#!/bin/sh # # convert raw initrd image to an U-Boot image and an image for QNAP TS-[12]19 # if [ $# -ne 1 ]; then echo "Usage: $0 " exit 1 fi rdpath=$1 path=/opt2/fedora/arm echo "Writing U-Boot ramdisk" mkimage -A arm -O linux -T ramdisk -C gzip -a 0x0 -e 0x0 -n "ramdisk" -d ${rdpath} ${rdpath}.uboot echo "Writing padded ramdisk" dd if=${rdpath} of=${rdpath}.padded ibs=9M conv=sync