BoardSetup revision f4f6b874
1# BeagleBone board-specific definitions
2
3HAIKU_BOARD_DESCRIPTION = "BeagleBone" ;
4HAIKU_BOARD_FDT_NAME = "beaglebone-black" ;
5
6# Not that many in the wild
7#HAIKU_BOARD_FDT_NAME = "beaglebone" ;
8
9
10#
11# Various hardcoded addresses
12#
13
14# load address for haiku_loader
15HAIKU_BOARD_LOADER_BASE = 0x80800000 ;
16HAIKU_BOARD_LOADER_ENTRY_RAW = $(HAIKU_BOARD_LOADER_BASE) ;
17HAIKU_BOARD_LOADER_ENTRY_NBSD = `printf \"obase=16;ibase=16;8 + %x\\n\" $(HAIKU_BOARD_LOADER_BASE)|bc` ;
18HAIKU_BOARD_LOADER_ENTRY_LINUX = `printf \"obase=16;ibase=16;10 + %x\\n\" $(HAIKU_BOARD_LOADER_BASE)|bc` ;
19
20#
21# mmc/SD image
22#
23
24# in MB
25HAIKU_BOARD_SDIMAGE_SIZE = 64 ;
26HAIKU_BOARD_SDIMAGE_FAT_SIZE = 32 ;
27
28# OMAP x-loader image, must be first file on FAT partition
29HAIKU_BOARD_MLO_IMAGE_URL = https://github.com/haiku/firmware/raw/master/arm/beaglebone ;
30mloFile = [ DownloadFile MLO : $(HAIKU_BOARD_MLO_IMAGE_URL)/MLO ] ;
31
32# u-boot image
33HAIKU_BOARD_UBOOT_IMAGE_URL = https://github.com/haiku/firmware/raw/master/arm/beaglebone ;
34ubootFile = [ DownloadFile u-boot.img : $(HAIKU_BOARD_UBOOT_IMAGE_URL)/u-boot.img ] ;
35
36# U-Boot environment
37HAIKU_BOARD_SDIMAGE_UBOOT_SCRIPT_NAME = boot.scr ;
38HAIKU_BOARD_SDIMAGE_UBOOT_SCRIPT = "\
39fatload mmc 0 ${fdt_addr_r} $(HAIKU_BOARD_FDT_NAME).dtb \
40    fdt addr ${fdt_addr_r} \
41    fatload mmc 0 ${ramdisk_addr_r} haiku-floppyboot.tgz.ub \
42    fatload mmc 0 ${kernel_addr_r} haiku_loader_linux.ub \
43    bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}" ;
44
45HAIKU_BOARD_SDIMAGE_FILES =
46	$(mloFile)
47	$(ubootFile)
48	$(HAIKU_BOARD_FDT_NAME).dtb
49	haiku_loader_linux.ub
50	haiku-floppyboot.tgz.ub
51    $(HAIKU_BOARD_SDIMAGE_UBOOT_SCRIPT_NAME)
52;
53
54#
55# gcc flags for the specific cpu
56
57local flags = -mcpu=cortex-a8 -mfpu=vfpv3 -mfloat-abi=hard ;
58
59HAIKU_ASFLAGS_$(HAIKU_PACKAGING_ARCH) += $(flags) ;
60HAIKU_CCFLAGS_$(HAIKU_PACKAGING_ARCH) += $(flags) ;
61HAIKU_C++FLAGS_$(HAIKU_PACKAGING_ARCH) += $(flags) ;
62