haiku/build/jam/board/rpi2/BoardSetup

76 lines
2.4 KiB
Plaintext
Raw Normal View History

# Raspberry Pi 2 board-specific definitions
HAIKU_BOARD_DESCRIPTION = "Raspberry Pi 2" ;
2015-03-28 22:33:58 +03:00
HAIKU_BOARD_FDT_NAME = "rpi2" ;
#
# Various hardcoded addresses
#
HAIKU_BOARD_LOADER_BASE = 0x00080000 ;
HAIKU_BOARD_LOADER_ENTRY_RAW = $(HAIKU_BOARD_LOADER_BASE) ;
HAIKU_BOARD_LOADER_ENTRY_NBSD = `printf \"obase=16;ibase=16;8 + %x\\n\" $(HAIKU_BOARD_LOADER_BASE)|bc` ;
HAIKU_BOARD_LOADER_ENTRY_LINUX = `printf \"obase=16;ibase=16;10 + %x\\n\" $(HAIKU_BOARD_LOADER_BASE)|bc` ;
#
# mmc/SD image
#
# u-boot image
HAIKU_BOARD_UBOOT_IMAGE_URL = https://github.com/kallisti5/rpi-uboot-bins/raw/master/rpi2 ;
ubootFile = [ DownloadFile u-boot.bin : $(HAIKU_BOARD_UBOOT_IMAGE_URL)/u-boot.bin ] ;
configFile = [ DownloadFile config.txt : $(HAIKU_BOARD_UBOOT_IMAGE_URL)/config.txt ] ;
# Raspberry Pi foundation loader
HAIKU_BOARD_FIRMWARE_URL = https://github.com/raspberrypi/firmware/raw/master/boot ;
bootcodeFile = [ DownloadFile bootcode.bin : $(HAIKU_BOARD_FIRMWARE_URL)/bootcode.bin ] ;
startFile = [ DownloadFile start.elf : $(HAIKU_BOARD_FIRMWARE_URL)/start.elf ] ;
licenseFile = [ DownloadFile LICENCE.broadcom : $(HAIKU_BOARD_FIRMWARE_URL)/LICENCE.broadcom ] ;
2015-03-28 22:33:58 +03:00
HAIKU_BOARD_FIRMWARE_FILES =
$(bootcodeFile)
$(startFile)
$(licenseFile)
;
HAIKU_BOARD_SDIMAGE_UBOOT_SCRIPT_NAME = boot.scr ;
HAIKU_BOARD_SDIMAGE_UBOOT_SCRIPT = "\
2015-03-28 22:33:58 +03:00
fatload mmc 0 ${fdt_addr_r} $(HAIKU_BOARD_FDT_NAME).dtb \
fdt addr ${fdt_addr_r} \
fatload mmc 0 ${ramdisk_addr_r} haiku-floppyboot.tgz.ub \
fatload mmc 0 ${kernel_addr_r} haiku_loader_linux.ub \
bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}" ;
HAIKU_BOARD_SDIMAGE_FAT_SIZE = 32 ;
HAIKU_BOARD_SDIMAGE_FILES =
$(HAIKU_BOARD_FIRMWARE_FILES)
$(configFile)
$(HAIKU_BOARD_FDT_NAME).dtb
$(ubootFile)
haiku_loader_linux.ub
haiku-floppyboot.tgz.ub
$(HAIKU_BOARD_SDIMAGE_UBOOT_SCRIPT_NAME)
;
HAIKU_BOARD_SDIMAGE_SIZE = 128 ;
#
# gcc flags for the specific cpu
#
local flags = -march=armv7-a -mfloat-abi=hard ;
HAIKU_ASFLAGS_$(HAIKU_PACKAGING_ARCH) += $(flags) ;
HAIKU_CCFLAGS_$(HAIKU_PACKAGING_ARCH) += $(flags) ;
HAIKU_C++FLAGS_$(HAIKU_PACKAGING_ARCH) += $(flags) ;
# Workaround for ld using 32k for alignment despite forcing it in the config...
# should definitely not be needed!
HAIKU_KERNEL_LINKFLAGS +=
-Wl,-z -Wl,max-page-size=0x1000
-Wl,-z -Wl,common-page-size=0x1000 ;
HAIKU_LINKFLAGS_$(HAIKU_PACKAGING_ARCH) +=
-Wl,-z -Wl,max-page-size=0x1000
-Wl,-z -Wl,common-page-size=0x1000 ;