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:
Christian Prochaska 2012-06-08 14:59:40 +02:00 committed by Norman Feske
parent 7e95c25b7b
commit 54051a7bb2
9 changed files with 35 additions and 41 deletions

View File

@ -19,6 +19,7 @@ CUSTOM_AS ?= $(CROSS_DEV_PREFIX)as
CUSTOM_AR ?= $(CROSS_DEV_PREFIX)ar CUSTOM_AR ?= $(CROSS_DEV_PREFIX)ar
CUSTOM_NM ?= $(CROSS_DEV_PREFIX)nm CUSTOM_NM ?= $(CROSS_DEV_PREFIX)nm
CUSTOM_OBJCOPY ?= $(CROSS_DEV_PREFIX)objcopy CUSTOM_OBJCOPY ?= $(CROSS_DEV_PREFIX)objcopy
CUSTOM_STRIP ?= $(CROSS_DEV_PREFIX)strip
# #
# GNU utilities # GNU utilities
@ -41,6 +42,7 @@ AS = $(CUSTOM_AS)
AR = $(CUSTOM_AR) AR = $(CUSTOM_AR)
NM = $(CUSTOM_NM) NM = $(CUSTOM_NM)
OBJCOPY = $(CUSTOM_OBJCOPY) OBJCOPY = $(CUSTOM_OBJCOPY)
STRIP = $(CUSTOM_STRIP)
# #
# Compiler and Linker options # Compiler and Linker options

View File

@ -37,11 +37,6 @@ NOUX_PKG_DIR = $(wildcard $(REP_DIR)/contrib/$(NOUX_PKG)-*)
PWD = $(shell pwd) PWD = $(shell pwd)
#
# Disable Noux on non-x86 architectures for now
#
REQUIRES += x86
# #
# Detect missing preparation of noux package # 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_SO = $(filter %.so,$(sort $(LINK_ITEMS)) $(EXT_OBJECTS) $(LIBGCC))
NOUX_LIBS += $(NOUX_LIBS_A) $(NOUX_LIBS_SO) $(NOUX_LIBS_A) 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)' \ LDFLAGS='$(NOUX_LDFLAGS)' CFLAGS='$(NOUX_CFLAGS)' \
CPPFLAGS='$(NOUX_CPPFLAGS)' CPPFLAGS='$(NOUX_CPPFLAGS)'

View File

@ -1,7 +1,3 @@
if {![have_spec x86]} {
puts "\nNoux is supported on the x86 architecture only\n"
exit 0
}
if {[have_spec linux]} { if {[have_spec linux]} {
puts "\nLinux not supported because of missing UART driver\n" puts "\nLinux not supported because of missing UART driver\n"
exit 0 exit 0
@ -74,7 +70,7 @@ if {[have_spec x86_64]} {
append qemu_args " -m 300 " 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]" puts "[exec cat $noux_output_file]"

View 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, # 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/'. # the package may get recompiled, yet it does not get reinstalled into 'bin/'.
@ -36,7 +31,7 @@ set viminfo=}
close $vimrc_fd close $vimrc_fd
# strip all binaries prior archiving # 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/bash.tar -h -C bin/bash .
exec tar cfv bin/coreutils.tar -h -C bin/coreutils . exec tar cfv bin/coreutils.tar -h -C bin/coreutils .

View File

@ -1,7 +1,3 @@
if {![have_spec x86]} {
puts "\nNoux is supported on the x86 architecture only\n"
exit 0
}
if {[have_spec linux]} { if {[have_spec linux]} {
puts "\nLinux not supported because of missing UART driver\n" puts "\nLinux not supported because of missing UART driver\n"
exit 0 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" 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 exec tar cfv bin/noux_fork.tar -h -C bin test-noux_fork
create_boot_directory create_boot_directory

View File

@ -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]} { if {[have_spec linux]} {
puts "\nLinux not supported because of missing UART driver\n" puts "\nLinux not supported because of missing UART driver\n"
exit 0 exit 0
@ -32,7 +28,7 @@ exec tar rfv bin/noux_netcat.tar -h -C bin/ etc
create_boot_directory create_boot_directory
install_config { append config {
<config verbose="yes"> <config verbose="yes">
<parent-provides> <parent-provides>
<service name="ROM"/> <service name="ROM"/>
@ -51,7 +47,7 @@ install_config {
<any-service> <any-child/> <parent/> </any-service> <any-service> <any-child/> <parent/> </any-service>
</default-route> </default-route>
<start name="timer"> <start name="timer">
<resource name="RAM" quantum="512K"/> <resource name="RAM" quantum="1M"/>
<provides><service name="Timer"/></provides> <provides><service name="Timer"/></provides>
</start> </start>
<start name="uart_drv"> <start name="uart_drv">
@ -64,11 +60,15 @@ install_config {
<start name="nic_drv"> <start name="nic_drv">
<resource name="RAM" quantum="4M"/> <resource name="RAM" quantum="4M"/>
<provides> <service name="Nic"/> </provides> <provides> <service name="Nic"/> </provides>
</start> </start>}
append_if [have_spec pci] config {
<start name="pci_drv"> <start name="pci_drv">
<resource name="RAM" quantum="2M"/> <resource name="RAM" quantum="2M"/>
<provides> <service name="PCI"/> </provides> <provides><service name="PCI"/> </provides>
</start> </start>}
append config {
<start name="noux_net"> <start name="noux_net">
<resource name="RAM" quantum="1G"/> <resource name="RAM" quantum="1G"/>
<config> <config>
@ -82,12 +82,24 @@ install_config {
</config> </config>
} }
build_boot_image { install_config $config
core init timer uart_drv pci_drv nic_drv
#
# 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 ld.lib.so noux_net libc.lib.so libm.lib.so
libc_noux.lib.so lwip.lib.so noux_netcat.tar 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 # Redirect the output of Noux via the virtual serial port 1 into a file to be
# dumped after the successful completion of the test. # dumped after the successful completion of the test.

View File

@ -1,5 +1,5 @@
if {![have_spec x86]} { if {![have_spec x86_32]} {
puts "\nNoux is supported on the x86 architecture only\n" puts "\nThe Noux tool chain scenario is supported on the x86_32 architecture only\n"
exit 0 exit 0
} }
@ -34,7 +34,7 @@ close $vimrc_fd
# strip all binaries prior archiving # strip all binaries prior archiving
set find_args "" set find_args ""
foreach pkg $noux_pkgs { append find_args " bin/$pkg/" } 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 { foreach pkg $noux_pkgs {
exec tar cfv bin/$pkg.tar -h -C bin/$pkg . } exec tar cfv bin/$pkg.tar -h -C bin/$pkg . }

View 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, # 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'. # VIM may get recompiled, yet it does not get reinstalled into 'bin/vim'.

View File

@ -8,4 +8,7 @@ NOUX_CFLAGS += -Dsh_xfree=free
# #
NOUX_CFLAGS += -DNO_MAIN_ENV_ARG=1 NOUX_CFLAGS += -DNO_MAIN_ENV_ARG=1
# Prevent interactions with nonexisting tty driver
NOUX_CFLAGS += -DNO_TTY_DRIVER
include $(REP_DIR)/mk/noux.mk include $(REP_DIR)/mk/noux.mk