| History log of /src/sys/arch/i386/stand/bootxx/bootxx_msdos/Makefile |
| Revision | | Date | Author | Comments |
| 1.5 |
| 30-Aug-2023 |
christos | Override these two booters with -Oz for clang since it produces smaller code here.
|
| 1.4 |
| 22-Jan-2020 |
martin | branches: 1.4.24; Clamp FAT partition size to 32 bit byte offsets to make the code small enough to fit.
|
| 1.3 |
| 11-Dec-2005 |
christos | branches: 1.3.166; 1.3.172; merge ktrace-lwp.
|
| 1.2 |
| 13-Oct-2003 |
lukem | branches: 1.2.4; Instead of defining TERSE_ERROR by default (due to space constraints), define NO_LBA_CHECK. bootxx_msdos still needs TERSE_ERROR because its BPB is larger than the default.
|
| 1.1 |
| 08-Oct-2003 |
lukem | Overhaul MBR handling (part 1):
<sys/bootblock.h>: * Added definitions for the Master Boot Record (MBR) used by a variety of systems (primarily i386), including the format of the BIOS Parameter Block (BPB). This information was cribbed from a variety of sources including <sys/disklabel_mbr.h> which this is a superset of.
As part of this, some data structure elements and #defines were renamed to be more "namespace friendly" and consistent with other bootblocks and MBR documentation. Update all uses of the old names to the new names.
<sys/disklabel_mbr.h>: * Deprecated in favor of <sys/bootblock.h> (the latter is more "host tool" friendly).
amd64 & i386: * Renamed /usr/mdec/bootxx_dosfs to /usr/mdec/bootxx_msdos, to be consistent with the naming convention of the msdosfs tools.
* Removed /usr/mdec/bootxx_ufs, as it's equivalent to bootxx_ffsv1 and it's confusing to have two functionally equivalent bootblocks, especially given that "ufs" has multiple meanings (it could be a synonym for "ffs", or the group of ffs/lfs/ext2fs file systems).
* Rework pbr.S (the first sector of bootxx_*): + Ensure that BPB (bytes 11..89) and the partition table (bytes 446..509) do not contain code. + Add support for booting from FAT partitions if BOOT_FROM_FAT is defined. (Only set for bootxx_msdos). + Remove "dummy" partition 3; if people want to installboot(8) these to the start of the disk they can use fdisk(8) to create a real MBR partition table... + Compile with TERSE_ERROR so it fits because of the above. Whilst this is less user friendly, I feel it's important to have a valid partition table and BPB in the MBR/PBR.
* Renamed /usr/mdec/biosboot to /usr/mdec/boot, to be consistent with other platforms.
* Enable SUPPORT_DOSFS in /usr/mdec/boot (stage2), so that we can boot off FAT partitions.
* Crank version of /usr/mdec/boot to 3.1, and fix some of the other entries in the version file.
installboot(8) (i386): * Read the existing MBR of the filesystem and retain the BIOS Parameter Block (BPB) in bytes 11..89 and the MBR partition table in bytes 446..509. (Previously installboot(8) would trash those two sections of the MBR.)
mbrlabel(8): * Use sys/lib/libkern/xlat_mbr_fstype.c instead of homegrown code to map the MBR partition type to the NetBSD disklabel type.
Test built "make release" for i386, and new bootblocks verified to work (even off FAT!).
|
| 1.2.4.4 |
| 21-Sep-2004 |
skrll | Fix the sync with head I botched.
|
| 1.2.4.3 |
| 18-Sep-2004 |
skrll | Sync with HEAD.
|
| 1.2.4.2 |
| 03-Aug-2004 |
skrll | Sync with HEAD
|
| 1.2.4.1 |
| 13-Oct-2003 |
skrll | file Makefile was added on branch ktrace-lwp on 2004-08-03 10:36:19 +0000
|
| 1.3.172.1 |
| 25-Jan-2020 |
ad | Sync with head.
|
| 1.3.166.1 |
| 08-Apr-2020 |
martin | Merge changes from current as of 20200406
|
| 1.4.24.1 |
| 14-Dec-2023 |
martin | Pull up following revision(s) (requested by rin in ticket #498):
sys/arch/i386/stand/dosboot/Makefile: revision 1.35 sys/arch/i386/stand/Makefile.booters: revision 1.95 sys/arch/i386/stand/bootxx/bootxx_msdos/Makefile: revision 1.5 sys/arch/i386/stand/Makefile.inc: revision 1.19 sys/arch/i386/stand/bootxx/bootxx_ustarfs/Makefile: revision 1.4 sys/arch/i386/stand/dosboot/Makefile: revision 1.34
Fix the clang build by setting -z noseparate-code
Merge the OPT_SIZE flags. -Oz is not always producing smaller code that -Os, so default to -Os for both, and we'll override where needed.
Override these two booters with -Oz for clang since it produces smaller code here.
x86/dosboot: Allow NULL dereference to fetch command line arguments DOS command line arguments are provided as struct psp at 0x0000; see doscommain.c.
Recent versions of gcc and clang are clever enough to optimize code block involving NULL dereference into ud2 insn.
Sprinkle -fno-delete-null-pointer-checks to doscommain.c to prevent this behavior.
Note that dosboot.com for netbsd-9 and later was broken due to this ``over optimization''. gcc 5.5.0 and clang 4.0.0 in netbsd-8 generate correct codes without this workaround.
XXX Are there still use cases for dosboot.com? Does anyone want to boot NetBSD from real-mode DOS in 2023?
x86/dosboot: Do not page-align data segment 4K alignment is too heavy burden for COM executable with 64K limit :) Fix binary size overflow for clang/amd64.
|