BelaPlatform / bela-image-builder

Scripts to build a Bela image from scratch
MIT License
37 stars 16 forks source link

Add goodies in the BELABOOT partition #31

Closed giuliomoro closed 7 years ago

giuliomoro commented 7 years ago
giuliomoro commented 7 years ago

After adding the drivers tomisc/boot/drivers in 2be535b, I tried this

diff --git a/scripts/create_img.sh b/scripts/create_img.sh
index 6703b46..1fd0660 100755
--- a/scripts/create_img.sh
+++ b/scripts/create_img.sh
@@ -40,6 +40,9 @@ rm ${DIR}/boot/uEnv.tmp
 sudo cp -v ${DIR}/boot/MLO /mnt/bela/boot/
 sudo cp -v ${DIR}/boot/u-boot.img /mnt/bela/boot/
 sudo cp -v $targetdir/opt/Bela/am335x-bone-bela*.dtb /mnt/bela/boot/
+# copying static extras to boot partition
+sudo cp -rv ${DIR}/misc/boot/* /mnt/bela/boot/
+
 # copy rootfs
 sudo cp -a ${DIR}/rootfs/* /mnt/bela/root/

Size of the drivers/ folder is about 3.6MB

However it produces an image that does not boot. @LBDonovan any idea?

LBDonovan commented 7 years ago

To boot properly MLO and u-boot.img have to be the first things copied onto the partition. It looks like you're doing that but maybe add a sync after copying the bootloaders, or maybe copy the drivers later after the rootfs?

giuliomoro commented 7 years ago

the sync did it