-dd if=$PATH_LOADER of=vmlinuz.tmp bs=$NEWSIZE conv=sync
-cat $PATH_ROOTFS >>vmlinuz.tmp
-../../../../staging_dir/host/bin/mkimage -A mips -O linux -T kernel -C none -a 0x400000 -e 0x400000 -n "ADM8668 Linux Kernel(2.4.31)" -d vmlinuz.tmp $OUTPUT
-rm vmlinuz.tmp
+dd if=$1 of=vmlinuz.tmp bs=$NEWSIZE conv=sync >/dev/null 2>&1
+shift
+appends=$(($# - 1))
+echo
+while [ $appends -gt 0 ]; do
+ dd if=$1 of=temp bs=64k conv=sync >/dev/null 2>&1
+ printf "### '%s' starts at 0x%x\n" "`basename $1`" "$((NEWSIZE+64))"
+ cat temp >>vmlinuz.tmp
+ shift
+ appends=$((appends-1))
+ NEWSIZE=$(stat -c%s vmlinuz.tmp)
+done
+echo
+../../../../staging_dir/host/bin/mkimage -A mips -O linux -T kernel \
+-C none -a 0x80400000 -e 0x80400000 -n "ADM8668 Linux Kernel(2.4.31)" \
+-d vmlinuz.tmp $1