Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 May 2021 04:08:51 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        Emmanuel Vadot <manu@bidouilliste.com>
Cc:        "freebsd-arm@freebsd.org" <arm@freebsd.org>
Subject:   Re: /usr/local/share/u-boot/u-boot-orangepi-plus-2e/README out of date ;  orangepi-plus-2e and RPi2 v1.1 get "Kernel args: (null)"
Message-ID:  <CF0EE6DE-6E9D-4011-892F-6F546325AEC9@yahoo.com>
In-Reply-To: <20210513124050.47714a83f876d67a80e28080@bidouilliste.com>
References:  <40298C05-5F50-4437-B15B-7A02EA070EAE.ref@yahoo.com> <40298C05-5F50-4437-B15B-7A02EA070EAE@yahoo.com> <20210513111517.86336633bae9568d8599f229@bidouilliste.com> <B1C79772-0C68-479B-9A27-6F8CF5037724@yahoo.com> <20210513124050.47714a83f876d67a80e28080@bidouilliste.com>

next in thread | previous in thread | raw e-mail | index | archive | help


> On 2021-May-13, at 03:40, Emmanuel Vadot <manu at bidouilliste.com> =
wrote:
>=20
> On Thu, 13 May 2021 02:57:21 -0700
> Mark Millard <marklmi@yahoo.com> wrote:
>=20
>>> On 2021-May-13, at 02:15, Emmanuel Vadot <manu at bidouilliste.com> =
wrote:
>>>=20
>>> On Thu, 13 May 2021 01:52:08 -0700
>>> Mark Millard via freebsd-arm <freebsd-arm@freebsd.org> wrote:
>>>=20
>>>> The updated armv7 U-Boot ports now install the likes of:
>>>>=20
>>>> # ls -Tldt /usr/local/share/u-boot/u-boot-orangepi-plus-2e/*
>>>> -rw-r--r--  1 root  wheel     504 May 12 07:01:10 2021 =
/usr/local/share/u-boot/u-boot-orangepi-plus-2e/README
>>>> -rw-r--r--  1 root  wheel      66 May 12 07:01:10 2021 =
/usr/local/share/u-boot/u-boot-orangepi-plus-2e/metadata
>>>> -rw-r--r--  1 root  wheel  490924 May 12 07:01:10 2021 =
/usr/local/share/u-boot/u-boot-orangepi-plus-2e/u-boot-sunxi-with-spl.bin
>>>>=20
>>>> # ls -Tldt /usr/local/share/u-boot/u-boot-rpi2/*
>>>> -rw-r--r--  1 root  wheel      767 May 12 06:39:07 2021 =
/usr/local/share/u-boot/u-boot-rpi2/README
>>>> -rw-r--r--  1 root  wheel       44 May 12 06:39:07 2021 =
/usr/local/share/u-boot/u-boot-rpi2/metadata
>>>> -rw-r--r--  1 root  wheel   475420 May 12 06:39:07 2021 =
/usr/local/share/u-boot/u-boot-rpi2/u-boot.bin
>>>>=20
>>>> So, for example, no boot.scr files ro go with ubldr.bin
>>>> any more.
>>>>=20
>>>> But the u-boot-orangepi-plus-2e/README says . . .
>>>>=20
>>>> QUOTE
>>>> This version is patched so that:
>>>> * API features are enabled.
>>>> * A boot.scr (U-Boot script) that loads ubldr.bin and execute it is =
included
>>>> END QUOTE
>>>>=20
>>>> The u-boot-rpi2/README says . . .
>>>>=20
>>>> QUOTE
>>>> This version is patched so that:
>>>> * ELF and API features are enabled.
>>>> * The distroboot command knows how to load FreeBSD loader(8)
>>>> * By default, it loads ubldr.bin (PIE) from file ubldr.bin on the =
FAT
>>>>  partition to address ${kernel_addr_r}, and launches it. If =
ubldr.bin is
>>>>  not found, it falls back on ubldr
>>>> END QUOTE
>>>>=20
>>>=20
>>> Oups, I'll update the README, thanks for noticing this.
>>=20
>> FYI: I only looked at examples for which I've access
>> to operational hardware.
>>=20
>>>> But for the orangepi-plus-2e that I have access to I
>>>> now get:
>>>>=20
>>>> . . .
>>>> Hit [Enter] to boot immediately, or any other key for command =
prompt.
>>>> Booting [/boot/kernel/kernel]...              =20
>>>> Using DTB provided by EFI at 0x47eea000.
>>>> Kernel entry at 0xb2e00200...
>>>> Kernel args: (null)
>>>=20
>>> This is the symptoms when caches are not flushed.
>>> U-Boot distroboot first scans for extlinux.conf, then uboot script =
and
>>> then EFI. So this probably means that you still have a boot.scr on =
the
>>> ESP, try removing that and make sure that you have the efi loader =
too
>>> in efi/boot/bootarm.efi.
>>=20
>> That is not the issue . . . showing more context
>> from the same recorded boot attempts (blank lines
>> and a huge number of escape sequences removed, and
>> using ". . ." for other omitted text):
>>=20
>> U-Boot 2021.04 (Apr 09 2021 - 19:24:51 +0000) Allwinner Technology
>> CPU:   Allwinner H3 (SUN8I 1680)
>> Model: Xunlong Orange Pi Plus 2E
>> DRAM:  2 GiB
>> . . .
>> =08FreeBSD/arm EFI loader, Revision 1.1
>>   Command line arguments: l
>>   Image base: 0xb8dd5000
>>   EFI version: 2.80
>>   EFI Firmware: Das U-Boot (rev 8225.1024)
>>   Console: comconsole (0)
>>   Load Path: /efi\boot\bootarm.efi
>> . . .
>> Found EFI removable media binary efi/boot/bootarm.efi
>> 1396100 bytes read in 36 ms (37 MiB/s)
>> Booting /efi\boot\bootarm.efi
>> Consoles: EFI console =20
>> |=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08=
-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08    Reading loader env vars from =
/efi/freebsd/loader.env
>> . . .
>> Hit [Enter] to boot immediately, or any other key for command prompt.
>> Booting [/boot/kernel/kernel]...              =20
>> Using DTB provided by EFI at 0x47eea000.
>> Kernel entry at 0xb2e00200...
>> Kernel args: (null)
>=20
> I cannot reproduce this here. Either by creating an image on the
> sdcard by hand (I usually only netboot my boards so the sdcard have
> only u-boot and a fat partition so u-boot can save its env) or by
> taking FreeBSD-13.0-RELEASE-arm-armv7-GENERICSD.img and adding
> u-boot on it.
> This was tested on an orangepi-one board (so same SoC, Allwinner H3)
> and on a BeagleBoneBlack.
> I suggest to try with a clean install from
> FreeBSD-13.0-RELEASE-arm-armv7-GENERICSD.img just to be sure.

