| #
46b606c8
|
| 30-Apr-2024 |
Stephen J. Kiernan <stevek@FreeBSD.org> |
userboot: support environment and symlinks in test application
Pass the environment on to the loader. Also define USERBOOT=1 in the environment varables.
Add support for symlinks in the test applic
userboot: support environment and symlinks in test application
Pass the environment on to the loader. Also define USERBOOT=1 in the environment varables.
Add support for symlinks in the test application open callback.
stat the root directory when opening file Without this, running "ls" command on the root directory encounters issues getting the directory listing.
Reviewed by: jhb Obtained from: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D44625
show more ...
|
| #
b3e76948
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
| #
942e52f7
|
| 01-Jun-2022 |
Toomas Soome <tsoome@FreeBSD.org> |
test_diskread(): detect end of the disk
Detect the end of the disk condition. This may happpen when disk image is truncated and the reads are addressing blocks past image end.
MFC after: 1 week Di
test_diskread(): detect end of the disk
Detect the end of the disk condition. This may happpen when disk image is truncated and the reads are addressing blocks past image end.
MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D35432
show more ...
|
| #
e307eb94
|
| 21-Sep-2020 |
Toomas Soome <tsoome@FreeBSD.org> |
loader: zfs should support bootonce an nextboot
bootonce feature is temporary, one time boot, activated by "bectl activate -t BE", "bectl activate -T BE" will reset the bootonce flag.
By default, t
loader: zfs should support bootonce an nextboot
bootonce feature is temporary, one time boot, activated by "bectl activate -t BE", "bectl activate -T BE" will reset the bootonce flag.
By default, the bootonce setting is reset on attempt to boot and the next boot will use previously active BE.
By setting zfs_bootonce_activate="YES" in rc.conf, the bootonce BE will be set permanently active.
bootonce dataset name is recorded in boot pool labels, bootenv area.
in case of nextboot, the nextboot_enable boolean variable is recorded in freebsd:nvstore nvlist, also stored in boot pool label bootenv area. On boot, the loader will process /boot/nextboot.conf if nextboot_enable is "YES", and will set nextboot_enable to "NO", preventing /boot/nextboot.conf processing on next boot.
bootonce and nextboot features are usable in both UEFI and BIOS boot.
To use bootonce/nextboot features, the boot loader needs to be updated on disk; if loader.efi is stored on ESP, then ESP needs to be updated and for BIOS boot, stage2 (zfsboot or gptzfsboot) needs to be updated (gpart or other tools).
At this time, only lua loader is updated.
Sponsored by: Netflix, Klara Inc. Differential Revision: https://reviews.freebsd.org/D25512
show more ...
|
| #
53f151f9
|
| 25-Mar-2020 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Fix pkgfs stat so it satisfies libsecureboot
We need a valid st_dev, st_ino and st_mtime to correctly track which files have been verified and to update our notion of time.
ve_utc_set(): ignore utc
Fix pkgfs stat so it satisfies libsecureboot
We need a valid st_dev, st_ino and st_mtime to correctly track which files have been verified and to update our notion of time.
ve_utc_set(): ignore utc if it would jump our current time by more than VE_UTC_MAX_JUMP (20 years).
Allow testing of install command via userboot. Need to fix its stat implementation too.
bhyveload also needs stat fixed - due to change to userboot.h
Call ve_error_get() from vectx_close() when hash is wrong.
Track the names of files we have hashed into pcr
For the purposes of measured boot, it is important to be able to reproduce the hash reflected in loader.ve.pcr so loader.ve.hashed provides a list of names in the order they were added.
Reviewed by: imp MFC after: 1 week Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org//D24027
show more ...
|
| #
bcbb1e60
|
| 03-Nov-2019 |
Toomas Soome <tsoome@FreeBSD.org> |
loader: userboot/test should accept more than one disk
allow to specify multiple -d options, test -d disk1 -d disk2 ..
|
| #
96b2f9c9
|
| 24-Oct-2019 |
Toomas Soome <tsoome@FreeBSD.org> |
userboot/test should use PRIx64 as one would expect from prefix 0x
Test is printing decimal value after prefix 0x.
|
| #
46b606c8
|
| 30-Apr-2024 |
Stephen J. Kiernan <stevek@FreeBSD.org> |
userboot: support environment and symlinks in test application
Pass the environment on to the loader. Also define USERBOOT=1 in the environment varables.
Add support for symlinks in the test applic
userboot: support environment and symlinks in test application
Pass the environment on to the loader. Also define USERBOOT=1 in the environment varables.
Add support for symlinks in the test application open callback.
stat the root directory when opening file Without this, running "ls" command on the root directory encounters issues getting the directory listing.
Reviewed by: jhb Obtained from: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D44625
show more ...
|
| #
b3e76948
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
| #
942e52f7
|
| 01-Jun-2022 |
Toomas Soome <tsoome@FreeBSD.org> |
test_diskread(): detect end of the disk
Detect the end of the disk condition. This may happpen when disk image is truncated and the reads are addressing blocks past image end.
MFC after: 1 week Di
test_diskread(): detect end of the disk
Detect the end of the disk condition. This may happpen when disk image is truncated and the reads are addressing blocks past image end.
MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D35432
show more ...
|
| #
e307eb94
|
| 21-Sep-2020 |
Toomas Soome <tsoome@FreeBSD.org> |
loader: zfs should support bootonce an nextboot
bootonce feature is temporary, one time boot, activated by "bectl activate -t BE", "bectl activate -T BE" will reset the bootonce flag.
By default, t
loader: zfs should support bootonce an nextboot
bootonce feature is temporary, one time boot, activated by "bectl activate -t BE", "bectl activate -T BE" will reset the bootonce flag.
By default, the bootonce setting is reset on attempt to boot and the next boot will use previously active BE.
By setting zfs_bootonce_activate="YES" in rc.conf, the bootonce BE will be set permanently active.
bootonce dataset name is recorded in boot pool labels, bootenv area.
in case of nextboot, the nextboot_enable boolean variable is recorded in freebsd:nvstore nvlist, also stored in boot pool label bootenv area. On boot, the loader will process /boot/nextboot.conf if nextboot_enable is "YES", and will set nextboot_enable to "NO", preventing /boot/nextboot.conf processing on next boot.
bootonce and nextboot features are usable in both UEFI and BIOS boot.
To use bootonce/nextboot features, the boot loader needs to be updated on disk; if loader.efi is stored on ESP, then ESP needs to be updated and for BIOS boot, stage2 (zfsboot or gptzfsboot) needs to be updated (gpart or other tools).
At this time, only lua loader is updated.
Sponsored by: Netflix, Klara Inc. Differential Revision: https://reviews.freebsd.org/D25512
show more ...
|
| #
53f151f9
|
| 25-Mar-2020 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Fix pkgfs stat so it satisfies libsecureboot
We need a valid st_dev, st_ino and st_mtime to correctly track which files have been verified and to update our notion of time.
ve_utc_set(): ignore utc
Fix pkgfs stat so it satisfies libsecureboot
We need a valid st_dev, st_ino and st_mtime to correctly track which files have been verified and to update our notion of time.
ve_utc_set(): ignore utc if it would jump our current time by more than VE_UTC_MAX_JUMP (20 years).
Allow testing of install command via userboot. Need to fix its stat implementation too.
bhyveload also needs stat fixed - due to change to userboot.h
Call ve_error_get() from vectx_close() when hash is wrong.
Track the names of files we have hashed into pcr
For the purposes of measured boot, it is important to be able to reproduce the hash reflected in loader.ve.pcr so loader.ve.hashed provides a list of names in the order they were added.
Reviewed by: imp MFC after: 1 week Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org//D24027
show more ...
|
| #
bcbb1e60
|
| 03-Nov-2019 |
Toomas Soome <tsoome@FreeBSD.org> |
loader: userboot/test should accept more than one disk
allow to specify multiple -d options, test -d disk1 -d disk2 ..
|
| #
96b2f9c9
|
| 24-Oct-2019 |
Toomas Soome <tsoome@FreeBSD.org> |
userboot/test should use PRIx64 as one would expect from prefix 0x
Test is printing decimal value after prefix 0x.
|
| #
e8e6a5f9
|
| 06-Dec-2017 |
Warner Losh <imp@FreeBSD.org> |
Make putenv and getenv match the userland definition of these functions, tweak man page and one variable that shouldn't be const anymore.
Sponsored by: Netflix
|
| #
d927d443
|
| 24-Nov-2017 |
Warner Losh <imp@FreeBSD.org> |
Mark the func pointer as __dead2. It looks up loader_main, which either aborts or exits, but never returns. Tag it as a non-returning function rather than supply a bogus return(0) at the end of main.
Mark the func pointer as __dead2. It looks up loader_main, which either aborts or exits, but never returns. Tag it as a non-returning function rather than supply a bogus return(0) at the end of main.
CID: 1382885 Sponsored by: Netflix
show more ...
|
| #
ca987d46
|
| 14-Nov-2017 |
Warner Losh <imp@FreeBSD.org> |
Move sys/boot to stand. Fix all references to new location
Sponsored by: Netflix
|
| #
2ce13699
|
| 13-Nov-2017 |
Warner Losh <imp@FreeBSD.org> |
Use proper include file. While <boot/userboot/userboot.h> works, it only works because we have -Isys on the command line. We also have -Isys/boot/userboot on the command line, so bring it in directly
Use proper include file. While <boot/userboot/userboot.h> works, it only works because we have -Isys on the command line. We also have -Isys/boot/userboot on the command line, so bring it in directly with <userboot.h>. No functional change, but it removes one hard to see dependency on the boot loader's location in sys/boot.
Sponsored by: Netflix
show more ...
|
| #
74b8d63d
|
| 10-Apr-2016 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
Cleanup unnecessary semicolons from the kernel.
Found with devel/coccinelle.
|
| #
e83ddf77
|
| 14-Jan-2016 |
Juli Mallett <jmallett@FreeBSD.org> |
Make it possible to specify the path to userboot.so with the -b flag.
Reviewed by: neel
|
| #
12857dd1
|
| 22-Jul-2014 |
Sean Bruno <sbruno@FreeBSD.org> |
copyin/copyout should return 0 if they are truly emulating copyin/copyout behavior.
remove stray %s in printf
rewrite printf to display 64bit type without warning.
|
| #
04f9c8ff
|
| 12-Nov-2012 |
Neel Natu <neel@FreeBSD.org> |
Add a callback function to userboot.so to fetch a list of environment variables and pass them to the kernel.
Reviewed by: dfr
|
| #
45ac30d5
|
| 03-Oct-2012 |
Andrey V. Elsukov <ae@FreeBSD.org> |
Replace all references to loader_callbacks_v1 with loader_callbacks.
Suggested by: grehan@
|
| #
3db1bfd8
|
| 05-Aug-2012 |
Andrey V. Elsukov <ae@FreeBSD.org> |
Bump USERBOOT_VERSION.
Requested by: dfr
|
| #
2c6f04dc
|
| 05-Aug-2012 |
Andrey V. Elsukov <ae@FreeBSD.org> |
Introduce new API to work with disks from the loader's drivers. It uses new API from the part.c to work with partition tables.
Update userboot's disk driver to use new API. Note that struct loader_c
Introduce new API to work with disks from the loader's drivers. It uses new API from the part.c to work with partition tables.
Update userboot's disk driver to use new API. Note that struct loader_callbacks_v1 has changed.
show more ...
|