1 ##############################################################################
4 # mkflashjffs2 -- construct an entire NETtel/SecureEdge x86 flash image.
6 # (C) Copyright 2001, Greg Ungerer (gerg@snapgear.com)
9 ##############################################################################
12 # Define the files to use.
14 FLASH=images/flash.bin
16 JFFSIMG=images/jffs2.img
18 ##############################################################################
22 echo "usage: mkflashjffs2"
26 ##############################################################################
29 # Check for any args...
40 SIZE=`cat $FLASH | wc -c`
41 PAD=`expr 1048576 - $SIZE`
42 echo "KERNEL: flash size=$SIZE padding=$PAD"
43 dd if=/dev/zero count=1 bs=$PAD 2> /dev/null | tr \\000 \\377 >> $FLASH
48 cat $JFFSIMG >> $FLASH
49 SIZE=`cat $FLASH | wc -c`
50 echo "IMG: flash size=$SIZE"