arm/targets: Add rpi2, rename raspberry_pi to rpi1
* The Raspberry pi 2 uses a new SoC which differs slightly from the Raspberry Pi 1. * Someday these two board targets could go away when we get FDT support.
This commit is contained in:
@@ -244,10 +244,14 @@ rule KernelArchitectureSetup architecture
|
|||||||
HAIKU_BOOT_PLATFORM ?= u-boot ;
|
HAIKU_BOOT_PLATFORM ?= u-boot ;
|
||||||
HAIKU_BOOT_FLOPPY_IMAGE_SIZE = 1440 ;
|
HAIKU_BOOT_FLOPPY_IMAGE_SIZE = 1440 ;
|
||||||
}
|
}
|
||||||
case raspberry_pi :
|
case rpi1 :
|
||||||
{
|
{
|
||||||
# For now rpi has a custom non u-boot loader
|
HAIKU_BOOT_PLATFORM ?= u-boot ;
|
||||||
HAIKU_BOOT_PLATFORM ?= raspberrypi_arm ;
|
HAIKU_BOOT_FLOPPY_IMAGE_SIZE = 1440 ;
|
||||||
|
}
|
||||||
|
case rpi2 :
|
||||||
|
{
|
||||||
|
HAIKU_BOOT_PLATFORM ?= u-boot ;
|
||||||
HAIKU_BOOT_FLOPPY_IMAGE_SIZE = 1440 ;
|
HAIKU_BOOT_FLOPPY_IMAGE_SIZE = 1440 ;
|
||||||
}
|
}
|
||||||
case verdex :
|
case verdex :
|
||||||
|
|||||||
@@ -0,0 +1,66 @@
|
|||||||
|
# Raspberry Pi 2 board-specific definitions
|
||||||
|
|
||||||
|
HAIKU_BOARD_DESCRIPTION = "Raspberry Pi 2" ;
|
||||||
|
HAIKU_BOOT_PLATFORM = u-boot ;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Various hardcoded addresses
|
||||||
|
#
|
||||||
|
|
||||||
|
HAIKU_BOARD_LOADER_BASE = 0x0c180000 ;
|
||||||
|
HAIKU_BOARD_LOADER_ENTRY_RAW = $(HAIKU_BOARD_LOADER_BASE) ;
|
||||||
|
HAIKU_BOARD_LOADER_ENTRY_LINUX = `printf \"obase=16;ibase=16;8 + %x\\n\" $(HAIKU_BOARD_LOADER_BASE)|bc` ;
|
||||||
|
HAIKU_BOARD_LOADER_ENTRY_NBSD = `printf \"obase=16;ibase=16;8 + %x\\n\" $(HAIKU_BOARD_LOADER_BASE)|bc` ;
|
||||||
|
|
||||||
|
HAIKU_BOARD_BOOT_ARCHIVE_BASE = 0x04000000 ;
|
||||||
|
HAIKU_BOARD_BOOT_ARCHIVE_SIZE = 0x00400000 ;
|
||||||
|
# TODO: needs to be configured in the config.txt
|
||||||
|
# ramfsfile=haiku-floppyboot.tgz and ramfsaddr=x
|
||||||
|
|
||||||
|
#
|
||||||
|
# Flash image
|
||||||
|
#
|
||||||
|
|
||||||
|
# N/A for Raspberry Pi
|
||||||
|
|
||||||
|
#
|
||||||
|
# mmc/SD image
|
||||||
|
#
|
||||||
|
|
||||||
|
HAIKU_BOARD_FIRMWARE_URL = http://github.com/raspberrypi/firmware/raw/master/boot/ ;
|
||||||
|
HAIKU_BOARD_FIRMWARE_FILES =
|
||||||
|
bootcode.bin
|
||||||
|
loader.bin
|
||||||
|
arm224_start.elf # start.elf
|
||||||
|
LICENSE.broadcom
|
||||||
|
;
|
||||||
|
|
||||||
|
# in MB
|
||||||
|
HAIKU_BOARD_SDIMAGE_FAT_SIZE = 32 ;
|
||||||
|
HAIKU_BOARD_SDIMAGE_FAT_FILES =
|
||||||
|
$(HAIKU_BOARD_FIRMWARE_FILES)
|
||||||
|
haiku_loader
|
||||||
|
;
|
||||||
|
|
||||||
|
# in MB
|
||||||
|
HAIKU_BOARD_SDIMAGE_SIZE = 256 ;
|
||||||
|
|
||||||
|
#
|
||||||
|
# gcc flags for the specific cpu
|
||||||
|
#
|
||||||
|
|
||||||
|
local flags = -mtune=arm1176jzf-s -march=armv6 ;
|
||||||
|
|
||||||
|
HAIKU_ASFLAGS_$(HAIKU_PACKAGING_ARCH) += $(flags) ;
|
||||||
|
HAIKU_CCFLAGS_$(HAIKU_PACKAGING_ARCH) += $(flags) ;
|
||||||
|
HAIKU_C++FLAGS_$(HAIKU_PACKAGING_ARCH) += $(flags) ;
|
||||||
|
|
||||||
|
# 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 ;
|
||||||
|
HAIKU_LINKFLAGS_$(HAIKU_PACKAGING_ARCH) +=
|
||||||
|
-Wl,-z -Wl,max-page-size=0x1000
|
||||||
|
-Wl,-z -Wl,common-page-size=0x1000 ;
|
||||||
|
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
##### CPU Speed
|
||||||
|
#arm_freq 700
|
||||||
|
|
||||||
|
##### Memory layout
|
||||||
|
#gpu_mem 64
|
||||||
|
|
||||||
|
# Memory based on model.. overrides gpu_mem
|
||||||
|
#gpu_mem_256 64
|
||||||
|
#gpu_mem_512 64
|
||||||
|
|
||||||
|
##### Low level
|
||||||
|
kernel=haiku_loader
|
||||||
|
kernel_address=0x0
|
||||||
|
ramfsfile=haiku-floppyboot.tgz
|
||||||
|
ramfsaddr=0x04000000
|
||||||
|
|
||||||
|
# Skip boot tags for non-linux platforms
|
||||||
|
disable_commandline_tags=1
|
||||||
|
#device_tree=bcm2835.dtb
|
||||||
|
#device_tree_address=0x100
|
||||||
|
|
||||||
|
##### UART Settings
|
||||||
|
# Default is 115200
|
||||||
|
#init_uart_baud=9600
|
||||||
|
#init_uart_clock=
|
||||||
@@ -483,7 +483,8 @@ supportedTargetArchs="
|
|||||||
"
|
"
|
||||||
supportedTargetBoards="
|
supportedTargetBoards="
|
||||||
beagle
|
beagle
|
||||||
raspberry_pi
|
rpi1
|
||||||
|
rpi2
|
||||||
verdex
|
verdex
|
||||||
"
|
"
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -5,8 +5,8 @@
|
|||||||
* Authors:
|
* Authors:
|
||||||
* Alexander von Gluck, kallisti5@unixzen.com
|
* Alexander von Gluck, kallisti5@unixzen.com
|
||||||
*/
|
*/
|
||||||
#ifndef _BOARD_RASPBERRY_PI_BOARD_CONFIG_H
|
#ifndef _BOARD_RPI1_BOARD_CONFIG_H
|
||||||
#define _BOARD_RASPBERRY_PI_BOARD_CONFIG_H
|
#define _BOARD_RPI1_BOARD_CONFIG_H
|
||||||
|
|
||||||
|
|
||||||
#define BOARD_NAME_PRETTY "Raspberry Pi"
|
#define BOARD_NAME_PRETTY "Raspberry Pi"
|
||||||
@@ -32,4 +32,4 @@
|
|||||||
/* 3Mhz */
|
/* 3Mhz */
|
||||||
|
|
||||||
|
|
||||||
#endif /* _BOARD_RASPBERRY_PI_BOARD_CONFIG_H */
|
#endif /* _BOARD_RPI1_BOARD_CONFIG_H */
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* 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>
|
||||||
|
|
||||||
|
// UART Settings
|
||||||
|
#define BOARD_UART_AMBA_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 BOARD_UART1_BASE
|
||||||
|
|
||||||
|
#define BOARD_UART_CLOCK 3000000
|
||||||
|
/* 3Mhz */
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* _BOARD_RPI2_BOARD_CONFIG_H */
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
#include "arch_framebuffer.h"
|
#include "arch_framebuffer.h"
|
||||||
|
|
||||||
|
#include <board_config.h>
|
||||||
#include <arch/arm/bcm283X.h>
|
#include <arch/arm/bcm283X.h>
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
#include <boot/stage2.h>
|
#include <boot/stage2.h>
|
||||||
|
|||||||
@@ -8,13 +8,15 @@
|
|||||||
* Alexander von Gluck IV, [email protected]
|
* Alexander von Gluck IV, [email protected]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <atomic>
|
|
||||||
|
|
||||||
#include "arch_mailbox.h"
|
#include "arch_mailbox.h"
|
||||||
|
|
||||||
#include "arch_cpu.h"
|
#include <atomic>
|
||||||
|
#include <board_config.h>
|
||||||
#include <arch/arm/bcm283X.h>
|
#include <arch/arm/bcm283X.h>
|
||||||
|
|
||||||
|
#include "arch_cpu.h"
|
||||||
|
|
||||||
|
|
||||||
class ArchMailboxArmBCM2835 final : public ArchMailbox {
|
class ArchMailboxArmBCM2835 final : public ArchMailbox {
|
||||||
public:
|
public:
|
||||||
|
|||||||
Reference in New Issue
Block a user