344291 |
19-Feb-2019 |
kevans |
MFC r335125-r335127, r335148, r335224
r335125: libsa: cstyle cleanup for open/close/read/write sources
r335126: libsa: f_rabuf could be NULL
It is possible that we will not get RA buffer from open(), therefore we must validate RA.
r335127: libsa: remobe unneeded check before free()
free() is checking for NULL, remove duplicate check.
r335148: libsa: open() should use NULL instead of typecasted 0
r335224: Remove empty directory |
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 |
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") |
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). |
326934 |
18-Dec-2017 |
ian |
MFC (conceptually) r326752, r326754:
This is a direct commit to 11-stable, because the code has moved and the directories have been restructured in 12-current, but it just hand- applies the same patches to the corresponding files in their old locations.
r326752: Save and restore r9 register in arm ubldr. In old gcc 4.2, r9 was a callee- saved register, but in arm EABI it may be either callee-saved or dedicated to some special purpose (such as a TLS pointer). It appears clang does not treat it as a callee-saved register (instead using it as another work register, similar to r12).
Another important side effect of these changes is that saving an extra register in the push/pop statements keeps the stack aligned to an 8-byte boundary during the self_reloc() call, as it always should have been.
As stated in the PR...
Essentially the important caller-saved registers are pushed (r0, r1, r9, lr) before the relocation call, and popped after. Then r8/r9 are saved as usual for the syscall trampoline, and lr is stored in r8 (now free) as a callee-saved value before calling into `main`.
The call to `main` can no longer be a tail call because we must restore r9 especially after main returns (although since we have used r8 to hold lr we must also restore this).
r326754: When building for arm arches, set PKTALIGN to the max cache line size supported by the arch, to meet u-boot's requirement that I/O be done in cache-aligned chunks.
PR: 223977 224008 |
323485 |
12-Sep-2017 |
rlibby |
MFC r316119 (by ngie):
self_reloc.c: Pass -Wno-error=maybe-uninitialized to gcc versions greater than 4.2.1 |
323409 |
11-Sep-2017 |
ian |
MFC r316374, r316377:
Preserve the registers containing argc, argv, and return address values passed in from u-boot across the call to self_reloc and any other early-init code, and restore them before calling main().
Correct a comment... the stack used by ubldr is the same stack u-boot was running on when it jumped to the ubldr entry point. None of the arches that use this code set up a different stack in their start.S routines. |
314921 |
08-Mar-2017 |
pfg |
MFC r314505: Split the ficl CFLAGS when they refer to an arch-specific include path.
This is a minimal attempt to keep consistency in the Makefiles so that moving ficl to somwehere like contrib will be less error prone. |
313183 |
04-Feb-2017 |
gonzo |
MFC r310124 (by andrew):
Add -fPIC to the ubldr build. Without this the self relocation code will try to use an absolute address in a switch statement, jumping to an invalid memory location.
Sponsored by: ABT Systems Ltd
PR: 216504 |
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 |
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 |
298826 |
30-Apr-2016 |
pfg |
sys/boot: spelling fixes in comments.
No functional change.
|
297793 |
10-Apr-2016 |
pfg |
Cleanup unnecessary semicolons from the kernel.
Found with devel/coccinelle.
|
297758 |
09-Apr-2016 |
ian |
Align the start of the text segment to an 8-byte boundary. This fixes alignment aborts in ubldr.bin for RPi that started happening with clang 3.8 (earlier clang apparently didn't generate strd instructions that trigger the alignment fault). The abort happened in ubldr.bin and not ubldr (elf version) because the elf headers are 0xf4 bytes long, and stripping them off left everything 4-byte aligned.
While here, also stop aligning the data segment to a page boundary, align it to 8 bytes instead (aligning to a page just needlessly makes the file bigger); pointed out by andrew@.
|
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
|
294028 |
14-Jan-2016 |
smh |
Revert r293903
Revert r293903 as EFI shouldn't be built on this platform that the this was reported on.
Sponsored by: Multiplay
|
293903 |
14-Jan-2016 |
smh |
Fix GCC warnings causing build failure after r293724
Disable some compiler warnings for GCC (non-standard compiler) fixing build failures introduced by r293724, which enabled WARNS in the EFI boot code, when compiling with none standard compiler (GCC).
Raised by: ian MFC after: 2 weeks X-MFC-With: r293268 Sponsored by: Multiplay
|
285683 |
18-Jul-2015 |
jmg |
move the prototype to the lib.h header.. This makes more sense, and it's an API between boot2.c and arm_init.S which calls it..
|
285682 |
18-Jul-2015 |
jmg |
other fixes to make boot2 compile for IXP... Properly end the asm sections, and for some reason, main needs a prototype... If someone has a better fix, I'm all ears...
Pointed out by: Berislav Purgar
|
285681 |
18-Jul-2015 |
jmg |
revert r278579, this is in a different compile environment than the kernel, and needs to be named cpu_id...
Pointed out by: Berislav Purgar
|
285138 |
04-Jul-2015 |
loos |
Install loader.rc with ARM u-boot loader (ubldr).
loader.rc is the responsible to read and process loader.conf variables.
This fix the issue of loader.conf being silently ignored.
MFC after: 3 days
|
283069 |
18-May-2015 |
ian |
Enable the NETIF_OPEN_CLOSE_ONCE option for ubldr. This keeps the network interface open continuously instead of closing it after each filesystem access and reopening it before the next (causing it to re-obtain network params each time). This vastly speeds up netbooting.
|
283013 |
16-May-2015 |
ian |
Re-link ubldr when any of its libraries change.
|
282731 |
10-May-2015 |
ian |
Create a relocatable instance of ubldr for ARM. The original ubldr, static-linked to run at a fixed position, is still installed to maintain compatibility with existing configurations. The makefile now also creates and installs ubldr.bin, a stripped binary (no elf headers) with an entry point offset of 0 that can be loaded by u-boot at any address and launched with "go ${loadaddr}".
To use ubldr.bin, U-Boot must still be built with the CONFIG_API option, but no longer needs the CONFIG_ELF option.
|
282661 |
08-May-2015 |
ian |
Move the text section to the start of the output file, so that when you create a stripped .bin file from it the entry point is the first byte of the file. (Will allow "load $addr $file ; go $addr" in u-boot.)
|
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
|
278579 |
11-Feb-2015 |
gnn |
Summary: Update CPU identification call to recent version.
|
276632 |
03-Jan-2015 |
ian |
Create a custom /boot/defaults/loader.conf for ARM. This differs from the standard file in the following ways:
- modules_path includes /boot/dtb - It doesn't contain 533 lines, of which 500 are either commented out, empty, or something_which_doesnt_work_on_arm_anyway=NO
The standard defaults file takes 40+ seconds to process on an arm beaglebone board. This one takes just a couple seconds.
This gets installed instead of the original because of the .PATH magic in the makefile.
|
276145 |
23-Dec-2014 |
ian |
Convert a couple lingering NO_FORTH conditionals to test MK_FORTH.
|
273934 |
01-Nov-2014 |
andrew |
Start to allow platforms other than U-Boot to use the FDT code in loader by moving U-Boot specific code from libfdt.a to a new libuboot_fdt.a. This needs to be a new library for linking to work correctly.
Differential Revision: https://reviews.freebsd.org/D1054 Reviewed by: ian, rpaulo (earlier version) MFC after: 1 week
|
272350 |
01-Oct-2014 |
andrew |
Remove MK_ARM_EABI, the armeb issues have been fixed. The code to support the oabi is still in the tree, but it is expected this will be removed as developers work on surrounding code.
With this commit the ARM EABI is the only supported supported ABI by FreeBSD on ARMa 32-bit processors.
X-MFC after: never Relnotes: yes Differential Revision: https://reviews.freebsd.org/D876
|
271285 |
08-Sep-2014 |
ian |
Add a 'ubenv import' command to import environment variables from the u-boot env into the loader(8) env (which also gets them into the kernel env). You can import selected variables or the whole environment. Each u-boot var=value becomes uboot.var=value in the loader env. You can also use 'ubenv show' to display uboot vars without importing them.
|
269113 |
26-Jul-2014 |
ian |
Enable at91 systems to boot from high capacity SD cards.
This also fixes a few minor violations of the SD protocol, such as running the bus at high speed during the card identification sequence.
The sdcard_init() routine now probes for SDHC cards so that later read requests can make needed adjustments between block and byte offsets based on card type.
There is a new MCI_readblocks() function that takes block number and block count parameters instead of byte-offset values. Using this routine, boot loader code can load a kernel from any location on an SDHC or standard SD.
The old MCI_read() interface remains unchanged so that existing customized boot loader code will still keep working without changes. Using this routine, boot loaders can load a kernel from anywhere in the first 4GB of an SDHC card (or of course any location on a standard SD card).
A new sdcard_use4wire() routine allows boot loaders to request 4-bit transfers; it should be called after sdcard_init(). The sdcard_init() routine no longer assumes the hardware is 4-wire capable and by default sets things up for 1-bit transfers. (4-wire mode is unreliable on at91rm9200, works on later SoCs.)
PR: 155894 Submitted by: me. years ago.
|
269112 |
26-Jul-2014 |
ian |
The 'flags' variable is conflicting with some inline code in a header file ("variable flags shadows a global..."), just rename this variable to wish away the problem.
|
269111 |
26-Jul-2014 |
ian |
Eliminate "no previous prototype for main" warnings.
|
269110 |
26-Jul-2014 |
ian |
Silence a clang warning about a while loop with an empty body.
|
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.
|
258780 |
30-Nov-2013 |
eadler |
Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this shifts into the sign bit. Instead use (1U << 31) which gets the expected result.
This fix is not ideal as it assumes a 32 bit int, but does fix the issue for most cases.
A similar change was made in OpenBSD.
Discussed with: -arch, rdivacky Reviewed by: cperciva
|
258527 |
24-Nov-2013 |
andrew |
Recent versions of U-Boot require us to also backup and restore r9 for API calls to work.
|
257210 |
27-Oct-2013 |
andrew |
Always build ubldr as a soft-float binary as there is no support for VFP this early on in the boot process.
|
255939 |
29-Sep-2013 |
andrew |
Fix ixp425 boot2 with ARM EABI: - libkern is missing __aeabi_llsl, implement this by calling __ashldi3. - Because of how the asm entry macros are defined the boot2 code requires the unwind symbols to exist, include them in boot2.
Approved by: re (marius)
|
253714 |
27-Jul-2013 |
kientzle |
Install Forth infrastructure along with ubldr.
Note: loader.rc is installed as loader.rc.sample so that by default, none of this is actually used.
|
251250 |
02-Jun-2013 |
tijl |
Convert old make variable modifiers :U and :L to bmake :tu and :tl.
Reviewed by: sjg
|
248962 |
31-Mar-2013 |
ian |
When running on armv6, set alignment checking to modulo-4 mode rather than modulo-8, because clang emits ldrd and strd instructions for addresses that are only 4-byte aligned
|
246647 |
11-Feb-2013 |
kientzle |
Provide verbose help for fdt commands on platforms that use it.
|
246369 |
05-Feb-2013 |
andrew |
* Add the integer div & mod functions and ARM EABI support functions to libstand. * Stop linking the ARM U-Boot loader against libgcc now libstand has the required symbols.
|
245677 |
19-Jan-2013 |
andrew |
Link against compiler-rt to pull in the required __aeabi_* functions
|
244278 |
15-Dec-2012 |
andrew |
Ignore a warning in ubldr where clang doesn't understand the %D printf specifier from libstand.
|
240277 |
09-Sep-2012 |
ae |
Handle LOADER_NO_DISK_SUPPORT knob in the arm and powerpc ubldr.
|
238463 |
15-Jul-2012 |
imp |
Use the pin number rather than the hybrid pin number + name.
|
238188 |
07-Jul-2012 |
imp |
Generalize this for loading the loader into the SPI. Plus trim about 100 bytes from the binary with silly tricks. Hope to get this small enough to run on the models that have 4k SRAM. We are close compiled for the at91rm9200, but still need to trim for the target.
|
238187 |
07-Jul-2012 |
imp |
Allow other SOCs to be compiled in, first step.
|
238186 |
07-Jul-2012 |
imp |
Strip out the useless junk. All we really care about is the text, data and bss sections. All the rest is needed for normal binaries, but boot loaders aren't normal.
|
236159 |
27-May-2012 |
kientzle |
Allow the load address used by ARM ubldr to be set via Make argument.
In particular, this simplifies scripts that build system images.
|
235988 |
25-May-2012 |
gleb |
Use 32-bit ufs_ino_t instead of ino_t to keep boot2 small and prevent unnecessary 64-bit math on 32-bit machines.
Sponsored by: Google Summer of Code 2011
|
235537 |
17-May-2012 |
gber |
Import work done under project/nand (@235533) into head.
The NAND Flash environment consists of several distinct components: - NAND framework (drivers harness for NAND controllers and NAND chips) - NAND simulator (NANDsim) - NAND file system (NAND FS) - Companion tools and utilities - Documentation (manual pages)
This work is still experimental. Please use with caution.
Obtained from: Semihalf Supported by: FreeBSD Foundation, Juniper Networks
|
235272 |
11-May-2012 |
imp |
Add support for passing in the board ID.
# This doesn't implement the full Linux boot ABI for arm yet. # since there's no ATAGs list passed in for r2, and r0 has # boot options rather than 0 as specified in the standard. # Commited code to the tree won't touch any of this anyway, but # future code may be able to use this.
|
235271 |
11-May-2012 |
imp |
Hack to unbreak boot2 for at91rm9200 boot loader. When the at91sam code came in, it moved things around which wound up breaking the build. We have to do this bit of a hack to avoid duplication of a lot of #defines.
|
234908 |
02-May-2012 |
kientzle |
Remove some redundant register loads.
Discussed on: arm@
|
228471 |
13-Dec-2011 |
ed |
Replace `inline static' by `static inline'.
If I interpret the C standard correctly, the storage specifier should be placed before the inline keyword. While at it, replace __inline by inline in the files affected.
|
226506 |
18-Oct-2011 |
des |
Look for /boot/config in addition to /boot.config, with the former taking precedence over the latter if it exists.
MFC after: 3 weeks
|
225955 |
04-Oct-2011 |
thompsa |
Allow ixp425 boot2 to compile after r219452
|
217663 |
20-Jan-2011 |
imp |
No need to list an obsolete arm compiler here.
|
217657 |
20-Jan-2011 |
imp |
Don't need __DYNAMIC here. it is commented out and a.out only -- these are all ELF.
|
215344 |
15-Nov-2010 |
imp |
We no longer need the OUTPUT_FORMAT line, so fix the build by removing it.
|
215034 |
09-Nov-2010 |
brucec |
Fix typos.
PR: bin/148894 Submitted by: olgeni
|
211725 |
23-Aug-2010 |
imp |
MFtbemd:
Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want to test of all the CPUs of a given family conform.
|
211676 |
23-Aug-2010 |
imp |
It turns out that the OUTPUT_FORMAT should do the right thing for both endians...
|
211675 |
23-Aug-2010 |
imp |
MF tbemd: differentiate between arm and armeb
|
209125 |
13-Jun-2010 |
raj |
Fix conditional FDT support in loader(8).
|
208538 |
25-May-2010 |
raj |
Initial loader(8) support for Flattened Device Tree.
o This is disabled by default for now, and can be enabled using WITH_FDT at build time.
o Tested with ARM and PowerPC.
Reviewed by: imp Sponsored by: The FreeBSD Foundation
|
204900 |
09-Mar-2010 |
ticso |
BWCT boards can have 128MB SDRAM.
|
204899 |
09-Mar-2010 |
ticso |
fix signed warning
|
186352 |
20-Dec-2008 |
sam |
Merge support for Gateworks Cambria boards: o add support for IXP435 cpu's (e.g. 64 irq's) o add support for Cambria-specific devices: npe, led's (front panel and octal latch), ehci, mcu, ide cf o redo memory mapping for xscale/ixp4xx boards: previously memory was assumed aliased to 0x10000000 but this appears to be true only for ixp425 systems and breaks operation on others; rework so memory is assumed to start at 0 o rework NPE configuration support to use NPE id's instead of port #'s; these changes also rename the associated MAC's to follow the NPE's they are attached to o update npe firmware to latest rev (same license) and update default fw imageid's to match; in particular this adds NPE-A and crypto support o re-style NPE fw handling code and add a console msg identifying the attributes of the loaded fw o fix numerous problems with handling failures during npe setup o fix npe rx q setup; need to spin waiting for mailbox responses during early boot stages as qmgr interrupts are not delivered; this fixes the problem where all 8 traffic classifications were not tied to the rx q (and eliminates the console msg "remember to fix rx q setup") o add DELAY to npe MII wait logic for IXP435 o strip down builtin phys->virt address translation table in resource handling to just those resources that require it and add a console msg to alert people when this (kludge) table needs to be extended o purge a bunch of dead netbsd-ism's o cleanup avila led driver o add Cambria support to boot2 and rework code for better multi-board support
Notes: 1. NPE-A doesn't work and causes NPE-C to stop working; it is disabled in the hints 2. USB isn't working yet; controller communicates ok but device discovery fails 3. Cambria support must be configured separately from IXP425 boards; multi-board support is TBD
Sponsored by: Hobnob, Gateworks (board donation) Reviewed by: imp
|
185375 |
27-Nov-2008 |
raj |
Let ARM loader(8) build with the man page.
|
185099 |
19-Nov-2008 |
raj |
Initial storage functionality for U-Boot support library.
- Only non-sliced bsdlabel style partitioning is currently supported (but provisions are made towards GPT support, which should follow soon) - Enable storage support in loader on ARM
Obtained from: Semihalf
|
183878 |
14-Oct-2008 |
raj |
Initial support of loader(8) for ARM machines running U-Boot.
This uses the common U-Boot support lib (sys/boot/uboot, already used on FreeBSD/powerpc), and assumes the underlying firmware has the modern API for stand-alone apps enabled in the config (CONFIG_API).
Only netbooting is supported at the moment.
Obtained from: Marvell, Semihalf
|
183673 |
07-Oct-2008 |
imp |
More diff reductions against ixp425/boot2/boot2.c. This time, we bring in FIXUP_BOOT_DRV functionality as an #ifdef. This is not enabled at this time, and the md5 remains constant with this change. Apart from the 'accept any partitioning scheme on the device' changes, this was the biggest delta...
# and yes, we'll merge these into one source file if we can do that in a # way that makes sense.
Obtained from: sys/boot/arm/ixp425/boot2/boot2.c
|
183671 |
07-Oct-2008 |
imp |
Diff reduction with boot/arm/at91/boot2/boot2.c: indent this statement correctly.
|
183669 |
07-Oct-2008 |
sam |
don't hardcode cc
Submitted by: Andrey Eltsov
|
183651 |
06-Oct-2008 |
jhay |
Add a boot loader for ixp425 based boards like the Gateworks Avila and ADI Pronghorn Metro with Redboot on them.
|
183636 |
06-Oct-2008 |
imp |
Bring in the trivial differences between this code and John Hay's new code. Added a copyright for the work I did to this file a couple of years ago. Add John's copyright too, since I'm sure I'll be pulling more into this code. This also implements a new -n option to not allow breaking into the boot sequence which was original in the patch John posted (not in the original i386 code I based this boot2.c on, only the name is the same). I haven't checked to see if he did that, or if it was one of Sam's improvements.
Submitted by: jhay@
|
183635 |
05-Oct-2008 |
imp |
Remove XMODEM_DL support. It never was complete and only serves to increase the diffs with other arm boot2 loaders.
|
183634 |
05-Oct-2008 |
imp |
Indent with 8-space tabs. This reduces the diffs to the newer ixp425 boot2 and may make it easier to merge these files in the future...
|
180012 |
25-Jun-2008 |
ru |
Enable GCC stack protection (aka Propolice) for userland: - It is opt-out for now so as to give it maximum testing, but it may be turned opt-in for stable branches depending on the consensus. You can turn it off with WITHOUT_SSP. - WITHOUT_SSP was previously used to disable the build of GNU libssp. It is harmless to steal the knob as SSP symbols have been provided by libc for a long time, GNU libssp should not have been much used. - SSP is disabled in a few corners such as system bootstrap programs (sys/boot), process bootstrap code (rtld, csu) and SSP symbols themselves. - It should be safe to use -fstack-protector-all to build world, however libc will be automatically downgraded to -fstack-protector because it breaks rtld otherwise. - This option is unavailable on ia64.
Enable GCC stack protection (aka Propolice) for kernel: - It is opt-out for now so as to give it maximum testing. - Do not compile your kernel with -fstack-protector-all, it won't work.
Submitted by: Jeremie Le Hen <jeremie@le-hen.org>
|
174878 |
23-Dec-2007 |
ticso |
- remove code from oroginal file, which is not required on BWCT boards - Be more chatty on startup, since we have enough code space on AT91RM9200 - init DS1672 charging - init USART GPIO
|
174877 |
23-Dec-2007 |
ticso |
BWCT boards uses two different SPI flash chips check for both status codes
|
173040 |
26-Oct-2007 |
jhb |
Use the smaller cgbase() macro in ufsread.c if UFS_SMALL_CGBASE is defined. This lets each boot program choose which version of cgbase() it wants to use rather than forcing ufsread.c to have that knowledge.
MFC after: 1 week Discussed with: imp
|
172991 |
25-Oct-2007 |
cognet |
Fix signedness to make gcc happy.
|
172952 |
25-Oct-2007 |
imp |
Load the bytes into the EMAC's MAC address register in the proper order. The kernel used to shuffle them around to get things right, but that was recently fixed. This makes our boot loader match the behavior of most other boot loaders for the atmel parts. This bug was inherited from the Kwikbyte loader that we started from.
This bug was discovered by Bj?\027.A?\027Nvrn K?\027Nvnig back in June, but fell on the floor. He provided patches to the kernel, include backwards compatibility options that were similar to Olivier's if_ate.c commit.
|
171876 |
17-Aug-2007 |
imp |
Don't pass RB_BOOTINFO to the kernel. There's no bootinfo actually passed into the kernel, and the kernel will soon grow that ability on arm.
Approved by: re@ (blanket)
|
171794 |
09-Aug-2007 |
imp |
Use the .S version for now. I have a version optimized for size p4, but I'm unsure of its provenance, so rather than add it here, revert the migration to it.
Approved by: re@ (blanket)
|
171426 |
13-Jul-2007 |
imp |
MFp4: Add support for the CENTIPAD board (http://www.harerod.de/centipad/index.html) (which is a very cool, very small ARM board) Add support for KB9202B (it has different memory) Make BOOT_FLAVOR settable Minor cleanup nits
Approved by: re@
|
168279 |
02-Apr-2007 |
imp |
Loop on sdcard init. This helps if one hasn't plugged in the card fast enough, or there's other issues that cause the first try to fail.
|
168013 |
28-Mar-2007 |
imp |
RTC_TIMR's RTC_SEC field is BCD. That makes it unsuitable for GetSeconds(). Instead, use CRTR register shifted right 15. This gives us a range of 32 seconds we can do for timeout.
Shift to using == rather than < or > for calculating the timeout, since if we can't read the ST_CTRT register twice in a second we have even bigger problems to worry about, and == deals with the 'wrap' issue.
This lets me type at the boot2 prompt again! Woo Hoo!
Bogusness noticed by: tisco Pointy Hat to: That silly imp guy
|
168012 |
28-Mar-2007 |
imp |
Since we're about to set ST_RTMR to 1 to increase the accuracy of the CRTR register to be 1/32768th of a second in init, we don't need to do it here.
|
168011 |
28-Mar-2007 |
imp |
All SD cards have a block size of 512. The READ_BL_LEN field in the CSD is usually 512 (well, 9), but for 2GB (and the rogue 4GB SD cards) it is 1024 (or 2048 for 4GB). This value doesn't work for the block read commands (which really want 512). Hardcode 512 for those. This may break really old MMC cards that don't have a 512 block size (I've never seen one: make my day and send me one :-), but since the MMC side of the house is currently broken, it should only have the effect that 2GB (and non-conforming 4GB) SD cards will work.
My 'non-conforming' 4GB SD card also works now too. The non-conforming 4GB SD cards were sold for a while before the SD association was worried they would be (a) incompatible (different FAT flavor on them) and (b) confusing for the new SDHC standard and cracked down on suppliers' bogus use of the SD trademark...
|
168007 |
28-Mar-2007 |
imp |
Various buglets fixed (from submitter):
The changes to getstr() is so that the character that is passed in to it, is also processed just as the rest. I also removed one of the getc() calls otherwise you loose every second character.
I also changed the strcpy of kname, so that it only happens if kname is '\0'. This is so that one can pass a kernel in through /boot.config.
The last change to boot2.c is in parse(). If you tried to type a kernel name to boot, the first character was lost, the arg-- fix that.
Submitted by: jhay
|
168006 |
28-Mar-2007 |
imp |
Fix problem where memcmp would return true in the case where the character after the character that was the same.
Submitted by: jhay
|
168005 |
28-Mar-2007 |
imp |
Fix off by one error in length of the string.
Submitted by: jhay
|
167586 |
15-Mar-2007 |
imp |
Remove vestiges of very specific fpga support for my company's board. It isn't relevant to FreeBSD as a whole, breaks the build, and isn't even needed for my company's boards anymore...
MFC After: 2 weeks
|
165401 |
20-Dec-2006 |
imp |
MFp4: differences for bwct ethernet attachment
|
165400 |
20-Dec-2006 |
imp |
MFp4: Differences in flash part for bwct. need a more generic way to cope.
|
165399 |
20-Dec-2006 |
imp |
MFp4: Add timeout to eeprom access for lame eeprom that go awol
|
165398 |
20-Dec-2006 |
imp |
MFp4: bwct memory size and PLL parameters
|
165397 |
20-Dec-2006 |
imp |
MFp4: bwct boot rom is different. need a more generic way to cope long term.
|
165396 |
20-Dec-2006 |
imp |
MFp4: Delay a second or two after the upload before printing Done. Add an automatic reset for remote operational luvin' goodness.
|
165395 |
20-Dec-2006 |
imp |
MFp4: bwct is a new board choice.
|
164324 |
16-Nov-2006 |
imp |
Mfp4: Remove mci_device.c. It should have been removed when it was merged ito sd-card.c, but this is an imperfect world.
|
164323 |
16-Nov-2006 |
imp |
Move to using a common arm_init.S. These things are more similar than different at this point.
|
164322 |
16-Nov-2006 |
imp |
MFp4: Don't fix the size at 8k, and some minor cleanups. andre@ contributed to fixing this problem.
|
164321 |
16-Nov-2006 |
imp |
MFp4: Improvements, including the ability to download to an arbitrary part of the spi flash.
|
164320 |
16-Nov-2006 |
imp |
Tweaks for better boot flavor support.
|
164319 |
16-Nov-2006 |
imp |
Mfp4: We no longer need ee.h included here.
|
164138 |
09-Nov-2006 |
imp |
MFp4: boot2 should now build
|
164137 |
09-Nov-2006 |
imp |
MFp4: boot on KB9202 correctly. Also, reduce the size of the SD/MMC driver somewhat.
|
164136 |
09-Nov-2006 |
imp |
MFp4: Support KB9202 booting better
|
164135 |
09-Nov-2006 |
imp |
Fix typo
|
164134 |
09-Nov-2006 |
imp |
MFp4: Make boot2 work on Kwikbyte KB9202 boards.
|
164133 |
09-Nov-2006 |
imp |
MFp4: Merge a slightly more generic build infrastructure.
|
164132 |
09-Nov-2006 |
imp |
MFp4: Remove bogus \r
|
163617 |
23-Oct-2006 |
imp |
Don't descend into at91 until we sort out the boot loader issues more generally
|
163598 |
21-Oct-2006 |
imp |
MFp4: default to not loading the fpga
|
163597 |
21-Oct-2006 |
imp |
MFp4: Update to smaller code footprint.
|
163596 |
21-Oct-2006 |
imp |
MFp4: Move to smaller code footprint.
|
163595 |
21-Oct-2006 |
imp |
MFp4: Move to smaller code. This was somehow forgotten before.
|
163542 |
20-Oct-2006 |
imp |
There's no fpga.c, so omit it.
|
163533 |
20-Oct-2006 |
imp |
MFp4:
Massive update. The highlights: o dramatically cut memory usage by writing better, less intertwingled code. o implement booting off mmc/sd cards (sd only tested one at the moment) o start to split out board specific stuff for boot2.
|
161453 |
18-Aug-2006 |
imp |
Build at91
|
161452 |
18-Aug-2006 |
imp |
Support compiling as part of world
|
161379 |
17-Aug-2006 |
imp |
MFp4: changes since .s -> .S rename. Use correct header for size
|
161370 |
16-Aug-2006 |
imp |
MFp4: First cut at making spi and/or sd card booting work, needs work
|
161369 |
16-Aug-2006 |
imp |
MFp4:
Tidy up a bit. Make sure that the burned image matches the downloaded one.
|
161368 |
16-Aug-2006 |
imp |
MFp4:
Simplify life a little for such a simple program.
|
161202 |
10-Aug-2006 |
imp |
MFp4: Integrate a boatload of bug fixes from p4. We're right on the 8k boundary with this program still.
text data bss dec hex filename 7925 4 4476 12405 3075 bootiic.out
so we have like 293 bytes left before we have to play games. There may be ways to reduce that somewhat, but they start to be very board specific.
|
161199 |
10-Aug-2006 |
imp |
MFp4:
Reach over into the arm tree to grab some at91 definitions. Better warnings Lots of build tweaks
|
161198 |
10-Aug-2006 |
imp |
MFp4: remove obsolete files
|
161197 |
10-Aug-2006 |
imp |
MFp4: Remove obsolete files in list Add spi flash reading routines
|
161196 |
10-Aug-2006 |
imp |
MFp4: Numerous changes from p4 to try to improve tftp downloading, reduce code footprint, etc. While some problems still remain, the reliability of tftp is much improved.
|
161195 |
10-Aug-2006 |
imp |
MFp4: consolidate #include files down to lib.h
|
161194 |
10-Aug-2006 |
imp |
MFp4: These will migrate to the boot specific directories because they are too hard to share between the different boot loaders.
|
161193 |
10-Aug-2006 |
imp |
MFp4: Make it clearer that the address passed to the eeprom routines is really an offset within the eeprom device, and not a IIC address.
|
161192 |
10-Aug-2006 |
imp |
MFp4: Catchup with migration of some defines.
|
161191 |
10-Aug-2006 |
imp |
MFp4: Tweaks for our board.
|
161190 |
10-Aug-2006 |
imp |
MFp4: Increase character timeout to 10. Make it a #define for easier changes in the future. This helps with getting started and to overcome the really sucky level of granuality this timeout has in getc. A timeout of 1 means 'wait until top of next second' rather than 'wait for at least a second'.
|
161156 |
10-Aug-2006 |
imp |
Add a dummy makefile to keep build happy
|
157940 |
21-Apr-2006 |
imp |
MFp4: Make getc(0) polling (this has the happy side effect of saving 8 bytes in the generated code).
|
157939 |
21-Apr-2006 |
imp |
MFp4: Loop forever getting characters... A kludge for now.
|
157938 |
21-Apr-2006 |
imp |
MFp4: Integrate support for building tag support for linux booting.
|
157937 |
21-Apr-2006 |
imp |
MFp4: Init eeprom here now that we don't init the eeprom in arm_init.s and read in the second 8k of the data. Tweak formatting.
|
157936 |
21-Apr-2006 |
imp |
Move from arm_init.s -> .S. #ifdef linux vs freebsd defaults for the boot loader (linux booting helps regression testing). No repo copy because of limited history.
|
157926 |
21-Apr-2006 |
imp |
MFp4: formatting nits and minor style changes that likely won't matter.
|
157925 |
21-Apr-2006 |
imp |
Allow one to enable building tags. Check the size of the boot imag.
|
157924 |
21-Apr-2006 |
imp |
MFp4:
On the KB9202 go ahead and enable the flash controller so the boot loader can access the parallel flash.
|
157921 |
21-Apr-2006 |
imp |
MFp4:
Make this compile, assuming that you have linux installed in a sensible place. tag_list is disabled by default, since we don't distribute linux, but it is desirable to allow the boot loader to boot Linux or FreeBSD (mostly for testing).
|
157918 |
21-Apr-2006 |
imp |
MFp4: Minor diffs to reduce diffs to p4.
|
157917 |
21-Apr-2006 |
imp |
spi flash updating boot loader. upload this file for the recovery xmodem download. Then download the image you want in the flash. This will burn the image into the flash. You must then reset the unit and the new flash image will be used for booting...
|
157916 |
21-Apr-2006 |
imp |
iic eeprom updating boot loader. upload this file for the recovery xmodem download. Then download the image you want in the eeprom. This will burn the image into the eeprom. You must then reset the unit and the new eeprom image will be used for booting...
|
157915 |
21-Apr-2006 |
imp |
Add boot0iic and boot0spi. These are 'shortcut' boot loaders designed to replace either a bad iic eeprom with one you download with xmodem, or likewise with a spi flash.
|
157873 |
19-Apr-2006 |
imp |
MFp4 (checkpoint of work in progress):
o Use a directory layout that is more akin to the i386 boot layout. o Create a libat91 for library routines that are used by one or more of the boot loaders. o Create bootiic for booting from an iic part. o Create bootspi for booting from an spi part. o Optimize the size of many of these routines (especially emac.c). Except for the emac.c optimizations, all these have been tested. o eliminate the inc directory, libat91 superceeds it. o Move linker.cfg up a layer to allow it to be shared.
|
157765 |
15-Apr-2006 |
imp |
Fix style nit noticed by bde.
|
157733 |
13-Apr-2006 |
imp |
Add commented out define for TSC board's boot0.
|
157732 |
13-Apr-2006 |
imp |
MFp4:
For 32-bit SDRAM systems, enable D16 to D31 in the PIO controller. Otherwise they read back as 0xffff.
Shave 8 bytes from the object size by using AT91C_BASE_PIOA directly and by not assigning PIO_BSR to 0 in the DBGU init. That's a nop in two ways (everything defaults to peripheral A, and writing 0 changes nothing).
|
157731 |
13-Apr-2006 |
imp |
Merge from p4:
Many places used #define FOO ((unsigned int) 0x23) where a simpler #define FOO 0x23u would have sufficed. This practice is overly verbose and has the disadvantage that you can't say
#if FOO == BAR #endif
because the extra "unsigned int" tokens choke cpp's little brain. Migrate to the latter style to allow use in preprocessor statements. The two are the same semantically anyway in a C context (at least for the uses they are put to presently, C gurus can explain to me how they differ).
|
157730 |
13-Apr-2006 |
imp |
Need at91rm9200_lowlevel.h for SDRAM_BASE definition.
|
157699 |
12-Apr-2006 |
imp |
Common register definition for AT91RM9200
|
157697 |
12-Apr-2006 |
imp |
Recovery boot loader for the AT91 family of processors. Download it via xmodem to the DBGU port when the AT91 comes up in recovery mode. The recovery loader will then load your program via xmodem into SDRAM at 1MB which can do its things. It needs to be tweaked to the specific board one is using, but it fits in < 1kB (all of Atmel's ARM products have at least 8kb of SRAM that I can tell, so this should work for them all).
Parts of this code were provided by Kwikbyte with copyright specifically disclaimed. I heavily modified it to act as a recovery loader (before it was a bootstrap loader) and to optimize for size (before I started the size was closer to 8k).
Bootstrap loaders for SPI and IIC to follow.
|