Merge branch 'arm-noboards'
* Remove the target-board system. * From now on, we target generic non-x86 architectures while leveraging fdt when needed. * ARM mmc images will likely need some post-processing to make them bootable on individual hardware. (This is actually how distros like Fedora handle ARM now. The image 'writer' application is told what hardware the image is for and adds a vendor bootloader / SPL / u-boot / etc)
This commit is contained in:
+18
-49
@@ -233,50 +233,16 @@ rule KernelArchitectureSetup architecture
|
||||
HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET = 192 ; # in kB - unused yet
|
||||
|
||||
case arm :
|
||||
switch $(HAIKU_BOOT_BOARD) {
|
||||
case beagleboard :
|
||||
{
|
||||
HAIKU_BOOT_PLATFORM ?= u-boot ;
|
||||
HAIKU_BOOT_FLOPPY_IMAGE_SIZE = 1440 ;
|
||||
}
|
||||
case beaglebone :
|
||||
{
|
||||
HAIKU_BOOT_PLATFORM ?= u-boot ;
|
||||
HAIKU_BOOT_FLOPPY_IMAGE_SIZE = 1440 ;
|
||||
}
|
||||
case neo_freerunner :
|
||||
{
|
||||
HAIKU_BOOT_PLATFORM ?= u-boot ;
|
||||
HAIKU_BOOT_FLOPPY_IMAGE_SIZE = 1440 ;
|
||||
}
|
||||
case overo :
|
||||
{
|
||||
HAIKU_BOOT_PLATFORM ?= u-boot ;
|
||||
HAIKU_BOOT_FLOPPY_IMAGE_SIZE = 1440 ;
|
||||
}
|
||||
case rpi2 :
|
||||
{
|
||||
HAIKU_BOOT_PLATFORM ?= u-boot ;
|
||||
HAIKU_BOOT_FLOPPY_IMAGE_SIZE = 1440 ;
|
||||
}
|
||||
case cubieboard4 :
|
||||
{
|
||||
HAIKU_BOOT_PLATFORM ?= u-boot ;
|
||||
HAIKU_BOOT_FLOPPY_IMAGE_SIZE = 1440 ;
|
||||
}
|
||||
case verdex :
|
||||
{
|
||||
HAIKU_BOOT_PLATFORM ?= u-boot ;
|
||||
HAIKU_BOOT_FLOPPY_IMAGE_SIZE = 1440 ;
|
||||
}
|
||||
case * :
|
||||
{
|
||||
Exit "Set HAIKU_BOOT_BOARD for your target ARM device!" ;
|
||||
}
|
||||
}
|
||||
HAIKU_BOOT_PLATFORM ?= u-boot ;
|
||||
|
||||
HAIKU_BOOT_SDIMAGE_SIZE ?= 128 ;
|
||||
# SOC's like allwinner need an offset to skip the hardcoded initial loader
|
||||
HAIKU_BOOT_SDIMAGE_BEGIN = 40950 ; # 512-byte sectors (divisible by 63)
|
||||
|
||||
HAIKU_BOOT_FLOPPY_IMAGE_SIZE = 1440 ;
|
||||
# offset in floppy image (>= sizeof(haiku_loader))
|
||||
HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET = 192 ; # in kB - unused yet
|
||||
HAIKU_BOOT_LOADER_BASE ?= 0x1000000 ;
|
||||
|
||||
case x86 :
|
||||
HAIKU_BOOT_PLATFORM ?= bios_ia32 ;
|
||||
@@ -365,17 +331,20 @@ rule KernelArchitectureSetup architecture
|
||||
HAIKU_KERNEL_PIC_LINKFLAGS = ;
|
||||
HAIKU_KERNEL_ADDON_LINKFLAGS = ;
|
||||
|
||||
# Include embedded board-specific file.
|
||||
if $(HAIKU_BOOT_BOARD) {
|
||||
include [ FDirName $(HAIKU_BUILD_RULES_DIR) board $(HAIKU_BOOT_BOARD)
|
||||
BoardSetup ] ;
|
||||
if $(HAIKU_BOARD_LOADER_BASE) {
|
||||
HAIKU_BOOT_LDFLAGS +=
|
||||
--defsym BOARD_LOADER_BASE=$(HAIKU_BOARD_LOADER_BASE) ;
|
||||
}
|
||||
# Any special kernel base addresses
|
||||
if $(HAIKU_BOOT_LOADER_BASE) {
|
||||
HAIKU_BOOT_LDFLAGS +=
|
||||
--defsym BOOT_LOADER_BASE=$(HAIKU_BOOT_LOADER_BASE) ;
|
||||
}
|
||||
|
||||
switch $(cpu) {
|
||||
case arm :
|
||||
# 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 ;
|
||||
|
||||
case ppc :
|
||||
# Build a position independent PPC kernel. We need to be able to
|
||||
# relocate the kernel, since the virtual address space layout at
|
||||
|
||||
@@ -710,7 +710,6 @@ if $(TARGET_PLATFORM) = haiku {
|
||||
TARGET_BOOT_LIBSUPC++ = $(HAIKU_BOOT_LIBSUPC++_$(TARGET_PACKAGING_ARCH)) ;
|
||||
|
||||
TARGET_BOOT_PLATFORM ?= $(HAIKU_BOOT_PLATFORM) ;
|
||||
TARGET_BOOT_BOARD ?= $(HAIKU_BOOT_BOARD) ;
|
||||
|
||||
local architecture ;
|
||||
for architecture in $(TARGET_PACKAGING_ARCHS) {
|
||||
@@ -732,7 +731,6 @@ if $(TARGET_PLATFORM) = haiku {
|
||||
TARGET_BOOT_LIBSUPC++ = ;
|
||||
|
||||
TARGET_BOOT_PLATFORM = ;
|
||||
TARGET_BOOT_BOARD = ;
|
||||
|
||||
TARGET_DEFINES_$(TARGET_PACKAGING_ARCH) = ;
|
||||
# all flags are in TARGET_DEFINES
|
||||
|
||||
@@ -83,9 +83,6 @@ options:
|
||||
first occurrence specifies the primary
|
||||
architecture of the Haiku to build, subsequent
|
||||
ones the secondary architectures.
|
||||
--target-board <board> ARM only: Target board to build for.
|
||||
<board> is one of: "beagleboard","beaglebone",
|
||||
"rpi2","cubieboard4","verdex","overo"
|
||||
--update re-runs last configure invocation [must be given
|
||||
as first option!]
|
||||
--use-clang Build with host Clang instead of GCC cross
|
||||
@@ -473,14 +470,6 @@ supportedTargetArchs="
|
||||
x86_64
|
||||
x86_gcc2
|
||||
"
|
||||
supportedTargetBoards="
|
||||
beagleboard
|
||||
beaglebone
|
||||
rpi2
|
||||
cubieboard4
|
||||
verdex
|
||||
overo
|
||||
"
|
||||
|
||||
# determine output directory
|
||||
if [ "$currentDir" = "$sourceDir" ]; then
|
||||
@@ -608,15 +597,6 @@ while [ $# -gt 0 ] ; do
|
||||
)
|
||||
haikuTargetArchs="$haikuTargetArchs $targetArch"
|
||||
;;
|
||||
--target-board)
|
||||
assertparam "$1" $#
|
||||
HAIKU_BOOT_BOARD=$2
|
||||
is_in_list "$HAIKU_BOOT_BOARD" "$supportedTargetBoards" || (
|
||||
echo "Unsupported target board: \"$HAIKU_BOOT_BOARD\"" >&2
|
||||
exit 1
|
||||
)
|
||||
shift 2
|
||||
;;
|
||||
--use-clang) useClang=1; shift 1;;
|
||||
--use-gcc-pipe) HAIKU_USE_GCC_PIPE=1; shift 1;;
|
||||
--use-gcc-graphite) useGccGraphiteDefault=1; shift 1;;
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* Copyright 2009
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _BOARD_BEAGLE_BOARD_CONFIG_H
|
||||
#define _BOARD_BEAGLE_BOARD_CONFIG_H
|
||||
|
||||
|
||||
#define BOARD_NAME_PRETTY "Beagle Board"
|
||||
|
||||
#define BOARD_CPU_TYPE_OMAP 1
|
||||
#define BOARD_CPU_OMAP3 1
|
||||
|
||||
#include <arch/arm/omap3.h>
|
||||
|
||||
// UART Settings
|
||||
#define BOARD_UART_8250 1
|
||||
|
||||
#define BOARD_UART1_BASE OMAP_UART1_BASE
|
||||
#define BOARD_UART2_BASE OMAP_UART2_BASE
|
||||
#define BOARD_UART3_BASE OMAP_UART3_BASE
|
||||
|
||||
#define BOARD_UART_DEBUG BOARD_UART3_BASE
|
||||
|
||||
#define BOARD_UART_CLOCK 48000000
|
||||
// 48MHz (APLL96/2)
|
||||
|
||||
|
||||
#endif /* _BOARD_BEAGLE_BOARD_CONFIG_H */
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* Copyright 2009
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _BOARD_BEAGLE_BONE_CONFIG_H
|
||||
#define _BOARD_BEAGLE_BONE_CONFIG_H
|
||||
|
||||
|
||||
#define BOARD_NAME_PRETTY "BeagleBone"
|
||||
|
||||
#define BOARD_CPU_TYPE_OMAP 1
|
||||
#define BOARD_CPU_OMAP3 1
|
||||
|
||||
#include <arch/arm/omap3.h>
|
||||
|
||||
// UART Settings
|
||||
#define BOARD_UART_8250 1
|
||||
|
||||
#define BOARD_UART1_BASE OMAP_UART1_BASE
|
||||
#define BOARD_UART2_BASE OMAP_UART2_BASE
|
||||
#define BOARD_UART3_BASE OMAP_UART3_BASE
|
||||
|
||||
#define BOARD_UART_DEBUG BOARD_UART3_BASE
|
||||
|
||||
#define BOARD_UART_CLOCK 48000000
|
||||
// 48MHz (APLL96/2)
|
||||
|
||||
|
||||
#endif /* _BOARD_BEAGLE_BONE_CONFIG_H */
|
||||
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* Copyright 2012-2015 Haiku, Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* Alexander von Gluck, [email protected]
|
||||
*/
|
||||
#ifndef _BOARD_SUN9I_BOARD_CONFIG_H
|
||||
#define _BOARD_SUN9I_BOARD_CONFIG_H
|
||||
|
||||
// https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/sun9i-a80.dtsi
|
||||
// http://linux-sunxi.org/A80/Memory_map
|
||||
|
||||
#define BOARD_NAME_PRETTY "Allwinner A80"
|
||||
|
||||
#define BOARD_CPU_TYPE_ARM7 1
|
||||
#define BOARD_CPU_A80 1
|
||||
|
||||
//#include <arch/arm/sun9i-a80.h>
|
||||
|
||||
// For now we just pick up APB1 devices + CPUS
|
||||
#define DEVICE_BASE 0x07000000
|
||||
#define DEVICE_SIZE 0x1008FFF
|
||||
|
||||
#define VECT_BASE 0xFFFF0000
|
||||
#define VECT_SIZE SIZE_4K
|
||||
|
||||
#define SDRAM_BASE 0x20000000
|
||||
#define SDRAM_SIZE 0x4000000
|
||||
// 64Mb (although it is really 0x1FFFFFFFF)
|
||||
|
||||
// UART Settings
|
||||
|
||||
// snps,dw-apb-uart?
|
||||
#define BOARD_UART1_BASE 0x07000000
|
||||
#define BOARD_UART2_BASE BOARD_UART1_BASE + 0x400
|
||||
#define BOARD_UART3_BASE BOARD_UART2_BASE + 0x400
|
||||
|
||||
#define BOARD_UART_DEBUG BOARD_UART1_BASE
|
||||
|
||||
#define BOARD_UART_CLOCK 24000000
|
||||
/* 2.4Mhz */
|
||||
|
||||
|
||||
#endif /* _BOARD_SUN9I_BOARD_CONFIG_H */
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* Copyright 2009 François Revol, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _BOARD_FREERUNNER_BOARD_CONFIG_H
|
||||
#define _BOARD_FREERUNNER_BOARD_CONFIG_H
|
||||
|
||||
|
||||
#define BOARD_NAME_PRETTY "Openmoko Neo FreeRunner"
|
||||
|
||||
#define BOARD_CPU_TYPE_ARM9 1
|
||||
#define BOARD_CPU_ARM920T 1
|
||||
|
||||
#include <arch/arm/arm920t.h>
|
||||
|
||||
// UART Settings
|
||||
#define BOARD_UART_8250 1
|
||||
|
||||
#define BOARD_UART1_BASE UART0_BASE
|
||||
#define BOARD_UART2_BASE UART1_BASE
|
||||
#define BOARD_UART3_BASE UART2_BASE
|
||||
|
||||
#define BOARD_UART_DEBUG BOARD_UART3_BASE
|
||||
|
||||
#define BOARD_UART_CLOCK 48000000
|
||||
// 48MHz (APLL96/2)
|
||||
|
||||
|
||||
#endif /* _BOARD_FREERUNNER_BOARD_CONFIG_H */
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* Copyright 2009
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _BOARD_OVERO_BOARD_CONFIG_H
|
||||
#define _BOARD_OVERO_BOARD_CONFIG_H
|
||||
|
||||
|
||||
#define BOARD_NAME_PRETTY "Gumstix Overo"
|
||||
|
||||
#define BOARD_CPU_TYPE_OMAP 1
|
||||
#define BOARD_CPU_OMAP3 1
|
||||
|
||||
#include <arch/arm/omap3.h>
|
||||
|
||||
// UART Settings
|
||||
#define BOARD_UART_8250 1
|
||||
|
||||
#define BOARD_UART1_BASE OMAP_UART1_BASE
|
||||
#define BOARD_UART2_BASE OMAP_UART2_BASE
|
||||
#define BOARD_UART3_BASE OMAP_UART3_BASE
|
||||
|
||||
#define BOARD_UART_DEBUG BOARD_UART3_BASE
|
||||
|
||||
#define BOARD_UART_CLOCK 48000000
|
||||
// 48MHz (APLL96/2)
|
||||
|
||||
|
||||
#endif /* _BOARD_OVERO_BOARD_CONFIG_H */
|
||||
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* Copyright 2012 Haiku, Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* Alexander von Gluck, [email protected]
|
||||
*/
|
||||
#ifndef _BOARD_RPI2_BOARD_CONFIG_H
|
||||
#define _BOARD_RPI2_BOARD_CONFIG_H
|
||||
|
||||
|
||||
#define BOARD_NAME_PRETTY "Raspberry Pi 2"
|
||||
|
||||
#define BOARD_CPU_TYPE_ARM7 1
|
||||
#define BOARD_CPU_BCM2836 1
|
||||
|
||||
#include <arch/arm/bcm283X.h>
|
||||
|
||||
#define DEVICE_BASE BCM2836_PERIPHERAL_BASE
|
||||
#define DEVICE_SIZE 0xFFFFFF
|
||||
|
||||
#define VECT_BASE 0xFFFF0000
|
||||
#define VECT_SIZE SIZE_4K
|
||||
|
||||
#define SDRAM_BASE BCM283X_SDRAM_BASE
|
||||
#define SDRAM_SIZE 0x4000000
|
||||
// 64Mb
|
||||
|
||||
// UART Settings
|
||||
#define BOARD_UART_PL011 1
|
||||
|
||||
#define BOARD_UART1_BASE UART0_BASE
|
||||
// PL011 UART
|
||||
#define BOARD_UART2_BASE UART1_BASE + 0x40
|
||||
// miniUART
|
||||
#define BOARD_UART3_BASE 0
|
||||
// N/A
|
||||
|
||||
#define BOARD_UART_DEBUG DEVICE_BASE + BOARD_UART1_BASE
|
||||
|
||||
#define BOARD_UART_CLOCK 3000000
|
||||
/* 3Mhz */
|
||||
|
||||
|
||||
#endif /* _BOARD_RPI2_BOARD_CONFIG_H */
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* Copyright 2009
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _BOARD_VERDEX_BOARD_CONFIG_H
|
||||
#define _BOARD_VERDEX_BOARD_CONFIG_H
|
||||
|
||||
|
||||
#define BOARD_NAME_PRETTY "Gumstix Verdex"
|
||||
|
||||
#define BOARD_CPU_TYPE_PXA 1
|
||||
#define BOARD_CPU_PXA270 1
|
||||
|
||||
#include <arch/arm/pxa270.h>
|
||||
|
||||
// UART Settings
|
||||
#define BOARD_UART_8250 1
|
||||
|
||||
#define BOARD_UART1_BASE FFUART_BASE
|
||||
#define BOARD_UART2_BASE BTUART_BASE
|
||||
#define BOARD_UART3_BASE STUART_BASE
|
||||
|
||||
#define BOARD_UART_DEBUG BOARD_UART1_BASE
|
||||
|
||||
#define BOARD_UART_CLOCK 48000000
|
||||
// 48MHz (APLL96/2)
|
||||
|
||||
|
||||
#endif /* _BOARD_VERDEX_BOARD_CONFIG_H */
|
||||
@@ -3,7 +3,6 @@ SubDir HAIKU_TOP src system boot arch arm ;
|
||||
UsePrivateHeaders [ FDirName kernel platform $(TARGET_BOOT_PLATFORM) ] ;
|
||||
|
||||
#XXX: should not be needed here
|
||||
UsePrivateHeaders [ FDirName kernel arch $(TARGET_KERNEL_ARCH) board $(TARGET_BOOT_BOARD) ] ;
|
||||
UseLibraryHeaders [ FDirName libfdt ] ;
|
||||
|
||||
{
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
#include <arm_mmu.h>
|
||||
#include <kernel.h>
|
||||
|
||||
#include <board_config.h>
|
||||
|
||||
#include <OS.h>
|
||||
|
||||
#include <string.h>
|
||||
@@ -32,7 +30,7 @@ extern "C" {
|
||||
};
|
||||
|
||||
|
||||
//#define TRACE_MMU
|
||||
#define TRACE_MMU
|
||||
#ifdef TRACE_MMU
|
||||
# define TRACE(x) dprintf x
|
||||
#else
|
||||
@@ -88,13 +86,16 @@ struct memblock {
|
||||
};
|
||||
|
||||
|
||||
#warning TODO: Plot pref. base from fdt!
|
||||
static struct memblock LOADER_MEMORYMAP[] = {
|
||||
/*
|
||||
{
|
||||
"devices",
|
||||
DEVICE_BASE,
|
||||
DEVICE_BASE + DEVICE_SIZE - 1,
|
||||
ARM_MMU_L2_FLAG_B,
|
||||
},
|
||||
*/
|
||||
{
|
||||
"RAM_kernel", // 8MB space for kernel, drivers etc
|
||||
KERNEL_LOAD_BASE,
|
||||
@@ -112,7 +113,6 @@ static struct memblock LOADER_MEMORYMAP[] = {
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
//static const uint32 kDefaultPageTableFlags = MMU_FLAG_READWRITE;
|
||||
// not cached not buffered, R/W
|
||||
|
||||
|
||||
@@ -11,10 +11,6 @@ UsePrivateHeaders [ FDirName graphics vesa ] ;
|
||||
UsePrivateHeaders [ FDirName storage ] ;
|
||||
UsePrivateHeaders [ FDirName kernel arch generic ] ;
|
||||
|
||||
# TODO: move this to arch/arm !
|
||||
|
||||
UsePrivateHeaders [ FDirName kernel arch $(TARGET_KERNEL_ARCH) board $(TARGET_BOOT_BOARD) ] ;
|
||||
|
||||
{
|
||||
local defines = _BOOT_MODE ;
|
||||
|
||||
@@ -164,8 +160,8 @@ rule BuildUBootSDImage image : files
|
||||
SDIMAGE_MTOOLS_H on $(image) = 255 ;
|
||||
SDIMAGE_MTOOLS_S on $(image) = 63 ;
|
||||
SDIMAGE_MTOOLS_C on $(image) = 8 ;
|
||||
SDIMAGE_SIZE on $(image) = $(HAIKU_BOARD_SDIMAGE_SIZE) ;
|
||||
SDIMAGE_BEGIN on $(image) = $(HAIKU_BOARD_SDIMAGE_BEGIN:E=63) ;
|
||||
SDIMAGE_SIZE on $(image) = $(HAIKU_BOOT_SDIMAGE_SIZE) ;
|
||||
SDIMAGE_BEGIN on $(image) = $(HAIKU_BOOT_SDIMAGE_BEGIN:E=63) ;
|
||||
BuildUBootSDImage1 $(image) : $(files) ;
|
||||
}
|
||||
|
||||
@@ -234,23 +230,17 @@ actions BlessSDImage1 bind HAIKU_BOARD_SDIMAGE_BOOT0_SEEK HAIKU_BOARD_SDIMAGE_BO
|
||||
fi
|
||||
}
|
||||
|
||||
HAIKU_BOOT_LOADER_ENTRY_LINUX = `printf \"obase=16;ibase=16;10 + %x\\n\" $(HAIKU_BOOT_LOADER_BASE)|bc` ;
|
||||
|
||||
# uimage targets
|
||||
BuildUImage haiku_loader.ub : haiku_loader :
|
||||
-A $(TARGET_ARCH) -O $(uImageFakeOS) -T kernel -C none
|
||||
-a $(HAIKU_BOARD_LOADER_BASE) -e $(HAIKU_BOARD_LOADER_ENTRY_RAW)
|
||||
-n 'haiku_loader $(TARGET_BOOT_BOARD)' ;
|
||||
|
||||
local tgzArchive = haiku-floppyboot.tgz ;
|
||||
|
||||
BuildUImage $(tgzArchive).ub : $(tgzArchive) :
|
||||
BuildUImage haiku-floppyboot.tgz.ub : haiku-floppyboot.tgz :
|
||||
-A $(TARGET_ARCH) -O linux -T ramdisk -C none
|
||||
-n '$(tgzArchive) $(TARGET_BOOT_BOARD)' ;
|
||||
-n 'Haiku $(TARGET_KERNEL_ARCH) floppyboot' ;
|
||||
|
||||
BuildUImage haiku_loader_linux.ub : haiku_loader :
|
||||
BuildUImage haiku_loader.ub : haiku_loader :
|
||||
-A $(TARGET_ARCH) -O linux -T kernel -C none
|
||||
-a $(HAIKU_BOARD_LOADER_BASE) -e $(HAIKU_BOARD_LOADER_ENTRY_LINUX)
|
||||
-n 'haiku_loader $(TARGET_BOOT_BOARD)' ;
|
||||
-a $(HAIKU_BOOT_LOADER_BASE) -e $(HAIKU_BOOT_LOADER_ENTRY_LINUX)
|
||||
-n 'Haiku $(TARGET_KERNEL_ARCH) loader' ;
|
||||
|
||||
if $(HAIKU_BOARD_SDIMAGE_UBOOT_SCRIPT_NAME) {
|
||||
BuildUImageScript $(HAIKU_BOARD_SDIMAGE_UBOOT_SCRIPT_NAME) :
|
||||
@@ -259,26 +249,27 @@ if $(HAIKU_BOARD_SDIMAGE_UBOOT_SCRIPT_NAME) {
|
||||
|
||||
# flash image targets
|
||||
|
||||
BuildUBootFlashImage haiku-$(HAIKU_BOOT_BOARD)_flash_image_raw.img : haiku_loader :
|
||||
BuildUBootFlashImage haiku-$(TARGET_KERNEL_ARCH)_flash_image_raw.img : haiku_loader :
|
||||
$(FLASH_IMAGE_PARTS) ;
|
||||
NotFile haiku-flash-image ;
|
||||
Depends haiku-flash-image : haiku-$(HAIKU_BOOT_BOARD)_flash_image_raw.img ;
|
||||
Depends haiku-flash-image : haiku-$(TARGET_KERNEL_ARCH)_flash_image_raw.img ;
|
||||
|
||||
#BuildUBootFlashImage haiku-$(HAIKU_BOOT_BOARD)_flash_image_elf.img : boot_loader_u-boot :
|
||||
#BuildUBootFlashImage haiku-$(TARGET_KERNEL_ARCH)_flash_image_elf.img : boot_loader_u-boot :
|
||||
# $(FLASH_IMAGE_PARTS) ;
|
||||
#NotFile haiku-flash-elf-image ;
|
||||
#Depends haiku-flash-elf-image : haiku-$(HAIKU_BOOT_BOARD)_flash_image_elf.img ;
|
||||
#Depends haiku-flash-elf-image : haiku-$(TARGET_KERNEL_ARCH)_flash_image_elf.img ;
|
||||
|
||||
BuildUBootFlashImage haiku-$(HAIKU_BOOT_BOARD)_flash_image_uimage.img : haiku_loader.ub :
|
||||
BuildUBootFlashImage haiku-$(TARGET_KERNEL_ARCH)_flash_image_uimage.img : haiku_loader.ub :
|
||||
$(FLASH_IMAGE_PARTS) ;
|
||||
NotFile haiku-flash-uimage ;
|
||||
Depends haiku-flash-uimage : haiku-$(HAIKU_BOOT_BOARD)_flash_image_uimage.img ;
|
||||
Depends haiku-flash-uimage : haiku-$(TARGET_KERNEL_ARCH)_flash_image_uimage.img ;
|
||||
|
||||
# SD/mmc image targets
|
||||
BuildUBootSDImage haiku-$(HAIKU_BOOT_BOARD).mmc : $(HAIKU_IMAGE) $(HAIKU_BOARD_SDIMAGE_FILES) ;
|
||||
BlessSDImage haiku-$(HAIKU_BOOT_BOARD).mmc ;
|
||||
BuildUBootSDImage haiku-$(TARGET_KERNEL_ARCH).mmc :
|
||||
$(HAIKU_IMAGE) haiku_loader.ub haiku-floppyboot.tgz.ub ;
|
||||
BlessSDImage haiku-$(TARGET_KERNEL_ARCH).mmc ;
|
||||
NotFile haiku-mmc-image ;
|
||||
Depends haiku-mmc-image : haiku-$(HAIKU_BOOT_BOARD).mmc ;
|
||||
Depends haiku-mmc-image : haiku-$(TARGET_KERNEL_ARCH).mmc ;
|
||||
|
||||
SEARCH on [ FGristFiles $(genericPlatformSources) ]
|
||||
= [ FDirName $(HAIKU_TOP) src system boot platform generic ] ;
|
||||
|
||||
@@ -7,7 +7,6 @@ UsePrivateSystemHeaders ;
|
||||
UsePrivateHeaders kernel [ FDirName kernel platform u-boot ] ;
|
||||
UsePrivateHeaders kernel [ FDirName kernel arch $(TARGET_KERNEL_ARCH) ]
|
||||
[ FDirName kernel boot platform $(HAIKU_BOOT_PLATFORM) ] ;
|
||||
UsePrivateHeaders [ FDirName kernel arch $(TARGET_KERNEL_ARCH) board $(TARGET_BOOT_BOARD) ] ;
|
||||
|
||||
SubDirC++Flags -fno-rtti ;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2015 Haiku, Inc. All rights reserved.
|
||||
* Copyright 2012-2016 Haiku, Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
@@ -9,8 +9,6 @@
|
||||
|
||||
#include "arch_mailbox.h"
|
||||
|
||||
#include <board_config.h>
|
||||
|
||||
#include "fdt_support.h"
|
||||
|
||||
ArchMailbox *gMailbox = NULL;
|
||||
@@ -19,12 +17,11 @@ extern void* gFDT;
|
||||
extern "C" status_t
|
||||
arch_mailbox_init()
|
||||
{
|
||||
#if defined(BOARD_CPU_BCM2835) || defined(BOARD_CPU_BCM2836)
|
||||
extern ArchMailbox *arch_get_mailbox_arm_bcm2835(addr_t base);
|
||||
phys_addr_t mboxBase = fdt_get_device_reg_byname(gFDT, "/axi/mbox");
|
||||
if (mboxBase) {
|
||||
gMailbox = arch_get_mailbox_arm_bcm2835(mboxBase);
|
||||
if (!mboxBase) {
|
||||
return B_ERROR;
|
||||
}
|
||||
#endif
|
||||
gMailbox = arch_get_mailbox_arm_bcm2835(mboxBase);
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ SubDirHdrs $(HAIKU_TOP) src system boot platform $(TARGET_BOOT_PLATFORM) ;
|
||||
UsePrivateSystemHeaders ;
|
||||
UsePrivateHeaders kernel [ FDirName kernel arch $(TARGET_KERNEL_ARCH) ]
|
||||
[ FDirName kernel boot platform $(HAIKU_BOOT_PLATFORM) ] ;
|
||||
|
||||
UsePrivateHeaders [ FDirName kernel arch $(TARGET_KERNEL_ARCH) board $(TARGET_BOOT_BOARD) ] ;
|
||||
|
||||
UseLibraryHeaders [ FDirName libfdt ] ;
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#include <arch/arm/arch_uart_pl011.h>
|
||||
#endif
|
||||
|
||||
#include <board_config.h>
|
||||
#include <boot/platform.h>
|
||||
#include <arch/cpu.h>
|
||||
#include <boot/stage2.h>
|
||||
@@ -124,17 +123,8 @@ serial_init(const void *fdt)
|
||||
// first try with hints from the FDT
|
||||
gUART = debug_uart_from_fdt(fdt);
|
||||
|
||||
// fallback to known board UARTs
|
||||
#if defined(BOARD_UART_DEBUG) && defined(BOARD_UART_CLOCK)
|
||||
if (gUART == NULL) {
|
||||
#ifdef BOARD_UART_PL011
|
||||
gUART = arch_get_uart_pl011(BOARD_UART_DEBUG, BOARD_UART_CLOCK);
|
||||
#else
|
||||
gUART = arch_get_uart_8250(BOARD_UART_DEBUG, BOARD_UART_CLOCK);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
// Do we can some kind of direct fallback here
|
||||
// (aka, guess arch_get_uart_pl011 or arch_get_uart_8250?)
|
||||
if (gUART == NULL)
|
||||
return;
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include <arch/cpu.h>
|
||||
#include <platform_arch.h>
|
||||
#include <platform/openfirmware/openfirmware.h>
|
||||
#include <board_config.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include <boot/platform/generic/video.h>
|
||||
#include <util/list.h>
|
||||
#include <drivers/driver_settings.h>
|
||||
#include <board_config.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -104,6 +103,8 @@ platform_switch_to_text_mode(void)
|
||||
extern "C" status_t
|
||||
platform_init_video(void)
|
||||
{
|
||||
|
||||
#warning TODO: Fix u-boot arm framebuffer location from fdt!
|
||||
#ifdef __ARM__
|
||||
#if defined(BOARD_CPU_ARM920T)
|
||||
extern ArchFramebuffer *arch_get_fb_arm_920(addr_t base);
|
||||
|
||||
@@ -2,8 +2,6 @@ SubDir HAIKU_TOP src system kernel arch arm ;
|
||||
|
||||
SubDirHdrs $(SUBDIR) $(DOTDOT) generic ;
|
||||
UsePrivateKernelHeaders ;
|
||||
UsePrivateHeaders [ FDirName kernel arch $(TARGET_KERNEL_ARCH) board $(TARGET_BOOT_BOARD) ] ;
|
||||
|
||||
|
||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) paging ] ;
|
||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) paging 32bit ] ;
|
||||
|
||||
@@ -12,17 +12,16 @@
|
||||
|
||||
//#include <arch_platform.h>
|
||||
#include <arch/debug_console.h>
|
||||
#include <arch/generic/debug_uart_8250.h>
|
||||
#include <arch/arm/arch_uart_pl011.h>
|
||||
#include <arch/generic/debug_uart.h>
|
||||
#include <boot/kernel_args.h>
|
||||
#include <kernel.h>
|
||||
#include <vm/vm.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "board_config.h"
|
||||
|
||||
|
||||
// TODO: Declare this in some header
|
||||
DebugUART *gArchDebugUART;
|
||||
extern DebugUART *debug_uart_from_fdt(const void *fdt);
|
||||
|
||||
|
||||
void
|
||||
@@ -95,12 +94,13 @@ arch_debug_serial_early_boot_message(const char *string)
|
||||
status_t
|
||||
arch_debug_console_init(kernel_args *args)
|
||||
{
|
||||
#if defined(BOARD_UART_PL011)
|
||||
gArchDebugUART = arch_get_uart_pl011(BOARD_UART_DEBUG, BOARD_UART_CLOCK);
|
||||
#else
|
||||
// More Generic 8250
|
||||
gArchDebugUART = arch_get_uart_8250(BOARD_UART_DEBUG, BOARD_UART_CLOCK);
|
||||
#endif
|
||||
// first try with hints from the FDT
|
||||
gArchDebugUART = debug_uart_from_fdt(args->platform_args.fdt);
|
||||
|
||||
// Do we can some kind of direct fallback here
|
||||
// (aka, guess arch_get_uart_pl011 or arch_get_uart_8250?)
|
||||
if (gArchDebugUART == NULL)
|
||||
return B_ERROR;
|
||||
|
||||
gArchDebugUART->InitEarly();
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
#include <arch/arm/reg.h>
|
||||
#include <arch/generic/debug_uart_8250.h>
|
||||
#include <board_config.h>
|
||||
#include <debug.h>
|
||||
#include <new>
|
||||
|
||||
@@ -42,7 +41,7 @@ void
|
||||
ArchUART8250::InitEarly()
|
||||
{
|
||||
// Perform special hardware UART configuration
|
||||
|
||||
#warning TODO: Detect OMAP3 from fdt!
|
||||
#if BOARD_CPU_OMAP3
|
||||
/* UART1 */
|
||||
RMWREG32(CM_FCLKEN1_CORE, 13, 1, 1);
|
||||
|
||||
@@ -6,7 +6,7 @@ STACK_SIZE = 16384;
|
||||
ENTRY(_start)
|
||||
SECTIONS
|
||||
{
|
||||
. = BOARD_LOADER_BASE;
|
||||
. = BOOT_LOADER_BASE;
|
||||
|
||||
/* text/read-only data */
|
||||
.text : { *(.text .gnu.linkonce.t.*) }
|
||||
|
||||
Reference in New Issue
Block a user