fiasco: use bender, read out comport from BDA

Fix #768
This commit is contained in:
Alexander Boettcher 2013-06-10 14:37:23 +02:00 committed by Norman Feske
parent bdd2935d4a
commit 27b6839ee0
3 changed files with 30 additions and 1 deletions

View File

@ -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)

View File

@ -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);

View File

@ -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"