m68k: update build to support MultiBootSubDirSetup
Change-Id: Idbbbb089286ad7d76f61993670a20d240bfe773c
This commit is contained in:
parent
9ad59bd841
commit
494acd2185
@ -323,7 +323,7 @@ rule KernelArchitectureSetup architecture
|
|||||||
|
|
||||||
case m68k :
|
case m68k :
|
||||||
HAIKU_KERNEL_PLATFORM ?= atari_m68k ;
|
HAIKU_KERNEL_PLATFORM ?= atari_m68k ;
|
||||||
HAIKU_BOOT_TARGETS += atari_m68k ;
|
HAIKU_BOOT_TARGETS += amiga_m68k atari_m68k ;
|
||||||
switch $(HAIKU_KERNEL_PLATFORM) {
|
switch $(HAIKU_KERNEL_PLATFORM) {
|
||||||
case atari_m68k :
|
case atari_m68k :
|
||||||
{
|
{
|
||||||
|
@ -20,6 +20,8 @@ BootstrapPackageRepository HaikuPortsCross
|
|||||||
|
|
||||||
:
|
:
|
||||||
# source packages
|
# source packages
|
||||||
|
binutils_bootstrap
|
||||||
|
gcc_bootstrap
|
||||||
libsolv_bootstrap
|
libsolv_bootstrap
|
||||||
zlib_bootstrap
|
zlib_bootstrap
|
||||||
:
|
:
|
||||||
|
@ -150,6 +150,71 @@ actions BuildUImageScript1
|
|||||||
rm -f $(<).txt
|
rm -f $(<).txt
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# the bootsector on haiku_loader.amiga_m68k must be checksummed
|
||||||
|
rule ChecksumAmigaLoader
|
||||||
|
{
|
||||||
|
local haikuLoader = $(1) ;
|
||||||
|
local checksummer = <build>fixup_amiga_boot_checksum ;
|
||||||
|
|
||||||
|
Depends $(haikuLoader) : $(checksummer) ;
|
||||||
|
|
||||||
|
TARGET_CHECKSUM on $(haikuLoader) = $(checksummer) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
actions ChecksumAmigaLoader bind TARGET_CHECKSUM
|
||||||
|
{
|
||||||
|
$(TARGET_CHECKSUM) $(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
# the bootsector on haiku_loader.atari_m68k must be checksummed
|
||||||
|
rule ChecksumAtariLoader
|
||||||
|
{
|
||||||
|
local haikuLoader = $(1) ;
|
||||||
|
local checksummer = <build>fixup_tos_boot_checksum ;
|
||||||
|
|
||||||
|
Depends $(haikuLoader) : $(checksummer) ;
|
||||||
|
|
||||||
|
TARGET_CHECKSUM on $(haikuLoader) = $(checksummer) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
actions ChecksumAtariLoader bind TARGET_CHECKSUM {
|
||||||
|
$(TARGET_CHECKSUM) $(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# atari_m68k: AUTO folder PRG target
|
||||||
|
# based on KernelLd
|
||||||
|
rule AtariBootPrgLd
|
||||||
|
{
|
||||||
|
# AtariBootPrgLd <name> : <objs> : <linkerscript> : <args> ;
|
||||||
|
|
||||||
|
LINK on $(1) = $(TARGET_LD_$(TARGET_PACKAGING_ARCH)) ;
|
||||||
|
|
||||||
|
LINKFLAGS on $(1) = $(4) ;
|
||||||
|
if $(3) { LINKFLAGS on $(1) += --script=$(3) ; }
|
||||||
|
|
||||||
|
# Remove any preset LINKLIBS
|
||||||
|
LINKLIBS on $(1) = ;
|
||||||
|
|
||||||
|
# TODO: Do we really want to invoke SetupKernel here? The objects should
|
||||||
|
# have been compiled with KernelObjects anyway, so we're doing that twice.
|
||||||
|
SetupKernel $(2) ;
|
||||||
|
|
||||||
|
# Show that we depend on the libraries we need
|
||||||
|
LocalClean clean : $(1) ;
|
||||||
|
LocalDepends all : $(1) ;
|
||||||
|
Depends $(1) : $(2) ;
|
||||||
|
|
||||||
|
MakeLocateDebug $(1) ;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
actions AtariBootPrgLd
|
||||||
|
{
|
||||||
|
$(LINK) $(LINKFLAGS) -o "$(1)" "$(2)" $(LINKLIBS) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
local extraSources = ;
|
local extraSources = ;
|
||||||
if $(TARGET_GCC_VERSION_$(TARGET_PACKAGING_ARCH)[1]) = 2 {
|
if $(TARGET_GCC_VERSION_$(TARGET_PACKAGING_ARCH)[1]) = 2 {
|
||||||
@ -265,6 +330,20 @@ for platform in [ MultiBootSubDirSetup ] {
|
|||||||
-n 'Haiku $(TARGET_KERNEL_ARCH) floppyboot' ;
|
-n 'Haiku $(TARGET_KERNEL_ARCH) floppyboot' ;
|
||||||
BuildUImageScript boot.scr : $(HAIKU_MMC_UBOOT_SCRIPT) ;
|
BuildUImageScript boot.scr : $(HAIKU_MMC_UBOOT_SCRIPT) ;
|
||||||
|
|
||||||
|
case amiga_m68k :
|
||||||
|
BuildBiosLoader haiku_loader.$(TARGET_BOOT_PLATFORM) : boot_loader_$(TARGET_BOOT_PLATFORM) ;
|
||||||
|
ChecksumAmigaLoader haiku_loader.$(TARGET_BOOT_PLATFORM) ;
|
||||||
|
|
||||||
|
case atari_m68k :
|
||||||
|
BuildBiosLoader haiku_loader.$(TARGET_BOOT_PLATFORM) : boot_loader_$(TARGET_BOOT_PLATFORM) ;
|
||||||
|
ChecksumAtariLoader haiku_loader.$(TARGET_BOOT_PLATFORM) ;
|
||||||
|
|
||||||
|
AtariBootPrgLd haiku.prg :
|
||||||
|
boot_loader_$(TARGET_BOOT_PLATFORM)
|
||||||
|
: $(HAIKU_TOP)/src/system/ldscripts/$(TARGET_ARCH)/boot_prg_$(TARGET_BOOT_PLATFORM).ld
|
||||||
|
: -Bstatic
|
||||||
|
;
|
||||||
|
|
||||||
case * :
|
case * :
|
||||||
Exit "Currently unsupported haiku_loader:" $(TARGET_BOOT_PLATFORM) ;
|
Exit "Currently unsupported haiku_loader:" $(TARGET_BOOT_PLATFORM) ;
|
||||||
}
|
}
|
||||||
|
@ -1,43 +1,57 @@
|
|||||||
SubDir HAIKU_TOP src system boot arch m68k ;
|
SubDir HAIKU_TOP src system boot arch m68k ;
|
||||||
|
|
||||||
DEFINES += _BOOT_MODE ;
|
local platform ;
|
||||||
|
for platform in [ MultiBootSubDirSetup amiga_m68k atari_m68k ] {
|
||||||
|
on $(platform) {
|
||||||
|
DEFINES += _BOOT_MODE ;
|
||||||
|
|
||||||
# TODO: Is there any reason to recompile arch_string.S here?
|
local kernelArchSources =
|
||||||
local librootArchObjects =
|
|
||||||
# <src!system!libroot!posix!string!arch!$(TARGET_ARCH)>arch_string.o
|
|
||||||
arch_string.S
|
|
||||||
;
|
|
||||||
|
|
||||||
local kernelLibArchObjects =
|
|
||||||
<src!system!kernel!lib!arch!$(TARGET_ARCH)>byteorder.o
|
|
||||||
<src!system!kernel!lib!arch!$(TARGET_ARCH)>memset.o
|
|
||||||
;
|
|
||||||
|
|
||||||
BootMergeObject boot_arch_$(TARGET_KERNEL_ARCH).o :
|
|
||||||
arch_elf.cpp
|
arch_elf.cpp
|
||||||
$(librootArchObjects)
|
;
|
||||||
:
|
|
||||||
:
|
|
||||||
$(kernelLibArchObjects)
|
|
||||||
;
|
|
||||||
|
|
||||||
BootMergeObject boot_arch_m68k_030.o :
|
local librootStringArchSources =
|
||||||
|
arch_string.S
|
||||||
|
;
|
||||||
|
|
||||||
|
local librootOsArchSources =
|
||||||
|
byteorder.S
|
||||||
|
;
|
||||||
|
|
||||||
|
local librootStringGenericSources =
|
||||||
|
#memcpy.c
|
||||||
|
memset.c
|
||||||
|
;
|
||||||
|
|
||||||
|
BootMergeObject [ FGristFiles boot_arch_$(TARGET_KERNEL_ARCH).o ] :
|
||||||
|
$(kernelArchSources)
|
||||||
|
$(librootStringArchSources)
|
||||||
|
$(librootOsArchSources)
|
||||||
|
$(librootStringGenericSources)
|
||||||
|
:
|
||||||
|
;
|
||||||
|
|
||||||
|
BootMergeObject boot_arch_m68k_030.o :
|
||||||
mmu_030.cpp
|
mmu_030.cpp
|
||||||
: -Wno-unused -mcpu=68030
|
: -Wno-unused -mcpu=68030
|
||||||
;
|
;
|
||||||
|
|
||||||
BootMergeObject boot_arch_m68k_040.o :
|
BootMergeObject boot_arch_m68k_040.o :
|
||||||
mmu_040.cpp
|
mmu_040.cpp
|
||||||
: -Wno-unused -mcpu=68040 -Wa,-m68040
|
: -Wno-unused -mcpu=68040 -Wa,-m68040
|
||||||
;
|
;
|
||||||
|
|
||||||
BootMergeObject boot_arch_m68k_060.o :
|
BootMergeObject boot_arch_m68k_060.o :
|
||||||
mmu_060.cpp
|
mmu_060.cpp
|
||||||
: -Wno-unused -mcpu=68060
|
: -Wno-unused -mcpu=68060
|
||||||
;
|
;
|
||||||
|
|
||||||
SEARCH on [ FGristFiles arch_elf.cpp ]
|
SEARCH on [ FGristFiles $(kernelArchSources) ]
|
||||||
= [ FDirName $(HAIKU_TOP) src system kernel arch $(TARGET_KERNEL_ARCH) ] ;
|
= [ FDirName $(HAIKU_TOP) src system kernel arch m68k ] ;
|
||||||
|
SEARCH on [ FGristFiles $(librootStringArchSources) ]
|
||||||
SEARCH on [ FGristFiles $(librootArchObjects) ]
|
= [ FDirName $(HAIKU_TOP) src system libroot posix string arch m68k ] ;
|
||||||
= [ FDirName $(HAIKU_TOP) src system libroot posix string arch $(TARGET_ARCH) ] ;
|
SEARCH on [ FGristFiles $(librootOsArchSources) ]
|
||||||
|
= [ FDirName $(HAIKU_TOP) src system libroot os arch m68k ] ;
|
||||||
|
SEARCH on [ FGristFiles $(librootStringGenericSources) ]
|
||||||
|
= [ FDirName $(HAIKU_TOP) src system libroot posix string arch generic ] ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
SubDir HAIKU_TOP src system boot platform amiga_m68k ;
|
SubDir HAIKU_TOP src system boot platform amiga_m68k ;
|
||||||
|
|
||||||
SubDirHdrs $(HAIKU_TOP) headers private kernel boot platform $(TARGET_BOOT_PLATFORM) ;
|
SubDirHdrs $(HAIKU_TOP) headers private kernel boot platform amiga_m68k ;
|
||||||
|
|
||||||
UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
|
UsePrivateHeaders [ FDirName kernel boot platform amiga_m68k ] ;
|
||||||
UsePrivateHeaders [ FDirName kernel platform $(TARGET_BOOT_PLATFORM) ] ;
|
UsePrivateHeaders [ FDirName kernel platform $(TARGET_BOOT_PLATFORM) ] ;
|
||||||
UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
|
UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
|
||||||
UsePrivateHeaders [ FDirName graphics common ] ;
|
UsePrivateHeaders [ FDirName graphics common ] ;
|
||||||
@ -17,16 +17,19 @@ UsePrivateHeaders [ FDirName storage ] ;
|
|||||||
SubDirC++Flags $(defines) -fno-rtti ;
|
SubDirC++Flags $(defines) -fno-rtti ;
|
||||||
}
|
}
|
||||||
|
|
||||||
#SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ;
|
local platform ;
|
||||||
|
for platform in [ MultiBootSubDirSetup amiga_m68k ] {
|
||||||
|
on $(platform) {
|
||||||
|
#SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ;
|
||||||
|
|
||||||
BootMergeObject boot_platform_amiga_m68k_shell.o :
|
BootMergeObject boot_platform_amiga_m68k_shell.o :
|
||||||
shell.S
|
shell.S
|
||||||
: -Wa,--pcrel
|
: -Wa,--pcrel
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
BootMergeObject boot_platform_amiga_m68k_other.o :
|
BootMergeObject boot_platform_amiga_m68k_other.o :
|
||||||
# shell.S
|
# shell.S
|
||||||
start.cpp
|
start.cpp
|
||||||
rom_calls.cpp
|
rom_calls.cpp
|
||||||
debug.cpp
|
debug.cpp
|
||||||
@ -41,7 +44,7 @@ BootMergeObject boot_platform_amiga_m68k_other.o :
|
|||||||
cpu.cpp
|
cpu.cpp
|
||||||
#smp.cpp
|
#smp.cpp
|
||||||
#smp_trampoline.S
|
#smp_trampoline.S
|
||||||
# support.S
|
# support.S
|
||||||
video.cpp
|
video.cpp
|
||||||
#apm.cpp
|
#apm.cpp
|
||||||
|
|
||||||
@ -50,41 +53,20 @@ BootMergeObject boot_platform_amiga_m68k_other.o :
|
|||||||
#dump_edid.c
|
#dump_edid.c
|
||||||
|
|
||||||
: #-Wa,--pcrel
|
: #-Wa,--pcrel
|
||||||
: boot_platform_generic.a
|
: boot_platform_generic_amiga_m68k.a
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
BootMergeObject boot_platform_amiga_m68k.o :
|
BootMergeObject boot_platform_amiga_m68k.o :
|
||||||
: :
|
: :
|
||||||
boot_platform_amiga_m68k_shell.o
|
boot_platform_amiga_m68k_shell.o
|
||||||
boot_platform_amiga_m68k_other.o
|
boot_platform_amiga_m68k_other.o
|
||||||
boot_arch_m68k_030.o
|
boot_arch_m68k_030.o
|
||||||
boot_arch_m68k_040.o
|
boot_arch_m68k_040.o
|
||||||
;
|
;
|
||||||
|
}
|
||||||
|
|
||||||
# the bootsector in haiku_loader must be checksummed
|
|
||||||
rule ChecksumAmigaLoader
|
|
||||||
{
|
|
||||||
local haikuLoader = $(1) ;
|
|
||||||
local checksummer = <build>fixup_amiga_boot_checksum ;
|
|
||||||
|
|
||||||
Depends $(haikuLoader) : $(checksummer) ;
|
|
||||||
|
|
||||||
TARGET_CHECKSUM on $(haikuLoader) = $(checksummer) ;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
actions ChecksumAmigaLoader bind TARGET_CHECKSUM
|
|
||||||
{
|
|
||||||
$(TARGET_CHECKSUM) $(1)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
ChecksumAmigaLoader haiku_loader ;
|
|
||||||
|
|
||||||
|
|
||||||
SEARCH on [ FGristFiles $(genericPlatformSources) ]
|
SEARCH on [ FGristFiles $(genericPlatformSources) ]
|
||||||
= [ FDirName $(HAIKU_TOP) src system boot platform generic ] ;
|
= [ FDirName $(HAIKU_TOP) src system boot platform generic ] ;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
SubDir HAIKU_TOP src system boot platform atari_m68k ;
|
SubDir HAIKU_TOP src system boot platform atari_m68k ;
|
||||||
|
|
||||||
SubDirHdrs $(HAIKU_TOP) headers private kernel boot platform $(TARGET_BOOT_PLATFORM) ;
|
SubDirHdrs $(HAIKU_TOP) headers private kernel boot platform atari_m68k ;
|
||||||
|
|
||||||
UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
|
UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
|
||||||
UsePrivateHeaders [ FDirName kernel platform $(TARGET_BOOT_PLATFORM) ] ;
|
UsePrivateHeaders [ FDirName kernel platform $(TARGET_BOOT_PLATFORM) ] ;
|
||||||
@ -17,21 +17,24 @@ UsePrivateHeaders [ FDirName storage ] ;
|
|||||||
SubDirC++Flags $(defines) -fno-rtti ;
|
SubDirC++Flags $(defines) -fno-rtti ;
|
||||||
}
|
}
|
||||||
|
|
||||||
#SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ;
|
local platform ;
|
||||||
|
for platform in [ MultiBootSubDirSetup atari_m68k ] {
|
||||||
|
on $(platform) {
|
||||||
|
#SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ;
|
||||||
|
|
||||||
BootMergeObject boot_platform_atari_m68k_shell.o :
|
BootMergeObject boot_platform_atari_m68k_shell.o :
|
||||||
shell.S
|
shell.S
|
||||||
: -Wa,--pcrel
|
: -Wa,--pcrel
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
# cpu-specific stuff
|
# cpu-specific stuff
|
||||||
# should be moved to boot/arch/m68k/...
|
# should be moved to boot/arch/m68k/...
|
||||||
# TODO: add 020+68851 support
|
# TODO: add 020+68851 support
|
||||||
|
|
||||||
|
|
||||||
BootMergeObject boot_platform_atari_m68k_other.o :
|
BootMergeObject boot_platform_atari_m68k_other.o :
|
||||||
# shell.S
|
# shell.S
|
||||||
start.cpp
|
start.cpp
|
||||||
toscalls.cpp
|
toscalls.cpp
|
||||||
debug.cpp
|
debug.cpp
|
||||||
@ -46,7 +49,7 @@ BootMergeObject boot_platform_atari_m68k_other.o :
|
|||||||
cpu.cpp
|
cpu.cpp
|
||||||
#smp.cpp
|
#smp.cpp
|
||||||
#smp_trampoline.S
|
#smp_trampoline.S
|
||||||
# support.S
|
# support.S
|
||||||
video.cpp
|
video.cpp
|
||||||
#apm.cpp
|
#apm.cpp
|
||||||
|
|
||||||
@ -56,84 +59,19 @@ BootMergeObject boot_platform_atari_m68k_other.o :
|
|||||||
|
|
||||||
: #-Wa,--pcrel
|
: #-Wa,--pcrel
|
||||||
: boot_platform_generic.a
|
: boot_platform_generic.a
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
BootMergeObject boot_platform_atari_m68k.o :
|
BootMergeObject boot_platform_atari_m68k.o :
|
||||||
: :
|
: :
|
||||||
boot_platform_atari_m68k_shell.o
|
boot_platform_atari_m68k_shell.o
|
||||||
boot_platform_atari_m68k_other.o
|
boot_platform_atari_m68k_other.o
|
||||||
boot_arch_m68k_030.o
|
boot_arch_m68k_030.o
|
||||||
boot_arch_m68k_040.o
|
boot_arch_m68k_040.o
|
||||||
;
|
;
|
||||||
|
}
|
||||||
|
|
||||||
# the bootsector in haiku_loader must be checksummed
|
|
||||||
|
|
||||||
|
|
||||||
rule ChecksumAtariLoader
|
|
||||||
{
|
|
||||||
local haikuLoader = $(1) ;
|
|
||||||
local checksummer = <build>fixup_tos_boot_checksum ;
|
|
||||||
|
|
||||||
Depends $(haikuLoader) : $(checksummer) ;
|
|
||||||
|
|
||||||
TARGET_CHECKSUM on $(haikuLoader) = $(checksummer) ;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
actions ChecksumAtariLoader bind TARGET_CHECKSUM {
|
|
||||||
$(TARGET_CHECKSUM) $(1)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
ChecksumAtariLoader haiku_loader ;
|
|
||||||
|
|
||||||
|
|
||||||
# AUTO folder PRG target
|
|
||||||
|
|
||||||
|
|
||||||
# based on KernelLd
|
|
||||||
rule AtariBootPrgLd
|
|
||||||
{
|
|
||||||
# AtariBootPrgLd <name> : <objs> : <linkerscript> : <args> ;
|
|
||||||
|
|
||||||
LINK on $(1) = $(TARGET_LD_$(TARGET_PACKAGING_ARCH)) ;
|
|
||||||
|
|
||||||
LINKFLAGS on $(1) = $(4) ;
|
|
||||||
if $(3) { LINKFLAGS on $(1) += --script=$(3) ; }
|
|
||||||
|
|
||||||
# Remove any preset LINKLIBS
|
|
||||||
LINKLIBS on $(1) = ;
|
|
||||||
|
|
||||||
# TODO: Do we really want to invoke SetupKernel here? The objects should
|
|
||||||
# have been compiled with KernelObjects anyway, so we're doing that twice.
|
|
||||||
SetupKernel $(2) ;
|
|
||||||
|
|
||||||
# Show that we depend on the libraries we need
|
|
||||||
LocalClean clean : $(1) ;
|
|
||||||
LocalDepends all : $(1) ;
|
|
||||||
Depends $(1) : $(2) ;
|
|
||||||
|
|
||||||
MakeLocateDebug $(1) ;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
actions AtariBootPrgLd
|
|
||||||
{
|
|
||||||
$(LINK) $(LINKFLAGS) -o "$(1)" "$(2)" $(LINKLIBS) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
AtariBootPrgLd haiku.prg :
|
|
||||||
boot_loader_$(TARGET_BOOT_PLATFORM)
|
|
||||||
: $(HAIKU_TOP)/src/system/ldscripts/$(TARGET_ARCH)/boot_prg_$(TARGET_BOOT_PLATFORM).ld
|
|
||||||
: -Bstatic
|
|
||||||
;
|
|
||||||
|
|
||||||
|
|
||||||
SEARCH on [ FGristFiles $(genericPlatformSources) ]
|
SEARCH on [ FGristFiles $(genericPlatformSources) ]
|
||||||
= [ FDirName $(HAIKU_TOP) src system boot platform generic ] ;
|
= [ FDirName $(HAIKU_TOP) src system boot platform generic ] ;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user