diff --git a/base-fiasco/Makefile b/base-fiasco/Makefile index 633ec31561..bd8a2225b4 100644 --- a/base-fiasco/Makefile +++ b/base-fiasco/Makefile @@ -10,6 +10,16 @@ DOWNLOAD_DIR = download CONTRIB_DIR = contrib FIASCO_ARCHIVE = 3rd_fiasco.tar.bz2 FIASCO_URI = http://downloads.sourceforge.net/project/genode/3rd/$(FIASCO_ARCHIVE) +PATCHES = $(shell find patches -name *.patch) + +# +# Utility to check if a tool is installed +# +check_tool = $(if $(shell which $(1)),,$(error Need to have '$(1)' installed.)) + +$(call check_tool,wget) +$(call check_tool,patch) +$(call check_tool,tar) # # Print help information by default @@ -33,6 +43,8 @@ $(CONTRIB_DIR): $(DOWNLOAD_DIR)/$(FIASCO_ARCHIVE) $(ECHO) "unpacking source code to '$(CONTRIB_DIR)/'" $(VERBOSE)tar xjf $< $(VERBOSE)mv 3rd $@ + $(ECHO) "applying patches to '$@/'" + $(VERBOSE)for i in $(PATCHES); do patch -d $@ -p0 < $$i; done $(VERBOSE)touch $@ prepare: $(CONTRIB_DIR) diff --git a/base-fiasco/patches/bda.patch b/base-fiasco/patches/bda.patch new file mode 100644 index 0000000000..0dfc79ea4f --- /dev/null +++ b/base-fiasco/patches/bda.patch @@ -0,0 +1,15 @@ +--- fiasco/snapshot/kernel/fiasco/src/kern/kernel_uart.cpp 2008-07-30 13:19:01.000000000 +0200 ++++ fiasco/snapshot/kernel/fiasco/src/kern/kernel_uart.cpp 2013-06-10 14:21:54.183996620 +0200 +@@ -72,6 +72,12 @@ + if ( (s = strstr(cmdline, " -comport ")) + ||(s = strstr(cmdline, " -comport="))) + p = strtoul(s + 10, 0, 0); ++ else ++ { ++ unsigned short bda_comports = (*((unsigned short *)0x410) >> 9) & 0x7; ++ if (bda_comports) ++ p = *((unsigned short *)0x400); ++ } + + if ((s = strstr(cmdline, " -comirq="))) + i = strtoul(s + 9, 0, 0); diff --git a/base-fiasco/run/env b/base-fiasco/run/env index bd30b38332..de957a25c5 100644 --- a/base-fiasco/run/env +++ b/base-fiasco/run/env @@ -13,6 +13,7 @@ # proc install_pxe_bootloader_to_run_dir { } { exec cp [genode_dir]/tool/boot/pulsar [run_dir]/boot/pulsar + exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender } @@ -141,7 +142,8 @@ proc build_boot_image {binaries} { # Generate pulsar config file # set fh [open "[run_dir]/config-52-54-00-12-34-56" "WRONLY CREAT TRUNC"] - puts $fh " exec /fiasco/bootstrap -serial -modaddr=0x02000000" + puts $fh " exec /boot/bender" + puts $fh " load /fiasco/bootstrap -serial -modaddr=0x02000000" puts $fh " load /fiasco/fiasco -serial -serial_esc -jdb_cmd=JH" puts $fh " load /fiasco/sigma0" puts $fh " load /genode/core"