]> git.siccegge.de Git - forks/vmdebootstrap.git/blob - examples/cubietruck-customise.sh
4d436ae3fa813f5d691777690b189e0cd8b3164d
[forks/vmdebootstrap.git] / examples / cubietruck-customise.sh
1 #!/bin/sh
2
3 set -e
4
5 rootdir=$1
6 image=$2
7
8 if [ -z "${image}" ]; then
9 echo "Image not specified"
10 exit
11 fi
12
13 if [ ! -f '/usr/lib/u-boot/Cubietruck/u-boot-sunxi-with-spl.bin' ]; then
14 echo "Unable to find cubietruck u-boot file"
15 exit
16 fi
17
18 # u-boot needs to be dd'd to the device, not a partition
19 # but kpartx does not setup the device, just the partitions
20
21 dd if=/usr/lib/u-boot/Cubietruck/u-boot-sunxi-with-spl.bin of=${image} bs=1k seek=8
22
23 mkdir -p $rootdir/boot/dtbs
24 cp $rootdir/usr/lib/linux-image-*-armmp/* $rootdir/boot/dtbs