2015-03-07 21:31:12 +03:00
|
|
|
# Raspberry Pi 2 board-specific definitions
|
2012-03-04 17:43:13 +04:00
|
|
|
|
2015-03-07 21:31:12 +03:00
|
|
|
HAIKU_BOARD_DESCRIPTION = "Raspberry Pi 2" ;
|
2015-03-28 22:33:58 +03:00
|
|
|
HAIKU_BOARD_FDT_NAME = "rpi2" ;
|
2012-05-11 04:17:38 +04:00
|
|
|
|
2012-03-04 17:43:13 +04:00
|
|
|
#
|
|
|
|
# Various hardcoded addresses
|
|
|
|
#
|
|
|
|
|
2015-03-07 22:00:56 +03:00
|
|
|
HAIKU_BOARD_LOADER_BASE = 0x00080000 ;
|
2015-03-07 20:02:48 +03:00
|
|
|
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` ;
|
2015-03-08 02:12:55 +03:00
|
|
|
HAIKU_BOARD_LOADER_ENTRY_LINUX = `printf \"obase=16;ibase=16;10 + %x\\n\" $(HAIKU_BOARD_LOADER_BASE)|bc` ;
|
2012-03-04 17:43:13 +04:00
|
|
|
|
|
|
|
#
|
2015-03-08 05:42:51 +03:00
|
|
|
# mmc/SD image
|
2012-03-04 17:43:13 +04:00
|
|
|
#
|
|
|
|
|
2015-03-08 05:42:51 +03:00
|
|
|
# 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 ] ;
|
2012-03-04 17:43:13 +04:00
|
|
|
|
2015-03-08 05:42:51 +03:00
|
|
|
# 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
|
|
|
|
2012-05-16 17:03:35 +04:00
|
|
|
HAIKU_BOARD_FIRMWARE_FILES =
|
2015-03-08 05:42:51 +03:00
|
|
|
$(bootcodeFile)
|
|
|
|
$(startFile)
|
|
|
|
$(licenseFile)
|
2012-05-16 17:03:35 +04:00
|
|
|
;
|
2012-03-04 17:43:13 +04:00
|
|
|
|
2015-03-08 05:42:51 +03:00
|
|
|
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 \
|
2015-03-08 05:42:51 +03:00
|
|
|
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}" ;
|
|
|
|
|
2012-03-04 17:43:13 +04:00
|
|
|
HAIKU_BOARD_SDIMAGE_FAT_SIZE = 32 ;
|
2015-03-08 05:42:51 +03:00
|
|
|
HAIKU_BOARD_SDIMAGE_FILES =
|
2012-05-16 17:03:35 +04:00
|
|
|
$(HAIKU_BOARD_FIRMWARE_FILES)
|
2015-03-08 05:42:51 +03:00
|
|
|
$(configFile)
|
2015-04-24 03:27:55 +03:00
|
|
|
$(HAIKU_BOARD_FDT_NAME).dtb
|
2015-03-08 05:42:51 +03:00
|
|
|
$(ubootFile)
|
|
|
|
haiku_loader_linux.ub
|
|
|
|
haiku-floppyboot.tgz.ub
|
|
|
|
$(HAIKU_BOARD_SDIMAGE_UBOOT_SCRIPT_NAME)
|
2012-03-04 17:43:13 +04:00
|
|
|
;
|
|
|
|
|
2015-03-08 05:42:51 +03:00
|
|
|
HAIKU_BOARD_SDIMAGE_SIZE = 128 ;
|
2012-03-04 17:43:13 +04:00
|
|
|
|
|
|
|
#
|
|
|
|
# gcc flags for the specific cpu
|
|
|
|
#
|
|
|
|
|
2015-11-07 20:03:20 +03:00
|
|
|
local flags = -march=armv7-a -mfloat-abi=hard ;
|
2015-03-06 23:58:46 +03:00
|
|
|
|
|
|
|
HAIKU_ASFLAGS_$(HAIKU_PACKAGING_ARCH) += $(flags) ;
|
|
|
|
HAIKU_CCFLAGS_$(HAIKU_PACKAGING_ARCH) += $(flags) ;
|
|
|
|
HAIKU_C++FLAGS_$(HAIKU_PACKAGING_ARCH) += $(flags) ;
|
2012-03-04 17:43:13 +04:00
|
|
|
|
|
|
|
# Workaround for ld using 32k for alignment despite forcing it in the config...
|
|
|
|
# should definitely not be needed!
|
2012-05-18 02:39:37 +04:00
|
|
|
HAIKU_KERNEL_LINKFLAGS +=
|
2012-03-04 17:43:13 +04:00
|
|
|
-Wl,-z -Wl,max-page-size=0x1000
|
|
|
|
-Wl,-z -Wl,common-page-size=0x1000 ;
|
2013-08-01 10:51:16 +04:00
|
|
|
HAIKU_LINKFLAGS_$(HAIKU_PACKAGING_ARCH) +=
|
2012-03-04 17:43:13 +04:00
|
|
|
-Wl,-z -Wl,max-page-size=0x1000
|
|
|
|
-Wl,-z -Wl,common-page-size=0x1000 ;
|
|
|
|
|