359761 |
10-Apr-2020 |
kevans |
MFC r359688: stand: -fno-common fixes for !x86 loaders
- beriloader: archsw is declared extern and defined elsewhere - ofwloader: ofw_elf{,64} are defined in elf_freebsd.c and ppc64_elf_freebsd.c respectively - ubldr: syscall_ptr is defined in start.S for whichever ubldr platform is building
-fno-common will become the default in GCC10/LLVM11. |
346482 |
21-Apr-2019 |
kevans |
MFC r341101, r341231, r341276, r341329, r341433, r341780, r342054-r342055, r342721, r342742, r342840, r343008, r343225
r341101: powerpcspe: Don't crash the loader on ubldr with SPE instructions.
-msoft-float seems to be insufficient for disabling the SPE on powerpcspe. Force it off with -mno-spe as well. This prevents a crash in ubldr on powerpcspe.
r341231: loader: command_bcache() should print unsigned values
All bcache counters are unsigned.
r341276: When handling CMD_CRIT error set command_errmsg to NULL after we dump it out, so that it does not result in error message printed twice.
OK load doodoo can't find 'doodoo' can't find 'doodoo' OK
r341329: loader.efi: fix EFI getchar() for multiple consoles
This fix is ported from illumos (issue #9970), the analysis and initial implementation was done by John Levon.
See also: https://www.illumos.org/issues/9970
Currently, efi_cons_getchar() will wait for a key. While this seems to make sense, the implementation of getchar() in common/console.c will loop across getchar() for all consoles without doing ischar() first.
This means that if we've configured multiple consoles, we can't input into the serial, as getchar() will be sat waiting for input only from efi_console.c
This patch does implement a bit more generic key buffer to support translation of input keys, and we use generic efi_readkey() to reduce duplication from calls from getchar() and poll().
r341433: Move inclusion of src.opts.mk later.
src.opts.mk includes bsd.own.mk. This in turn defines CTFCONVERT_CMD depending on the MK_CTF value. We then set MK_CTF to no, which has no real effect. The solution is to set all the MK_foo values before including src.opts.mk.
This should stop the cdboot binary from exploding in size for releases built WITH_CTF=yes in src.conf.
r341780: powerpc/ubldr: Teach powerpc's ubldr to boot 64-bit kernels
This is just a copy of powerpc/ofw's ppc64_elf_freebsd.c modified to fit ubldr's boot format.
r342054: Print an error message in efi_main.c if we can't allocate memory for the heap
With the default Qemu parameters, only 128MB RAM gets given to a VM. This causes the loader to be unable to allocate the 64MB it needs for the heap. This change makes the cause of the error more obvious.
r342055: Cast error message in efi_main.c to CHAR16* to avoid build error
r342721: loader.efi: update memmap command to recognize new attributes
Also move memory type to string translation to libefi for later use.
r342742: loader.efi: efi variable rework and lsefi command added
This update does add diag and debug capabilities to interpret the efi variables, configuration and protocols (lsefi).
The side effect is that we add/update bunch of related headers.
r342840: Create MK_LOADER_VERBOSE and connect it to ELF_VERBOSE in the loader code.
r343008: Add Dell Chromebook to the list of devices with E820 extmem quirk enabled
Just like for Acer C270 chromebook the E820 extmem workaround is required for FreeBSD to boot on Dell chromebook.
r343225: Unbreak mip64 build after r328437
Add exit and getchar functions to beri/boot2 code. They are required by panic_action functin introduced in r328437
PR: 18498, 204916 |
344290 |
19-Feb-2019 |
kevans |
MFC r335117: stand bootprog_info consolidation
bootprog_info is generated in vers.c. Move it's definition to bootstrap.h and remove all the redundant copies. |
337477 |
08-Aug-2018 |
bdrewery |
MFC r335733:
Don't use CCACHE for linking. |
332154 |
06-Apr-2018 |
kevans |
MFC r330806-r330815, r330837, r330864, r330883
pc98 changes associated with the named commits are also included in this commit, despite not having been made with the original commits due to its removal in head.
r330806: Minor cosmetic changes.
Make sure { on the same line as struct for all struct *devdesc. Move some type definitions to next to the dv_type define, since that's what sets the d_type.
r330807: We can't use d_opendata for blkio storage.
open_disk uses d_opendata for it's own purpse. We can't store blkio there. Fortunately, blkio is stored elsewhere and we never actually retrieve blkio from d_opendata. Eliminate it as a source of confusion. Eliminate all stores of d_opendata in efi since this layer doesn't own that field.
r330808: Make struct libi386_devdesc match the struct devdesc better
Move data to top and call it d_opendata.
r330809: Use the actual struct devdesc at the start of all *_devdesc structs
The current system is fragile and requires very careful layout of all *_devdesc structures. It also makes it hard to change the base devdesc. Take a page from CAM and put the 'header' in all the derived classes and adjust the code to match.
For OFW, move the iHandle h_handle out of a slot conflicting with d_opendata. Due to quirks in the alignment rules, this worked. However changing the code to use d_opendata storage now that it's a pointer is hard, so just have a separate field for it.
All other cleanups were to make the *_devdesc structures match where they'd taken some liberties that were none-the-less compatible enough to work.
r330810: Remove d_type from devdesc. It's not needed as we can fetch it from d_dev->dv_type when we need it.
r330811: GC unused routines.
Sponsored by: Netflix
r330812: Use the one-line-per-file pattern here, and sort the file names.
Sponsored by: Netflix
r330813: Move the env convenience routines out of boot1.c.
These routines are more generally useful. Even though boot1 is on its way out, it's better to make these common during the transition than copy them.
r330814: Star BootCurrent entry when booting.
Sponsored by: Netflix
r330815: Print the load and device path as well as BootCurrent and BootOrder
Sponsored by: Netflix
r330837: biosdisk.c should not set d_opendata.
Same as 330807, d_opendata is owned by open_disk and we should not set it.
M stand/i386/libi386/biosdisk.c
r330864: Prefer uintXX_t to u_intXX_t
A foolish consistency is the hobgoblin of little minds, adored by little statesmen and philosophers and divines. With consistency a great soul has simply nothing to do. -- Ralph Waldo Emerson
r330883: Fix typo that misteriously passes compilation. |
332150 |
06-Apr-2018 |
kevans |
MFC r329190, r329315, r330131: metadata load file unification
r329190: Unify metadata load files for arm, mips, powerpc, sparc64
Summary: All metadata.c files are very similar, with only trivial changes. Unify them into a single common file, with minor special-casing where needed.
r329315: stand: Fix ubldr after r329190
metadata load files were consolidated in r329190, and these relocation fixup bits were inadvertently dropped in the process. Re-add them to fix boot with ubldr.
r330131: Fix module loading on arm after the metadata.c unification in r329190. Arm modules need an additional address fixup not needed by other platforms. |
332149 |
06-Apr-2018 |
kevans |
MFC r330788: beri loader: Replace getc/putc with beri_ prefixed versions
This matches a convention that we use, at least in ubldr, to prefix getc/putc with a loader-specific prefix to avoid collisions. This was encountered while trying to build the beri loader with MK_LOADER_LUA=yes. |
332131 |
06-Apr-2018 |
kevans |
MFC r329345: Eliminate bsd.stand.mk and -fPIC 32-bit intel builds
OK. We don't really need a bsd.stand.mk, and it was causing a -fPIC for the toolchain to be added (bogusly) when building on amd64. Pull all relevant defs back into defs.mk and delete bsd.stand.mk.
This saves about 15-20k on i386 loader and zfsloader which when combined with Lua give us a lot more stack space in those constrained environments. |
332115 |
06-Apr-2018 |
kevans |
MFC r330005-r330007, r330021, r330029, r330622, r331207: Solo loader.conf(5)
r330005: Go back to one loader.conf
We really only need one loader.conf. The other loader.conf was created because the current one took forever to parse in FORTH. That will be fixed in the next commit.
r330006: Take a meat cleaver to defaults/loader.conf
Remove almost all of the _load=XXX options (kept only those relevant to splash screens, since there were other settings). Remove the excessively cutesy comment blocks. Remove excessive comments and replace with similar content Remove gratuitous blank lines (while leaving some)
We have too many modules to list them all here. There's no purpose in doing so and it's a giant hassle to maintain. In addition the extra ~500 lines slow this down on small platforms. It slowed it down so much small platforms forked, which caused other issues... This is a compromise between those two extremes.
r330007: loader.conf is loader agnostic, so remove 4th references.
r330021: These two directories build man pages, so it's incorrect to tag them NO_OBJ. Also, make sure the loader.conf.5 man gets built and installed.
r330029: Fix a typo: "now" -> "no".
r330622: loader.conf(5): Document some other settings
These tend to have less coverage in other places and they don't have defaults as of yet, so mention them here: - fdt_overlays - kernels_autodetect (lualoader only)
r331207: loader.conf: remove obsolete non-x86 beastie menu statement
As of r330005 the same loader.conf defaults are used on all platforms. |
330123 |
28-Feb-2018 |
kevans |
MFC r330004: Add NO_OBJ to those directories that don't make anything.
For directories that don't many anything, add NO_OBJ=t just before we include bsd.init.mk. This prevents them from creating an OBJ directory. In addition, prevent defs.mk from creating the machine related links in these cases. They aren't needed and break, at least on stable, the read-only src tree build.
PR: 226074 |
329183 |
12-Feb-2018 |
kevans |
MFC Loader Fixes Final: r327612,r327703,r327704,r327878,r327879,r327881, r328007,r328029,r328030,r328031,r328061,r328156,r328169,r328288,r328289, r328290,r328291,r328292,r328411,r328536,r328603,r328614,r328642,r328769, r328779,r328780,r328781,r328782,r328783,r328806,r328808,r328826,r328835, r328911,r328986,r328987,r328990,r328999,r329000,r329019,r329050,r329054, r329060
r327612: Invent new #defines for the biospci_{read,write}_config function
r327703: Define __dmadat after #include'ing ufsread.c.
r327704: Fix printf missing format variables warnings.
r327878: Add GUID for UEFI boot manager variables.
r327879: Report the boot order and where we are in that boot order.
r327881: Allow this file to be included
r328007: Fix booting on some arm64 systems after r327879 by fixing the call to utf8_to_ucs2
r328029: When returning an error and freeing allocated memory from ucs2_to_utf8, NULL the return pointer.
r328030: Check the return value from utf8_to_ucs2 instead of whether or not uv is NULL.
r328031: Need to free uv after we're done using it.
r328061: utf8_to_ucs2() should check for malloc failure
r328156: stand: Move sections around to fix stand/ build with ld.lld on armv7
r328169: Remove extra copy of bootinfo.c. It's a bit rotted copy of the one in efi/loader.
r328288: Fix some resource leaks.
r328289: Don't leak memory when displaying help.
r328290: On malloc failure, be sure to close the include file that triggered it.
r328291: getenv does not return tainted data in the boot loader. Attempt to clue Coverity into that fact.
r328292: There's no tainted data here, tag it as such to avoid false positives.
r328411: loader.efi: add missing EFI GUIDs
r328536: loader: support for mixed-endianness ELF/loader and POWER8
r328603: Add missing non-POWERPC case to give the scr value something non-zero.
r328614: Move libstand.3 to libsa.3. Update libsa.3 to include functions
r328642: Break out the interpreters (simple and forth) w/o ifdefs.
r328769: Centralize several variables.
r328779: Retire pnp.4th and the code needed only for 4th words used here.
r328780: These 4th words were an attempt to allow integration into the boot loader scripts. However, that path won't be taken after all it seems.
r328781: Remove pcibios forth support.
r328782: Now that we no longer conditionally compile some files outside of ficl
r328783: Invent new LDR_INTERP for the loader interpreter to use.
r328806: We need more heap space to properly load newer powerpc kernels.
r328808: Implement strcoll as strcmp.
r328826: Make cross-endian loader changes apply only to powerpc
r328835: Fix regression introduced in r328806, preventing boot on many platforms.
r328911: Ignore relocation tables for non-memory-resident sections.
r328986: Fix relative location of USB sources after recent move.
r328987: A more definitions to kernel emulation shim in order to build stand/usb.
r328990: Move the stand/usb test loader into its own directory.
r328999: Fix indentation to FreeBSD standard for interp files
r329000: Move simple interpreter 'perform' into interp.c and call it
r329019: Move to tabs for indentation and to 8-space notches, per style(9).
r329050: Fix build of userboot.so
r329054: Set script.lang in the environment to either 'forth' or 'simple' to reflect what scripting language was compiled into the loader.
r329060: loader: fix endianness conversion
PR: 225323 |
329176 |
12-Feb-2018 |
kevans |
MFC r327705,r328447: Fix BERI bootloader build
r327705: Use <stand.h> instead of <inttypes.h> and <stdio.h> in boot code. r328447: BERI isn't BTX, so we don't have to provide exit(). |
329175 |
12-Feb-2018 |
kevans |
MFC Loader Fixes 2017q4p7: r324844,r326089,r326926,r326440,r326484,r326494, r326588,r326708,r326784,r326914,r327390,r328446,r326090,r326143,r326144, r326182,r326384,r326421,r326440,r326441,r326442,r326443,r326444,r326445, r326446,r326447,r326448,r326484,r326485,r326486,r326487,r326488,r326490, r326491,r326492,r326493,r326494,r326495,r326504,r326507,r326509,r326584, r326585,r326586,r326587,r326588,r326589,r326590,r326591,r326592,r326593, r326594,r326600,r326616,r326671,r326707,r326708,r326709,r326710,r326711, r326712,r326714,r326720,r326768,r326772,r326784,r326792,r326812,r326854, r326855,r326856,r326858,r326886,r326887,r326914,r326926,r326927,r326960, r326961,r326962,r326963,r327351,r327453,r327390,r327523,r327524,r326489, r327880,r328437,r328438,r328439,r328441,r328446,r328448,r328449,r328612, r328613,r328615
While here, undo our libfdt hack of not including <stdlib.h> if we're compiling _STANDALONE.
r324844: When building standalone, don't define errno. Let the definition from stand.h override. This is similar to what we do in the kernel.
r326089: loader.efi: efipart does not recognize partitionless disks
r326090: net_parse_rootpath() has no parameters
r326143: Fix theoretical integer overflow issues. If the product here is
r326144: Mark the func pointer as __dead2. It looks up loader_main, which
r326182: Modify all FreeBSD bootloaders on PowerPC AIM (Book-S) systems
r326384: Use const pointers to avoid casting away constness.
r326421: loader.efi: efipart should exclude iPXE stub block protocol
r326440: Remove stale dependency on ufsread.c
r326441: Minor flags cleanup
r326442: Cleanup CFALGS usage here
r326443: We don't need both _STAND and _STANDALONE, use the latter.
r326444: Move geli to common DO32 stuff
r326445: Fix random() and srandom() prototypes to match the standard.
r326446: Undefine _STANDALONE since this is test code.
r326447: Tweaks to the beri boot loader so that it builds w/o warnings.
r326448: Fix all warnings related to geli and ZFS support on x86.
r326484: Const poison the propname.
r326485: Delcare md_load in libofw.h. Make all prototypes match for ofw
r326486: Include machine/md_var to pick up __syncicache prototype.
r326487: Cast mdp (a vm_offset_t) to void * to match prototype.
r326488: e_entry can be smaller than a pointer. Cast it to an intptr_t
r326490: Declare our strange brand of main().
r326491: Disconnet ps3 from the build. There's too many warnings to fix.
r326492: Cast void * pointer to char * so the arg matches the %s format.
r326493: Provide a md_load64 prototype.
r326494: Mark two things as unused (since they are only sometimes used)
r326495: Now it's safe to bump WARNS to 1.
r326504: Switch to proper MK_LOADER_GELI tests.
r326507: increase maximum size of zfsboot
r326509: loader.efi: add note about iPXE into the efipart.c
r326584: When building standalone, include stand.h rather than the kernel
r326585: Include ficl.h before anything else
r326586: No need to include the userland md5.h, the kernel one is just fine.
r326587: Use the kernel relative paths, rather than the userland relative paths
r326588: Need to include skein in the include path
r326589: Make sure we include the right path for skein.h
r326590: Prefer stdint.h to inttypes.h
r326591: This isn't NetBSD specific code. Include these for any kernel /
r326592: Don't inherit CFLAGS. This a specialized test program.
r326593: Stop building with the standard system headers.
r326594: Now that we offer a semi-sane standards-ish set of #include files, stop hacking includes with sed.
r326600: Since this is contrib code, create an upstreamable version of my
r326616: dhcp_try_rfc1048() is not used any more
r326671: Avoid setting -Wno-tentative-definition-incomplete-type with gcc.
r326707: Add partial support signal.h functioanlity. Pull in machine/signal.h
r326708: Remove _KERNEL hack now that errno.h does the right thing when built standalone.
r326709: Provide implementations for iscntrl, ispunct and isgraph.
r326710: Put the files we're copying over into a few variables and clean hings up.
r326711: Const poison a couple of interfaces.
r326712: Create interp class.
r326714: boot1.c needs EFI_ZFS_BOOT too, so add it globally.
r326720: This path belongs in ficl/Makefile, not the common defines for users
r326768: Fix a comment to be more accurate
r326772: Fix regression with lua import
r326784: Revert part of 362772. It was causing problems for includes
r326792: Attempt to unbreak buildworld
r326812: Revert r326792, r326784, r326772, r326712
r326854: libefi: make efichar.h more usable in stand code
r326855: Cargo cut a fix for the regressions r326585 caused.
r326856: Fix comments after bump in size.
r326858: Revert r326855: Cargo cut a fix for the regressions r326585 caused.
r326886: Panic in sbrk if setheap hasn't been called yet. This is preferable o a mysterious crash
r326887: Remove the 'mini libstand in libstand' that util.[ch] provided.
r326914: Move loader-only defines to loader.mk from defs.mk
r326926: Move loader help file definitions to being 100% inside of loader.mk.
r326927: libficl is only ever used in a loader (never a boot) program. Move it.
r326960: Simplify things a little. The RETURN macro isn't required.
r326961: Interact is always called with NULL. Simplify code a little
r326962: Hoist btx include stuff to i386/Makefile.inc
r326963: No need to use relative paths like this here.
r327351: Fix ubldr. uboot/lib uses defines for the loader.
r327453: Add a validbcd() routine that uses the bcd2bin_data[] array
r327390: Garbage-collect loader.ps3. It is currently disconnected from the build and kboot replaces.
r327523: Don't clobber system LDFLAGS for beri boot loaders.
r327524: Use 'extern uint8_t' instead of 'extern void' for external symbols.
r326489: Allow this file to be used in libsa without warning...
r327880: Move getsecs() prototype to stand.h from net.h so it can be used
r328437: Split panic routine
r328438: Implement abort() as a call to panic.
r328439: Provide abs form stdlib.h.
r328441: abort() should be marked __dead2 since it won't return.
r328446: Now that exit is __dead2, we need to tag ub_exit() as __dead2.
r328448: Make exit() never return until host_exit can be written.
r328449: Tag unreachable places as such. I left the while (1); in place
r328612: Move strtold wrapper from strtol.c to its own strtold.c.
r328613: Kill copies of strtol and strtoul.
r328615: Update stand.h for changes for strto*l
PR: 223969 |
329146 |
12-Feb-2018 |
kevans |
MFC r326038,r326069,r326072: More stand simplification and fixes
r326038: Move some more common stuff up to Makefile.inc.
r326069: Fix gptzfsboot for cases with GELI.
r326072: Unbreak riscv build in universe. |
329145 |
12-Feb-2018 |
kevans |
MFC r325834,r325997,326502: Move sys/boot to stand/
This is effectively a direct commit to stable/11, due to differences between stable/11 and head. Changes to DTS in sys/boot/fdt/dts were often accompanied by kernel changes. Many of these were also risc-v updates that likely had many more dependencies to MFC.
Because of this, sys/boot/fdt/dts remains as-is while everything else in sys/boot relocates to stand/.
r325834: Move sys/boot to stand. Fix all references to new location
r325997: Remove empty directories.
r326502: Document the sys/boot -> stand move in hier.7 and the top-level README. |
329140 |
11-Feb-2018 |
kevans |
MFC Loader Fixes 2017q4p6: r324649,r324650,r324651,r324652,r324653,r324654, r324700,r324702,r324709,r324717,r324719,r324841,r324842,r324843,r324845, r324850,r324876,r324877,r324878,r324879,r324880,r324881,r324883,r324980, r324981,r324982,r324995,r325014,r325093,r325094,r325114,r325170,r325171, r325172,r325173,r325174,r325175,r325176,r325248,r325286,r325310,r325332, r325338,r325339,r325376,r325377,r325379,r325380,r325382,r325478,r325479, r325480,r325482,r325483,r325484,r325485,r325556,r325641,r325681,r325685, r325686,r325687,r325688,r325689,r325690,r325691,r325692,r325693,r325694, r325743,r325744,r325748,r325775,r325779,r325780
r324649: Move common/Makefile.inc to sys/boot/loader.mk.
r324650: tweak style
r324651: create defs.mk for common definitions
r324652: Move all the ficl common code into ficl.mk
r324653: LOADER_foo_SUPPORTED
r324654: Explicitly inlcude SYSDIR in the include path
r324700: loader: initialize dv_cleanup in md.c to eliminate clang warning
r324702: We need to include disk.o in libuboot.a when we're building with support for disk access.
r324709: Revert "Unify boot1 with loader" change r324646
r324717: libsa/ip.c: misplaced comment, ip_v is half char, not ip_p
r324719: libsa/ip: stop read loop on bad fragments
r324841: Use BOOTDIR more consistently in defs.mk rather than repeat sys/boot.
r324842: Introduce BOOTOBJ: The top level object directory for the boot tree
r324843: Stopgap fix to the mistmatch between LOADER_GELI_SUPPORT and LOADER_NO_GELI_SUPPORT.
r324845: Use BOOTOBJ and BOOTDIR to find geli includes and libraries.
r324850: Define LIBSA32 to LIBSA on i386 to fix build.
r324876: Move fdt and uboot defines into common uboot.mk.
r324877: End source directories with SRC rather than a hodgepodge of names
r324878: Make at91 boot loader compile again.
r324879: Prefer SRCTOP paths for bits we're grabbing from libc.
r324880: Use BOOTSRC here.
r324881: Use SYSDIR instead of ${.CURDIR}/../..<etc>/sys.
r324883: Use preferred defined paths, rather than relative paths in fdt.
r324980: Use BOOTDIR consistently.
r324981: Move BINDIR definition to defs.mk, and override where it isn't /boot
r324982: Remove sys/boot/arm/at91 and ixp425
r324995: loader.efi: Make framebuffer commands available for arm64
r325014: Add a 'place holder' arm struct efi_fb until a real one comes
r325093: Define new EFI variables
r325094: Cleanup non-arch Makefiles
r325114: Use defs.mk defins in most MD code
r325170: Use defs.mk values for userboot
r325171: Use defs.mk name and prefer bsd.init.mk
r325172: Remove the -nostdlib stuff I added. Instead, fix LDFLAGS to be honored correctly with the new Makefile.inc include order.
r325173: We don't need to build a special ficl for userboot.
r325174: Minor cleanup
r325175: For amd64, compile both zfs and zfs32 libraries.
r325176: Actually add zfs32/Makefile
r325248: loader ptblread() is broken with >512B sectors
r325286: efipart_strategy is using wrong offset with >512B sectors
r325310: zfs.c:vdev_read() needs to be careful about large sectors
r325332: loader: re-enable gzip support for x86
r325338: loader: fix BOOTSRC -> BOOTOBJ in a library path
r325339: This used to have bzip2 support too.
r325376: WIP: centralize machine links
r325377: mostly libsa
r325379: Revert "mostly libsa"
r325380: Revert "WIP: centralize machine links"
r325382: Cleanup stray libstand names to be libsa names.
r325478: Powerpc is a 32-bit boot loader.
r325479: Define LIBFICL32 to be libficl.a on i386 and libficl32.a on amd64.
r325480: Use DO32 for all the places that we need to flag we're building a 32-bit version of a library.
r325482: Move machine and other link creation to defs.mk
r325483: MACHINE can never be powerpc64, so cleanup code that thinks it can.
r325484: Prefer bsd.init.mk to src.opts.mk
r325485: Centralize all 32-bit builds on 64-bit platform stuff.
r325556: loader: set options before including bsd.init.mk
r325641: loader.efi: efi_devpath_is_prefix should return bool
r325681: boot1: avoid using NULL device path
r325685: libsa32 isn't needed for i386. It's already a 32-bit platform.
r325686: Simplify this if to a direct assignment.
r325687: Remove all the empty help files from the powerpc build.
r325688: FDT support doesn't make sense for ps3, remove it.
r325689: Remove LOADER_FDT_SUPPORT as a Makefile variable.
r325690: Remove LOADER_ZFS_SUPPORT as a Makefile variable
r325691: Remove useless PNP define here.
r325692: Replace LOADER_FIREWIRE_SUPPORT variable
r325693: Move LOADER_{NO,}_GELI_SUPPORT to MK_LOADER_GELI
r325694: Install the 4th files in sys/boot/forth instead of each loader
r325743: Make sure the proper loader.rc gets installed.
r325744: boot1: also check for NULL device
r325748: Use proper include file.
r325775: Add loader.conf to the list of files that are MD.
r325779: Add /boot/dts to the list of default modules.
r325780: Don't add /boot/dt*s* but /boot/dt*b*. Stupid think-o. |
329135 |
11-Feb-2018 |
kevans |
MFC Loader Fixes 2017q4p5: r324557,r324558,r324559,r324646,r324647
r324557: Rename exit to efi_exit to avoid clashing with libsa exit definition
r324558: Define prototype for exit and ensure references
r324559: Move panic back into libsa. It's documented in libstand(3) to belong there.
r324646: Unify boot1 with loader.
r324647: Move orphaned man pages into new man directory from common. |
329131 |
11-Feb-2018 |
kevans |
MFC Loader Fixes 2017q4p3: r324460,r324471
r324460: Rather than laying whack-a-mole with including the path to stand.h, always include it.
r324471: Fix typos: `stand alon{e,g}` should be spelled like `standalone` |
329129 |
11-Feb-2018 |
kevans |
MFC Loader Fixes 2017q4p1: r324321,r324359,r324360,r324388,r324449,r324450, r324451,r324452
r324321: This README file was quite relevant for FreeBSD 3 or 4. No more.
r324359: Add efi_devpath_is_prefix
r324360: Encapsulate ZFS preferences into efi_zfs_is_preferred
r324388: Unbreak building efiboot with MK_ZFS == no
r324449: Prefer ${LIBSTAND} to -lstand
r324450: Define SASRC and use it
r324451: Add missing -I${SASRC} in a couple of places so that stand.h doesn't accidentally come in via host pollution.
r324452: Define LIBSA* and use them instead of overloaded LIBSTAND |
329118 |
11-Feb-2018 |
kevans |
Back out MFC r324558: Define prototype for exit and ensure references
This went terribly wrong |
329114 |
11-Feb-2018 |
kevans |
MFC Loader Fixes 2017q3: r320547,r320553,r321621,r321844,r321969,r321991, r322037,r322038,r322039,r322040,r322056,r322074,r322542,r322592,r322593, r322896,r322923,r323671,r322930,r322931,r322932,r322933,r322934,r322935, r322936,r322937,r322938,r322939,r322941,r323062,r323063,r323064,r323065, r323100,r323131,r323174,r323258,r323261,r323272,r323367,r323379,r323389, r323407,r323428,r323436,r323494,r323496,r323497,r323541,r323554,r323589, r323707,r323867,r323885,r323886,r323895,r323896,r323897,r323905,r323906, r323907,r323908,r323909,r323952,r323991,r324099,r324558,r326445,r326609, r326610
This batch includes a special kludge to fix powerpc loader build; <stdlib.h> was included after <stand.h> there, causing problems with DEBUG_MALLOC bits. Include <stdlib.h> a little bit earlier to fix the build with the intention of removing this when eventually libsa silently replaces stdlib.h with stand.h.
r320547: Link EFI/uboot loaders with -znotext
r320553: Integer underflow in efipart_realstrategy when I/O starts after end of disk
r321621: Always set the receive mask in loader.efi.
r321844: Clean up style in print_state(..) and pager_printf(..)
r321969: Fix the return types for printf and putchar to match their libc
r321991: Revert r321969
r322037: Add stpcpy and stpncpy to libstand
r322038: Add definitions and utilities for EFI drivers
r322039: Move EFI ZFS functions to libefi
r322040: Add EFI utility functions to libefi
r322056: Move EFI fmtdev functionality to libefi
r322074: libefi/time.c cstyle cleanup
r322542: loader.efi: repace XXX with real comments in trap.c
r322592: Remove unused defines.
r322593: Define proposed GUID for FreeBSD boot loader variables.
r322896: Make spinconsole platform independent and hook it up into EFI loader
r322923: Hide length of geli passphrase during boot.
r323671: Fix language used in the r322923.
r322930: Move efi_main into efi/loader
r322931: Cleanup efi_main return type
r322932: Use the loader.efi conventions for the various EFI tables.
r322933: No need for MK_ZFS around these: they are by their nature only active when MK_ZFS is true.
r322934: _STAND is sometimes defined on the command line. Make the define here match.
r322935: Fix warnings due to type mismatch.
r322936: Remove useless 'static' for an enum definition.
r322937: Forward declare struct dsk to avoid warnings when building libi386.
r322938: Link in libefi for boot1
r322939: Use efi_devpath_str for debug path info.
r322941: Eliminate redunant device path matching.
r323062: Make efichar.c routines available to libefi.
r323063: boot1.efi: print more info about where boot1.efi is loaded from
r323064: Exit rather than panic for most errors.
r323065: Save where we're booted from
r323100: libstand: nfs_readlink() should return proper return code
r323131: Revert r322941: Eliminate redundant device matching functions
r323174: Fix loader bug causing too many pages allocation when bootloader is U-Boot
r323258: ucs2len
r323261: Fix armv6 build
r323272: Be consistent and do return (1);
r323367: Mark init_chroot and init_script variables as deprecated.
r323379: It's been pointed out that init_script at least is useful w/o
r323389: loader.efi: chain loader should provide proper device handle
r323407: boot1 generate-fat: generate all templates at once
r323428: r323389 breaks the kernel build when WITHOUT_ZFS is defined in src.conf
r323436: boot1: remove BOOT1_MAXSIZE default value
r323494: loader should support large_dnode
r323496: libstand: tftp_open() can leak pkt on error
r323497: libefi: efipart_open should check the status from disk_open
r323541: libefi: efipart_realstrategy rsize pointer may be NULL
r323554: Increase EFI boot file size frok 128k to 384k
r323589: loader: biosmem.c cstyle cleanup
r323707: loader: biosmem allocate heap just below 4GB
r323867: libefi: devicename.c cleanups
r323885: libefi: efi_devpath_match() should return bool
r323886: libefi: efipart.c should use calloc()
r323895: libefi: efi_devpath_match local len should be unsigned
r323896: r323885 did miss efilib.h update
r323897: efilib.h: typo in structure member description
r323905: libefi: pdinfo_t pd_unit and pd_open should be unsigned
r323906: libefi: efipart_strategy() should return ENXIO when there is no media
r323907: libefi: efipart.c cstyle fix for efipart_print_common()
r323908: libefi: efipart_hdinfo_add_filepath should check strtol result
r323909: libefi: define EISA PNP constants
r323952: After the r317886 support for TFTP and NFS can be enable simultaneously.
r323991: libefi: efipart_floppy() will should not pass acpi pointer if the HID test fails
r324099: Compile loader as Little-Endian on PPC64/POWER8
r324558: Define prototype for exit and ensure references
r326445: Fix random() and srandom() prototypes to match the standard.
r326609: Make putenv and getenv match the userland definition
r326610: Fix random() prototype to match the system.
PR: 219000 221001 222215 Relnotes: yes ("The length of the geli passphrase is hidden during boot") |
329100 |
10-Feb-2018 |
kevans |
MFC Loader Fixes 2017q2: r316437,r316577,r316578,r316585,r316590,r316612, r316625,r316628,r316654,r316682,r316704,r316771,r317092,r317097,r317099, r317652,r317785,r317886,r317887,r318142,r318320,r318356,r318678,r318754, r318982,r318986,r318987,r318988,r318989,r318990,r318991,r318992,r318993, r318994,r318999,r319083,r319084,r319085,r320011,r320234,r320288,r320304, r320467,r320482
r316437: Small cleanup to make i386/loader match efi/loader boot environment code
r316577: loader: part.c cstyle cleanup
r316578: loader: want mechanism to avoid RA with bcache
r316585: loader: zfs reader should check all labels
r316590: libstand/dosfs: cache FAT32 in 128 Kb blocks to save loader memory
r316612: In r298230 the value of HEAP_MIN was changed from 3MB to 64MB. Correct a comment.
r316625: Do not use -msoft-float with intention of disabling FP on aarch64
r316628: Silence GCC warning by initializing the local variable.
r316654: loader: r316585 did miss userboot update
r316682: loader: r316585 did miss sparc/ofw
r316704: loader.efi: only fetch zfs pool guid for the actual boot device
r316771: loader: Avoid possible overflow via environment variable
r317092: loader: zfs reader vdev_probe should check for minimum device size
r317097: loader: F_READ/F_WRITE should be checked against masked flag
r317099: loader: uboot disk ioctl should call disk_ioctl
r317652: loader.efi: ResetSystem does not use data with EFI_SUCCESS
r317785: zfsboot: drvsize() may be unusable on some systems
r317886: distinguish NFS versus TFTP boot by rootpath
r317887: loader: network read rework
r318142: libstand: NULL pointer dereference in rarp
r318320: loader: add ip layer code into libstand
r318356: libstand: increase nfs max read size to 16k
r318678: Replacing iterating over rootpath by strsep(3).
r318754: Pass -N directly to ld via -Wl rather than passing it to the compiler driver.
r318982: Pass a "FREEBSD" user-class in PXE dhcp request
r318986: add a comment on vendor index 19 and 20 to avoid confusion
r318987: Support URI scheme for root-path in netbooting
r318988: Always build tftpfs support along with nfs for pxeboot
r318989: Always issue the pxe request
r318990: Partially revert r314948
r318991: Document recent changes on pxeboot
r318992: Capitalize DHCP
r318993: Use the usual FreeBSD spelling for the DHCP user class
r318994: Catch with the change in the user class
r318999: Update the comments concerning net_parse_rootpath to reflect what it is now
r319083: Followup on the user-class changes
r319084: Small cleanup in dev_net.c
r319085: use the same option list for dhcp discovery and request
r320011: Add chain loader support for loader
r320234: Make structure padding explicit in EFI_MEMORY_DESCRIPTOR
r320288: Allow Clang's integrated assembler to assemble boot0
r320304: loader.efi: Disable smbios for arm
r320467: loader: chain load relocate data declaration is bad
r320482: As with arm64 mark the EFI PE header as allocated on arm.
PR: 218473 |
329099 |
10-Feb-2018 |
kevans |
MFC Loader Fixes 2017q1: r311458,r312237,r312314,r312374,r312947,r313042, r313047,r313166,r313328,r313332,r313333,r313337,r313348,r313349,r313389, r313442,r313451,r313575,r313645,r313710,r314114,r314213,r314275,r314945, r314948,r315008,r315408,r315427,r315645,r315646,r315648,r315653,r315850, r316064,r316078,r316079,r316100,r316104,r316111,r316112,r316171,r316279, r316280,r316287,r316311,r316343,r316424,r316436
r311458: Use compiler driver to link BERI boot loaders
r312237: loader.efi: find_currdev() can leak memory
r312314: loader: move device path definitions to include/efidevp.h
r312374: loader: efi devpath api usage should be more aware of NULL pointers
r312947: Remove "-Xassembler -G0" from CFLAGS.
r313042: loader.efi environment related cleanups
r313047: loader: disk/part api needs to use uint64_t offsets
r313166: loader: libefi/env.c warnings in arm build
r313328: loader: Implement disk_ioctl() to support DIOCGSECTORSIZE and DIOCGMEDIASIZE.
r313332: loader: bcache read ahead block count should take account the large sectors
r313333: loader: Replace EFI part devices.
r313337: loader: 313329 missed ZFS guard in loader/main.c
r313348: loader: biosdisk fix for 2+TB disks
r313349: loader: disk io should not use alloca()
r313389: efipart is also using the '%S' printf format, add -Wno-format for it.
r313442: loader: possible NULL pointer dereference in efipart.c
r313451: loader: possible NULL pointer dereference in bcache.c
r313575: makefs: make the buffer functions look exactly like the kernel ones
r313645: loader: implement MEDIA_FILEPATH_DP support in efipart
r313710: loader: cstyle fixes and DIOCGMEDIASIZE should use uint64_t
r314114: Use LDFLAGS with CC instead of _LDFLAGS.
r314213: Remove control+r handling from geliboot's pwgets()
r314275: Remove unused macro from common/drv.c.
r314945: Some style(9) fixes. No functional changes.
r314948: Try to extract the RFC1048 data from PXE.
r315008: r314948 seems to be missing a variable or two that will break
r315408: loader: remove open_disk cache
r315427: loader: biosdisk should report IO error from INT13
r315645: loader: disk_cleanup was left in userboot_disk.c
r315646: loader: pxe.h constants have wrong values
r315648: libstand: verify value provided by nfs.read_size
r315653: loader: verify the value from dhcp.interface-mtu and use snprintf o set mtu
r315850: The original author abused Nd (one-line description, used by makewhatis)
r316064: Fix build with path names with 'align' or 'nop' in them.
r316078: gpt*boot: Save a bit more memory when LOADER_NO_GELI_SUPPORT is specified
r316079: Simply retire the sedification of the boot2.s file.
r316100: Remove -fno-guess-branch-probability and -fno-unit-at-a-time.
r316104: Use `NO_WCAST_ALIGN` instead of spelling it out as -Wno-cast-align in CFLAGS
r316111: loader: move bios getsecs into time.c
r316112: loader: ls command should display file types properly
r316171: xfsread inlined uses more space, so remove the inline tag.
r316279: loader: efipart should check disk size from partition table
r316280: loader: simplify efi_zfs_probe and avoid double probing for zfs.
r316287: Remove OLD_NFSV2 from loader and libstand
r316311: Add explicit_bzero() to libstand, and switch GELIBoot to using it
r316343: Implement boot-time encryption key passing (keybuf)
r316424: Fix sparc64 build broken by r316343 and r316076
r316436: Restore EFI boot environment functionality broken in r313333
PR: 216940 217298 217935 |
329011 |
08-Feb-2018 |
kevans |
MFC r307322,r307323,r307324,r307326,r307327,r307338,r307879,r307908,r307911, r307942,r307950,r307951,r307954,r307955,r308125,r308195,r308476,r308534, r308535,r308776,r308843,r310236,r310726: Loader fixes, 2016q4
r307322: Remove /boot/boot.conf, deprecated for 16 years
r307323: Remove fetching of pInterp.
r307324: Create a new linker set, Xficl_compile_set which contains a list of functions to call to register new forth words.
r307326: In UEFI mode expose the SMBIOS anchor base address via kenv
r307327: Update i386 build of loader.efi (but leave it disabled) so that we at least build it now.
r307338: Create a pcibios-version environment FORTH word.
r307879: Preliminary support for EFI in boot loader.
r307908: Fix the build on both arm64 and when WITHOUT_FORTH is defined.
r307911: Add better comment...
r307942: Really make WITHOUT_FORTH (MK_FORTH==no) work.
r307950: Add it (Makefile.ficl) to the right place
r307951: Fix two backwards tests.
r307954: Back out the move to the loader script from -N.
r307955: LIBSTAND goes last, so put it last here too.
r308125: In loader.efi, instead of exiting directly, try to fallback.
r308195: efinet_dev_print should honor verbose option.
r308476: boot/forth spelling issue in forth word
r308534: The file_loadraw function grew an argument, update install function
r308535: Add support for LOADER_RC setting in the pkgfs manifes
r308776: loader: zfs toplevel vdev must have spa set.
r308843: loader: smbios version check is not correct
r310236: Renumber license clauses to avoid skipping #3
r310726: cdboot: add explict suffix to ambiguous or instruction
PR: 214375 |
328941 |
06-Feb-2018 |
kevans |
MFC r308774: loader: beri_sdcard_disk_print() needs to return int.
r308434 did change the return type for dv_print callbacks, but the return type for beri_sdcard_disk_print() was left unchanged, causing compile errors. |
328889 |
05-Feb-2018 |
kevans |
MFC r308434, 308827
MFC r308434: Loader paged/pageable data is not always paged. MFC r308827: lsdev device name section headers should be printed by dv_print callback. |
328499 |
27-Jan-2018 |
kevans |
MFC (conceptually) r328107: Add /boot/overlays
This is a direct commit to stable/11, due to path changes in HEAD. Diffs have been applied on top of stable/11, with exception to the change to forth/loader.conf. forth/loader.conf has seen additional changes in HEAD mthat are not being MFC'd to stable/11, so the addition of /boot/overlays to its module_path is not necessary.
MFC r328107: stand: Add /boot/overlays for separation of overlays from DTB
This matches directory structure used commonly in Linux-land, and it's cleaner than mixing overlays into the existing module paths. Overlays are still mixed in by specifying fdt_overlays in loader.conf(5). |
317145 |
19-Apr-2017 |
emaste |
MFC r303442, r305343: remove CONSTRUCTORS from linker scripts
r303442: remove CONSTRUCTORS from kernel linker scripts
r305343: remove CONSTRUCTORS from MIPS uboot linker script
The linker script CONSTRUCTORS keyword is only meaningful "when linking object file formats which do not support arbitrary sections, such as ECOFF and XCOFF"[1] and is ignored for other object file formats.
LLVM's lld does not yet accept (and ignore) CONSTRUCTORS, so just remove CONSTRUCTORS from the linker script as it has no effect.
[1] https://sourceware.org/binutils/docs/ld/Output-Section-Keywords.html
Reported by: andrew Sponsored by: The FreeBSD Foundation |
313355 |
06-Feb-2017 |
tsoome |
MFC r309369,310850,310853:
libstand: dosfs cstyle cleanup for return keyword. dosfs support in libstand is broken since r298230
PR: 214423 Submitted by: Mikhail Kupchik Reported by: Mikhail Kupchik Approved by: imp (mentor) |
312556 |
20-Jan-2017 |
emaste |
MFC r310267: Deduplicate loader vers.c Makefile rules
The Makefile rule to create vers.c for loader version info was previously duplicated in each of the various loader Makefiles. Instead, share a common rule in Makefile.inc.
Sponsored by: The FreeBSD Foundation |
312318 |
17-Jan-2017 |
emaste |
MFC r310225: Reduce boot loader version string duplication
Instead of repeating "%s, Revision %s" "(%s %s)" in each loader, just create the full version string in vers.c |
308719 |
16-Nov-2016 |
bapt |
MFC r307238:
Stop closing the network device when netbooting for loaders using the common dev_net.c code.
The NETIF_OPEN_CLOSE_ONCE flag was added in r201932 to prevent that behaviour on some architectures (sparc64 and powerpc64) the default was left to always open and close the device for each open and close of a file by the loader because it was necessary for u-boot on arm.
Since it has been added, the flag was turned on for every arches including the u-boot loader for arm.
This also fixes netbooting on RPi3 (tested by gonzo@)
For the loader.efi it greatly speeds up netbooting
Reviewed by: emaste, gonzo, tsoome Approved by: gonzo MFC after: 1 month Sponsored by: Gandi.net Differential Revision: https://reviews.freebsd.org/D8230 |
302408 |
08-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
298433 |
21-Apr-2016 |
pfg |
sys: use our roundup2/rounddown2() macros when param.h is available.
rounddown2 tends to produce longer lines than the original code and when the code has a high indentation level it was not really advantageous to do the replacement.
This tries to strike a balance between readability using the macros and flexibility of having the expressions, so not everything is converted.
|
298309 |
19-Apr-2016 |
pfg |
sys/boot: use our nitems() macro when it is available through param.h.
No functional change, only trivial cases are done in this sweep,
Discussed in: freebsd-current
|
298230 |
18-Apr-2016 |
allanjude |
A new implementation of the loader block cache
The block cache implementation in loader has proven to be almost useless, and in worst case even slowing down the disk reads due to insufficient cache size and extra memory copy. Also the current cache implementation does not cache reads from CDs, or work with zfs built on top of multiple disks. Instead of an LRU, this code uses a simple hash (O(1) read from cache), and instead of a single global cache, a separate cache per block device. The cache also implements limited read-ahead to increase performance. To simplify read ahead management, the read ahead will not wrap over bcache end, so in worst case, single block physical read will be performed to fill the last block in bcache.
Booting from a virtual CD over IPMI: 0ms latency, before: 27 second, after: 7 seconds 60ms latency, before: over 12 minutes, after: under 5 minutes.
Submitted by: Toomas Soome <tsoome@me.com> Reviewed by: delphij (previous version), emaste (previous version) Relnotes: yes Differential Revision: https://reviews.freebsd.org/D4713
|
296183 |
29-Feb-2016 |
sgalabov |
This review aims at introducing ubldr (loader with U-Boot interface) for MIPS (32 and 64-bit, LE and BE). The changes were tested with QEMU's 'mips' target.
Most of the implementation was lifted from the ARM version, the appropriate MIPS-specific things were implemented.
With these changes I am able to go all the way through the u-boot->ubldr->kernel boot chain in QEMU on all combinations of bit-ness and endian-ness.
For the tests I've used FAT32 disk images (as FAT32 is supported by U-boot), which include /boot/kernel/kernel and /boot/kernel/ubldr.bin
In U-boot I do: fatload ide 0 <LOAD_ADDR> /boot/kernel/ubldr.bin; go <LOAD_ADDR> where LOAD_ADDR is 80800000 for 32-bit and ffffffff80800000 for 64-bit
Then it's the usual ubldr that takes over and loads and starts a kernel.
Approved by: adrian (mentor) Sponsored by: Smartcom - Bulgaria AD Differential Revision: https://reviews.freebsd.org/D5313
|
296079 |
26-Feb-2016 |
sgalabov |
Currently BERI's loader is including the 32-bit version of the FICL MIPS sysdep.h (sys/boot/ficl/mips/sysdep.h) instead of the 64-bit version (sys/boot/ficl/mips64/sysdep.h).
Although this may not be an issue in practice, it would be more correct if the 64-bit version was used. Also, using the 64-bit version would make it easier to add support for 64-bit ubldr on MIPS.
Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D5310
|
294925 |
27-Jan-2016 |
imp |
Fix mistake when transitioning to the new defines with ZFS loader. I hate adding yet another define, but it is the lessor of the evil choices available. Kill another evil by removing PATH_BOOT3 and replacing it with PATH_LOADER or PATH_LOADER_ZFS as appropriate.
PR: 206659
|
294847 |
26-Jan-2016 |
imp |
Remove static from these two. They slipped through the cracks.
MFC After: 1 week
|
294766 |
26-Jan-2016 |
imp |
RBX_ defines are in rbx.h, move it there.
Differential Revision: https://reviews.freebsd.org/D5038
|
294765 |
26-Jan-2016 |
imp |
Move all the separate copies of the same strings into paths.h. There's nothing machine specific about these.
Differential Revision: https://reviews.freebsd.org/D5038
|
294451 |
20-Jan-2016 |
emaste |
Increase BERI boot components section alignment to 16
The .text, .bss, and .data sections claimed 16-byte alignment, but were only aligned to 8 by the linker script.
Discovered with elfcopy(1) from elftoolchain, which performs validation absent from the binutils strip(1). ELF tool chain ticket #512.
Reported by: brooks Reviewed by: brooks Sponsored by: DARPA, AFRL
|
286368 |
06-Aug-2015 |
allanjude |
Remove guards around overwriting loader.rc and menu.rc
There have been .local version of each for user modifications for some time This allows users to receive future updates to these files
PR: 183765 Submitted by: Bertram Scharpf, Nikolai Lifanov (patch) Reviewed by: dteske, loos, eadler Approved by: bapt (mentor) MFC after: 1 month Relnotes: yes Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D3176
|
284597 |
19-Jun-2015 |
bapt |
Fix fallouts from r284590
Reported by: kib
|
281010 |
03-Apr-2015 |
jkim |
Fix mips build, really. :-(
|
281009 |
03-Apr-2015 |
jkim |
Revert .PATH changes to fix mips build.
Reported by: bz Pointy hat to: jkim
|
281002 |
02-Apr-2015 |
jkim |
Install newly added brand-*.4th and logo-*.4th files and reduce duplication.
Reviewed by: dteske Pointy hat to: dteske
|
280980 |
02-Apr-2015 |
dim |
Ensure the cross assembler, linker and objcopy are used for the build32 stage, just like for the regular world stage.
Reviewed by: rodrigc, imp, bapt, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D2187
|
275457 |
03-Dec-2014 |
emaste |
Increase BERI loader section alignment to 16
The .text, .bss, and .data sections claimed 16-byte alignment, but were only aligned to 8 by the linker script.
Discovered with strip(1) from elftoolchain, which performs validation absent from the binutils strip(1).
Sponsored by: DARPA, AFRL
|
270168 |
19-Aug-2014 |
bdrewery |
Revert r267233 for now. PIE support needs to be reworked.
1. 50+% of NO_PIE use is fixed by adding -fPIC to INTERNALLIB and other build-only utility libraries. 2. Another 40% is fixed by generating _pic.a variants of various libraries. 3. Some of the NO_PIE use is a bit absurd as it is disabling PIE (and ASLR) where it never would work anyhow, such as csu or loader. This suggests there may be better ways of adding support to the tree. Many of these cases can be fixed such that -fPIE will work but there is really no reason to have it in those cases. 4. Some of the uses are working around hacks done to some Makefiles that are really building libraries but have been using bsd.prog.mk because the code is cleaner. Had they been using bsd.lib.mk then NO_PIE would not have been needed.
We likely do want to enable PIE by default (opt-out) for non-tree consumers (such as ports). For in-tree though we probably want to only enable PIE (opt-in) for common attack targets such as remote service daemons and setuid utilities. This is also a great performance compromise since ASLR is expected to reduce performance. As such it does not make sense to enable it in all utilities such as ls(1) that have little benefit to having it enabled.
Reported by: kib
|
269153 |
27-Jul-2014 |
marcel |
Give loaders more control over the Forth initialization process. In particular, allow loaders to define the name of the RC script the interpreter needs to use. Use this new-found control to have the PXE loader (when compiled with TFTP support and not NFS support) read from ${bootfile}.4th, where ${bootfile} is the name of the file fetched by the PXE firmware.
The normal startup process involves reading the following files: 1. /boot/boot.4th 2. /boot/loader.rc or alternatively /boot/boot.conf
When these come from a FreeBSD-defined file system, this is all good. But when we boot over the network, subdirectories and fixed file names are often painful to administrators and there's really no way for them to change the behaviour of the loader.
Obtained from: Juniper Networks, Inc.
|
269114 |
26-Jul-2014 |
sjg |
Reviewed by: imp
LDFLAGS is supposed to be given to CC not LD. Define _LDFLAGS as a filtered version of LDFLAGS safe to give to LD
|
267233 |
08-Jun-2014 |
bdrewery |
In preparation for ASLR [1] support add WITH_PIE to support building with -fPIE.
This is currently an opt-in build flag. Once ASLR support is ready and stable it should changed to opt-out and be enabled by default along with ASLR.
Each application Makefile uses opt-out to ensure that ASLR will be enabled by default in new directories when the system is compiled with PIE/ASLR. [2]
Mark known build failures as NO_PIE for now.
The only known runtime failure was rtld.
[1] http://www.bsdcan.org/2014/schedule/events/452.en.html Submitted by: Shawn Webb <lattera@gmail.com> Discussed between: des@ and Shawn Webb [2]
|
266893 |
30-May-2014 |
hselasky |
Add optional support for USB to BERI loader. Fix the linker script so that the garbage collection feature can be used when linking.
Sponsored by: DARPA, AFRL
|
266885 |
30-May-2014 |
hselasky |
Fix delay() function in the BERI loader code.
Reviewed by: brooks @ Sponsored by: DARPA, AFRL
|
265420 |
06-May-2014 |
imp |
Use src.opts.mk in preference to bsd.own.mk except where we need stuff from the latter.
|
264400 |
13-Apr-2014 |
imp |
NO_MAN= has been deprecated in favor of MAN= for some time, go ahead and finish the job. ncurses is now the only Makefile in the tree that uses it since it wasn't a simple mechanical change, and will be addressed in a future commit.
|
262406 |
23-Feb-2014 |
rwatson |
Build the BERI boot loader on 64-bit MIPS (but not 32-bit MIPS). While these binaries aren't immediately useful on other MIPSes, still build them as part of mips64 world in order to expose them to tinderbox.
MFC after: 3 weeks Sponsored by: DARPA, AFRL
|
262235 |
19-Feb-2014 |
rwatson |
Temporarily unhook BERI boot loader from the build until 32-bit MIPS properly excludes building our 64-bit only boot-loader adaptation.
|
262198 |
18-Feb-2014 |
rwatson |
Replace Apache-style license on two Makefiles with stock 2-clause BSD; license, although the former is pretty safe, it wasn't intended to be used in the version of MIPS boot2/loader upstreamed to FreeBSD.
MFC after: 3 weeks Sponsored by: DARPA, AFRL
|
262197 |
18-Feb-2014 |
rwatson |
Commit a first cut at ports of boot2 and loader to 64-bit MIPS, with a particular interest in (and support for) SRI International and the University of Cambridge's BERI FPGA soft-core processor. This includes micro device drivers for the Altera JTAG UART console, memory-mapped flash, and the Altera SD Card IP core in both boot2 and loader. boot2 can be written to the on-board Intel StrataFlash on the DE4 board, and loader can be placed in StrataFlash or the SD Card.
Plenty of XXX comments, but works quite well locally in practice and I am using it daily. Although I had originally ported the ARM version of boot2, the current version is x86-derived as that proved more feature-complete. As we don't currently use partitions on our flash disks, support for that has been commented out relative to x86, but would be easy to add back. FDT support has not yet been hooked up, although some skeleton parts have been put in place for that.
This may well be a useful starting point for ports to other 32-bit and 64-bit MIPS-ISA systems.
This merge is synchronised to CheriBSD github commit e41d74fd719525d4dd7a7ee499114679165eeaf6, but with some additions of $FreeBSD.
MFC after: 3 weeks Sponsored by: DARPA, AFRAL
|