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
|
|
|
|
;
|
|
|
|
|
2007-10-02 19:22:13 +04:00
|
|
|
AddResources zbeos : boot_loader.rdef ;
|
|
|
|
|
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
|
|
|
|
|
|
|
libz.a
|
|
|
|
|
|
|
|
# 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
|
2005-11-27 03:27:19 +03:00
|
|
|
: -Bstatic
|
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
|
|
|
|
|
|
|
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) ;
|
|
|
|
|
2005-11-27 03:27:19 +03:00
|
|
|
rule BuildZbeos {
|
|
|
|
local zbeos = $(1) ;
|
|
|
|
local bootLoader = $(2) ;
|
|
|
|
|
|
|
|
Depends $(zbeos) : $(bootLoader) ;
|
|
|
|
MakeLocateDebug $(zbeos) ;
|
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
|
|
|
}
|
|
|
|
|
|
|
|
actions BuildZbeos {
|
|
|
|
rm -f $(1)
|
|
|
|
$(TARGET_OBJCOPY) -O binary $(2) $(1)
|
|
|
|
}
|
|
|
|
|
2006-09-25 19:51:02 +04:00
|
|
|
BuildZbeos zbeos : 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
|
|
|
|
BuildZbeos pxehaiku-loader : boot_loader_$(TARGET_BOOT_PLATFORM) ;
|
|
|
|
|
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 ;
|