05-11-2020, 01:23 PM
(This post was last modified: 05-11-2020, 01:32 PM by CameronNemo.)
Unfortunately I could not get even a basic boot.scr to work with mainline u-boot (the recent 2020.04 release). Does anyone have any tips for debugging or known-working images (idbloader.img and u-boot.itb) that I can use as reference?
Here is the boot.cmd I am using:
```
setenv blink_power 'led power off; sleep 0.1; led power on'
while true; do run blink_power; sleep 1; done
```
I am building the script image with:
```
mkimage -C none -A arm -T script -d boot.cmd boot.scr
```
The ATF/u-boot build recipes are here: https://github.com/void-linux/void-packages/pull/21198
My sfdisk config is:
```
label: gpt
unit: sectors
first-lba: 64
/dev/mmcblk1p1 : start= 64, size= 16320, type=8DA63339-0007-60C0-C436-083AC8230908, name="IDBLoader", attrs="RequiredPartition"
/dev/mmcblk1p2 : start= 16384, size= 8192, type=8DA63339-0007-60C0-C436-083AC8230908, name="U-Boot", attrs="RequiredPartition"
/dev/mmcblk1p3 : start= 24576, size= 8192, type=8DA63339-0007-60C0-C436-083AC8230908, name="TrustedFirmware-A", attrs="RequiredPartition"
/dev/mmcblk1p4 : start= 32768, size= 229376, type=L, name="BootFS", bootable, attrs="LegacyBIOSBootable"
/dev/mmcblk1p6 : start= 262144, type=L, name="RootFS"
```
I then flash the images to the first two partitions, make a 32 bit FAT filesystem on the bootfs, mount it, and copy the boot.scr into the bootfs.
Here is the boot.cmd I am using:
```
setenv blink_power 'led power off; sleep 0.1; led power on'
while true; do run blink_power; sleep 1; done
```
I am building the script image with:
```
mkimage -C none -A arm -T script -d boot.cmd boot.scr
```
The ATF/u-boot build recipes are here: https://github.com/void-linux/void-packages/pull/21198
My sfdisk config is:
```
label: gpt
unit: sectors
first-lba: 64
/dev/mmcblk1p1 : start= 64, size= 16320, type=8DA63339-0007-60C0-C436-083AC8230908, name="IDBLoader", attrs="RequiredPartition"
/dev/mmcblk1p2 : start= 16384, size= 8192, type=8DA63339-0007-60C0-C436-083AC8230908, name="U-Boot", attrs="RequiredPartition"
/dev/mmcblk1p3 : start= 24576, size= 8192, type=8DA63339-0007-60C0-C436-083AC8230908, name="TrustedFirmware-A", attrs="RequiredPartition"
/dev/mmcblk1p4 : start= 32768, size= 229376, type=L, name="BootFS", bootable, attrs="LegacyBIOSBootable"
/dev/mmcblk1p6 : start= 262144, type=L, name="RootFS"
```
I then flash the images to the first two partitions, make a 32 bit FAT filesystem on the bootfs, mount it, and copy the boot.scr into the bootfs.