mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-21 22:47:50 +00:00
os: make platform_drv package ready for ARM
* Make target binaries independent of board SPECS * Name binaries of one architecture unambigously * Extend include path to match board specifics * Adapt run-scripts to use the right binary Ref #2190 Ref #3180
This commit is contained in:
parent
c55663b923
commit
911f4ada0a
@ -108,9 +108,18 @@ proc append_platform_drv_build_components {} {
|
|||||||
append build_components { } [platform_drv_build_components]
|
append build_components { } [platform_drv_build_components]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
proc platform_drv_binary {} {
|
||||||
|
if {[have_spec arndale] } { return arndale_platform_drv }
|
||||||
|
if {[have_spec imx53] } { return imx53_platform_drv }
|
||||||
|
if {[have_spec odroid_x2]} { return odroid_x2_platform_drv }
|
||||||
|
if {[have_spec rpi] } { return rpi_platform_drv }
|
||||||
|
if {[have_spec x86] } { return platform_drv }
|
||||||
|
return no_platform_drv_available
|
||||||
|
}
|
||||||
|
|
||||||
proc platform_drv_boot_modules {} {
|
proc platform_drv_boot_modules {} {
|
||||||
set drv_boot_modules ""
|
set drv_boot_modules ""
|
||||||
lappend_if [have_platform_drv] drv_boot_modules platform_drv
|
lappend_if [have_platform_drv] drv_boot_modules [platform_drv_binary]
|
||||||
lappend_if [have_spec x86] drv_boot_modules report_rom
|
lappend_if [have_spec x86] drv_boot_modules report_rom
|
||||||
|
|
||||||
if {[have_spec x86]} {
|
if {[have_spec x86]} {
|
||||||
@ -262,6 +271,7 @@ proc platform_drv_config {} {
|
|||||||
|
|
||||||
append drv_config {
|
append drv_config {
|
||||||
<start name="platform_drv" } [platform_drv_priority] { caps="800">
|
<start name="platform_drv" } [platform_drv_priority] { caps="800">
|
||||||
|
<binary name="} [platform_drv_binary] {"/>
|
||||||
<resource name="RAM" quantum="4M" constrain_phys="yes"/>
|
<resource name="RAM" quantum="4M" constrain_phys="yes"/>
|
||||||
<provides>
|
<provides>
|
||||||
<service name="Platform"/>}
|
<service name="Platform"/>}
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#include <base/capability.h>
|
#include <base/capability.h>
|
||||||
#include <base/rpc.h>
|
#include <base/rpc.h>
|
||||||
#include <dataspace/capability.h>
|
#include <dataspace/capability.h>
|
||||||
#include <platform/framebuffer_info.h>
|
#include <spec/rpi/platform/framebuffer_info.h>
|
||||||
|
|
||||||
namespace Platform {
|
namespace Platform {
|
||||||
using namespace Genode;
|
using namespace Genode;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
base
|
base
|
||||||
os
|
os
|
||||||
platform_session
|
platform_session
|
||||||
|
regulator_session
|
||||||
report_session
|
report_session
|
||||||
|
@ -9,8 +9,9 @@ set build_components {
|
|||||||
drivers/sd_card
|
drivers/sd_card
|
||||||
test/block/client
|
test/block/client
|
||||||
}
|
}
|
||||||
lappend_if [have_spec arndale] build_components drivers/platform
|
|
||||||
lappend_if [have_spec rpi] build_components drivers/platform
|
source ${genode_dir}/repos/base/run/platform_drv.inc
|
||||||
|
append_platform_drv_build_components
|
||||||
|
|
||||||
build $build_components
|
build $build_components
|
||||||
create_boot_directory
|
create_boot_directory
|
||||||
@ -36,12 +37,7 @@ set config {
|
|||||||
</default-route>
|
</default-route>
|
||||||
<default caps="100"/> }
|
<default caps="100"/> }
|
||||||
|
|
||||||
append_if [expr [have_spec arndale] || [have_spec rpi]] config {
|
append_platform_drv_config
|
||||||
<start name="platform_drv">
|
|
||||||
<resource name="RAM" quantum="1M"/>
|
|
||||||
<provides> <service name="Regulator"/>
|
|
||||||
<service name="Platform"/> </provides>
|
|
||||||
</start>}
|
|
||||||
|
|
||||||
append config {
|
append config {
|
||||||
<start name="timer">
|
<start name="timer">
|
||||||
@ -70,9 +66,8 @@ set boot_modules {
|
|||||||
sd_card_drv
|
sd_card_drv
|
||||||
test-block-client
|
test-block-client
|
||||||
}
|
}
|
||||||
lappend_if [have_spec arndale] boot_modules platform_drv
|
|
||||||
lappend_if [have_spec rpi] boot_modules platform_drv
|
|
||||||
|
|
||||||
|
append_platform_drv_boot_modules
|
||||||
set disk_image "bin/sd_card.img"
|
set disk_image "bin/sd_card.img"
|
||||||
|
|
||||||
build_boot_image $boot_modules
|
build_boot_image $boot_modules
|
||||||
|
@ -148,7 +148,7 @@ append_if $mmc_rootfs config {
|
|||||||
<resource name="RAM" quantum="3M"/>
|
<resource name="RAM" quantum="3M"/>
|
||||||
<provides><service name="Timer"/></provides>
|
<provides><service name="Timer"/></provides>
|
||||||
</start>
|
</start>
|
||||||
<start name="platform_drv">
|
<start name="imx53_platform_drv">
|
||||||
<resource name="RAM" quantum="3M"/>
|
<resource name="RAM" quantum="3M"/>
|
||||||
<provides>
|
<provides>
|
||||||
<service name="Regulator"/>
|
<service name="Regulator"/>
|
||||||
@ -228,7 +228,7 @@ if { $mmc_rootfs } {
|
|||||||
|
|
||||||
# add components that enable MMC access via parvirtualized block
|
# add components that enable MMC access via parvirtualized block
|
||||||
lappend boot_modules timer
|
lappend boot_modules timer
|
||||||
lappend boot_modules platform_drv
|
lappend boot_modules imx53_platform_drv
|
||||||
lappend boot_modules sd_card_drv
|
lappend boot_modules sd_card_drv
|
||||||
lappend boot_modules part_block
|
lappend boot_modules part_block
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
TARGET = platform_drv
|
TARGET = arndale_platform_drv
|
||||||
REQUIRES = arndale
|
REQUIRES = arm_v7
|
||||||
SRC_CC = main.cc
|
SRC_CC = main.cc
|
||||||
INC_DIR += ${PRG_DIR}
|
INC_DIR += ${PRG_DIR} $(call select_from_repositories,include/spec/exynos5)
|
||||||
LIBS = base
|
LIBS = base
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
TARGET = platform_drv
|
TARGET = imx53_platform_drv
|
||||||
REQUIRES = imx53
|
REQUIRES = arm_v7
|
||||||
SRC_CC = main.cc
|
SRC_CC = main.cc
|
||||||
INC_DIR += ${PRG_DIR}
|
INC_DIR += ${PRG_DIR} $(call select_from_repositories,include/spec/imx53)
|
||||||
LIBS = base
|
LIBS = base
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
TARGET = platform_drv
|
TARGET = odroid_x2_platform_drv
|
||||||
REQUIRES = odroid_x2
|
REQUIRES = arm_v7
|
||||||
SRC_CC = main.cc
|
SRC_CC = main.cc
|
||||||
INC_DIR += ${PRG_DIR}
|
INC_DIR += ${PRG_DIR} $(call select_from_repositories,include/spec/exynos4)
|
||||||
LIBS = base
|
LIBS = base
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
TARGET = platform_drv
|
TARGET = rpi_platform_drv
|
||||||
REQUIRES = rpi
|
REQUIRES = arm_v6
|
||||||
SRC_CC = main.cc
|
SRC_CC = main.cc
|
||||||
INC_DIR += ${PRG_DIR}
|
INC_DIR += ${PRG_DIR} $(call select_from_repositories,include/spec/rpi)
|
||||||
LIBS = base
|
LIBS = base
|
||||||
|
|
||||||
# enable C++11 support
|
# enable C++11 support
|
||||||
|
Loading…
Reference in New Issue
Block a user