projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
brcm47xx-2.6: add a few nops here, some irq saving there, blast the full cache on...
[openwrt.git]
/
target
/
linux
/
x86-2.6
/
image
/
gen_image.sh
diff --git
a/target/linux/x86-2.6/image/gen_image.sh
b/target/linux/x86-2.6/image/gen_image.sh
index
314d731
..
d48e372
100755
(executable)
--- a/
target/linux/x86-2.6/image/gen_image.sh
+++ b/
target/linux/x86-2.6/image/gen_image.sh
@@
-22,12
+22,15
@@
cyl=$(( ($KERNELSIZE + $ROOTFSSIZE) * 1024 * 1024 / ($head * $sect * 512)))
set `ptgen -o "$OUTPUT" -h $head -s $sect -p ${KERNELSIZE}m -p ${ROOTFSSIZE}m`
KERNELOFFSET="$(($1 / 512))"
set `ptgen -o "$OUTPUT" -h $head -s $sect -p ${KERNELSIZE}m -p ${ROOTFSSIZE}m`
KERNELOFFSET="$(($1 / 512))"
-ROOTFSOFFSET="$(($2 / 512))"
+KERNELSIZE="$(($2 / 512))"
+ROOTFSOFFSET="$(($3 / 512))"
+ROOTFSSIZE="$(($4 / 512))"
-BLOCKS="$((($
ROOTFSOFFSET - $KERNELOFFSET) / 2
- 1))"
+BLOCKS="$((($
KERNELSIZE / 2)
- 1))"
genext2fs -d "$KERNELDIR" -b "$BLOCKS" "$OUTPUT.kernel"
dd if="$OUTPUT.kernel" of="$OUTPUT" bs=512 seek="$KERNELOFFSET" conv=notrunc
genext2fs -d "$KERNELDIR" -b "$BLOCKS" "$OUTPUT.kernel"
dd if="$OUTPUT.kernel" of="$OUTPUT" bs=512 seek="$KERNELOFFSET" conv=notrunc
+[ -n "$PADDING" ] && dd if=/dev/zero of="$OUTPUT" bs=512 seek="$ROOTFSOFFSET" conv=notrunc count="$ROOTFSSIZE"
dd if="$ROOTFSIMAGE" of="$OUTPUT" bs=512 seek="$ROOTFSOFFSET" conv=notrunc
#rm -f "$OUTPUT.kernel"
dd if="$ROOTFSIMAGE" of="$OUTPUT" bs=512 seek="$ROOTFSOFFSET" conv=notrunc
#rm -f "$OUTPUT.kernel"
This page took
0.022821 seconds
and
4
git commands to generate.