4dd4a398cda1b1da9220b7dc2e78b4ca3871a1a7
[openwrt.git] / target / linux / rdc / image / mkimg_sitecom.pl
1 #!/usr/bin/perl
2
3 $bzimgsize = -s @ARGV[0];
4 $padding = 4 - ($bzimgsize + 2) % 4;
5 if ($padding == 4) {
6 $padding = 0; }
7 open (bzimg, @ARGV[0]);
8 while (<bzimg>) { $i .= $_; }
9 $i .= "\0"x$padding;
10 $i .= pack "v", -(unpack "%v*", $i);
11 print "CSYS";
12 print pack("V", length($i));
13 print pack("V", 0);
14 #-s @ARGV[1]
15 print "WRRM";
16 print pack("V", length($i));
17 print $i;
This page took 0.037526 seconds and 3 git commands to generate.