Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: netbsd-9, boot, EFI and device tree

On Mon, Apr 26, 2021 at 01:57:51PM +0200, Manuel Bouyer wrote:
> On Mon, Apr 26, 2021 at 01:40:25PM +0200, tlaronde%polynum.com@localhost wrote:
> > On Sun, Apr 25, 2021 at 06:42:19PM +0200, Manuel Bouyer wrote:
> > > 
> > > My problem is that I need a custom device tree (activate SPI2, more
> > > devices on I2C2, and so on). For this I found that there is a
> > > fdtfile variable in u-boot, that contains a dts file name which will
> > > be loaded from /dts/ on the FAT. So this part is solved.
> > > 
> > > The second issue (but not for this project) is that I need some
> > > kernel command line parameters (console=xxx, root=yyy for example).
> > > With u-boot loading netbsd.ub, I can set this in an u-boot variable.
> > > But I don't know how to do this with the EFI second-stage boot loader.
> > 
> > Setting via U-Boot the environment variable "bootargs" should do it. (I
> > looked at the finger---the armv7 code---and not at the moon: the common
> > efiboot code. The env is read.)
> thanks, I confirm that it works. I did
> setenv bootargs "-s"
> in u-boot and the board did boot single user.
> It would be nice if the fdtfile and bootargs variables were documented
> somewhere

Yes and there is more than these 2 ones:

$ cd /usr/src/sys/stand/efiboot

$ fgrep efi_env_get *.c

boot.c:		val = efi_env_get(arg);
boot.c:	s = efi_env_get("efibootplist");
boot.c:	s = efi_env_get("fdtfile");
boot.c:	s = efi_env_get("initrd");
boot.c:	s = efi_env_get("bootfile");
boot.c:	s = efi_env_get("rootdev");
boot.c:	s = efi_env_get("bootargs");
boot.c:	s = efi_env_get("rndseed");
efienv.c:efi_env_get(const char *key)



can be set and will be available. If someone more knowlegeable and more
proficient in english than me could add the gist of this thread to 
boot.8 or create some efi/boot.8 that would be great!
        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C

Home | Main Index | Thread Index | Old Index