aboutsummaryrefslogtreecommitdiff
path: root/sys/boot/i386/boot0
Commit message (Collapse)AuthorAgeFilesLines
* Move sys/boot to stand. Fix all references to new locationWarner Losh2017-11-143-773/+0
| | | | | | | Sponsored by: Netflix Notes: svn path=/head/; revision=325834
* Use defs.mk name and prefer bsd.init.mkWarner Losh2017-10-301-1/+1
| | | | | | | | | | Also need to make some small tweaks to the Makefiles to use += rather than = due to small shift in include file order. Sponsored by: Netflix Notes: svn path=/head/; revision=325171
* Allow Clang's integrated assembler to assemble boot0Ed Maste2017-06-231-3/+0
| | | | | | | | | | | dim@ compared clang IAS-built and GNU as-built boot0 and found them equivalent. IAS encoded one instruction using two bytes where GNU as used three, and another instruction using three bytes where GNU as used two. The net result is equivalent and tested, so there is no need to force IAS off for boot0. Notes: svn path=/head/; revision=320288
* Don't use -N to set the OMAGIC with data and text writeable and dataWarner Losh2016-09-031-1/+2
| | | | | | | | | | | | | | | | | not page aligned. To do this, use the ld script gnu ld installs on my system. This is imperfect: LDFLAGS_BIN and LD_FLAGS_BIN describe different things. The loader script could be better named and take into account other architectures. And having two different mechanisms to do basically the same thing needs study. However, it's blocking forward progress on lld, so I'll work in parallel to sort these out. Differential Revision: https://reviews.freebsd.org/D7409 Reviewed by: emaste Notes: svn path=/head/; revision=305353
* Implement (ACFLAGS|CFLAGS|CXXFLAGS).SRC globally.Bryan Drewery2016-03-261-1/+0
| | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=297283
* Remove disconnected boot0ext.Bryan Drewery2015-11-202-500/+0
| | | | | | | | | | | | | This was [re-]added in r127458 (apparently with disconnected history as well) and never connected to the build. It is no longer relevant for modern systems from the past 20 years. Discussed with: jhb Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291106
* META_MODE: Remove DEP_MACHINE from Makefile.depend files.Bryan Drewery2015-09-251-2/+0
| | | | | | | | | This has not been needed since r246865 in projects/bmake. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=288228
* META_MODE: Remove DEP_RELDIR from Makefile.depend files.Bryan Drewery2015-09-251-2/+0
| | | | | | | | | This has not been needed since r284171 in projects/bmake. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=288226
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * Merge sync of headSimon J. Gerraty2015-05-271-2/+2
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Merge headSimon J. Gerraty2014-04-281-1/+1
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265044
| * | Updated/new Makefile.dependSimon J. Gerraty2012-11-081-0/+14
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242788
* | | Minor comments fixesThomas Quinot2015-05-161-2/+2
| |/ |/| | | | | Notes: svn path=/head/; revision=283006
* | NO_MAN= has been deprecated in favor of MAN= for some time, go aheadWarner Losh2014-04-131-1/+1
|/ | | | | | | | | 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. Notes: svn path=/head/; revision=264400
* Define several extra macros in bsd.sys.mk and sys/conf/kern.pre.mk, toDimitry Andric2012-02-281-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | get rid of testing explicitly for clang (using ${CC:T:Mclang}) in individual Makefiles. Instead, use the following extra macros, for use with clang: - NO_WERROR.clang (disables -Werror) - NO_WCAST_ALIGN.clang (disables -Wcast-align) - NO_WFORMAT.clang (disables -Wformat and friends) - CLANG_NO_IAS (disables integrated assembler) - CLANG_OPT_SMALL (adds flags for extra small size optimizations) As a side effect, this enables setting CC/CXX/CPP in src.conf instead of make.conf! For clang, use the following: CC=clang CXX=clang++ CPP=clang-cpp MFC after: 2 weeks Notes: svn path=/head/; revision=232263
* Allow boot0cfg to force a PXE boot via boot0 on the next boot.John Baldwin2011-12-201-1/+1
| | | | | | | | | | | | | - Fix boot0 to check for PXE when using the pre-set setting for the preferred slice. - Update boot0cfg to use slice 6 to select PXE. Accept a 'pxe' argument instead of a number for the 's' option as a way to select PXE as well. Submitted by: Andrew Boyer aboyer averesystems MFC after: 2 weeks Notes: svn path=/head/; revision=228738
* Upgrade our copy of llvm/clang to r126079, from upstream's trunk.Dimitry Andric2011-02-201-0/+6
| | | | | | | | This contains many improvements, primarily better C++ support, an integrated assembler for x86 and support for -pg. Notes: svn path=/head/; revision=218893
* Use -Wl,-N instead of the undocumented -N option for GCC.Ed Schouten2010-06-031-1/+1
| | | | | | | | | | GCC forwards the -N flag directly to ld. This flag is not documented and not supported by (for example) Clang. Just use -Wl,-N. Submitted by: Pawel Worach Notes: svn path=/head/; revision=208789
* A number of small changes to make the 'save choice to disk' safer,Luigi Rizzo2008-12-302-28/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and re-enable it as default. In particular: + re-enable the 'update' flag in the Makefile (of course!); + commit Warner's patch "orb $NOUPDATE,_FLAGS(%bp)" to avoid writing to disk in case of a timeout/default choice; + fix an off-by-one count in the partition scan code that would print the wrong name for unknown partitions; + unconditionally change the boot prompt to 'Boot:' instead of 'Default:' to make room for the extra code/checks/messages. Some of the changes listed below are also made to save space; + rearrange and fix comments for known partition types. Right now we explicitly recognise *BSD, Linux, FAT16 (type 6, used on many USB keys), NTFS (type 7), FAT32 (type 11). Depending on other options we also recognise Extended (type 5), FAT12 (type 1) and FAT16 < 32MB (type 4). + Add an entry "F6 PXE" when the code is built with -DPXE (which is a default now). Technically, F6 boots through INT18, so the prompt 'PXE' is a bit misleading. Unfortunately the name INT18 is too long and does not fit in - we could use ROM perhaps. The reason I picked 'PXE' is that on many (I believe) new systems INT18 calls PXE. Apart from the choice of the name for PXE/ROM/INT18, this should close pending issues on the 1-sector boot0 code and we should be able to move the code to RELENG_7 when it reopens. No boot0cfg changes are necessary. MFC after: 3 weeks Notes: svn path=/head/; revision=186598
* Fix typo in the comment %is -> %si.Maxim Sobolev2008-12-081-1/+1
| | | | Notes: svn path=/head/; revision=185776
* Another, hopefully final set of changes to boot0 and boot0cfg.Luigi Rizzo2008-12-032-61/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | boot0.S changes: + import a patch from Christoph Mallon to rearrange the various print functions and save another couple of bytes; + implement the suggestion in PR 70531 to enable booting from any valid partition because even the extended partitions that were previously in our kill list may contain a valid boot loader. This simplifies the code and saves some bytes; + followwing up PR 127764, implement conditional code to preserve the 'Volume ID' which might be used by other OS (NT, XP, Vista) and is located at offset 0x1b8. This requires a relocation of the parameter block within the boot sector -- there is no other possible workaround. To address this, boot0cfg has been updated to handle both versions of the boot code; + slightly rearrange the strings printed in the menus to make the code buildable with all options. Given the tight memory budget, this means that with certain options we need to shrink or remove certain labels. and especially: make -DVOLUME_LABEL -DPXE the default options. This means that the newly built boot0 block will preserve the Volume ID, and has the (hidden) option F6 to boot from INT18/PXE. I think the extra functionality is well worth the change. The most visible difference here is that the 'Default: ' string now becomes 'Boot: ' (it can be reverted to the old value but then we need to nuke 1/2 partition name or entries to make up for the extra room). boot0cfg changes: + modify the code to recognise the new boot0 structure (with the relocated options block to make room for the Volume id). + add two options, '-i xxxx-xxxx' to set the volume ID, -e c to modify the character printed in case of bad input PR: 127764 70531 Submitted by: Christoph Mallon (portions) MFC after: 4 weeks Notes: svn path=/head/; revision=185579
* This commits brings in a lot of documentation and some enhancementLuigi Rizzo2008-12-022-248/+476
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of the boot0.S code, with a number of compile-time selectable options, the most interesting one being the ability to select PXE booting. The code is completely compatible with the previous one, and with the boot0cfg program. Even the actual code is largely unmodified, with only minor rearrangements or fixes to make room for the new features. The behaviour of the standard build differs from the previous version in the following, minor things: + 'noupdate' is the default, which means the code does not write back the selection to disk. You can enable the feature at runtime with boot0cfg, or changing the flags in the Makefile. + a drive number of 0x00 (floppy, or USB in floppy emulation) is now accepted as valid. Previously, it was overridden with 0x80, meaning that the partition table coming from the media was used to access sectors on a possibly different media. You can revert to the previous mode building with -DCHECK_DRIVE, and you can always use the 'setdrv' option in boot0cfg + certain FAT or NTFS partitions are listed as WIN instead of DOS. + the 'bel' character on a bad selection is replaced by a '#' to make it clear that the system is not hang even if the machine does not have a speaker. This can be reverted back at compile time, or at runtime with an upcoming boot0cfg option. Additional features are available as compile time options, and may be become the default if deemed useful. In particular: + INT18/PXE boot (make -DPXE) This option enables booting through INT 18h (which on certain BIOSes can be hooked to PXE) by pressing F6. There is unfortunately no room to print the additional menu option. Also, to make room for the code, the 'Default: ' string is changed to 'Boot: ' + print current drive number (make -DTEST) Prints a line indicating the current drive number. This is useful to figure out what is going on for machines/bioses which remap drives in sometimes surprising ways. + disable numeric keys in console mode (make -DONLY_F_KEYS) Not really a significant option, but it is needed to make room for the -DTEST mode. + disable floppy support (make -DCHECK_DRIVE) Revert to the old behaviour of only accepting 0x80 and above as valid drive numbers. MFC after: 6 weeks Notes: svn path=/head/; revision=185562
* Fix a typo in previous commit: must call "putn" to print a crlf,Luigi Rizzo2008-11-261-1/+1
| | | | | | | | | | | | | instead of "puts" which prints whatever is at %si, followed by a CRLF. It was not noticed during tests because at that point %si points to a partition entry whose first byte is 0x80, which is both a terminator for the string and a non printable character. Submitted by: Christoph Mallon Notes: svn path=/head/; revision=185346
* Pass the pointer to the selected partition in %si to the next stageLuigi Rizzo2008-11-261-2/+3
| | | | | | | | | | | | | | | | | | boot code. The bug was introduced in rev.1.13, and went unnoticed because FreeBSD's boot1 does not use it, but other systems might. (I have been struggling for almost a full day trying to figure out why a syslinux'ed partition would not boot when started with the FreeBSD /boot/boot0, only to realize that the bug was ours!) The space for the two extra bytes (push %si and pop %si) is reclaimed by removing an extra CRLF that is printed before booting. The bug is not a major one but if there is time it might be a good thing to merge it into the upcoming releases. Notes: svn path=/head/; revision=185339
* Fix setting of serial port speed. A junk value was passed in AX whenThomas Quinot2007-03-261-1/+1
| | | | | | | | | | | | | bioscom is called to set up serial port parameters because COMSPEED was treated as an address instead of an immediate value, causing serial port parameters to never be set. PR: i386/110828 Reviewed by: jhb MFC after: 2 weeks Notes: svn path=/head/; revision=167914
* Restore the pre-5.x behavior of only beeping if the user makes a badJohn Baldwin2006-05-031-5/+8
| | | | | | | | | | | | | | selection and not always beeping on startup. The two bytes for the extra 'jmp' instruction were obtained by removing recognition of BSD/OS partitions. Requested by: many Tested by: subset of many Head nod: imp, keramida MFC after: 2 weeks Notes: svn path=/head/; revision=158265
* Allow BOOT_BOOT0_COMCONSOLE_SPEED to be derived from BOOT_COMCONSOLE_SPEEDRuslan Ermilov2005-04-251-5/+28
| | | | | | | at compile time. Notes: svn path=/head/; revision=145515
* Remove type 0x4 (FAT12 <32MB) to make room for type 0x7 (NTFS).Dag-Erling Smørgrav2005-02-081-2/+2
| | | | Notes: svn path=/head/; revision=141540
* Only update the boot sector when there is a valid drive number provided.Peter Edwards2005-01-091-14/+15
| | | | | | | | | | | | (After squeezing a few more bytes out of boot0) Discussed With: jhb, julian PR: 66248 Submitted By: Hans Petter Selasky MFC After: 1 week Notes: svn path=/head/; revision=139948
* Start the dreaded NOFOO -> NO_FOO conversion.Ruslan Ermilov2004-12-211-1/+1
| | | | | | | OK'ed by: core Notes: svn path=/head/; revision=139103
* - If the COMSPEED is set to 0, then don't try to initialize the serial portJohn Baldwin2004-11-241-10/+10
| | | | | | | | | | | | | and assume that the BIOS has set it up for us. This allows folks with a serial-aware BIOS to set the BIOS to speeds above 9600 and allow boot0 to just use the existing settings. - Purge some gratuitous cpp comments as per style(9). Submitted by: Danny Braniss danny at cs dot huji dot ac dot il (1) MFC after: 1 month Notes: svn path=/head/; revision=138048
* Clean up the comments, rewording, adding missing punctuationGiorgos Keramidas2004-11-061-35/+26
| | | | | | | | | and other minor nits. Approved by: jhb Notes: svn path=/head/; revision=137298
* In conjunction with having boot0cfg(8) default boot0 to packet mode.David E. O'Brien2004-08-271-1/+1
| | | | | | | Submitted by: Tor.Egge@cvsup.no.freebsd.org Notes: svn path=/head/; revision=134357
* Save a couple of bytes for the SIO case.Poul-Henning Kamp2004-06-171-4/+2
| | | | Notes: svn path=/head/; revision=130632
* Merge boot0 and boot0sio so they behave the same.Poul-Henning Kamp2004-06-111-42/+17
| | | | Notes: svn path=/head/; revision=130343
* Partly back out last revision that unnecessarily changed validRuslan Ermilov2004-05-141-236/+236
| | | | | | | | | assembler line comments and damaged the CVS history. Prompted by: bde, jhb Notes: svn path=/head/; revision=129239
* Convert block comments into C-style that is understood by cpp(1).Ruslan Ermilov2004-04-291-204/+210
| | | | | | | | | | Keep line comments in assembler style. A few lines that match the '^[[:space:]]+#' regexp still need to be fixed, somehow. OK'ed by: bde, jhb Notes: svn path=/head/; revision=128741
* Thanks to David's patches, we can now simplify these makefilesRuslan Ermilov2004-04-281-6/+4
| | | | | | | | | further, and just use PROG directly (without FILES). Suggested by: bde Notes: svn path=/head/; revision=128725
* Switch to using C99 comments in assembler preprocessed with cpp(1).Ruslan Ermilov2004-04-281-414/+414
| | | | Notes: svn path=/head/; revision=128723
* - Properly merge boot0sio.s and boot0.s into boot0.S.Ruslan Ermilov2004-04-283-666/+167
| | | | | | | | | | | | | boot0sio.s was repo-copied to boot0.S. - Rename boot0ext.s to boot0ext.S, to stay consistent with other preprocessed asm files around here, and for better portability. Repocopied by: joe Notes: svn path=/head/; revision=128722
* Temporary precaution measure until repocopy requests areRuslan Ermilov2004-04-281-5/+7
| | | | | | | processed: don't forget to clean generated .s sources. Notes: svn path=/head/; revision=128718
* Change from '#' to "//" comment character to allow CPP preprocessing.Poul-Henning Kamp2004-04-275-1295/+500
| | | | | | | | | | | Merge boot0.s and boot0sio.s into boot0_512.s controlled by "#ifdef SIO". Add Makefile magic to generate boot0.s and boot0sio.s from boot0_512.s. The compile boot0 and boot0sio have unchanged MD5 checksums. Notes: svn path=/head/; revision=128691
* Use a more compact syntax for passing the "binary" options to 'ld'.David E. O'Brien2004-04-251-1/+1
| | | | Notes: svn path=/head/; revision=128651
* Simplify the building of our i386 'binary' boot components by directlyDavid E. O'Brien2004-04-251-6/+2
| | | | | | | | | producing them using 'ld' options rather than post-processing with 'objcopy'. Idea by: Ryan Sommers <ryans@gamersimpact.com> Notes: svn path=/head/; revision=128649
* Fix a last second typo in 'vi' that caused a problem.David E. O'Brien2004-04-202-4/+4
| | | | Notes: svn path=/head/; revision=128471
* White space style cleanup.David E. O'Brien2004-04-205-109/+109
| | | | Notes: svn path=/head/; revision=128451
* MFp4: merge version #5 of the 2-sector boot0 from the "jhb boot" branch.David E. O'Brien2004-04-192-36/+48
| | | | Notes: svn path=/head/; revision=128441
* Bring back jhb's two sector (1024 bytes) 'boot0' [rev 1.22] as 'boot0ext'.David E. O'Brien2004-03-262-0/+974
| | | | Notes: svn path=/head/; revision=127458
* - Factor out -nostdlib to an upper level Makefile.inc.Ruslan Ermilov2004-02-091-4/+7
| | | | | | | | | | | | | | - Now that bsd.prog.mk deals with programs linked with -nostdlib better, and has a notion of an "internal" program, use PROG where possible. This has a good impact on the contents of .depend files and causes programs to be linked with cc(1). XXX: boot2 couldn't be converted as it's actually two programs. Tested on: i386, amd64 Notes: svn path=/head/; revision=125621
* First round of cleanups to sys/boot/ makefiles:Ruslan Ermilov2004-02-061-14/+10
| | | | | | | | | | | | | | | - do not use PROG for what's not a real C program, - use sys.mk transformation rules where possible, - only create the "machine" symlink on AMD64, - removed MAINTAINER lines in individual makefiles, - added the LIBSTAND defitinion to <bsd.libnames.mk>, - somewhat better contents in .depend files. Tested on: i386, amd64 Prodded by: bde Notes: svn path=/head/; revision=125537