mirror of https://github.com/ipxe/ipxe.git
[bios] Add bin-x86_64-pcbios build platform
Move most arch/i386 files to arch/x86, and adjust the contents of the Makefiles and the include/bits/*.h headers to reflect the new locations. This patch makes no substantive code changes, as can be seen using a rename-aware diff (e.g. "git show -M5"). This patch does not make the pcbios platform functional for x86_64; it merely allows it to compile without errors. Signed-off-by: Michael Brown <mcb30@ipxe.org>pull/45/head
parent
43515f9f1a
commit
f468f12b1e
|
@ -80,20 +80,11 @@ PIE_FLAGS := $(shell $(PIE_TEST) && $(ECHO) '-fno-PIE -nopie')
|
|||
WORKAROUND_CFLAGS += $(PIE_FLAGS)
|
||||
endif
|
||||
|
||||
# Define version string for lkrnprefix.S
|
||||
#
|
||||
CFLAGS_lkrnprefix += -DVERSION="\"$(VERSION)\""
|
||||
|
||||
# i386-specific directories containing source files
|
||||
#
|
||||
SRCDIRS += arch/i386/core arch/i386/transitions arch/i386/prefix
|
||||
SRCDIRS += arch/i386/firmware/pcbios
|
||||
SRCDIRS += arch/i386/core
|
||||
SRCDIRS += arch/i386/image
|
||||
SRCDIRS += arch/i386/interface/pcbios
|
||||
SRCDIRS += arch/i386/interface/pxe
|
||||
SRCDIRS += arch/i386/interface/pxeparent
|
||||
SRCDIRS += arch/i386/interface/syslinux
|
||||
SRCDIRS += arch/i386/hci/commands
|
||||
SRCDIRS += arch/i386/interface/syslinux
|
||||
|
||||
# Include common x86 Makefile
|
||||
#
|
||||
|
|
|
@ -1,123 +1,6 @@
|
|||
# -*- makefile -*- : Force emacs to use Makefile mode
|
||||
|
||||
# The i386 linker script
|
||||
# Include generic BIOS Makefile
|
||||
#
|
||||
LDSCRIPT = arch/i386/scripts/i386.lds
|
||||
|
||||
# Stop ld from complaining about our customised linker script
|
||||
#
|
||||
LDFLAGS += -N --no-check-sections
|
||||
|
||||
# pcbios specific drivers
|
||||
SRCDIRS += arch/i386/drivers
|
||||
SRCDIRS += arch/i386/drivers/net
|
||||
|
||||
# Media types.
|
||||
#
|
||||
MEDIA += rom
|
||||
MEDIA += mrom
|
||||
MEDIA += pcirom
|
||||
MEDIA += isarom
|
||||
MEDIA += pxe
|
||||
MEDIA += kpxe
|
||||
MEDIA += kkpxe
|
||||
MEDIA += kkkpxe
|
||||
MEDIA += lkrn
|
||||
MEDIA += dsk
|
||||
MEDIA += nbi
|
||||
MEDIA += hd
|
||||
MEDIA += raw
|
||||
MEDIA += exe
|
||||
|
||||
# Padding rules
|
||||
#
|
||||
PAD_rom = $(PERL) $(PADIMG) --blksize=512 --byte=0xff
|
||||
PAD_mrom = $(PAD_rom)
|
||||
PAD_pcirom = $(PAD_rom)
|
||||
PAD_isarom = $(PAD_rom)
|
||||
PAD_dsk = $(PERL) $(PADIMG) --blksize=512
|
||||
PAD_hd = $(PERL) $(PADIMG) --blksize=32768
|
||||
PAD_exe = $(PERL) $(PADIMG) --blksize=512
|
||||
|
||||
# Finalisation rules
|
||||
#
|
||||
FINALISE_rom = $(PERL) $(FIXROM)
|
||||
FINALISE_mrom = $(FINALISE_rom)
|
||||
FINALISE_pcirom = $(FINALISE_rom)
|
||||
FINALISE_isarom = $(FINALISE_rom)
|
||||
|
||||
# Use $(ROMS) rather than $(DRIVERS) for "allroms", "allmroms", etc.
|
||||
#
|
||||
LIST_NAME_rom := ROMS
|
||||
LIST_NAME_mrom := ROMS
|
||||
LIST_NAME_pcirom := ROMS
|
||||
LIST_NAME_isarom := ROMS
|
||||
|
||||
# Locations of isolinux files
|
||||
#
|
||||
SYSLINUX_DIR_LIST := \
|
||||
/usr/lib/syslinux \
|
||||
/usr/lib/syslinux/bios \
|
||||
/usr/lib/syslinux/modules/bios \
|
||||
/usr/share/syslinux \
|
||||
/usr/share/syslinux/bios \
|
||||
/usr/share/syslinux/modules/bios \
|
||||
/usr/local/share/syslinux \
|
||||
/usr/local/share/syslinux/bios \
|
||||
/usr/local/share/syslinux/modules/bios \
|
||||
/usr/lib/ISOLINUX
|
||||
ISOLINUX_BIN_LIST := \
|
||||
$(ISOLINUX_BIN) \
|
||||
$(patsubst %,%/isolinux.bin,$(SYSLINUX_DIR_LIST))
|
||||
LDLINUX_C32_LIST := \
|
||||
$(LDLINUX_C32) \
|
||||
$(patsubst %,%/ldlinux.c32,$(SYSLINUX_DIR_LIST))
|
||||
ISOLINUX_BIN = $(firstword $(wildcard $(ISOLINUX_BIN_LIST)))
|
||||
LDLINUX_C32 = $(firstword $(wildcard $(LDLINUX_C32_LIST)))
|
||||
|
||||
# rule to make a non-emulation ISO boot image
|
||||
NON_AUTO_MEDIA += iso
|
||||
%iso: %lkrn util/geniso
|
||||
$(QM)$(ECHO) " [GENISO] $@"
|
||||
$(Q)ISOLINUX_BIN=$(ISOLINUX_BIN) LDLINUX_C32=$(LDLINUX_C32) \
|
||||
VERSION="$(VERSION)" bash util/geniso -o $@ $<
|
||||
|
||||
# rule to make a floppy emulation ISO boot image
|
||||
NON_AUTO_MEDIA += liso
|
||||
%liso: %lkrn util/geniso
|
||||
$(QM)$(ECHO) " [GENISO] $@"
|
||||
$(Q)VERSION="$(VERSION)" bash util/geniso -l -o $@ $<
|
||||
|
||||
# rule to make a syslinux floppy image (mountable, bootable)
|
||||
NON_AUTO_MEDIA += sdsk
|
||||
%sdsk: %lkrn util/gensdsk
|
||||
$(QM)$(ECHO) " [GENSDSK] $@"
|
||||
$(Q)bash util/gensdsk $@ $<
|
||||
|
||||
# rule to write disk images to /dev/fd0
|
||||
NON_AUTO_MEDIA += fd0
|
||||
%fd0 : %dsk
|
||||
$(QM)$(ECHO) " [DD] $@"
|
||||
$(Q)dd if=$< bs=512 conv=sync of=/dev/fd0
|
||||
$(Q)sync
|
||||
|
||||
# Special target for building Master Boot Record binary
|
||||
$(BIN)/mbr.bin : $(BIN)/mbr.o
|
||||
$(QM)$(ECHO) " [OBJCOPY] $@"
|
||||
$(Q)$(OBJCOPY) -O binary $< $@
|
||||
|
||||
# rule to make a USB disk image
|
||||
$(BIN)/usbdisk.bin : $(BIN)/usbdisk.o
|
||||
$(QM)$(ECHO) " [OBJCOPY] $@"
|
||||
$(Q)$(OBJCOPY) -O binary $< $@
|
||||
|
||||
NON_AUTO_MEDIA += usb
|
||||
%usb: $(BIN)/usbdisk.bin %hd
|
||||
$(QM)$(ECHO) " [FINISH] $@"
|
||||
$(Q)cat $^ > $@
|
||||
|
||||
# Padded floppy image (e.g. for iLO)
|
||||
NON_AUTO_MEDIA += pdsk
|
||||
%pdsk : %dsk
|
||||
$(Q)cp $< $@
|
||||
$(Q)$(PADIMG) --blksize=1474560 $@
|
||||
MAKEDEPS += arch/x86/Makefile.pcbios
|
||||
include arch/x86/Makefile.pcbios
|
||||
|
|
|
@ -5,12 +5,17 @@ INCDIRS += arch/x86/include
|
|||
# x86-specific directories containing source files
|
||||
#
|
||||
SRCDIRS += arch/x86/core
|
||||
SRCDIRS += arch/x86/image
|
||||
SRCDIRS += arch/x86/interface/pcbios
|
||||
SRCDIRS += arch/x86/interface/pxe
|
||||
SRCDIRS += arch/x86/interface/pxeparent
|
||||
SRCDIRS += arch/x86/interface/efi
|
||||
SRCDIRS += arch/x86/interface/vmware
|
||||
SRCDIRS += arch/x86/prefix
|
||||
SRCDIRS += arch/x86/hci/commands
|
||||
SRCDIRS += arch/x86/drivers/xen
|
||||
SRCDIRS += arch/x86/drivers/hyperv
|
||||
SRCDIRS += arch/x86/transitions
|
||||
|
||||
# breaks building some of the linux-related objects
|
||||
CFLAGS += -Ulinux
|
||||
|
@ -18,6 +23,10 @@ CFLAGS += -Ulinux
|
|||
# disable valgrind
|
||||
CFLAGS += -DNVALGRIND
|
||||
|
||||
# Define version string for lkrnprefix.S
|
||||
#
|
||||
CFLAGS_lkrnprefix += -DVERSION="\"$(VERSION)\""
|
||||
|
||||
# Include Hyper-V driver in the all-drivers build
|
||||
#
|
||||
DRIVERS_hyperv += hyperv
|
||||
|
|
|
@ -0,0 +1,123 @@
|
|||
# -*- makefile -*- : Force emacs to use Makefile mode
|
||||
|
||||
# BIOS-specific directories containing source files
|
||||
#
|
||||
SRCDIRS += arch/x86/drivers/net
|
||||
|
||||
# The i386 linker script
|
||||
#
|
||||
LDSCRIPT = arch/x86/scripts/pcbios.lds
|
||||
|
||||
# Stop ld from complaining about our customised linker script
|
||||
#
|
||||
LDFLAGS += -N --no-check-sections
|
||||
|
||||
# Media types.
|
||||
#
|
||||
MEDIA += rom
|
||||
MEDIA += mrom
|
||||
MEDIA += pcirom
|
||||
MEDIA += isarom
|
||||
MEDIA += pxe
|
||||
MEDIA += kpxe
|
||||
MEDIA += kkpxe
|
||||
MEDIA += kkkpxe
|
||||
MEDIA += lkrn
|
||||
MEDIA += dsk
|
||||
MEDIA += nbi
|
||||
MEDIA += hd
|
||||
MEDIA += raw
|
||||
MEDIA += exe
|
||||
|
||||
# Padding rules
|
||||
#
|
||||
PAD_rom = $(PERL) $(PADIMG) --blksize=512 --byte=0xff
|
||||
PAD_mrom = $(PAD_rom)
|
||||
PAD_pcirom = $(PAD_rom)
|
||||
PAD_isarom = $(PAD_rom)
|
||||
PAD_dsk = $(PERL) $(PADIMG) --blksize=512
|
||||
PAD_hd = $(PERL) $(PADIMG) --blksize=32768
|
||||
PAD_exe = $(PERL) $(PADIMG) --blksize=512
|
||||
|
||||
# Finalisation rules
|
||||
#
|
||||
FINALISE_rom = $(PERL) $(FIXROM)
|
||||
FINALISE_mrom = $(FINALISE_rom)
|
||||
FINALISE_pcirom = $(FINALISE_rom)
|
||||
FINALISE_isarom = $(FINALISE_rom)
|
||||
|
||||
# Use $(ROMS) rather than $(DRIVERS) for "allroms", "allmroms", etc.
|
||||
#
|
||||
LIST_NAME_rom := ROMS
|
||||
LIST_NAME_mrom := ROMS
|
||||
LIST_NAME_pcirom := ROMS
|
||||
LIST_NAME_isarom := ROMS
|
||||
|
||||
# Locations of isolinux files
|
||||
#
|
||||
SYSLINUX_DIR_LIST := \
|
||||
/usr/lib/syslinux \
|
||||
/usr/lib/syslinux/bios \
|
||||
/usr/lib/syslinux/modules/bios \
|
||||
/usr/share/syslinux \
|
||||
/usr/share/syslinux/bios \
|
||||
/usr/share/syslinux/modules/bios \
|
||||
/usr/local/share/syslinux \
|
||||
/usr/local/share/syslinux/bios \
|
||||
/usr/local/share/syslinux/modules/bios \
|
||||
/usr/lib/ISOLINUX
|
||||
ISOLINUX_BIN_LIST := \
|
||||
$(ISOLINUX_BIN) \
|
||||
$(patsubst %,%/isolinux.bin,$(SYSLINUX_DIR_LIST))
|
||||
LDLINUX_C32_LIST := \
|
||||
$(LDLINUX_C32) \
|
||||
$(patsubst %,%/ldlinux.c32,$(SYSLINUX_DIR_LIST))
|
||||
ISOLINUX_BIN = $(firstword $(wildcard $(ISOLINUX_BIN_LIST)))
|
||||
LDLINUX_C32 = $(firstword $(wildcard $(LDLINUX_C32_LIST)))
|
||||
|
||||
# rule to make a non-emulation ISO boot image
|
||||
NON_AUTO_MEDIA += iso
|
||||
%iso: %lkrn util/geniso
|
||||
$(QM)$(ECHO) " [GENISO] $@"
|
||||
$(Q)ISOLINUX_BIN=$(ISOLINUX_BIN) LDLINUX_C32=$(LDLINUX_C32) \
|
||||
VERSION="$(VERSION)" bash util/geniso -o $@ $<
|
||||
|
||||
# rule to make a floppy emulation ISO boot image
|
||||
NON_AUTO_MEDIA += liso
|
||||
%liso: %lkrn util/geniso
|
||||
$(QM)$(ECHO) " [GENISO] $@"
|
||||
$(Q)VERSION="$(VERSION)" bash util/geniso -l -o $@ $<
|
||||
|
||||
# rule to make a syslinux floppy image (mountable, bootable)
|
||||
NON_AUTO_MEDIA += sdsk
|
||||
%sdsk: %lkrn util/gensdsk
|
||||
$(QM)$(ECHO) " [GENSDSK] $@"
|
||||
$(Q)bash util/gensdsk $@ $<
|
||||
|
||||
# rule to write disk images to /dev/fd0
|
||||
NON_AUTO_MEDIA += fd0
|
||||
%fd0 : %dsk
|
||||
$(QM)$(ECHO) " [DD] $@"
|
||||
$(Q)dd if=$< bs=512 conv=sync of=/dev/fd0
|
||||
$(Q)sync
|
||||
|
||||
# Special target for building Master Boot Record binary
|
||||
$(BIN)/mbr.bin : $(BIN)/mbr.o
|
||||
$(QM)$(ECHO) " [OBJCOPY] $@"
|
||||
$(Q)$(OBJCOPY) -O binary $< $@
|
||||
|
||||
# rule to make a USB disk image
|
||||
$(BIN)/usbdisk.bin : $(BIN)/usbdisk.o
|
||||
$(QM)$(ECHO) " [OBJCOPY] $@"
|
||||
$(Q)$(OBJCOPY) -O binary $< $@
|
||||
|
||||
NON_AUTO_MEDIA += usb
|
||||
%usb: $(BIN)/usbdisk.bin %hd
|
||||
$(QM)$(ECHO) " [FINISH] $@"
|
||||
$(Q)cat $^ > $@
|
||||
|
||||
# Padded floppy image (e.g. for iLO)
|
||||
NON_AUTO_MEDIA += pdsk
|
||||
%pdsk : %dsk
|
||||
$(Q)cp $< $@
|
||||
$(Q)$(PADIMG) --blksize=1474560 $@
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/** @file
|
||||
*
|
||||
* i386-specific entropy API implementations
|
||||
* x86-specific entropy API implementations
|
||||
*
|
||||
*/
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/** @file
|
||||
*
|
||||
* i386-specific CPU sleeping API implementations
|
||||
* x86-specific CPU sleeping API implementations
|
||||
*
|
||||
*/
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/** @file
|
||||
*
|
||||
* i386-specific reboot API implementations
|
||||
* x86-specific reboot API implementations
|
||||
*
|
||||
*/
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/** @file
|
||||
*
|
||||
* i386-specific sanboot API implementations
|
||||
* x86-specific sanboot API implementations
|
||||
*
|
||||
*/
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/** @file
|
||||
*
|
||||
* i386-specific SMBIOS API implementations
|
||||
* x86-specific SMBIOS API implementations
|
||||
*
|
||||
*/
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/** @file
|
||||
*
|
||||
* i386-specific time API implementations
|
||||
* x86-specific time API implementations
|
||||
*
|
||||
*/
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/** @file
|
||||
*
|
||||
* i386-specific timer API implementations
|
||||
* x86-specific timer API implementations
|
||||
*
|
||||
*/
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/** @file
|
||||
*
|
||||
* i386-specific user access API implementations
|
||||
* x86-specific user access API implementations
|
||||
*
|
||||
*/
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/** @file
|
||||
*
|
||||
* i386-specific user memory allocation API implementations
|
||||
* x86-specific user memory allocation API implementations
|
||||
*
|
||||
*/
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue