X-Git-Url: https://git.siccegge.de//index.cgi?a=blobdiff_plain;f=examples%2Fcubietruck-customise.sh;h=1a66bf92e6452f45c9b8889e070b4d9bc16d3209;hb=857094af5a523d4e746cada537595f849f4281a4;hp=74a0d5b209507cb4b4893a4a5b0c4ab1ab4d8de2;hpb=9d8a5152b0a56ec94bbf43c37539f6760a3a1404;p=forks%2Fvmdebootstrap.git diff --git a/examples/cubietruck-customise.sh b/examples/cubietruck-customise.sh index 74a0d5b..1a66bf9 100755 --- a/examples/cubietruck-customise.sh +++ b/examples/cubietruck-customise.sh @@ -3,10 +3,26 @@ set -e rootdir=$1 +image=$2 -# u-boot needs to be dd'd to the partition -#cp /usr/lib/u-boot/Cubietruck/uboot.elf /boot/ -#cp /usr/lib/u-boot/Cubietruck/u-boot-sunxi-with-spl.bin /boot/ +if [ -z "${image}" ]; then + echo "Image not specified" + exit +fi + +if [ ! -f '/usr/lib/u-boot/Cubietruck/u-boot-sunxi-with-spl.bin' ]; then + echo "Unable to find cubietruck u-boot file" + exit +fi + +# u-boot needs to be dd'd to the device, not a partition +# but kpartx does not setup the device, just the partitions + +dd if=/usr/lib/u-boot/Cubietruck/u-boot-sunxi-with-spl.bin of=${image} bs=1k seek=8 mkdir -p $rootdir/boot/dtbs cp $rootdir/usr/lib/linux-image-*-armmp/* $rootdir/boot/dtbs + +for module in phy-sun4i-usb ohci-platform; do + echo ${module} >> ${rootdir}/etc/initramfs-tools/modules +done