aboutsummaryrefslogtreecommitdiff
path: root/stand/userboot/test
Commit message (Collapse)AuthorAgeFilesLines
* Remove residual blank line at start of MakefileWarner Losh2024-07-151-1/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* userboot: support environment and symlinks in test applicationStephen J. Kiernan2024-04-301-34/+160
| | | | | | | | | | | | | | | 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
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-162-2/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* Update/fix Makefile.depend for userlandSimon J. Gerraty2023-04-191-1/+0
|
* test_diskread(): detect end of the diskToomas Soome2022-06-191-0/+5
| | | | | | | | | 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
* loader: zfs should support bootonce an nextbootToomas Soome2020-09-211-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=365938
* Fix pkgfs stat so it satisfies libsecurebootSimon J. Gerraty2020-03-251-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=359307
* loader: userboot/test should accept more than one diskToomas Soome2019-11-031-13/+13
| | | | | | | allow to specify multiple -d options, test -d disk1 -d disk2 .. Notes: svn path=/head/; revision=354278
* userboot/test should use PRIx64 as one would expect from prefix 0xToomas Soome2019-10-241-1/+1
| | | | | | | Test is printing decimal value after prefix 0x. Notes: svn path=/head/; revision=354015
* Centralize several variables.Warner Losh2018-02-021-4/+0
| | | | | | | | | | MK_CTF, MK_SSP, MK_PROFILE, NO_PIC, and INTERNALLIB are always the same, so set them in defs.mk. MAN= is common, so set it here too. This removes a lot of boring repetition from the Makefiles that added almost no value. Notes: svn path=/head/; revision=328769
* Make putenv and getenv match the userland definition of theseWarner Losh2017-12-061-2/+2
| | | | | | | | | | functions, tweak man page and one variable that shouldn't be const anymore. Sponsored by: Netflix Notes: svn path=/head/; revision=326609
* Don't inherit CFLAGS. This a specialized test program, and can beWarner Losh2017-12-051-1/+1
| | | | | | | | | | built with mostly default flags. Do so in anticipation of the rest of stand not building with system headers. Sponsored by: Netflix Notes: svn path=/head/; revision=326592
* Undefine _STANDALONE since this is test code. This is unsastifying,Warner Losh2017-12-021-1/+1
| | | | | | | | | but since we sadly only have one test, put this in as a stopgap. Sponsored by: Netflix Notes: svn path=/head/; revision=326446
* Mark the func pointer as __dead2. It looks up loader_main, whichWarner Losh2017-11-241-1/+1
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=326144
* Move sys/boot to stand. Fix all references to new locationWarner Losh2017-11-143-0/+506
Sponsored by: Netflix Notes: svn path=/head/; revision=325834