diff options
author | Florian Fainelli <florian@openwrt.org> | 2007-04-02 16:59:59 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2007-04-02 16:59:59 +0000 |
commit | 3e8d73d762c0e473bcfa49dbdc488b48ba57e06a (patch) | |
tree | 49b3d3f10ddedb39df71c2cdac6b597d2115a6cc /target/linux/rb1xx-2.6/image/gen_image.sh | |
parent | 75262124ba989c05a5840d8ad878429589e68249 (diff) | |
download | upstream-3e8d73d762c0e473bcfa49dbdc488b48ba57e06a.tar.gz upstream-3e8d73d762c0e473bcfa49dbdc488b48ba57e06a.tar.bz2 upstream-3e8d73d762c0e473bcfa49dbdc488b48ba57e06a.zip |
Add preliminary RouterBoard RB1xx support
SVN-Revision: 6839
Diffstat (limited to 'target/linux/rb1xx-2.6/image/gen_image.sh')
-rwxr-xr-x | target/linux/rb1xx-2.6/image/gen_image.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/target/linux/rb1xx-2.6/image/gen_image.sh b/target/linux/rb1xx-2.6/image/gen_image.sh new file mode 100755 index 0000000000..e812859797 --- /dev/null +++ b/target/linux/rb1xx-2.6/image/gen_image.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +OUTPUT="$1" +KERNELSIZE="$2" +KERNELIMAGE="$3" +ROOTFSSIZE="$4" +ROOTFSIMAGE="$5" + +rm -f "$OUTPUT" + +# create partition table +set `ptgen -o "$OUTPUT" -h 16 -s 32 -t 0x27 -p ${KERNELSIZE}m -t 0x83 -p ${ROOTFSSIZE}m` + +KERNELOFFSET="$(($1 / 512))" +ROOTFSOFFSET="$(($2 / 512))" + +dd if="$KERNELIMAGE" of="$OUTPUT" bs=512 conv=notrunc seek="$KERNELOFFSET" +dd if="$ROOTFSIMAGE" of="$OUTPUT" bs=512 conv=notrunc seek="$ROOTFSOFFSET" |