diff --git a/README.md b/README.md index ab09942..4630a8b 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ This is the external Buildroot repository used to build system images and updates for the MynaPlayer project. -BUILDING +Building -------- -Building MynaPlayer is a easy process, though it requires decent hardware. +Building MynaPlayer is an easy process, though it requires decent hardware. First install Buildroot's required dependencies. See: [The buildroot user manual, chapter 2: System requirements](https://buildroot.org/downloads/manual/manual.html#requirement) @@ -13,12 +13,16 @@ ``` mkdir MYNA && cd MYNA -git clone -b v3.0.7 'https://github.com/OpenVPN/easy-rsa' -git clone -b 2020.05.x 'https://git.buildroot.net/buildroot' +wget 'https://github.com/OpenVPN/easy-rsa/releases/download/v3.0.7/EasyRSA-3.0.7.tgz' +wget 'https://git.buildroot.net/buildroot/snapshot/buildroot-2020.05.1.tar.gz' +tar -xf EasyRSA-3.0.7.tgz +tar -xf buildroot-2020.05.1.tar.gz +mv EasyRSA-3.0.7 easy-rsa +mv buildroot-2020.05.1 buildroot git clone 'https://git.lumina-sensum.com/git/LuminaSensum/buildroot-MynaPlayer.git' export BR2_EXTERNAL="$PWD/buildroot-MynaPlayer" cd buildroot -git am ../buildroot-MynaPlayer/buildroot-patches/*.patch +for p in ../buildroot-MynaPlayer/buildroot-patches/*.patch; do patch -p1 < $p; done cd .. ``` @@ -44,20 +48,47 @@ ``` cd buildroot -make O=output_initramfs myna_player_odyssey_initramfs_defconfig -make O=output_initramfs -j8 -make O=output_rootfs myna_player_odyssey_defconfig -make O=output_rootfs -j8 +make O=output_build myna_player_odyssey_defconfig +make O=output_build -j8 cd .. ``` -Copy RAUC bundles and keys to a server (www.jookia.org in this example): +Installing via dd +----------------- + +For the initial install of Buildroot you'll need to write a full system image to your board's storage. + +To flash to eMMC, first boot Linux from an SD card on the board. See [Seeed's ODYSSEY STM32MP157C Wiki page](https://wiki.seeedstudio.com/ODYSSEY-STM32MP157C/) for instructions on how to do this. + +First, copy the image to the board from your build server. In this case I'll use SFTP over SSH: ``` -ls buildroot/output_rootfs/images/ +sftp build-server:/home/jookia/MYNA/buildroot/output_build/images/MynaPlayer.img . +``` + +Now write it to the eMMC: + +``` +dd if=MynaPlayer.img of=/dev/mmcblk0 +``` + +Switch to eMMC boot and reboot. + +You can use this method to install updates, but it's much slower compared to RAUC. + +Updating via RAUC +----------------- + +To update using RAUC you'll need a server to host the files. +In this example I'll be using a HTTP server (www.jookia.org) which serves contents from /var/www/www.jookia.org/. + +First, copy RAUC bundles and keys to your server: + +``` +ls buildroot/output_build/images/ # Find the file ending in *.raucb # You can also just flash MynaPlayer.img using dd but it takes a long time -mv buildroot/output_rootfs/images/bundle-MynaPlayer-2020-08-06.fe2ca3ce-be36-4f33-94d4-e295cd0518be.raucb /var/www/www.jookia.org/ +mv buildroot/output_build/images/bundle-MynaPlayer-2020-08-06.fe2ca3ce-be36-4f33-94d4-e295cd0518be.raucb /var/www/www.jookia.org/ cp $PWD/easy-rsa/pki/ca.crt /var/www/www.jookia.org/ chmod a+r /var/www/www.jookia.org/ca.crt ```