In my context:

The RPi2 v1.1 has a microsd card with just bootcode.bin .
The rest is from the USB3 SSD media. (Such worked before
the U-Boot update, for example.)

The orangepi-plus-2e has a microsd card with just its
(now updated) U-Boot and empty file systems. The rest
is from the USB3 SSD media.

It is the same USB3 SSD boot media used for both.

It is the same media I've been using right along,
just updated to remove the old U-Boot related
extra materials and to copy over the new U-Boot
for the RPi2 V1.1.

The media has a non-debug head [so: 14] build, based
on:

merge-base: 7381bbee29df959e88ec59866cf2878263e7f3b2
merge-base: CommitDate: 2021-03-12 20:29:42 +0000
7381bbee29df (freebsd/main, freebsd/HEAD, pure-src, main) cam: Run all =
XPT_ASYNC ccbs in a dedicated thread
n245444 (--first-parent --count for merge-base)

It has been working the whole time since then until
this change. It is a build with code generation
tuned for cortex-A7, as is my normal for my own
builds for armv7.

I need to get some sleep. So it will be some time
before I try any other forms of experiments.

>> and:
>>=20
>> U-Boot 2021.04 (May 12 2021 - 13:36:42 +0000)
>> DRAM:  948 MiB
>> RPI 2 Model B (0xa21041)
>> . . .
>> =08FreeBSD/arm EFI loader, Revision 1.1
>>   Command line arguments: l
>>   Image base: 0x39df8000
>>   EFI version: 2.80
>>   EFI Firmware: Das U-Boot (rev 8225.1024)
>>   Console: comconsole (0)
>>   Load Path: /efi\boot\bootarm.efi
>> . . .
>> Found EFI removable media binary efi/boot/bootarm.efi
>> 1396100 bytes read in 38 ms (35 MiB/s)
>> libfdt fdt_check_header(): FDT_ERR_BADMAGIC
>=20
> This line doesn't looks good.

Yea, I noticed it but have done no investigation
as yet. (Only the RPi2 v1.1 that message. It is
the one notable difference.)

>> Booting /efi\boot\bootarm.efi
>> Consoles: EFI console =20
>> |=08/=08-=08\=08|=08/=08-=08\=08|=08/=08    Reading loader env vars =
from /efi/freebsd/loader.env
>> . . .
>> Hit [Enter] to boot immediately, or any other key for command prompt.
>> Booting [/boot/kernel/kernel]...              =20
>> Using DTB provided by EFI at 0x7ef6000.
>> Kernel entry at 0x33e00200...
>> Kernel args: (null)
>>=20
>> No *.scr files, no ubldr* files. Showing
>> from the efi partition mounted on a Rock64:
>>=20
>> # find /mnt/dtb/ -print
>> /mnt/dtb/
>> /mnt/dtb/sun8i-h3-orangepi-plus2e.dtb
>> /mnt/dtb/overlays
>> /mnt/dtb/overlays/sun8i-h3-i2c0.dtbo
>> /mnt/dtb/overlays/spigen-rpi2.dtbo
>>=20
>> # find /mnt/efi/ -print
>> /mnt/efi/
>> /mnt/efi/boot
>> /mnt/efi/boot/bootarm.efi
>>=20
>> # ls -Tld /mnt/u*
>> -rwxr-xr-x  1 root  wheel  475420 May 12 06:39:06 2021 =
/mnt/u-boot.bin
>>=20
>> # ls -Tld /mnt/*.scr
>> ls: /mnt/*.scr: Invalid argument
>>=20
>> I'll not list the files from the RPi* firmware.
>>=20
>>=20
>>>> and that is the last of the output.
>>>>=20
>>>> The RPi2 v1.1 is similar:
>>>>=20
>>>> Hit [Enter] to boot immediately, or any other key for command =
prompt.
>>>> Booting [/boot/kernel/kernel]...              =20
>>>> Using DTB provided by EFI at 0x7ef6000.
>>>> Kernel entry at 0x33e00200...
>>>> Kernel args: (null)
>>>>=20
>>>> and that is the last of the output.
>>=20

=3D=3D=3D
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CF0EE6DE-6E9D-4011-892F-6F546325AEC9>