Tags: patch

Hi Vagrant, thanks for looking at this.


On Fri, 15 Jan 2021, Vagrant Cascadian wrote:
> This is fairly new in u-boot, but yes, it's probably possible in most 
> cases with recent u-boot versions.

Great.  I've tried making that change to debian/targets in version 
2021.01+dfsg-1 (patch is below) and rebuilding, and I've verified that 
for all eleven arm64 sunxi platforms:

- u-boot-sunxi-with-spl.bin is equal to spl/sunxi-spl.bin concatenated 
    with u-boot-sunxi-with-spl.fit.fit
- spl/sunxi-spl.bin is 32K in size
- u-boot-sunxi-with-spl.fit.fit differs from u-boot-sunxi-with-spl.fit.itb 
    only in a timestamp

Therefore, for each of these platforms, writing u-boot-sunxi-with-spl.bin 
to the card at offset 8K should work just as well as writing the SPL at 
8K and the FIT image at 40K, which the current u-boot-install-sunxi 
script does.  I've confirmed that it works on the Orange Pi One Plus.


> > That would mean we could further simplify the u-boot-install-sunxi script.
> 
> This part is already done in the 2021.01~rc version experimental.

I saw that version, thanks, but I was proposing to further simplify the 
script by making it write just one file to the card rather than two. 
I've double-checked and I'm sure my patch to that script doesn't 
duplicate any changes already made.  The full list of changes in the 
patch is:

- Improve 'Specify target' error message
- Remove check for mkimage which is no longer used
- Avoid creating tempfiles in current directory
- Write one combined file to card rather than two components
- Sync on the write operation rather than separately


> > Out of interest, what's the reason for including uboot.elf? 
> 
> I tried removing it at some point, but some platforms require it 
> (e.g. p2371-2180 in u-boot-tegra).

OK.  What do you think of the idea of installing it only where needed? 
Perhaps it could be listed explicitly in debian/targets for those 
platforms that require it.

Thanks very much,
Harold.

--- debian/targets      2021-01-19 06:18:39.675829807 +0000
+++ debian/targets.simplified   2021-01-19 06:18:54.167504580 +0000
@@ -229,37 +229,37 @@
 arm64  rpi             rpi_arm64       u-boot.bin
 
 # Rodrigo Exterckötter Tjäder <rodr...@tjader.xyz>
-arm64  sunxi           a64-olinuxino   
/usr/lib/arm-trusted-firmware/sun50i_a64/bl31.bin u-boot.bin spl/sunxi-spl.bin 
u-boot-nodtb.bin arch/arm/dts/sun50i-a64-olinuxino.dtb 
u-boot-sunxi-with-spl.fit.itb
+arm64  sunxi           a64-olinuxino   
/usr/lib/arm-trusted-firmware/sun50i_a64/bl31.bin u-boot-sunxi-with-spl.bin
 
 # Philip Rinn <ri...@inventati.org>
-arm64  sunxi           a64-olinuxino-emmc      
/usr/lib/arm-trusted-firmware/sun50i_a64/bl31.bin u-boot.bin spl/sunxi-spl.bin 
u-boot-nodtb.bin arch/arm/dts/sun50i-a64-olinuxino-emmc.dtb 
u-boot-sunxi-with-spl.fit.itb
+arm64  sunxi           a64-olinuxino-emmc      
/usr/lib/arm-trusted-firmware/sun50i_a64/bl31.bin u-boot-sunxi-with-spl.bin
 
 # Domenico Andreoli <ca...@debian.org>
-arm64  sunxi           nanopi_neo2     
/usr/lib/arm-trusted-firmware/sun50i_a64/bl31.bin u-boot.bin spl/sunxi-spl.bin 
u-boot-nodtb.bin arch/arm/dts/sun50i-h5-nanopi-neo2.dtb 
u-boot-sunxi-with-spl.fit.itb
+arm64  sunxi           nanopi_neo2     
/usr/lib/arm-trusted-firmware/sun50i_a64/bl31.bin u-boot-sunxi-with-spl.bin
 
 # Steev Klimaszewski <st...@kali.org>
-arm64  sunxi           nanopi_neo_plus2        
/usr/lib/arm-trusted-firmware/sun50i_a64/bl31.bin u-boot.bin spl/sunxi-spl.bin 
u-boot-nodtb.bin arch/arm/dts/sun50i-h5-nanopi-neo-plus2.dtb 
u-boot-sunxi-with-spl.fit.itb
+arm64  sunxi           nanopi_neo_plus2        
/usr/lib/arm-trusted-firmware/sun50i_a64/bl31.bin u-boot-sunxi-with-spl.bin
 
 # Frederic Danis <frederic.da...@collabora.com>
