Add boot archive base and size and map the boot archive.

An archive (ramfs) to be loaded can be specified in the raspberry pi
config.txt with a certain base address. We can use this to put our
floppy boot archive into memory on startup.

During the start procedure we now map that archive so we can later
load the kernel from it.
This commit is contained in:
Michael Lotz
2012-11-28 02:00:00 +01:00
parent 05e2d61a5e
commit 046e01014d
3 changed files with 13 additions and 1 deletions
+5
View File
@@ -9,6 +9,11 @@ HAIKU_BOOT_PLATFORM = raspberrypi_arm ;
HAIKU_BOARD_LOADER_BASE = 0x0 ;
HAIKU_BOARD_BOOT_ARCHIVE_BASE = 0x04000000 ;
HAIKU_BOARD_BOOT_ARCHIVE_SIZE = 0x00400000 ;
# TODO: needs to be configured in the config.txt
# ramfsfile=haiku-floppyboot.tgz and ramfsaddr=x
#
# Flash image
#
@@ -12,7 +12,9 @@ UsePrivateHeaders [ FDirName storage ] ;
UsePrivateHeaders [ FDirName kernel arch $(TARGET_KERNEL_ARCH) board $(TARGET_BOOT_BOARD) ] ;
{
local defines = _BOOT_MODE ;
local defines = _BOOT_MODE
BOOT_ARCHIVE_BASE=$(HAIKU_BOARD_BOOT_ARCHIVE_BASE)
BOOT_ARCHIVE_SIZE=$(HAIKU_BOARD_BOOT_ARCHIVE_SIZE) ;
defines = [ FDefines $(defines) ] ;
SubDirCcFlags $(defines) ;
@@ -120,6 +120,11 @@ _start(void)
mmu_init();
platform_init_video();
// Map in the boot archive loaded into memory by the firmware.
args.platform.boot_tgz_size = BOOT_ARCHIVE_SIZE;
args.platform.boot_tgz_data = (void*)mmu_map_physical_memory(
BOOT_ARCHIVE_BASE, args.platform.boot_tgz_size, kDefaultPageFlags);
serial_init();
console_init();