summaryrefslogtreecommitdiff
path: root/target/linux/rb532-2.6/base-files/sbin
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-12-06 18:31:28 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-12-06 18:31:28 +0000
commit440a0b6f4ad94c56cadaf9d45ab79f62ebbe7f3d (patch)
tree90a4c4a25d820e450f23fec4bc08441ffc1ae871 /target/linux/rb532-2.6/base-files/sbin
parentda4077f1bc0dadf4dfa7633761c53aed8ca0f2c7 (diff)
replace the ugly rb532 cmdline hack with a cleaner one that does not depend on magic offsets
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5699 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/rb532-2.6/base-files/sbin')
-rwxr-xr-xtarget/linux/rb532-2.6/base-files/sbin/cf2nand9
1 files changed, 2 insertions, 7 deletions
diff --git a/target/linux/rb532-2.6/base-files/sbin/cf2nand b/target/linux/rb532-2.6/base-files/sbin/cf2nand
index f8576beaa4..3f3352fd1b 100755
--- a/target/linux/rb532-2.6/base-files/sbin/cf2nand
+++ b/target/linux/rb532-2.6/base-files/sbin/cf2nand
@@ -6,13 +6,8 @@ copy_kernel() {
local output="$2"
local cmdline="$3"
size="$(echo -n "$cmdline" | wc -c)"
- dd if="$input" bs=3M count=1 | (
- dd bs=4112 count=1
- echo -n "$cmdline"
- dd if=/dev/zero bs="$((512 - $size))" count=1
- dd bs=512 count=1 of=/dev/null
- cat
- ) > "$output"
+ dd if="$input" bs=3M count=1 > "$output"
+ /sbin/patch-cmdline "$output" "$cmdline"
}
fstype="$(mount | grep ' / ' | awk '{print $5}')"