Skip to content

Commit b2bdabc

Browse files
committed
arm: Add beaglebone target, rename beagle
* beaglebone vs beagleboard * While the boards are almost the same, they have diff. FDT's now (more memory, different layout etc) * Make u-boot script more rpi-like (depend on u-boot for initial addresses) * Wasn't working, still doesn't.
1 parent e409118 commit b2bdabc

File tree

6 files changed

+101
-4
lines changed

6 files changed

+101
-4
lines changed

build/jam/ArchitectureRules

+6-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,12 @@ rule KernelArchitectureSetup architecture
234234

235235
case arm :
236236
switch $(HAIKU_BOOT_BOARD) {
237-
case beagle :
237+
case beagleboard :
238+
{
239+
HAIKU_BOOT_PLATFORM ?= u-boot ;
240+
HAIKU_BOOT_FLOPPY_IMAGE_SIZE = 1440 ;
241+
}
242+
case beaglebone :
238243
{
239244
HAIKU_BOOT_PLATFORM ?= u-boot ;
240245
HAIKU_BOOT_FLOPPY_IMAGE_SIZE = 1440 ;
File renamed without changes.

build/jam/board/beaglebone/BoardSetup

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# BeagleBone board-specific definitions
2+
3+
HAIKU_BOARD_DESCRIPTION = "BeagleBone" ;
4+
HAIKU_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
15+
HAIKU_BOARD_LOADER_BASE = 0x80800000 ;
16+
HAIKU_BOARD_LOADER_ENTRY_RAW = $(HAIKU_BOARD_LOADER_BASE) ;
17+
HAIKU_BOARD_LOADER_ENTRY_NBSD = `printf \"obase=16;ibase=16;8 + %x\\n\" $(HAIKU_BOARD_LOADER_BASE)|bc` ;
18+
HAIKU_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
25+
HAIKU_BOARD_SDIMAGE_SIZE = 64 ;
26+
HAIKU_BOARD_SDIMAGE_FAT_SIZE = 32 ;
27+
28+
# OMAP x-loader image, must be first file on FAT partition
29+
HAIKU_BOARD_MLO_IMAGE_URL = https://github.com/kallisti5/beagle-uboot-bins/raw/master/beaglebone ;
30+
mloFile = [ DownloadFile MLO : $(HAIKU_BOARD_MLO_IMAGE_URL)/MLO ] ;
31+
32+
# u-boot image
33+
HAIKU_BOARD_UBOOT_IMAGE_URL = https://github.com/kallisti5/beagle-uboot-bins/raw/master/beaglebone ;
34+
ubootFile = [ DownloadFile u-boot.img : $(HAIKU_BOARD_UBOOT_IMAGE_URL)/u-boot.img ] ;
35+
36+
# U-Boot environment
37+
HAIKU_BOARD_SDIMAGE_UBOOT_SCRIPT_NAME = boot.scr ;
38+
HAIKU_BOARD_SDIMAGE_UBOOT_SCRIPT = "\
39+
fatload 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+
45+
HAIKU_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+
57+
local flags = -mcpu=cortex-a8 -mfpu=vfpv3 -mfloat-abi=hard ;
58+
59+
HAIKU_ASFLAGS_$(HAIKU_PACKAGING_ARCH) += $(flags) ;
60+
HAIKU_CCFLAGS_$(HAIKU_PACKAGING_ARCH) += $(flags) ;
61+
HAIKU_C++FLAGS_$(HAIKU_PACKAGING_ARCH) += $(flags) ;

configure

+5-3
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,9 @@ options:
8383
first occurrence specifies the primary
8484
architecture of the Haiku to build, subsequent
8585
ones the secondary architectures.
86-
--target-board <board> ARM only: Specify the board to build for. Must be
87-
one of beagle,rpi1,rpi2,cubieboard4,verdex,overo.
86+
--target-board <board> ARM only: Target board to build for.
87+
<board> is one of: "beagleboard","beaglebone",
88+
"rpi1","rpi2","cubieboard4","verdex","overo"
8889
--update re-runs last configure invocation [must be given
8990
as first option!]
9091
--use-clang Build with host Clang instead of GCC cross
@@ -473,7 +474,8 @@ supportedTargetArchs="
473474
x86_gcc2
474475
"
475476
supportedTargetBoards="
476-
beagle
477+
beagleboard
478+
beaglebone
477479
rpi1
478480
rpi2
479481
cubieboard4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright 2009
3+
* Distributed under the terms of the MIT License.
4+
*/
5+
#ifndef _BOARD_BEAGLE_BONE_CONFIG_H
6+
#define _BOARD_BEAGLE_BONE_CONFIG_H
7+
8+
9+
#define BOARD_NAME_PRETTY "BeagleBone"
10+
11+
#define BOARD_CPU_TYPE_OMAP 1
12+
#define BOARD_CPU_OMAP3 1
13+
14+
#include <arch/arm/omap3.h>
15+
16+
// UART Settings
17+
#define BOARD_UART_8250 1
18+
19+
#define BOARD_UART1_BASE OMAP_UART1_BASE
20+
#define BOARD_UART2_BASE OMAP_UART2_BASE
21+
#define BOARD_UART3_BASE OMAP_UART3_BASE
22+
23+
#define BOARD_UART_DEBUG BOARD_UART3_BASE
24+
25+
#define BOARD_UART_CLOCK 48000000
26+
// 48MHz (APLL96/2)
27+
28+
29+
#endif /* _BOARD_BEAGLE_BONE_CONFIG_H */

0 commit comments

Comments
 (0)