BoardSetup revision 9c5e234c
1# Cubieboard 4 board-specific definitions
2# This likely could be easily used for other Allwinner chipsets
3
4HAIKU_BOARD_DESCRIPTION = "Cubieboard 4 (CC-A80)" ;
5HAIKU_BOARD_FDT_NAME = "cubieboard4" ;
6
7#
8# Various hardcoded addresses
9#
10
11# 0x20000000 = SDRAM start
12# 0x20007800 = haiku_loader_linux.ub
13# 0x20087800 = BASE
14
15HAIKU_BOARD_LOADER_BASE = 0x20087800 ;
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# TODO: Update to https://github.com/cubieboard/CC-A80-binaries when accepted upstream
25HAIKU_BOARD_FIRMWARE_URL = "https://github.com/kallisti5/CC-A80-binaries/raw/master/bin" ;
26
27# u-boot image
28# Dear Cubbieboard, add fdt_addr_r, ramdisk_addr_r, kernel_addr_r to u-boot
29HAIKU_BOARD_SDIMAGE_UBOOT_SCRIPT_NAME = boot.scr ;
30HAIKU_BOARD_SDIMAGE_UBOOT_SCRIPT = "\
31    fatload mmc 0 0x20800000 haiku-floppyboot.tgz.ub \
32    fatload mmc 0 0x20007800 haiku_loader_linux.ub \
33    bootm 0x20007800 0x20800000" ;
34
35HAIKU_BOARD_SDIMAGE_FAT_SIZE = 32 ;
36HAIKU_BOARD_SDIMAGE_FILES = 
37	haiku_loader_linux.ub
38	haiku-floppyboot.tgz.ub
39	$(HAIKU_BOARD_SDIMAGE_UBOOT_SCRIPT_NAME)
40;
41
42HAIKU_BOARD_SDIMAGE_BEGIN = 40950 ; # 512-byte sectors (divisible by 63)
43HAIKU_BOARD_SDIMAGE_SIZE = 128 ; # MiB
44
45boot0File = [ DownloadFile sdcard-boot0 : $(HAIKU_BOARD_FIRMWARE_URL)/sdcard-boot0 ] ;
46boot1File = [ DownloadFile sdcard-boot1 : $(HAIKU_BOARD_FIRMWARE_URL)/sdcard-boot1 ] ;
47
48# The Allwinner chips require an SD card "blessed" with
49# the boot0 SPL and boot1 (u-boot) at a fixed location on
50# the SD card. (Dear AW, please support loading from FAT)
51HAIKU_BOARD_SDIMAGE_BOOT0_FILE = $(boot0File) ;
52HAIKU_BOARD_SDIMAGE_BOOT0_SEEK = 8192 ;
53HAIKU_BOARD_SDIMAGE_BOOT1_FILE = $(boot1File) ;
54HAIKU_BOARD_SDIMAGE_BOOT1_SEEK = 19554304 ;
55
56#
57# gcc flags for the specific cpu
58#
59
60local flags = -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard ;
61
62HAIKU_ASFLAGS_$(HAIKU_PACKAGING_ARCH) += $(flags) ;
63HAIKU_CCFLAGS_$(HAIKU_PACKAGING_ARCH) += $(flags) ;
64HAIKU_C++FLAGS_$(HAIKU_PACKAGING_ARCH) += $(flags) ;
65