Environment to build U-Boot for Orange Pi 3 with SCP, ATF
Build on own machine:
- Please configure LXC on you distributive to be able run it in unpriveleged mode.
- Run lxcup.sh script
- It will create u-boot-sunxi-with-spl.bin in root path
How write U-boot image to SD card to first run your system (using your PC)
- Erase SD card and keep table partition: dd if=/dev/zero of=${card} bs=1k count=1023 seek=1
- Write image to SD card: dd if=u-boot-sunxi-with-spl.bin of=/dev/sda bs=1024 seek=8
How write U-Boot image to eMMC integrated in SBC (using your SBC)
- Disable Read-Only protection (after reboot it will with protection): echo 0 > /sys/block/mmcblk1boot0/force_ro && echo 0 > /sys/block/mmcblk1boot1/force_ro
- Install mmc-utils for you distributive. For Debian/Ubuntu run - sudo apt update && sudo apt install mmc-utils
- Reconfigure eMMC: mmc bootbus set single_hs x1 x4 /dev/mmcblk1 && mmc bootpart enable 1 1 /dev/mmcblk1
- Write U-Boot image to eMMC: dd if=u-boot-sunxi-with-spl.bin of=/dev/mmcblk1boot0 bs=4k
- Reboot your SBC.
Please make sure that your selected correct /dev/mmcblk or /dev/sd devices.
This info taken from: