mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-18 18:56:29 +00:00
Enable Noux for ARM
With this patch the existing Noux run scripts except the tool chain script can be executed on the ARM platform. Fixes #229.
This commit is contained in:
parent
7e95c25b7b
commit
54051a7bb2
@ -19,6 +19,7 @@ CUSTOM_AS ?= $(CROSS_DEV_PREFIX)as
|
||||
CUSTOM_AR ?= $(CROSS_DEV_PREFIX)ar
|
||||
CUSTOM_NM ?= $(CROSS_DEV_PREFIX)nm
|
||||
CUSTOM_OBJCOPY ?= $(CROSS_DEV_PREFIX)objcopy
|
||||
CUSTOM_STRIP ?= $(CROSS_DEV_PREFIX)strip
|
||||
|
||||
#
|
||||
# GNU utilities
|
||||
@ -41,6 +42,7 @@ AS = $(CUSTOM_AS)
|
||||
AR = $(CUSTOM_AR)
|
||||
NM = $(CUSTOM_NM)
|
||||
OBJCOPY = $(CUSTOM_OBJCOPY)
|
||||
STRIP = $(CUSTOM_STRIP)
|
||||
|
||||
#
|
||||
# Compiler and Linker options
|
||||
|
@ -37,11 +37,6 @@ NOUX_PKG_DIR = $(wildcard $(REP_DIR)/contrib/$(NOUX_PKG)-*)
|
||||
|
||||
PWD = $(shell pwd)
|
||||
|
||||
#
|
||||
# Disable Noux on non-x86 architectures for now
|
||||
#
|
||||
REQUIRES += x86
|
||||
|
||||
#
|
||||
# Detect missing preparation of noux package
|
||||
#
|
||||
@ -109,7 +104,7 @@ NOUX_LIBS_A = $(filter %.a, $(sort $(LINK_ITEMS)) $(EXT_OBJECTS) $(LIBGCC))
|
||||
NOUX_LIBS_SO = $(filter %.so,$(sort $(LINK_ITEMS)) $(EXT_OBJECTS) $(LIBGCC))
|
||||
NOUX_LIBS += $(NOUX_LIBS_A) $(NOUX_LIBS_SO) $(NOUX_LIBS_A)
|
||||
|
||||
NOUX_ENV += CC='$(CC)' LD='$(LD)' AR='$(AR)' LIBS='$(NOUX_LIBS)' \
|
||||
NOUX_ENV += CC='$(CC)' LD='$(LD)' AR='$(AR)' STRIP='$(STRIP)' LIBS='$(NOUX_LIBS)' \
|
||||
LDFLAGS='$(NOUX_LDFLAGS)' CFLAGS='$(NOUX_CFLAGS)' \
|
||||
CPPFLAGS='$(NOUX_CPPFLAGS)'
|
||||
|
||||
|
@ -1,7 +1,3 @@
|
||||
if {![have_spec x86]} {
|
||||
puts "\nNoux is supported on the x86 architecture only\n"
|
||||
exit 0
|
||||
}
|
||||
if {[have_spec linux]} {
|
||||
puts "\nLinux not supported because of missing UART driver\n"
|
||||
exit 0
|
||||
@ -74,7 +70,7 @@ if {[have_spec x86_64]} {
|
||||
append qemu_args " -m 300 "
|
||||
}
|
||||
|
||||
run_genode_until "child exited with exit value 0.*\n" 20
|
||||
run_genode_until "child exited with exit value 0.*\n" 30
|
||||
|
||||
puts "[exec cat $noux_output_file]"
|
||||
|
||||
|
@ -1,8 +1,3 @@
|
||||
if {![have_spec x86]} {
|
||||
puts "\nNoux is supported on the x86 architecture only\n"
|
||||
exit 0
|
||||
}
|
||||
|
||||
#
|
||||
# Uncomment the following line when working on the VIM source code. Otherwise,
|
||||
# the package may get recompiled, yet it does not get reinstalled into 'bin/'.
|
||||
@ -36,7 +31,7 @@ set viminfo=}
|
||||
close $vimrc_fd
|
||||
|
||||
# strip all binaries prior archiving
|
||||
exec sh -c "find bin/bash/ bin/vim/ bin/coreutils/ -type f | (xargs strip || true) 2>/dev/null"
|
||||
exec sh -c "find bin/bash/ bin/vim/ bin/coreutils/ -type f | (xargs [cross_dev_prefix]strip || true) 2>/dev/null"
|
||||
|
||||
exec tar cfv bin/bash.tar -h -C bin/bash .
|
||||
exec tar cfv bin/coreutils.tar -h -C bin/coreutils .
|
||||
|
@ -1,7 +1,3 @@
|
||||
if {![have_spec x86]} {
|
||||
puts "\nNoux is supported on the x86 architecture only\n"
|
||||
exit 0
|
||||
}
|
||||
if {[have_spec linux]} {
|
||||
puts "\nLinux not supported because of missing UART driver\n"
|
||||
exit 0
|
||||
@ -9,7 +5,7 @@ if {[have_spec linux]} {
|
||||
|
||||
build "core init drivers/timer drivers/uart noux/minimal lib/libc_noux test/noux_fork"
|
||||
|
||||
# strip coreutils binaries and create tar archive
|
||||
# create tar archive
|
||||
exec tar cfv bin/noux_fork.tar -h -C bin test-noux_fork
|
||||
|
||||
create_boot_directory
|
||||
|
@ -1,7 +1,3 @@
|
||||
if {![have_spec x86_32]} {
|
||||
puts "\nNoux is supported on the x86_32 architecture only\n"
|
||||
exit 0
|
||||
}
|
||||
if {[have_spec linux]} {
|
||||
puts "\nLinux not supported because of missing UART driver\n"
|
||||
exit 0
|
||||
@ -32,7 +28,7 @@ exec tar rfv bin/noux_netcat.tar -h -C bin/ etc
|
||||
|
||||
create_boot_directory
|
||||
|
||||
install_config {
|
||||
append config {
|
||||
<config verbose="yes">
|
||||
<parent-provides>
|
||||
<service name="ROM"/>
|
||||
@ -51,7 +47,7 @@ install_config {
|
||||
<any-service> <any-child/> <parent/> </any-service>
|
||||
</default-route>
|
||||
<start name="timer">
|
||||
<resource name="RAM" quantum="512K"/>
|
||||
<resource name="RAM" quantum="1M"/>
|
||||
<provides><service name="Timer"/></provides>
|
||||
</start>
|
||||
<start name="uart_drv">
|
||||
@ -64,11 +60,15 @@ install_config {
|
||||
<start name="nic_drv">
|
||||
<resource name="RAM" quantum="4M"/>
|
||||
<provides> <service name="Nic"/> </provides>
|
||||
</start>
|
||||
</start>}
|
||||
|
||||
append_if [have_spec pci] config {
|
||||
<start name="pci_drv">
|
||||
<resource name="RAM" quantum="2M"/>
|
||||
<provides> <service name="PCI"/> </provides>
|
||||
</start>
|
||||
<provides><service name="PCI"/> </provides>
|
||||
</start>}
|
||||
|
||||
append config {
|
||||
<start name="noux_net">
|
||||
<resource name="RAM" quantum="1G"/>
|
||||
<config>
|
||||
@ -82,12 +82,24 @@ install_config {
|
||||
</config>
|
||||
}
|
||||
|
||||
build_boot_image {
|
||||
core init timer uart_drv pci_drv nic_drv
|
||||
install_config $config
|
||||
|
||||
#
|
||||
# Boot modules
|
||||
#
|
||||
|
||||
# generic modules
|
||||
set boot_modules {
|
||||
core init timer uart_drv nic_drv
|
||||
ld.lib.so noux_net libc.lib.so libm.lib.so
|
||||
libc_noux.lib.so lwip.lib.so noux_netcat.tar
|
||||
}
|
||||
|
||||
# platform-specific modules
|
||||
lappend_if [have_spec pci] boot_modules pci_drv
|
||||
|
||||
build_boot_image $boot_modules
|
||||
|
||||
#
|
||||
# Redirect the output of Noux via the virtual serial port 1 into a file to be
|
||||
# dumped after the successful completion of the test.
|
||||
|
@ -1,5 +1,5 @@
|
||||
if {![have_spec x86]} {
|
||||
puts "\nNoux is supported on the x86 architecture only\n"
|
||||
if {![have_spec x86_32]} {
|
||||
puts "\nThe Noux tool chain scenario is supported on the x86_32 architecture only\n"
|
||||
exit 0
|
||||
}
|
||||
|
||||
@ -34,7 +34,7 @@ close $vimrc_fd
|
||||
# strip all binaries prior archiving
|
||||
set find_args ""
|
||||
foreach pkg $noux_pkgs { append find_args " bin/$pkg/" }
|
||||
exec sh -c "find $find_args -type f | (xargs strip || true) 2>/dev/null"
|
||||
exec sh -c "find $find_args -type f | (xargs [cross_dev_prefix]strip || true) 2>/dev/null"
|
||||
|
||||
foreach pkg $noux_pkgs {
|
||||
exec tar cfv bin/$pkg.tar -h -C bin/$pkg . }
|
||||
|
@ -1,8 +1,3 @@
|
||||
if {![have_spec x86]} {
|
||||
puts "\nNoux is supported on the x86 architecture only\n"
|
||||
exit 0
|
||||
}
|
||||
|
||||
#
|
||||
# Uncomment the following line when working on the VIM source code. Otherwise,
|
||||
# VIM may get recompiled, yet it does not get reinstalled into 'bin/vim'.
|
||||
|
@ -8,4 +8,7 @@ NOUX_CFLAGS += -Dsh_xfree=free
|
||||
#
|
||||
NOUX_CFLAGS += -DNO_MAIN_ENV_ARG=1
|
||||
|
||||
# Prevent interactions with nonexisting tty driver
|
||||
NOUX_CFLAGS += -DNO_TTY_DRIVER
|
||||
|
||||
include $(REP_DIR)/mk/noux.mk
|
||||
|
Loading…
Reference in New Issue
Block a user