]> git.siccegge.de Git - forks/vmdebootstrap.git/blob - examples/wandboard-customise.sh
add modules to cubietruck example and provide a wandboard example based on that.
[forks/vmdebootstrap.git] / examples / wandboard-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/wandboard_quad/u-boot.imx' ]; then
14 echo "Unable to find wandboard 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/wandboard_quad/u-boot.imx of=${image} seek=1 conv=fsync bs=1k
22
23 mkdir -p $rootdir/boot/dtbs
24 cp $rootdir/usr/lib/linux-image-*-armmp/* $rootdir/boot/dtbs
25
26 for module in ahci_platform ahci_imx sd-mod; do
27 echo ${module} >> ${rootdir}/etc/initramfs-tools/modules
28 done