View Single Post
Posts: 362 | Thanked: 426 times | Joined on Nov 2010 @ Italy, Lombardia
#54
Originally Posted by pali View Post
Has somebody idea how to rewrite that script to work with default busybox?
Replace:
Code:
...
uboot_size=$(wc -c "$uboot" | cut -f1 -d' ')
kernel_size=$(wc -c "$kernel" | cut -f1 -d' ')
...
dd if="/dev/zero" of="$output" bs=1 count="$uboot_append" conv=notrunc oflag=append 2>/dev/null
dd if="$kernel" of="$output" conv=notrunc oflag=append 2>/dev/null
...
With:
Code:
...
uboot_size=$(ls -l "$uboot" | tr -s ' ' | cut -f5 -d' ')
kernel_size=$(ls -l "$kernel" | tr -s ' ' | cut -f5 -d' ')
...
dd if="/dev/zero" of="$output" bs=1 count="$uboot_append"  seek="$uboot_size" 2>/dev/null
dd if="$kernel" of="$output" bs=512 seek="$(($uboot_max / 512))" 2>/dev/null
...
 

The Following 6 Users Say Thank You to Fabry For This Useful Post: