aboutsummaryrefslogtreecommitdiff
path: root/stand/mips
Commit message (Collapse)AuthorAgeFilesLines
* Don't use CCACHE for linking.Bryan Drewery2018-06-271-4/+4
| | | | | | | | MFC after: 2 weeks Sponsored by: Dell EMC Notes: svn path=/head/; revision=335733
* bootprog_info is generated in vers.c. Move it's definition toWarner Losh2018-06-141-3/+0
| | | | | | | | | bootstrap.h and remove all the redundant copies. Sponsored by: Netflix Notes: svn path=/head/; revision=335117
* Remove d_type from devdesc. It's not needed as we can fetch it fromWarner Losh2018-03-121-2/+1
| | | | | | | d_dev->dv_type when we need it. Notes: svn path=/head/; revision=330810
* Use the actual struct devdesc at the start of all *_devdesc structsWarner Losh2018-03-123-11/+11
| | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=330809
* beri loader: Replace getc/putc with beri_ prefixed versionsKyle Evans2018-03-124-8/+8
| | | | | | | | | | | | 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. No objection from: brooks Reported by: emaste Notes: svn path=/head/; revision=330788
* Go back to one loader.confWarner Losh2018-02-261-13/+0
| | | | | | | | | 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. Notes: svn path=/head/; revision=330005
* Add NO_OBJ to those directories that don't make anything.Warner Losh2018-02-261-0/+2
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=330004
* Eliminate bsd.stand.mk and -fPIC 32-bit intel buildsWarner Losh2018-02-161-1/+0
| | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=329345
* Unify metadata load files for arm, mips, powerpc, sparc64Justin Hibbits2018-02-134-358/+2
| | | | | | | | | | | | 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. Reviewed By: imp Differential Revision: https://reviews.freebsd.org/D13978 Notes: svn path=/head/; revision=329190
* Invent new LDR_INTERP for the loader interpreter to use. Use this inWarner Losh2018-02-022-4/+4
| | | | | | | | | | preference to LIBFICL{,32}. LIBFICL{,32} are now always defined, but LDR_INTERP{,32} is defined empty when building w/o forth (aka the simple interpreter) and defined to LIBFICL{,32} when we are building forth. Notes: svn path=/head/; revision=328783
* Centralize several variables.Warner Losh2018-02-022-5/+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
* Tag unreachable places as such. I left the while (1); in place sinceWarner Losh2018-01-262-0/+5
| | | | | | | | | in this context we want to busy wait to stop. Suggested by: pfg@ Notes: svn path=/head/; revision=328449
* BERI isn't BTX, so we don't have to provide exit(). Just remove itWarner Losh2018-01-261-7/+0
| | | | | | | since it's unused. Notes: svn path=/head/; revision=328447
* stand: Add /boot/overlays to allow separation of overlays from base FDTKyle Evans2018-01-181-1/+1
| | | | | | | | | | | | 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). Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D13922 Notes: svn path=/head/; revision=328107
* Use <stand.h> instead of <inttypes.h> and <stdio.h> in boot code.John Baldwin2018-01-081-2/+1
| | | | | | | | | | | In the freestanding boot compile environment, standard headers are not available. Curiously, only building with clang exposed this as compiles with external GCC still succeeded. Sponsored by: DARPA / AFRL Notes: svn path=/head/; revision=327705
* Fix printf missing format variables warnings.John Baldwin2018-01-081-2/+2
| | | | | | | | | Include the failing kernel file name for errors in beri_elf64_exec(). Sponsored by: DARPA / AFRL Notes: svn path=/head/; revision=327704
* Define __dmadat after #include'ing ufsread.c.John Baldwin2018-01-081-3/+2
| | | | | | | | | | | The __dmadat variable is a statically allocated I/O buffer. The type is declared in the ufsread.c source file and clang warns if a variable is defined before it's type is declared. Sponsored by: DARPA / AFRL Notes: svn path=/head/; revision=327703
* Use 'extern uint8_t' instead of 'extern void' for external symbols.John Baldwin2018-01-032-6/+6
| | | | | | | | | | | | | | | | The beri boot loaders depend on symbols defined in linker scripts or assembly files. The boot loaders do not care about the type of these symbols but just want to extract a pointer to them. Older versions of GCC permitted external symbols to be declared of type 'void' and then '&foo' generated a void pointer to the memory at the symbol's address. However, void objects are not valid C and newer versions of GCC error if these are used. Instead, declare these symbols as being bytes (or an array of bytes in the cheri_sdcard_vaddr case). Sponsored by: DARPA / AFRL Notes: svn path=/head/; revision=327524
* Don't clobber system LDFLAGS for beri boot loaders.John Baldwin2018-01-032-4/+2
| | | | | | | | | | | | | | Prior to r325114, bsd.init.mk was included after assignments to CFLAGS and LDFLAGS in these Makefiles. After r325114, bare assignments (= rather than +=) lost system-assigned default values that are needed when compiling with an external toolchain. CFLAGS in both Makefiles already uses +=. This commit changes LDFLAGS to use +=. While here, depend on the LDFLAGS update in the parent Makefile.inc to set -nostdlib. Sponsored by: DARPA / AFRL Notes: svn path=/head/; revision=327523
* Interact is always called with NULL. Simplify code a little byWarner Losh2017-12-191-1/+1
| | | | | | | | | | | | removing this argument, and expanding when rc is NULL. This effectively completes the back out of custom scripts for tftp booted loaders from r269153 that was started in r292344 with the new path tricks that obsoleted it. Submitted by: Netflix Notes: svn path=/head/; revision=326961
* Move loader help file definitions to being 100% inside of loader.mk.Warner Losh2017-12-182-2/+2
| | | | | | | | | | | | HELP_FILES is a loader only thing, so move it to loader.mk. Only generate the help file if HELP_FILES is defined. Adjust Makefiles to new convention. Fix a few cases where ${.CURDIR}/ was missing resulting in missing bits from the help files. Sponsored by: Netflix Notes: svn path=/head/; revision=326926
* Remove the 'mini libstand in libstand' that util.[ch] provided. TheseWarner Losh2017-12-152-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | weren't needed, and their existance interfered with things in subtle ways. One of these subtle ways was that malloc could be different based on what files were included when (even within the same .c file, it turns out). Move to a single malloc implementation as well by adding the calls to setheap() to gptboot.c and zfsboot.c. Once upon a time, these boot loaders strove to not use libstand. However, with the proliferation of features, that striving is too hard for too little gain and lead to stupid mistakes. This fixes the GELI-enabled (but not even using) boot environment. The geli routines were calling libstand malloc but zfsboot.c and gptboot.c were using the mini libstand malloc, so this failed when we tried to probe for GELI partitions. Subtle changes in build order when moving to self-contained stand build in r326593 toggled what it used from one type to another due to odd nesting of the zfs implementation code that differed subtly between zfsloader and zfsboot. Sponsored by: Netflix Notes: svn path=/head/; revision=326887
* Revert r326792, r326784, r326772, r326712Warner Losh2017-12-121-1/+1
| | | | | | | | | | Something subtle is creating problems for disk access on ubldr. Back it out unti that can be sorted out. Sponsored by: Netflix Notes: svn path=/head/; revision=326812
* Fix regression with lua importWarner Losh2017-12-111-1/+1
| | | | | | | | | | | | | | Don't print when we can't find a file. Copy it instead to the error buffer. Higher level routines determine if it's appropriate to print the error message. Also, remove dead code (labeled bogusly lost functionality) since we never used that functionality. Remove unused arg from interact() too. Sponsored by: Netflix Notes: svn path=/head/; revision=326772
* Tweaks to the beri boot loader so that it builds w/o warnings.Warner Losh2017-12-027-15/+9
| | | | | | | Sponsored by: Netflix Notes: svn path=/head/; revision=326447
* Minor flags cleanupWarner Losh2017-12-021-1/+0
| | | | | | | | | | | | Move kernel includes and libsa includes together at the top of defs.mk Move all machine specific defines from Makefile.inc to their friends in defs.mk. Add comments and remove now useless junk after the move. Sponsored by: Netflix Notes: svn path=/head/; revision=326441
* Move some more common stuff up to Makefile.inc. In particular, the noWarner Losh2017-11-204-6/+2
| | | | | | | | | | | | | | simd / no float stuff is centeralized here. Also centralise -ffreestanding since it is specified everywhere. This, along with a change to share/mk/bsd.cpu.mk to include -mno-avx2 in CFLAGS_NO_SIMD should fix building for newer machines (eg with CPUTYPE=haswell) where clang was generating avx2 instructions. Sponsored by: Netflix Notes: svn path=/head/; revision=326038
* Move sys/boot to stand. Fix all references to new locationWarner Losh2017-11-1440-0/+4222
Sponsored by: Netflix Notes: svn path=/head/; revision=325834