2005-10-29 20:27:43 +04:00
|
|
|
SubDir HAIKU_TOP src system boot ;
|
2002-10-30 05:10:06 +03:00
|
|
|
|
2005-11-27 03:27:19 +03:00
|
|
|
local librootFunctions =
|
2008-03-30 15:01:41 +04:00
|
|
|
abs.o
|
2005-11-27 03:27:19 +03:00
|
|
|
ctype.o
|
|
|
|
qsort.o
|
|
|
|
kernel_vsprintf.o
|
|
|
|
memcmp.o
|
|
|
|
memmove.o
|
|
|
|
strdup.o
|
|
|
|
strlen.o
|
|
|
|
strnlen.o
|
|
|
|
strcmp.o
|
|
|
|
strcasecmp.o
|
|
|
|
strncmp.o
|
|
|
|
strcat.o
|
|
|
|
strcpy.o
|
|
|
|
strlcat.o
|
|
|
|
strlcpy.o
|
|
|
|
strchr.o
|
|
|
|
strrchr.o
|
|
|
|
strtol.o
|
|
|
|
;
|
|
|
|
|
2009-08-08 20:02:34 +04:00
|
|
|
local extraLinkerArgs = ;
|
[ARM]
- consolidate board specific definitions into build/jam/board/*/BoardSetup to avoid duplicating address values everywhere,
- add various addresses, boot script, custom C/C++ flags and SD card definition,
- not sure BoardSetup is included at the best place though,
- replaced board-specific ldscript with passing the loader address directly to LD from BoardSetup,
- added haiku.mmc target which generates an mmc/SD card image with a FAT partition with the files needed to boot for the board, should later be integrated with haiku.image with the BFS partition offset passed to bfs_shell, requires apt:sfdisk,mtools on GNU/Linux,
- added some more rules, one to build a script for the SD image,
- fake a NetBSD loader for now, U-Boot doesn't know haiku, and we'll need a way to pass the tgz image and RAM size, we'll either use standlone way (usual C argv[]) or the NetBSD args,
- style fixes,
- 80 cols, /me pets Ingo.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32284 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-12 20:12:35 +04:00
|
|
|
if $(HAIKU_BOARD_LOADER_BASE) {
|
|
|
|
extraLinkerArgs += --defsym BOARD_LOADER_BASE=$(HAIKU_BOARD_LOADER_BASE) ;
|
2009-08-08 20:02:34 +04:00
|
|
|
}
|
|
|
|
|
2009-04-03 13:02:44 +04:00
|
|
|
AddResources haiku_loader : boot_loader.rdef ;
|
2007-10-02 19:22:13 +04:00
|
|
|
|
2006-09-25 19:51:02 +04:00
|
|
|
KernelLd boot_loader_$(TARGET_BOOT_PLATFORM) :
|
2005-11-27 03:27:19 +03:00
|
|
|
boot_platform_$(TARGET_BOOT_PLATFORM).o
|
2005-12-31 00:20:07 +03:00
|
|
|
boot_arch_$(TARGET_ARCH).o
|
2005-11-27 03:27:19 +03:00
|
|
|
boot_loader.a
|
Added a mini networking stack to the boot loader. It speaks basic ARP,
IP, and UDP, as well as a home brewn UDP based protocol, "remote disk",
which provides random access to a single remote file/device. The Open
Firmware flavored boot loader automatically initializes the net stack,
searches for a remote disk, and tries to boot from it, if the boot
device is a network device (e.g. when loading the boot loader via
TFTP).
This is quite nice for developing with a two-machine setup, since one
doesn't even need to install Haiku on the test machine anymore, but can
serve it directly from the development machine. When the networking
support in the kernel is working, this method could even be used to
fully boot, not just for loading kernel and initial modules.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15689 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-28 01:01:33 +03:00
|
|
|
boot_net.a
|
2005-11-27 03:27:19 +03:00
|
|
|
boot_partitions.a
|
|
|
|
|
|
|
|
# file systems
|
|
|
|
boot_bfs.a
|
|
|
|
boot_amiga_ffs.a
|
|
|
|
boot_tarfs.a
|
2008-10-16 03:54:04 +04:00
|
|
|
boot_fatfs.a
|
2005-11-27 03:27:19 +03:00
|
|
|
|
2009-04-29 05:52:01 +04:00
|
|
|
# needed by tarfs
|
|
|
|
boot_zlib.a
|
2005-11-27 03:27:19 +03:00
|
|
|
|
|
|
|
# libroot functions needed by the stage2 boot loader (compiled for the
|
|
|
|
# kernel)
|
|
|
|
$(librootFunctions:G=src!system!kernel!lib)
|
|
|
|
|
2006-09-25 19:51:02 +04:00
|
|
|
: $(HAIKU_TOP)/src/system/ldscripts/$(TARGET_ARCH)/boot_loader_$(TARGET_BOOT_PLATFORM).ld
|
2009-08-08 20:02:34 +04:00
|
|
|
: -Bstatic $(extraLinkerArgs)
|
2005-11-27 16:31:50 +03:00
|
|
|
;
|
2005-11-27 03:27:19 +03:00
|
|
|
|
2008-11-11 22:08:51 +03:00
|
|
|
rule BuildCoffLoader {
|
|
|
|
local coffLoader = $(1) ;
|
|
|
|
local bootLoader = $(2) ;
|
|
|
|
# XXX: eventually switch on arch
|
2008-11-12 05:36:03 +03:00
|
|
|
COFF_FORMAT on $(coffLoader) = xcoff-powermac ;
|
|
|
|
HACK_COFF on $(coffLoader) = <build>hack-coff ;
|
2008-11-11 22:08:51 +03:00
|
|
|
|
2009-01-15 19:47:53 +03:00
|
|
|
Depends $(coffLoader) : <build>hack-coff ;
|
2008-11-11 22:08:51 +03:00
|
|
|
Depends $(coffLoader) : $(bootLoader) ;
|
|
|
|
MakeLocateDebug $(coffLoader) ;
|
|
|
|
}
|
|
|
|
|
2008-11-12 05:36:03 +03:00
|
|
|
actions BuildCoffLoader bind HACK_COFF {
|
2008-11-11 22:08:51 +03:00
|
|
|
rm -f $(1)
|
|
|
|
$(TARGET_OBJCOPY) -O $(COFF_FORMAT) $(2) $(1)
|
2008-11-12 05:36:03 +03:00
|
|
|
#$(CP) $(2) $(1)
|
|
|
|
$(HACK_COFF) $(1)
|
2008-11-11 22:08:51 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
BuildCoffLoader boot_loader_$(TARGET_BOOT_PLATFORM)_coff : boot_loader_$(TARGET_BOOT_PLATFORM) ;
|
|
|
|
|
2009-04-03 13:02:44 +04:00
|
|
|
rule BuildBiosLoader {
|
|
|
|
local haikuLoader = $(1) ;
|
2005-11-27 03:27:19 +03:00
|
|
|
local bootLoader = $(2) ;
|
|
|
|
|
2009-04-03 13:02:44 +04:00
|
|
|
Depends $(haikuLoader) : $(bootLoader) ;
|
|
|
|
MakeLocateDebug $(haikuLoader) ;
|
2007-10-02 19:22:13 +04:00
|
|
|
|
|
|
|
on $(1) ResAttr $(1) : $(RESFILES) : false ;
|
|
|
|
if ! [ on $(1) return $(DONT_USE_BEOS_RULES) ] {
|
|
|
|
SetType $(1) ;
|
|
|
|
MimeSet $(1) ;
|
|
|
|
}
|
2005-11-27 03:27:19 +03:00
|
|
|
}
|
|
|
|
|
2009-04-03 13:02:44 +04:00
|
|
|
actions BuildBiosLoader {
|
2005-11-27 03:27:19 +03:00
|
|
|
rm -f $(1)
|
|
|
|
$(TARGET_OBJCOPY) -O binary $(2) $(1)
|
|
|
|
}
|
|
|
|
|
2009-04-03 13:02:44 +04:00
|
|
|
BuildBiosLoader haiku_loader : boot_loader_$(TARGET_BOOT_PLATFORM) ;
|
2005-11-27 03:27:19 +03:00
|
|
|
|
2007-01-06 16:46:41 +03:00
|
|
|
# different target for PXE, to be build with TARGET_BOOT_PLATFORM=pxe_ia32 jam pxehaiku-loader
|
2009-04-03 13:02:44 +04:00
|
|
|
BuildBiosLoader pxehaiku-loader : boot_loader_$(TARGET_BOOT_PLATFORM) ;
|
2007-01-06 16:46:41 +03:00
|
|
|
|
2005-12-31 00:20:07 +03:00
|
|
|
SubInclude HAIKU_TOP src system boot arch $(TARGET_ARCH) ;
|
2005-10-29 20:27:43 +04:00
|
|
|
SubInclude HAIKU_TOP src system boot loader ;
|
2005-12-31 00:20:07 +03:00
|
|
|
SubInclude HAIKU_TOP src system boot platform ;
|