Re: uBoot broken on RPI2 Model B?

From: Karl Denninger <karl_at_denninger.net>
Date: Sat, 04 Mar 2023 02:35:35 UTC
On 3/3/2023 20:48, Karl Denninger wrote:
> On 3/3/2023 19:36, Mark Millard wrote:
>> On Mar 3, 2023, at 14:50, Karl Denninger<karl@denninger.net>  wrote:
>>
>> ......
>
> Hmmmm....
>
> I will grab the "latest" and compare.  The difference has to lie in 
> there /somewhere /since the snapshot does boot (I was looking for the 
> correct one and wasn't sure which one it was -- thanks/.)/
>
> It appears that the boot environment u-boot uses defaults to mmc 0, 
> but mmc0 does not exist.  Mmc 1 /does; /from the u-boot prompt if I 
> escape out I can select mmc 1 and, having done so, I can see the 
> device//(its characteristics show up once I select it/.)/
>
> What appears to be happening, however, is that the EFI loader thinks 
> it came from and thus should boot from 0, and fails as there's nothing 
> there.  Trying to get cute and use ubldr.bin instead didn't get me 
> anywhere either (I have an old boot.scr file which, when included, 
> does load the ubldr image but it hangs when it tries to start it and I 
> can't escape out of it.)
>
> Here's one thing that I found, and its probably the issue -- from the 
> snapshot:
>
> root@NewFS:/mnt2 # ls -al EFI/BOOT
> total 1384
> drwxr-xr-x  1 root  wheel     4096 Mar  1 23:36 .
> drwxr-xr-x  1 root  wheel     4096 Mar  1 23:36 ..
> -rwxr-xr-x  1 root  wheel  1407668 Mar  1 22:55 bootarm.efi
> root@NewFS:/mnt2 # file EFI/BOOT/bootarm.efi
> EFI/BOOT/bootarm.efi: MS-DOS executable PE32 executable (EFI 
> application) ARM Thumb, for MS Windows
>
> And from what was built (implying that the build code picked up the 
> *wrong* file, perhaps one missing things...)
>
> root@NewFS:/mnt # ls -al EFI/BOOT
> total 140
> drwxr-xr-x  1 root  wheel    4096 Feb 13 11:09 .
> drwxr-xr-x  1 root  wheel    4096 Feb 13 11:09 ..
> -rwxr-xr-x  1 root  wheel  133812 Feb 13 11:09 bootarm.efi
> root@NewFS:/mnt # file EFI/BOOT/bootarm.efi
> EFI/BOOT/bootarm.efi: MS-DOS executable PE32 executable (EFI 
> application) ARM Thumb, for MS Windows
>
> That one runs, but can't find anything -- and is 1/10th the size of 
> the one on the snapshot!  I will dig around and see if I can figure 
> that one out, because the same "pickup" works as expected for the Pi3, 
> so something odd is going on here.  A bit of swapping files around and 
> I bet I can figure it out; will post back when I do.
>
> Thanks.
>
Ok, so this is what's going on and I have figured it out.

The Crochet code was picking up boot1.efi which does run and should, 
you'd think, be enough to boot a MBR disk -- but isn't anymore.  The lua 
loader is not picked up by the build process and, once its put in the 
EFI directory it works and the unit boots.

I'll figure out where to get it from and fix the build -- the rest was 
ok, but the EFI loader was not.

Thanks -- now off to rebuild my poudriere environment for 13armv7 as 
what I have right now is for 12 and I need to rebuild the packages I use 
for 13.

-- 
Karl Denninger
karl@denninger.net
/The Market Ticker/
/[S/MIME encrypted email preferred]/