diff options
author | Helge Deller <deller@gmx.de> | 2024-01-02 23:15:19 +0100 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2024-01-04 18:48:58 +0100 |
commit | 52d63d583517a35b10b401e101f537643d88f5b2 (patch) | |
tree | fdb9f0c5da5a6350a302d9b24f12883a998c011b | |
parent | beb4c49cfb1c9c31f6cfc698e2baa744cbe0b646 (diff) | |
download | seabios-hppa-52d63d583517a35b10b401e101f537643d88f5b2.zip seabios-hppa-52d63d583517a35b10b401e101f537643d88f5b2.tar.gz seabios-hppa-52d63d583517a35b10b401e101f537643d88f5b2.tar.bz2 |
parisc: Prepare for builing a 64-bit firmware
Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | Makefile.parisc | 12 |
2 files changed, 7 insertions, 8 deletions
@@ -107,7 +107,8 @@ parisc: FORCE ifneq "$(CONFIG_PARISC)" "y" @echo "ERROR: run 'make config' and select PA-RISC before building the parisc target." endif - DIRS="" $(MAKE) -f Makefile.parisc all + DIRS="" OUT=out/ BITS=32 BIT_SUFFIX="" CROSS_PREFIX=hppa-linux-gnu- $(MAKE) -f Makefile.parisc all + # DIRS="" OUT=out-64/ BITS=64 BIT_SUFFIX="64" CROSS_PREFIX=hppa64-linux-gnu- $(MAKE) -f Makefile.parisc all # Make definitions .PHONY : all clean distclean parisc FORCE diff --git a/Makefile.parisc b/Makefile.parisc index f88fbd8..4240e0c 100644 --- a/Makefile.parisc +++ b/Makefile.parisc @@ -5,7 +5,7 @@ # This file may be distributed under the terms of the GNU LGPLv3 license. # Output directory -OUT=out/ +# OUT=out-$(BITS)/ (provided by caller) # Common command definitions export HOSTCC := $(CC) @@ -13,7 +13,6 @@ export CONFIG_SHELL := sh export KCONFIG_AUTOHEADER := autoconf.h export KCONFIG_CONFIG := $(CURDIR)/.config export LC_ALL := C -CROSS_PREFIX=hppa-linux-gnu- ifneq ($(CROSS_PREFIX),) CC=$(CROSS_PREFIX)gcc LIBGCC = $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) @@ -32,7 +31,6 @@ LD32BIT_FLAG:= # misc.c stacks.c system.c resume.c pcibios.c hw/timer.c SRCBOTH=output.c string.c block.c cdrom.c disk.c kbd.c \ serial.c sercon.c clock.c vgahooks.c \ - apm.c cp437.c \ hw/pci.c hw/rtc.c hw/dma.c hw/pic.c hw/serialio.c \ hw/usb.c hw/usb-uhci.c hw/usb-ohci.c hw/usb-ehci.c \ hw/usb-hid.c hw/usb-msc.c hw/usb-uas.c \ @@ -43,7 +41,7 @@ SRCBOTH=output.c string.c block.c cdrom.c disk.c kbd.c \ SRC32FLAT=$(SRCBOTH) post.c e820map.c romfile.c optionroms.c \ pmm.c font.c boot.c bootsplash.c jpeg.c bmp.c tcgbios.c sha1.c \ hw/pcidevice.c hw/ahci.c hw/pvscsi.c hw/usb-xhci.c hw/usb-hub.c hw/sdcard.c \ - fw/coreboot.c fw/lzmadecode.c fw/multiboot.c fw/csm.c fw/biostables.c \ + fw/coreboot.c fw/lzmadecode.c fw/multiboot.c fw/biostables.c \ fw/paravirt.c fw/shadow.c fw/pciinit.c fw/smm.c fw/xen.c \ fw/acpi.c fw/mptable.c fw/pirtable.c fw/smbios.c fw/romfile_loader.c \ hw/virtio-ring.c hw/virtio-pci.c hw/virtio-blk.c hw/virtio-scsi.c \ @@ -98,7 +96,7 @@ endif -include $(KCONFIG_CONFIG) target-y := -target-$(CONFIG_PARISC) += $(OUT)hppa-firmware.img +target-$(CONFIG_PARISC) += $(OUT)hppa-firmware$(BIT_SUFFIX).img all: $(target-y) @@ -161,9 +159,9 @@ $(OUT)ccode32flat.o: $(OUT)autoversion.h $(OUT)autoconf.h $(patsubst %.c, $(OUT) $(OUT)autoversion.h: $(Q)$(PYTHON) ./scripts/buildversion.py -e "$(EXTRAVERSION)" -t "$(CC);$(AS);$(LD);$(OBJCOPY);$(OBJDUMP);$(STRIP)" $(OUT)autoversion.h -$(OUT)hppa-firmware.img: $(OUT)autoconf.h $(OUT)head.o $(OUT)ccode32flat.o src/version.c +$(OUT)hppa-firmware$(BIT_SUFFIX).img: $(OUT)autoconf.h $(OUT)head.o $(OUT)ccode32flat.o src/version.c @echo " Linking $@" - $(Q)$(CPP) $(CPPFLAGS) -Isrc -D__ASSEMBLY__ src/parisc/pafirmware.lds.S -o $(OUT)pafirmware.lds + $(Q)$(CPP) $(CPPFLAGS) -Isrc -D__ASSEMBLY__ -DBITS=$(BITS) src/parisc/pafirmware.lds.S -o $(OUT)pafirmware.lds $(Q)$(CC) $(CFLAGS32FLAT) -c src/version.c -o $(OUT)version.o $(Q)$(LD) -N -T $(OUT)pafirmware.lds $(OUT)head.o $(OUT)version.o -X -o $@ -e startup --as-needed $(OUT)ccode32flat.o $(LIBGCC) |