[3/4] config: u-boot: bypass the u-boot script on Traverse Ten64

Message ID 20221003062019.19636-4-matt@traverse.com.au
State Accepted
Commit 6efb611cbc97908cbd893806ceb82c167cddeb6a
Headers
Series kernel: aarch64: Add support for Traverse Ten64 board |

Commit Message

Mathew McBride Oct. 3, 2022, 6:20 a.m. UTC
  The Ten64 board runs a U-Boot which works best directly
booting EFI. Attempting to load your own DTB or other steps
will cause issues.
(see https://ten64doc.traverse.com.au/faq/#common-issues)

The current stable Ten64 firmware unfortunately searches for
boot.scr before bootaa64.efi. So redirect it back to the EFI path.

A future Ten64 firmware package will prefer EFI first before
any boot script avoiding this issue. I will provide a patch
reversing this when that day comes.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
---
 config/u-boot/boot.cmd | 9 +++++++++
 1 file changed, 9 insertions(+)
  

Comments

Michael Tremer Oct. 4, 2022, 8:57 a.m. UTC | #1
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>

> On 3 Oct 2022, at 07:20, Mathew McBride <matt@traverse.com.au> wrote:
> 
> The Ten64 board runs a U-Boot which works best directly
> booting EFI. Attempting to load your own DTB or other steps
> will cause issues.
> (see https://ten64doc.traverse.com.au/faq/#common-issues)
> 
> The current stable Ten64 firmware unfortunately searches for
> boot.scr before bootaa64.efi. So redirect it back to the EFI path.
> 
> A future Ten64 firmware package will prefer EFI first before
> any boot script avoiding this issue. I will provide a patch
> reversing this when that day comes.
> 
> Signed-off-by: Mathew McBride <matt@traverse.com.au>
> ---
> config/u-boot/boot.cmd | 9 +++++++++
> 1 file changed, 9 insertions(+)
> 
> diff --git a/config/u-boot/boot.cmd b/config/u-boot/boot.cmd
> index 64e9c05bc..a27996780 100644
> --- a/config/u-boot/boot.cmd
> +++ b/config/u-boot/boot.cmd
> @@ -1,3 +1,12 @@
> +# Traverse Ten64 board can boot EFI directly
> +# Redirect it to the EFI process already in the
> +# bootloader
> +# (Remove on release of the 1.x Ten64 firmwire package)
> +if test "${board}" = "ten64"; then
> +	load ${devtype} ${devnum}:2 ${kernel_addr_r} efi/boot/bootaa64.efi
> +	bootefi ${kernel_addr_r} ${fdt_addr_r}
> +fi;
> +
> if test ${boot_dev} = ""; then
> 	setenv boot_dev mmc;
> 	setenv root_dev /dev/mmcblk0p3;
> -- 
> 2.30.1
>
  
Mathew McBride Oct. 28, 2022, 4:41 a.m. UTC | #2
Hi Michael,

I finally had time to test the official Core 171 build on the Ten64.

The compiled boot script (config/u-boot/boot.scr) needs to be updated (using config/u-boot/boot.mk) to take effect.

As boot.scr is a binary file it is best for someone with commit access to update it.

I'm not sure why the compiled boot.scr is in the tree, though I could try modifying the u-boot build script to compile it. Unless there is some reason that I'm not aware of?

Best Regards,
Matt

On Tue, Oct 4, 2022, at 7:57 PM, Michael Tremer wrote:
> Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
> 
> > On 3 Oct 2022, at 07:20, Mathew McBride <matt@traverse.com.au> wrote:
> > 
> > The Ten64 board runs a U-Boot which works best directly
> > booting EFI. Attempting to load your own DTB or other steps
> > will cause issues.
> > (see https://ten64doc.traverse.com.au/faq/#common-issues)
> > 
> > The current stable Ten64 firmware unfortunately searches for
> > boot.scr before bootaa64.efi. So redirect it back to the EFI path.
> > 
> > A future Ten64 firmware package will prefer EFI first before
> > any boot script avoiding this issue. I will provide a patch
> > reversing this when that day comes.
> > 
> > Signed-off-by: Mathew McBride <matt@traverse.com.au>
> > ---
> > config/u-boot/boot.cmd | 9 +++++++++
> > 1 file changed, 9 insertions(+)
> > 
> > diff --git a/config/u-boot/boot.cmd b/config/u-boot/boot.cmd
> > index 64e9c05bc..a27996780 100644
> > --- a/config/u-boot/boot.cmd
> > +++ b/config/u-boot/boot.cmd
> > @@ -1,3 +1,12 @@
> > +# Traverse Ten64 board can boot EFI directly
> > +# Redirect it to the EFI process already in the
> > +# bootloader
> > +# (Remove on release of the 1.x Ten64 firmwire package)
> > +if test "${board}" = "ten64"; then
> > + load ${devtype} ${devnum}:2 ${kernel_addr_r} efi/boot/bootaa64.efi
> > + bootefi ${kernel_addr_r} ${fdt_addr_r}
> > +fi;
> > +
> > if test ${boot_dev} = ""; then
> > setenv boot_dev mmc;
> > setenv root_dev /dev/mmcblk0p3;
> > -- 
> > 2.30.1
> > 
> 
>
  

Patch

diff --git a/config/u-boot/boot.cmd b/config/u-boot/boot.cmd
index 64e9c05bc..a27996780 100644
--- a/config/u-boot/boot.cmd
+++ b/config/u-boot/boot.cmd
@@ -1,3 +1,12 @@ 
+# Traverse Ten64 board can boot EFI directly
+# Redirect it to the EFI process already in the
+# bootloader
+# (Remove on release of the 1.x Ten64 firmwire package)
+if test "${board}" = "ten64"; then
+	load ${devtype} ${devnum}:2 ${kernel_addr_r} efi/boot/bootaa64.efi
+	bootefi ${kernel_addr_r} ${fdt_addr_r}
+fi;
+
 if test ${boot_dev} = ""; then
 	setenv boot_dev mmc;
 	setenv root_dev /dev/mmcblk0p3;