Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

persistant boot options on systems without ipmi #62

Open
hanetzer opened this issue Apr 26, 2019 · 4 comments
Open

persistant boot options on systems without ipmi #62

hanetzer opened this issue Apr 26, 2019 · 4 comments

Comments

@hanetzer
Copy link

Unless I'm just dumb I don't think its possible to set autoboot options on systems which
do not do ipmi. I currently have a buildroot-built 'skiroot' for aarch64 (rk3399-gru-kevin)
which can boot gentoo on the emmc. However, I have to manually tell it to boot the entry
each time I boot it. Boot overrides inside the 'System configuration' menu of petitboot-nc
do not persist after reboots.

Using petitboot 1.10.3 and the following syslinux.cfg:

DEFAULT 5.0.9-gentoo

LABEL 5.0.9-gentoo
kernel /boot/vmlinuz-5.0.9-gentoo
append console=tty0 console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 init=/sbin/openrc-init root=/dev/mmcblk1p2 rootwait rw earlycon=uart8250,mmio32,0xff1a0000
initrd /boot/initramfs-5.0.9-gentoo.img
@hanetzer
Copy link
Author

Ok a bit of research shows that on powerpc systems these params are stored in some form of nvram.
No such memory exists on my system, and no platform-independent way of storing this sort of thing
exists in mainline coreboot atm. So, I'm working on implementing a platform-uboot.c to use the
userspace tools from uboot (fw_printenv and fw_setenv) to store these params, and shrink the cbfs
in coreboot by a bit to store the params.

@sammj
Copy link
Contributor

sammj commented Apr 30, 2019

@hanetzer yep, on POWER boxes this is saved in NVRAM. fw_fooenv support would be great to have, if you have patches or questions feel free to post them on the mailing list! https://lists.ozlabs.org/listinfo/petitboot

@hanetzer
Copy link
Author

hanetzer commented May 2, 2019

@sammj ok, I've got a basic platform-uboot.c thrown together, sent it to the ml. Problem is, the
petitboot parameters which contain a ?, such as autoboot?, need to be escaped otherwise
the u-boot env gets corrupted. so instead of constructing a command like this;
fw_setenv autoboot? true we would need fw_setenv autoboot\? true, and I'm not sure how
I could achieve that based on the existing code.

@sammj
Copy link
Contributor

sammj commented May 2, 2019

How parameters are saved is implemented per-platform, so in your platform-uboot you could probably handle this by inserting escaping characters if needed in what you pass to fw_setenv etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants