summaryrefslogtreecommitdiffstats
path: root/sys/boot/i386/boot2/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* MFC r280980:dim2015-04-091-2/+2
| | | | | | | | Ensure the cross assembler, linker and objcopy are used for the build32 stage, just like for the regular world stage. Reviewed by: rodrigc, imp, bapt, emaste Differential Revision: https://reviews.freebsd.org/D2187
* MFC r279598:dim2015-03-081-1/+3
| | | | | | | | | | When compiling boot2 with gcc on i386 and pc98, only use the custom flag -mno-align-long-strings when compiling with base gcc. This is checked by comparing the version number against 4.2.1, which is not exactly right, but good enough. (There is no other way to check whether we are using the non-standard gcc in base, as far as I know.) Reported by: rodrigc
* MFC r260334:dim2014-01-091-1/+2
| | | | | | | | | | | | Split the last gcc-specific flags off into CFLAGS.gcc. This also removes the need to use -Qunused-arguments for clang throughout the tree. MFC r260369: Apply band-aid for 32-bit compat libs failures after r260334: put back -Qunused-arguments for clang for now, until I can figure out a way to make it unneeded in all scenarios. Sorry about the breakage.
* MFC r260095:dim2014-01-041-3/+3
| | | | | | | | | | For sys/boot/i386 and sys/boot/pc98, separate flags to be passed directly to the linker (LD_FLAGS) from flags passed indirectly, via the compiler driver (LDFLAGS). This is because several Makefiles under sys/boot/i386 and sys/boot/pc98 use ${LD} directly to link, and the normal LDFLAGS value should not be used in these cases.
* MFC r257532 (by adrian):dim2013-12-301-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix this build for clang. MFC r259730: To avoid having to explicitly test COMPILER_TYPE for setting clang-specific or gcc-specific flags, introduce the following new variables for use in Makefiles: CFLAGS.clang CFLAGS.gcc CXXFLAGS.clang CXXFLAGS.gcc In bsd.sys.mk, these get appended to the regular CFLAGS or CXXFLAGS for the right compiler. MFC r259913: For libstand and sys/boot, split off gcc-only flags into CFLAGS.gcc. MFC r259927: Fix pc98 build, by also forcing COMPILER_TYPE in sys/boot/pc98/boot2's Makefile. Pointy hat to: dim
* Define several extra macros in bsd.sys.mk and sys/conf/kern.pre.mk, todim2012-02-281-10/+6
| | | | | | | | | | | | | | | | | | | | | 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
* When building some of the boot loaders with clang, and DEBUG_FLAGS ordim2011-07-171-0/+3
| | | | | | | | | | | CFLAGS having '-g' in it, clang outputs several assembly directives that are too new for our version of binutils. Therefore, assemble the resulting .s files with clang instead. A more general solution can be implemented when a GNU as-compatible driver for clang's integrated assembler appears. Reported by: dougb
* Fine-tune llvm optimization for sys/boot/i386/boot2, which shaves offdim2011-05-051-1/+2
| | | | | | some more bytes from the final boot2 image. Submitted by: rdivacky
* Clang r130700 can now compile sys/boot/i386/boot2 with room to spare.dim2011-05-021-3/+6
|
* Due to space constraints, the UFS boot2 and boot1 use an evil hack wherejhb2011-04-281-0/+1
| | | | | | | | | boot2 calls back into boot1 to perform disk reads. The ZFS MBR boot blocks do not have the same space constraints, so remove this hack for ZFS. While here, remove commented out code to support C/H/S addressing from zfsldr. The ZFS and GPT bootstraps always just use EDD LBA addressing. MFC after: 2 weeks
* Build boot2 with -mregparm=3, ie. pass upto 3 arguments via registers.rdivacky2011-04-041-0/+1
| | | | | | | | | | | This modifies CFLAGS and tweaks sio.S to use the new calling convention. The sio_init() and sio_putc() prototypes are modified so that other users of this code know the correct calling convention. This makes the code smaller when compiled with clang. Reviewed by: jhb Tested by: me and Freddie Cash <fjwcash gmail com>
* Remove superfluous -mno-(mmx|3dnow|sse|sse2|sse3) flags in Makefilesdim2011-01-051-1/+0
| | | | | | | under sys/boot/{i386,pc98}, since these are already added via sys/boot/{i386,pc98}/Makefile.inc. Submitted by: arundel
* When building world with clang, for gnu/lib/libobjc, sys/boot/i386/boot2dim2010-09-211-3/+1
| | | | | | | | | | | | and sys/boot/pc98/boot2, do not simply assign 'gcc' to CC, since compile flags are sometimes passed via this variable, for example during the build32 stage on amd64. This caused the 32-bit libobjc build on amd64 to fail. Instead, only replace the first instance of clang (if any, including optional path) with gcc, and leave the arguments alone. Approved-by: rpaulo (mentor)
* Use a more robust way to substitute gcc for clang, when compilingdim2010-08-311-1/+3
| | | | | | | gnu/lib/libobjc and sys/boot/i386/boot2, so it also works when using absolute paths and/or options, as in CC="/absolute/path/clang -foo". Approved by: rpaulo (mentor)
* MF tbemd: Minor tweaks, prefer MACHINE_CPUARCH generally to MACHINE_ARCHimp2010-08-231-1/+1
|
* Make sure the boot2 stage is compiled with gcc, as clang has norpaulo2010-08-211-0/+5
| | | | | | | problems compiling it, but it just gets too big at the moment, even with -Os. This is not applicable to gptboot, though. Submitted by: Dimitry Andric <dimitry at andric.com>
* Revert the part of change 107879 that employs the unused bytes aftermarcel2009-03-071-1/+1
| | | | | | | | | | | | | | the disklabel in the 2nd sector for boot code. Even with both UFS1 and UFS2 supported, there's enough bytes left that we don't have to nibble from the disklabel. Thus, the entire 2nd sector is now reserved for the disklabel, which makes the bootcode compatible again with disklabels that have more than 8 partitions -- such as those created and supported by gpart. i386: 135 bytes available amd64: 151 bytes available Ok'd by: jhb
* Tweak inlining parameters a little. Add warning to tell us if functionkan2007-05-191-1/+2
| | | | we declared as inline can not be inlined.
* Add -mno-sse3 for prescott/noconaache2005-07-151-1/+1
|
* Ensure GCC does not use FP registers in integer code.obrien2005-03-151-0/+1
| | | | | | I think all we really need is -fno-sse2. I really don't like cluttering up the compiler invocation, but this bigger hammer will fix reported problems for now.
* B1FLAGS -> BOOT_BOOT1_FLAGS, which is consistent withyar2004-08-271-2/+2
| | | | naming of other boot-related make vars.
* Compile boot2 with -fno-unit-at-a-time. GCCs aggressive optimizationkan2004-07-301-1/+3
| | | | breaks boot in spectacular ways otherwise.
* Re-add sio.S, and properly deal with assembler files.ru2004-02-171-9/+4
| | | | Repocopied by: joe
* - Factor out -nostdlib to an upper level Makefile.inc.ru2004-02-091-1/+1
| | | | | | | | | | | - 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
* Argh, unbreak "make depend" for AMD64.ru2004-02-071-1/+1
| | | | Reported by: kris
* - Removed -elf which is not a valid gcc(1) option anymore.ru2004-02-071-1/+1
| | | | - Removed -ffreestanding; it's enforced by ../Makefile.inc.
* Generate .depend file.ru2004-02-071-0/+2
|
* Untangle building of AMD64 boot code.ru2004-02-071-4/+2
| | | | Tested on: amd64 (sledge)
* First round of cleanups to sys/boot/ makefiles:ru2004-02-061-60/+43
| | | | | | | | | | | | - 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
* Inherit BINDIR from a parent Makefile.inc.ru2004-02-061-1/+0
|
* Build on amd64. Yes, I know this isn't particularly nice.peter2003-06-261-0/+12
|
* Fixed CLEANFILES.ru2003-02-251-1/+1
| | | | Submitted by: cron
* Build a file "boot" which consists of boot1 and boot2 concatenated.phk2003-01-261-1/+6
| | | | | There is little if any reason to treat the two components separately and it will simplify disklabel(8) and libdisk if we didn't.
* -mno-align-long-strings can make things smaller, so lets use it in hopesobrien2002-12-211-0/+1
| | | | that it does here.
* I didn't intend to delete this rm from the Makefile. It snuck in atimp2002-12-181-0/+1
| | | | | | | | | the last second before the commit. # likely we can remove this hack now that gcc generates better aligned code # in the align to word case. Noticed by: bde
* Make both UFS1 and UFS2 fit on the same boot blocks. These are aimp2002-12-171-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | subset of Peter's patchs that are believed to be safe. Makefile tweaks: o -fomit-frame-pointer o Change default to building both UFS1 and UFS2 bootblocks. Lots of boot2 tweaks: o lookup is only ever called with kname, so use it directly. o inline memsize o getstr are only ever called with cmd, so hardware that. o tweaks to the parsing code to test after the conversion rather than before since we tested after anyways. o eliminate support for %x in printf. o eliminate a few bytes in printfs. o Tweak the boot banner. o eliminate support for wd and " " devices (I might add wd back to keep bde happy). o eliminate support for a few arguments. This takes us from -162 bytes free to 67 bytes free. I've tested this only on a few systems, so be careful when updating to this change. Submitted by: peter, imp, ian
* Employ the unused bytes after the disklabel in the second sector. This makesphk2002-12-141-15/+6
| | | | | | | | | | it possible to make UFS1_ONLY and UFS2_ONLY versions which fit inside the traditional 16 sectors. Remove assorted now unneeded hackery. UFS1_AND_UFS2 still needs another 150 bytes to work, and that is probably not within our reach, ever.
* Revert MEM_USR back to 0xa000 for BTX clients. Instead, adjust boot2jhb2002-10-081-1/+1
| | | | | | | to run at 0xc000 by changing its virtual start address from 0x1000 to 0x2000. Tested by: phk
* Now that ufsread.c doesn't do 64bit divide remainder operations,phk2002-10-081-15/+2
| | | | | | don't bother with libkern. Sponsored by: DARPA & NAI Labs.
* Reinstate rev 1.36 with an important line that got missed. Note thisgreen2002-10-081-2/+5
| | | | | also improves the "random undocumented offsets into various memory spaces" a little bit.
* Unbreak boot2 by backing out rev 1.36 to Makefile, which does notphk2002-10-081-3/+1
| | | | | | | | | | | | | | | | | | work as advertised: bang# pwd /bang/src/sys/boot/i386/boot2 bang# make clean >& /dev/null bang# cvs -q update -r 1.35 Makefile >& /dev/null bang# make >& /dev/null bang# cat /usr/obj/`pwd`/boot2.h #define XREADORG 0x725 bang# cvs -q update -r 1.36 Makefile > & /dev/null bang# make clean > & /dev/null bang# make > & /dev/null bang# cat /usr/obj/`pwd`/boot2.h #define XREADORG 0x25 bang#
* Correct a bug in adding 0x700 to a number.green2002-10-071-1/+3
|
* Conditionalize the number of sectors loaded by boot1.s on UFS1/UFS12.phk2002-10-071-3/+30
| | | | | | | | Conditionalize the "XX bytes left" checks reference on UFS1/UFS12. Conditionally build the necessary 64bit math for boot2 if UFS12. Sponsored by: DARPA & NAI Labs.
* Change the comment character from # to // in boot1.s and runphk2002-10-071-1/+2
| | | | | | it through CPP so we can conditionalized things. Sponsored by: DARPA & NAI Labs
* Move the definition of UFS1_ONLY into the Makefiles where it belongs.phk2002-10-071-0/+2
| | | | Sponsored by: DARPA & NAI Labs.
* Drop support for COPY, -c has been the default mode of install(1)ru2002-07-291-2/+2
| | | | | | for a long time now. Approved by: bde
* Revert the part of Kirks UFS2 commit which added divdi3.c and moddi3.cphk2002-06-211-1/+1
| | | | to libi386, this issue was resolved already in a cleaner way.
* This commit adds basic support for the UFS2 filesystem. The UFS2mckusick2002-06-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | filesystem expands the inode to 256 bytes to make space for 64-bit block pointers. It also adds a file-creation time field, an ability to use jumbo blocks per inode to allow extent like pointer density, and space for extended attributes (up to twice the filesystem block size worth of attributes, e.g., on a 16K filesystem, there is space for 32K of attributes). UFS2 fully supports and runs existing UFS1 filesystems. New filesystems built using newfs can be built in either UFS1 or UFS2 format using the -O option. In this commit UFS1 is the default format, so if you want to build UFS2 format filesystems, you must specify -O 2. This default will be changed to UFS2 when UFS2 proves itself to be stable. In this commit the boot code for reading UFS2 filesystems is not compiled (see /sys/boot/common/ufsread.c) as there is insufficient space in the boot block. Once the size of the boot block is increased, this code can be defined. Things to note: the definition of SBSIZE has changed to SBLOCKSIZE. The header file <ufs/ufs/dinode.h> must be included before <ufs/ffs/fs.h> so as to get the definitions of ufs2_daddr_t and ufs_lbn_t. Still TODO: Verify that the first level bootstraps work for all the architectures. Convert the utility ffsinfo to understand UFS2 and test growfs. Add support for the extended attribute storage. Update soft updates to ensure integrity of extended attribute storage. Switch the current extended attribute interfaces to use the extended attribute storage. Add the extent like functionality (framework is there, but is currently never used). Sponsored by: DARPA & NAI Labs. Reviewed by: Poul-Henning Kamp <phk@freebsd.org>
* Add explicit dependency on ufsread.cphk2002-06-051-1/+1
|
* Preparation for UFS2 commit:phk2002-06-051-0/+1
| | | | | | | Factor the ufs reading code out of the i386/boot2 loader so it can be reused by for instance sparc64. Sponsored by: DARPA and NAI Labs.
OpenPOWER on IntegriCloud