Glad to hear! :-)
-Ash

From: François Ozog <francois.ozog@linaro.org>
Sent: 17 April 2020 14:55
To: Ash Wilding <Ash.Wilding@arm.com>
Cc: Manish Pandey2 <Manish.Pandey2@arm.com>; tf-a@lists.trustedfirmware.org <tf-a@lists.trustedfirmware.org>
Subject: Re: [TF-A] Linux as BL33
 


On Thu, 16 Apr 2020 at 20:06, Ash Wilding <Ash.Wilding@arm.com> wrote:

Hi @François,

 

<quote>

Now, I changed U-Boot to Image, added code to ensure arg0 is 0 (DTB) but Linux does not start (zero printk visible).

I don't find kernel text base anymore, may be it disappeared: any suggestion to get the kernel start when loaded at 64KB offset?

the kernel image with embedded initrd is 10MB, SRAM is at 64MB so there should be enough space to decompress initrd...

</quote>

 

 

I recommend reading through the arm64 Linux booting requirements if you haven’t already; you’ll need to ensure all of those conditions are met before entering the kernel [1].

 

For example have you correctly set text_offset in the image header?

 

<quote>

  u32 code0;                                        /* Executable code */

  u32 code1;                                        /* Executable code */

  u64 text_offset;                              /* Image load offset, little endian */

  u64 image_size;                              /* Effective Image size, little endian */

  u64 flags;                                           /* kernel flags, little endian */

  u64 res2             = 0;                         /* reserved */

  u64 res3             = 0;                         /* reserved */

  u64 res4             = 0;                         /* reserved */

  u32 magic         = 0x644d5241;   /* Magic number, little endian, "ARM\x64" */

  u32 res5;                                           /* reserved (used for PE COFF offset) */

</quote>

 

<quote>

The Image must be placed text_offset bytes from a 2MB aligned base address anywhere in usable system RAM and called there.

</quote>

 

Thanks for the pointers. It now works nicely! I'll check with Marvell if they want to upstream a polished version of my hacks ;-) 
(I experienced a "you stupid" moment.... I placed the DTB for Linux where U-Boot was initially: at MARVELL_RAM_BASE=0..... and you know what? I did envision it looked like a NULL data pointer at all!!!!!!)
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


--
François-Frédéric Ozog | Director Linaro Edge & Fog Computing Group
T: +33.67221.6485
francois.ozog@linaro.org | Skype: ffozog

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.