diff --git a/base/mk/global.mk b/base/mk/global.mk index 8c90be6649..7b02bb439e 100644 --- a/base/mk/global.mk +++ b/base/mk/global.mk @@ -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 diff --git a/ports/mk/noux.mk b/ports/mk/noux.mk index 3b3312f169..1102b7d9b0 100644 --- a/ports/mk/noux.mk +++ b/ports/mk/noux.mk @@ -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)' diff --git a/ports/run/noux.run b/ports/run/noux.run index 5882d84ac7..f881a82e84 100644 --- a/ports/run/noux.run +++ b/ports/run/noux.run @@ -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]" diff --git a/ports/run/noux_bash.run b/ports/run/noux_bash.run index abfdcb4d7f..346e00733e 100644 --- a/ports/run/noux_bash.run +++ b/ports/run/noux_bash.run @@ -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 . diff --git a/ports/run/noux_fork.run b/ports/run/noux_fork.run index 05168a3b38..c3f74dc0d3 100644 --- a/ports/run/noux_fork.run +++ b/ports/run/noux_fork.run @@ -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 diff --git a/ports/run/noux_net_netcat.run b/ports/run/noux_net_netcat.run index e7c75de9c5..035c4d4f63 100644 --- a/ports/run/noux_net_netcat.run +++ b/ports/run/noux_net_netcat.run @@ -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 { @@ -51,7 +47,7 @@ install_config { - + @@ -64,11 +60,15 @@ install_config { - + } + +append_if [have_spec pci] config { - - + + } + +append config { @@ -82,12 +82,24 @@ install_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. diff --git a/ports/run/noux_tool_chain.run b/ports/run/noux_tool_chain.run index 099f0efdaa..41c127124b 100644 --- a/ports/run/noux_tool_chain.run +++ b/ports/run/noux_tool_chain.run @@ -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 . } diff --git a/ports/run/noux_vim.run b/ports/run/noux_vim.run index 59fcfa5701..836faef329 100644 --- a/ports/run/noux_vim.run +++ b/ports/run/noux_vim.run @@ -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'. diff --git a/ports/src/noux-pkg/bash/target.mk b/ports/src/noux-pkg/bash/target.mk index 5d71c69769..e84e1b7e99 100644 --- a/ports/src/noux-pkg/bash/target.mk +++ b/ports/src/noux-pkg/bash/target.mk @@ -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