-arm64  sunxi           orangepi_zero_plus2     
/usr/lib/arm-trusted-firmware/sun50i_a64/bl31.bin u-boot.bin spl/sunxi-spl.bin 
u-boot-nodtb.bin arch/arm/dts/sun50i-h5-orangepi-zero-plus2.dtb 
u-boot-sunxi-with-spl.fit.itb
+arm64  sunxi           orangepi_zero_plus2     
/usr/lib/arm-trusted-firmware/sun50i_a64/bl31.bin u-boot-sunxi-with-spl.bin
 
 # harr...@gmx.ph
-arm64  sunxi           orangepi_one_plus       
/usr/lib/arm-trusted-firmware/sun50i_h6/bl31.bin u-boot.bin spl/sunxi-spl.bin 
u-boot-nodtb.bin arch/arm/dts/sun50i-h6-orangepi-one-plus.dtb 
u-boot-sunxi-with-spl.fit.itb
+arm64  sunxi           orangepi_one_plus       
/usr/lib/arm-trusted-firmware/sun50i_h6/bl31.bin u-boot-sunxi-with-spl.bin
 
 # Vagrant Cascadian <vagr...@debian.org>
-arm64  sunxi           pine64_plus     
/usr/lib/arm-trusted-firmware/sun50i_a64/bl31.bin u-boot.bin spl/sunxi-spl.bin 
u-boot-nodtb.bin arch/arm/dts/sun50i-a64-pine64-plus.dtb 
arch/arm/dts/sun50i-a64-pine64.dtb u-boot-sunxi-with-spl.fit.itb
+arm64  sunxi           pine64_plus     
/usr/lib/arm-trusted-firmware/sun50i_a64/bl31.bin u-boot-sunxi-with-spl.bin
 
 # Sunil Mohan Adapa <su...@medhas.org>
-arm64  sunxi           pine64-lts      
/usr/lib/arm-trusted-firmware/sun50i_a64/bl31.bin u-boot.bin spl/sunxi-spl.bin 
u-boot-nodtb.bin arch/arm/dts/sun50i-a64-pine64-lts.dtb 
arch/arm/dts/sun50i-a64-pine64.dtb u-boot-sunxi-with-spl.fit.itb
+arm64  sunxi           pine64-lts      
/usr/lib/arm-trusted-firmware/sun50i_a64/bl31.bin u-boot-sunxi-with-spl.bin
 
 # Vagrant Cascadian <vagr...@debian.org>
-arm64  sunxi           pinebook        
/usr/lib/arm-trusted-firmware/sun50i_a64/bl31.bin u-boot.bin spl/sunxi-spl.bin 
u-boot-nodtb.bin arch/arm/dts/sun50i-a64-pinebook.dtb 
u-boot-sunxi-with-spl.fit.itb
+arm64  sunxi           pinebook        
/usr/lib/arm-trusted-firmware/sun50i_a64/bl31.bin u-boot-sunxi-with-spl.bin
 
 # Benoit Delcour <benoit.delc...@gmail.com>
-arm64  sunxi           pinephone       
/usr/lib/arm-trusted-firmware/sun50i_a64/bl31.bin u-boot.bin spl/sunxi-spl.bin 
u-boot-nodtb.bin arch/arm/dts/sun50i-a64-pinephone-1.2.dtb 
u-boot-sunxi-with-spl.fit.itb
+arm64  sunxi           pinephone       
/usr/lib/arm-trusted-firmware/sun50i_a64/bl31.bin u-boot-sunxi-with-spl.bin
 
 # Jonas Smedegaard <d...@jones.dk>
-arm64  sunxi           teres_i         
/usr/lib/arm-trusted-firmware/sun50i_a64/bl31.bin u-boot.bin spl/sunxi-spl.bin 
u-boot-nodtb.bin arch/arm/dts/sun50i-a64-teres-i.dtb 
u-boot-sunxi-with-spl.fit.itb
+arm64  sunxi           teres_i         
/usr/lib/arm-trusted-firmware/sun50i_a64/bl31.bin u-boot-sunxi-with-spl.bin
 
 # Vagrant Cascadian <vagr...@debian.org>
 arm64  tegra           p2371-2180      u-boot.bin

Reply via email to