OpenBIOS
Threads by month
- ----- 2025 -----
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2000 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1999 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1998 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1997 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1996 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1995 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1994 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1993 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1992 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1991 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1990 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1989 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1988 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1987 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1986 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1985 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1984 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1983 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1982 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1981 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1980 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1979 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1978 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1977 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1976 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1975 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1974 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1973 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1972 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1971 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1970 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1969 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1968 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1967 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1966 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1965 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1964 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1963 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1962 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1961 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1960 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1959 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1958 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1957 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1956 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1955 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1954 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1953 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1952 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1951 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1950 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1949 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1948 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1947 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1946 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1945 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1944 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1943 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1942 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1941 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1940 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1939 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1938 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1937 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1936 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1935 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1934 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1933 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1932 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1931 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1930 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1929 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1928 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1927 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1926 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1925 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1924 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1923 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1922 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1921 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1920 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1919 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1918 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1917 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1916 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1915 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1914 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1913 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1912 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1911 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1910 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1909 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1908 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1907 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1906 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1905 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1904 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
August 2009
- 14 participants
- 81 discussions

r556 - in trunk/openbios-devel: . arch/ppc arch/sparc32 arch/sparc64 arch/unix arch/x86 config/xml kernel
by svn@openbios.org Aug. 17, 2009
by svn@openbios.org Aug. 17, 2009
Aug. 17, 2009
Author: blueswirl
Date: 2009-08-17 18:58:42 +0200 (Mon, 17 Aug 2009)
New Revision: 556
Modified:
trunk/openbios-devel/Makefile.target
trunk/openbios-devel/arch/ppc/build.xml
trunk/openbios-devel/arch/sparc32/build.xml
trunk/openbios-devel/arch/sparc64/build.xml
trunk/openbios-devel/arch/unix/build.xml
trunk/openbios-devel/arch/x86/build.xml
trunk/openbios-devel/arch/x86/entry.S
trunk/openbios-devel/config/xml/dictionary.xsl
trunk/openbios-devel/config/xml/object.xsl
trunk/openbios-devel/config/xml/rules.xml
trunk/openbios-devel/kernel/bootstrap.c
Log:
Introduce quiet build
Make forthstrap quiet by default. Use generic rules when possible, unify
the rules and cleanup white space. Use ld flag --whole-archive to avoid
some local rule use. We can also remove some hacks introduced to avoid
missing symbols.
Fix problems brought in by ld flag --whole-archive:
* x86: fix missing nvram symbols
* PPC: disable misc.S build for qemu (conflicts with our libgcc)
Signed-off-by: Blue Swirl <blauwirbel(a)gmail.com>
Modified: trunk/openbios-devel/Makefile.target
===================================================================
--- trunk/openbios-devel/Makefile.target 2009-08-17 16:58:39 UTC (rev 555)
+++ trunk/openbios-devel/Makefile.target 2009-08-17 16:58:42 UTC (rev 556)
@@ -65,4 +65,6 @@
build: all
+quiet-command = $(if $(V),$1,$(if $(2),@echo $2 && $1, @$1))
+
include rules.mak
Modified: trunk/openbios-devel/arch/ppc/build.xml
===================================================================
--- trunk/openbios-devel/arch/ppc/build.xml 2009-08-17 16:58:39 UTC (rev 555)
+++ trunk/openbios-devel/arch/ppc/build.xml 2009-08-17 16:58:42 UTC (rev 556)
@@ -6,13 +6,13 @@
<object source="briq/tree.fs"/>
<object source="briq/briq.fs"/>
</dictionary>
-
+
<dictionary name="openbios-pearpc" init="openbios" target="forth" condition="PEARPC">
<object source="ppc.fs"/>
<object source="pearpc/tree.fs"/>
<object source="pearpc/pearpc.fs"/>
</dictionary>
-
+
<dictionary name="openbios-qemu" init="openbios" target="forth" condition="QEMU">
<object source="ppc.fs"/>
<object source="qemu/tree.fs"/>
@@ -24,86 +24,75 @@
<object source="mol/tree.fs"/>
<object source="mol/mol.fs"/>
</dictionary>
-
+
<!-- HACK ALERT -->
-
+
<executable name="target/include/briq-dict.h" target="target" condition="BRIQ">
<rule><![CDATA[
+ $(call quiet-command,true, " GEN $(TARGET_DIR)$@")
@echo "static const char forth_dictionary[] = {" > $@
@cat $< | hexdump -ve '1/0 "\t" 8/1 "0x%02x, " 1/0 "\n"' \
| sed 's/0x ,//g' >> $@
- @echo "};" >> $@
- ]]></rule>
+ @echo "};" >> $@]]></rule>
<external-object source="openbios-briq.dict"/>
</executable>
-
+
<executable name="target/arch/ppc/briq/kernel.o" target="target" condition="BRIQ">
- <rule><![CDATA[
- $(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/arch/ppc/briq/kernel.c
- ]]></rule>
- <external-object source="target/include/briq-dict.h"/>
+ <rule><![CDATA[ $(SRCDIR)/arch/ppc/briq/kernel.c $(ODIR)/target/include/static-dict.h
+ $(call quiet-command,$(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/arch/ppc/briq/kernel.c, " CC $(TARGET_DIR)$@")]]></rule>
</executable>
-
-
+
+
<executable name="target/include/pearpc-dict.h" target="target" condition="PEARPC">
<rule><![CDATA[
+ $(call quiet-command,true, " GEN $(TARGET_DIR)$@")
@echo "static const char forth_dictionary[] = {" > $@
@cat $< | hexdump -ve '1/0 "\t" 8/1 "0x%02x, " 1/0 "\n"' \
| sed 's/0x ,//g' >> $@
- @echo "};" >> $@
- ]]></rule>
+ @echo "};" >> $@]]></rule>
<external-object source="openbios-pearpc.dict"/>
</executable>
-
+
<executable name="target/arch/ppc/pearpc/kernel.o" target="target" condition="PEARPC">
- <rule><![CDATA[
- $(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/arch/ppc/pearpc/kernel.c
- ]]></rule>
- <external-object source="target/include/pearpc-dict.h"/>
+ <rule><![CDATA[ $(SRCDIR)/arch/ppc/pearpc/kernel.c $(ODIR)/target/include/pearpc-dict.h
+ $(call quiet-command,$(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/arch/ppc/pearpc/kernel.c, " CC $(TARGET_DIR)$@")]]></rule>
</executable>
<executable name="target/include/qemu-dict.h" target="target" condition="QEMU">
<rule><![CDATA[
+ $(call quiet-command,true, " GEN $(TARGET_DIR)$@")
@echo "static const char forth_dictionary[] = {" > $@
@cat $< | hexdump -ve '1/0 "\t" 8/1 "0x%02x, " 1/0 "\n"' \
| sed 's/0x ,//g' >> $@
- @echo "};" >> $@
- ]]></rule>
+ @echo "};" >> $@]]></rule>
<external-object source="openbios-qemu.dict"/>
</executable>
<executable name="target/arch/ppc/qemu/kernel.o" target="target" condition="QEMU">
- <rule><![CDATA[
- $(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/arch/ppc/qemu/kernel.c
- ]]></rule>
- <external-object source="target/include/qemu-dict.h"/>
+ <rule><![CDATA[ $(SRCDIR)/arch/ppc/qemu/kernel.c $(ODIR)/target/include/qemu-dict.h
+ $(call quiet-command,$(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/arch/ppc/qemu/kernel.c, " CC $(TARGET_DIR)$@")]]></rule>
</executable>
-
+
<executable name="target/include/mol-dict.h" target="target" condition="MOL">
<rule><![CDATA[
+ $(call quiet-command,true, " GEN $(TARGET_DIR)$@")
@echo "static const char forth_dictionary[] = {" > $@
@cat $< | hexdump -ve '1/0 "\t" 8/1 "0x%02x, " 1/0 "\n"' \
| sed 's/0x ,//g' >> $@
- @echo "};" >> $@
- ]]></rule>
+ @echo "};" >> $@]]></rule>
<external-object source="openbios-mol.dict"/>
</executable>
-
+
<executable name="target/arch/ppc/mol/kernel.o" target="target" condition="MOL">
<rule><![CDATA[
- $(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/arch/ppc/mol/kernel.c
- ]]></rule>
- <external-object source="target/include/mol-dict.h"/>
+ $(call quiet-command,$(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/arch/ppc/mol/kernel.c, " CC $(TARGET_DIR)$@")]]></rule>
</executable>
-
+
<!-- END OF HACK ALERT -->
-
+
<library name="briq" target="target" type="static" condition="BRIQ">
- <object source="misc.S">
- <rule><![CDATA[
- $(CC) $$EXTRACFLAGS $(AS_FLAGS) $(CFLAGS) $(INCLUDES) -c -o $@ $^]]></rule>
- </object>
+ <object source="misc.S"/>
<object source="ofmem.c"/>
<object source="briq/briq.c" flags="-I$(SRCDIR)/arch/ppc"/>
<object source="briq/init.c" flags="-I$(SRCDIR)/arch/ppc"/>
@@ -113,12 +102,9 @@
<object source="briq/tree.c" flags="-I$(SRCDIR)/arch/ppc"/>
<object source="briq/vfd.c" flags="-I$(SRCDIR)/arch/ppc"/>
</library>
-
+
<library name="pearpc" target="target" type="static" condition="PEARPC">
- <object source="misc.S">
- <rule><![CDATA[
- $(CC) $$EXTRACFLAGS $(AS_FLAGS) $(CFLAGS) $(INCLUDES) -c -o $@ $^]]></rule>
- </object>
+ <object source="misc.S"/>
<object source="ofmem.c"/>
<object source="pearpc/pearpc.c" flags="-I$(SRCDIR)/arch/ppc"/>
<object source="pearpc/init.c" flags="-I$(SRCDIR)/arch/ppc"/>
@@ -130,12 +116,8 @@
<!-- taken from mol: generalize -->
<object source="pearpc/console.c" flags="-I$(SRCDIR)/arch/ppc"/>
</library>
-
+
<library name="qemu" target="target" type="static" condition="QEMU">
- <object source="misc.S">
- <rule><![CDATA[
- $(CC) $$EXTRACFLAGS $(AS_FLAGS) $(CFLAGS) $(INCLUDES) -c -o $@ $^]]></rule>
- </object>
<object source="qemu/ofmem.c"/>
<object source="qemu/qemu.c" flags="-I$(SRCDIR)/arch/ppc"/>
<object source="qemu/init.c" flags="-I$(SRCDIR)/arch/ppc"/>
@@ -146,12 +128,8 @@
<object source="qemu/console.c" flags="-I$(SRCDIR)/arch/ppc"/>
</library>
-
<library name="mol" target="target" type="static" condition="MOL">
- <object source="misc.S">
- <rule><![CDATA[
- $(CC) $$EXTRACFLAGS $(AS_FLAGS) $(CFLAGS) $(INCLUDES) -c -o $@ $^]]></rule>
- </object>
+ <object source="misc.S"/>
<object source="ofmem.c"/>
<object source="mol/init.c" flags="-I$(SRCDIR)/arch/ppc"/>
<object source="mol/main.c" flags="-I$(SRCDIR)/arch/ppc"/>
@@ -165,22 +143,14 @@
<object source="mol/tree.c" flags="-I$(SRCDIR)/arch/ppc"/>
<external-object source="target/arch/ppc/mol/kernel.o"/>
</library>
-
+
<executable name="openbios-briq.elf" target="target" condition="BRIQ">
<rule>
- $(LD) -g -Ttext=0x01e01000 -Bstatic $^ $(shell $(CC) -print-libgcc-file-name) -o $@
- $(NM) $@ | sort > $(ODIR)/openbios-briq.syms
- cp $@ $@.nostrip
- $(STRIP) $@
- </rule>
- <object source="start.S">
- <rule><![CDATA[
- $(CC) $$EXTRACFLAGS $(AS_FLAGS) $(CFLAGS) $(INCLUDES) -c -o $@ $^]]></rule>
- </object>
- <object source="timebase.S">
- <rule><![CDATA[
- $(CC) $$EXTRACFLAGS $(AS_FLAGS) $(CFLAGS) $(INCLUDES) -c -o $@ $^]]></rule>
- </object>
+ $(call quiet-command,$(LD) -g -Ttext=0x01e01000 -Bstatic $^ $(shell $(CC) -print-libgcc-file-name) -o $@.nostrip --whole-archive $^," LINK $(TARGET_DIR)$@")
+ $(call quiet-command,$(NM) $@.nostrip | sort > $(ODIR)/openbios-briq.syms," GEN $(TARGET_DIR)$@.syms")
+ $(call quiet-command,$(STRIP) $@.nostrip -o $@," STRIP $(TARGET_DIR)$@")</rule>
+ <object source="start.S"/>
+ <object source="timebase.S"/>
<external-object source="libbriq.a"/>
<external-object source="libbootstrap.a"/>
<external-object source="libmodules.a"/>
@@ -188,23 +158,14 @@
<external-object source="liblibc.a"/>
<external-object source="libfs.a"/>
</executable>
-
-
+
<executable name="openbios-pearpc.elf" target="target" condition="PEARPC">
<rule>
- $(LD) -g -Ttext=0x01e01000 -Bstatic $^ $(shell $(CC) -print-libgcc-file-name) -o $@
- $(NM) $@ | sort > $(ODIR)/openbios-pearpc.syms
- cp $@ $@.nostrip
- $(STRIP) $@
- </rule>
- <object source="start.S">
- <rule><![CDATA[
- $(CC) $$EXTRACFLAGS $(AS_FLAGS) $(CFLAGS) $(INCLUDES) -c -o $@ $^]]></rule>
- </object>
- <object source="timebase.S">
- <rule><![CDATA[
- $(CC) $$EXTRACFLAGS $(AS_FLAGS) $(CFLAGS) $(INCLUDES) -c -o $@ $^]]></rule>
- </object>
+ $(call quiet-command,$(LD) -g -Ttext=0x01e01000 -Bstatic $^ $(shell $(CC) -print-libgcc-file-name) -o $@.nostrip --whole-archive $^," LINK $(TARGET_DIR)$@")
+ $(call quiet-command,$(NM) $@.nostrip | sort > $(ODIR)/openbios-pearpc.syms," GEN $(TARGET_DIR)$@.syms")
+ $(call quiet-command,$(STRIP) $@.nostrip -o $@," STRIP $(TARGET_DIR)$@")</rule>
+ <object source="start.S"/>
+ <object source="timebase.S"/>
<external-object source="libpearpc.a"/>
<external-object source="libbootstrap.a"/>
<external-object source="libmodules.a"/>
@@ -215,44 +176,26 @@
<executable name="openbios-qemu.elf" target="target" condition="QEMU">
<rule>
- $(LD) --warn-common -N -T $(SRCDIR)/arch/ppc/qemu/ldscript $^ -o $@
- $(NM) $@ | sort > $(ODIR)/openbios-qemu.syms
- cp $@ $@.nostrip
- $(STRIP) $@
- </rule>
- <object source="qemu/start.S">
- <rule><![CDATA[
- $(CC) $$EXTRACFLAGS $(AS_FLAGS) $(CFLAGS) $(INCLUDES) -c -o $@ $^]]></rule>
- </object>
- <object source="timebase.S">
- <rule><![CDATA[
- $(CC) $$EXTRACFLAGS $(AS_FLAGS) $(CFLAGS) $(INCLUDES) -c -o $@ $^]]></rule>
- </object>
+ $(call quiet-command,$(LD) --warn-common -N -T $(SRCDIR)/arch/ppc/qemu/ldscript -o $@.nostrip --whole-archive $^," LINK $(TARGET_DIR)$@")
+ $(call quiet-command,$(NM) $@.nostrip | sort > $(ODIR)/openbios-qemu.syms," GEN $(TARGET_DIR)$@.syms")
+ $(call quiet-command,$(STRIP) $@.nostrip -o $@," STRIP $(TARGET_DIR)$@")</rule>
+ <object source="qemu/start.S"/>
+ <object source="timebase.S"/>
<external-object source="libqemu.a"/>
<external-object source="libbootstrap.a"/>
- <external-object source="libdrivers.a"/>
- <!-- Needs to be after drivers to avoid missing symbols -->
<external-object source="libmodules.a"/>
+ <external-object source="libdrivers.a"/>
<external-object source="liblibc.a"/>
<external-object source="libfs.a"/>
<external-object source="libgcc.a"/>
</executable>
-
-
-
<executable name="openbios-mol.elf" target="target" condition="MOL">
<rule>
- $(LD) -g -Ttext=0x01e01000 -Bstatic $^ $(shell $(CC) -print-libgcc-file-name) -o $@
- $(NM) $@ | sort > $(ODIR)/openbios-mol.syms
- cp $@ $@.nostrip
- $(STRIP) $@
-
- </rule>
- <object source="start.S">
- <rule><![CDATA[
- $(CC) $$EXTRACFLAGS $(AS_FLAGS) $(CFLAGS) $(INCLUDES) -c -o $@ $^]]></rule>
- </object>
+ $(call quiet-command,$(LD) -g -Ttext=0x01e01000 -Bstatic $^ $(shell $(CC) -print-libgcc-file-name) -o $@.nostrip --whole-archive $^," LINK $(TARGET_DIR)$@")
+ $(call quiet-command,$(NM) $@.nostrip | sort > $(ODIR)/openbios-mol.syms," GEN $(TARGET_DIR)$@.syms")
+ $(call quiet-command,$(STRIP) $@.nostrip -o $@," STRIP $(TARGET_DIR)$@")</rule>
+ <object source="start.S"/>
<external-object source="libmol.a"/>
<external-object source="libbootstrap.a"/>
<external-object source="libmodules.a"/>
@@ -260,5 +203,5 @@
<external-object source="liblibc.a"/>
<external-object source="libfs.a"/>
</executable>
-
+
</build>
Modified: trunk/openbios-devel/arch/sparc32/build.xml
===================================================================
--- trunk/openbios-devel/arch/sparc32/build.xml 2009-08-17 16:58:39 UTC (rev 555)
+++ trunk/openbios-devel/arch/sparc32/build.xml 2009-08-17 16:58:42 UTC (rev 556)
@@ -20,26 +20,16 @@
<object source="forthload.c"/>
<object source="loadfs.c"/>
<object source="romvec.c"/>
+ <object source="entry.S"/>
+ <object source="vectors.S"/>
</library>
- <executable name="target/arch/sparc32/entry.o" target="target">
- <rule><![CDATA[ $(SRCDIR)/arch/sparc32/entry.S
- $(CC) $$EXTRACFLAGS $(AS_FLAGS) $(CFLAGS) $(INCLUDES) -c -o $@ $^]]></rule>
- </executable>
- <executable name="target/arch/sparc32/vectors.o" target="target">
- <rule><![CDATA[ $(SRCDIR)/arch/sparc32/vectors.S $(SRCDIR)/arch/sparc32/wof.S $(SRCDIR)/arch/sparc32/wuf.S
- $(CC) $$EXTRACFLAGS $(AS_FLAGS) $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/arch/sparc32/vectors.S]]></rule>
- </executable>
-
<executable name="openbios-plain.elf" target="target" condition="IMAGE_ELF">
<rule>
- $(LD) --warn-common -N -T $(SRCDIR)/arch/sparc32/ldscript -o $@.nostrip $^
- $(NM) $@.nostrip | sort > $(ODIR)/openbios-plain.syms
- cp $@.nostrip $@
- $(STRIP) $@</rule>
+ $(call quiet-command,$(LD) --warn-common -N -T $(SRCDIR)/arch/sparc32/ldscript -o $@.nostrip --whole-archive $^," LINK $(TARGET_DIR)$@")
+ $(call quiet-command,$(NM) $@.nostrip | sort > $(ODIR)/openbios-plain.syms," GEN $(TARGET_DIR)$@.syms")
+ $(call quiet-command,$(STRIP) $@.nostrip -o $@," STRIP $(TARGET_DIR)$@")</rule>
<object source="plainboot.c"/>
- <external-object source="target/arch/sparc32/vectors.o"/>
- <external-object source="target/arch/sparc32/entry.o"/>
<external-object source="libsparc32.a"/>
<external-object source="libbootstrap.a"/>
<external-object source="libmodules.a"/>
@@ -53,6 +43,7 @@
<executable name="target/include/static-dict.h" target="target" condition="IMAGE_ELF_EMBEDDED">
<rule><![CDATA[
+ $(call quiet-command,true, " GEN $(TARGET_DIR)$@")
@echo "static const char forth_dictionary[] = {" > $@
@cat $< | hexdump -ve '1/0 "\t" 8/1 "0x%02x, " 1/0 "\n"' \
| sed 's/0x ,//g' >> $@
@@ -62,19 +53,16 @@
<executable name="target/arch/sparc32/builtin.o" target="target" condition="IMAGE_ELF_EMBEDDED">
<rule><![CDATA[ $(SRCDIR)/arch/sparc32/builtin.c $(ODIR)/target/include/static-dict.h
- $(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/arch/sparc32/builtin.c]]></rule>
+ $(call quiet-command,$(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/arch/sparc32/builtin.c, " CC $(TARGET_DIR)$@")]]></rule>
</executable>
<!-- END OF HACK ALERT -->
<executable name="openbios-builtin.elf" target="target" condition="IMAGE_ELF_EMBEDDED">
<rule>
- $(LD) --warn-common -N -T $(SRCDIR)/arch/sparc32/ldscript -o $@.nostrip $^
- $(NM) $@.nostrip | sort > $(ODIR)/openbios-builtin.syms
- cp $@.nostrip $@
- $(STRIP) $@</rule>
- <external-object source="target/arch/sparc32/vectors.o"/>
- <external-object source="target/arch/sparc32/entry.o"/>
+ $(call quiet-command,$(LD) --warn-common -N -T $(SRCDIR)/arch/sparc32/ldscript -o $@.nostrip --whole-archive $^," LINK $(TARGET_DIR)$@")
+ $(call quiet-command,$(NM) $@.nostrip | sort > $(ODIR)/openbios-builtin.syms," GEN $(TARGET_DIR)$@.syms")
+ $(call quiet-command,$(STRIP) $@.nostrip -o $@," STRIP $(TARGET_DIR)$@")</rule>
<external-object source="target/arch/sparc32/builtin.o"/>
<external-object source="libsparc32.a"/>
<external-object source="libbootstrap.a"/>
Modified: trunk/openbios-devel/arch/sparc64/build.xml
===================================================================
--- trunk/openbios-devel/arch/sparc64/build.xml 2009-08-17 16:58:39 UTC (rev 555)
+++ trunk/openbios-devel/arch/sparc64/build.xml 2009-08-17 16:58:42 UTC (rev 556)
@@ -20,36 +20,21 @@
<object source="fcodeload.c"/>
<object source="loadfs.c"/>
<object source="ofmem_sparc64.c"/>
+ <object source="entry.S"/>
+ <object source="vectors.S"/>
+ <object source="call-client.S"/>
</library>
- <executable name="target/arch/sparc64/entry.o" target="target">
- <rule><![CDATA[ $(SRCDIR)/arch/sparc64/entry.S
- $(CC) $$EXTRACFLAGS $(AS_FLAGS) $(CFLAGS) $(INCLUDES) -c -o $@ $^]]></rule>
- </executable>
- <executable name="target/arch/sparc64/vectors.o" target="target">
- <rule><![CDATA[ $(SRCDIR)/arch/sparc64/vectors.S
- $(CC) $$EXTRACFLAGS $(AS_FLAGS) $(CFLAGS) $(INCLUDES) -c -o $@ $^]]></rule>
- </executable>
- <executable name="target/arch/sparc64/call-client.o" target="target">
- <rule><![CDATA[ $(SRCDIR)/arch/sparc64/call-client.S
- $(CC) $$EXTRACFLAGS $(AS_FLAGS) $(CFLAGS) $(INCLUDES) -c -o $@ $^]]></rule>
- </executable>
-
<executable name="openbios-plain.elf" target="target" condition="IMAGE_ELF">
<rule>
- $(LD) --warn-common -T $(SRCDIR)/arch/sparc64/ldscript -o $@.nostrip $^
- $(NM) $@.nostrip | sort > $(ODIR)/openbios-plain.syms
- cp $@.nostrip $@
- $(STRIP) $@</rule>
+ $(call quiet-command,$(LD) --warn-common -T $(SRCDIR)/arch/sparc64/ldscript -o $@.nostrip --whole-archive $^," LINK $(TARGET_DIR)$@")
+ $(call quiet-command,$(NM) $@.nostrip | sort > $(ODIR)/openbios-plain.syms," GEN $(TARGET_DIR)$@.syms")
+ $(call quiet-command,$(STRIP) $@.nostrip -o $@," STRIP $(TARGET_DIR)$@")</rule>
<object source="plainboot.c"/>
- <external-object source="target/arch/sparc64/vectors.o"/>
- <external-object source="target/arch/sparc64/entry.o"/>
- <external-object source="target/arch/sparc64/call-client.o"/>
<external-object source="libsparc64.a"/>
<external-object source="libbootstrap.a"/>
- <external-object source="libdrivers.a"/>
- <!-- Needs to be after drivers to avoid missing symbols -->
<external-object source="libmodules.a"/>
+ <external-object source="libdrivers.a"/>
<external-object source="liblibc.a"/>
<external-object source="libfs.a"/>
<external-object source="libgcc.a"/>
@@ -59,6 +44,7 @@
<executable name="target/include/static-dict.h" target="target" condition="IMAGE_ELF_EMBEDDED">
<rule><![CDATA[
+ $(call quiet-command,true, " GEN $(TARGET_DIR)$@")
@echo "static const char forth_dictionary[] = {" > $@
@cat $< | hexdump -ve '1/0 "\t" 8/1 "0x%02x, " 1/0 "\n"' \
| sed 's/0x ,//g' >> $@
@@ -68,7 +54,7 @@
<executable name="target/arch/sparc64/builtin.o" target="target" condition="IMAGE_ELF_EMBEDDED">
<rule><![CDATA[ $(SRCDIR)/arch/sparc64/builtin.c $(ODIR)/target/include/static-dict.h
- $(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/arch/sparc64/builtin.c]]></rule>
+ $(call quiet-command,$(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/arch/sparc64/builtin.c, " CC $(TARGET_DIR)$@")]]></rule>
</executable>
<!-- END OF HACK ALERT -->
@@ -76,19 +62,14 @@
<executable name="openbios-builtin.elf" target="target" condition="IMAGE_ELF_EMBEDDED">
<!-- We use -N to reduce the file size by 1M -->
<rule>
- $(LD) --warn-common -N -T $(SRCDIR)/arch/sparc64/ldscript -o $@.nostrip $^
- $(NM) $@.nostrip | sort > $(ODIR)/openbios-builtin.syms
- cp $@.nostrip $@
- $(STRIP) $@</rule>
- <external-object source="target/arch/sparc64/vectors.o"/>
- <external-object source="target/arch/sparc64/entry.o"/>
+ $(call quiet-command,$(LD) --warn-common -N -T $(SRCDIR)/arch/sparc64/ldscript -o $@.nostrip --whole-archive $^," LINK $(TARGET_DIR)$@")
+ $(call quiet-command,$(NM) $@.nostrip | sort > $(ODIR)/openbios-builtin.syms," GEN $(TARGET_DIR)$@.syms")
+ $(call quiet-command,$(STRIP) $@.nostrip -o $@," STRIP $(TARGET_DIR)$@")</rule>
<external-object source="target/arch/sparc64/builtin.o"/>
- <external-object source="target/arch/sparc64/call-client.o"/>
<external-object source="libsparc64.a"/>
<external-object source="libbootstrap.a"/>
- <external-object source="libdrivers.a"/>
- <!-- Needs to be after drivers to avoid missing symbols -->
<external-object source="libmodules.a"/>
+ <external-object source="libdrivers.a"/>
<external-object source="liblibc.a"/>
<external-object source="libfs.a"/>
<external-object source="libgcc.a"/>
Modified: trunk/openbios-devel/arch/unix/build.xml
===================================================================
--- trunk/openbios-devel/arch/unix/build.xml 2009-08-17 16:58:39 UTC (rev 555)
+++ trunk/openbios-devel/arch/unix/build.xml 2009-08-17 16:58:42 UTC (rev 556)
@@ -6,7 +6,7 @@
<executable name="openbios-unix" target="target">
<rule>
- $(CC) $(CFLAGS) -rdynamic $(LIBDL_LDFLAGS) -o $@ $^
+ $(call quiet-command,$(CC) $(CFLAGS) -rdynamic $(LIBDL_LDFLAGS) -o $@ $^," LINK $(TARGET_DIR)$@")
</rule>
<object source="unix.c" flags="-DBOOTSTRAP"/>
<object source="boot.c" flags="-DBOOTSTRAP"/>
Modified: trunk/openbios-devel/arch/x86/build.xml
===================================================================
--- trunk/openbios-devel/arch/x86/build.xml 2009-08-17 16:58:39 UTC (rev 555)
+++ trunk/openbios-devel/arch/x86/build.xml 2009-08-17 16:58:42 UTC (rev 556)
@@ -17,29 +17,21 @@
<object source="elfload.c"/>
<object source="forthload.c"/>
<object source="loadfs.c"/>
+ <object source="entry.S"/>
<object source="xbox/console.c" condition="XBOX"/>
<object source="xbox/methods.c" condition="XBOX"/>
</library>
- <executable name="target/arch/x86/entry.o" target="target">
- <rule><![CDATA[ $(SRCDIR)/arch/x86/entry.S
- $(CC) $$EXTRACFLAGS $(AS_FLAGS) $(CFLAGS) $(INCLUDES) -c -o $@ $^]]></rule>
- </executable>
-
<executable name="openbios.multiboot" target="target" condition="IMAGE_ELF_MULTIBOOT">
<rule>
- $(LD) --warn-common -N -T $(SRCDIR)/arch/x86/ldscript -o $@.nostrip $^
- $(NM) $@.nostrip | sort > $(ODIR)/openbios-multiboot.syms
- cp $@.nostrip $@
- $(STRIP) $@
- </rule>
- <external-object source="target/arch/x86/entry.o"/>
+ $(call quiet-command,$(LD) --warn-common -N -T $(SRCDIR)/arch/x86/ldscript -o $@.nostrip --whole-archive $^," LINK $(TARGET_DIR)$@")
+ $(call quiet-command,$(NM) $@.nostrip | sort > $(ODIR)/openbios-multiboot.syms," GEN $(TARGET_DIR)$@.syms")
+ $(call quiet-command,$(STRIP) $@.nostrip -o $@," STRIP $(TARGET_DIR)$@")</rule>
<object source="multiboot.c"/>
<external-object source="libx86.a"/>
<external-object source="libbootstrap.a"/>
- <external-object source="libdrivers.a"/>
- <!-- Needs to be after drivers to avoid missing symbols -->
<external-object source="libmodules.a"/>
+ <external-object source="libdrivers.a"/>
<external-object source="liblibc.a"/>
<external-object source="libfs.a"/>
<external-object source="libgcc.a"/>
@@ -47,60 +39,51 @@
<executable name="openbios-plain.elf" target="target" condition="IMAGE_ELF">
<rule>
- $(LD) --warn-common -N -T $(SRCDIR)/arch/x86/ldscript -o $@.nostrip $^
- $(NM) $@.nostrip | sort > $(ODIR)/openbios-plain.syms
- cp $@.nostrip $@
- $(STRIP) $@
- </rule>
- <external-object source="target/arch/x86/entry.o"/>
+ $(call quiet-command,$(LD) --warn-common -N -T $(SRCDIR)/arch/x86/ldscript -o $@.nostrip --whole-archive $^," LINK $(TARGET_DIR)$@")
+ $(call quiet-command,$(NM) $@.nostrip | sort > $(ODIR)/openbios-plain.syms," GEN $(TARGET_DIR)$@.syms")
+ $(call quiet-command,$(STRIP) $@.nostrip -o $@," STRIP $(TARGET_DIR)$@")</rule>
<object source="plainboot.c"/>
<external-object source="libx86.a"/>
<external-object source="libbootstrap.a"/>
- <external-object source="libdrivers.a"/>
- <!-- Needs to be after drivers to avoid missing symbols -->
<external-object source="libmodules.a"/>
+ <external-object source="libdrivers.a"/>
<external-object source="liblibc.a"/>
<external-object source="libfs.a"/>
<external-object source="libgcc.a"/>
</executable>
<!-- HACK ALERT -->
-
+
<executable name="target/include/static-dict.h" target="target" condition="IMAGE_ELF_EMBEDDED">
<rule><![CDATA[
+ $(call quiet-command,true, " GEN $(TARGET_DIR)$@")
@echo "static const char forth_dictionary[] = {" > $@
@cat $< | hexdump -ve '1/0 "\t" 8/1 "0x%02x, " 1/0 "\n"' \
| sed 's/0x ,//g' >> $@
- @echo "};" >> $@
- ]]></rule>
+ @echo "};" >> $@]]></rule>
<external-object source="openbios-x86.dict"/>
</executable>
-
+
<executable name="target/arch/x86/builtin.o" target="target" condition="IMAGE_ELF_EMBEDDED">
- <rule><![CDATA[
- $(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/arch/x86/builtin.c
- ]]></rule>
- <external-object source="target/include/static-dict.h"/>
+ <rule><![CDATA[ $(SRCDIR)/arch/x86/builtin.c $(ODIR)/target/include/static-dict.h
+ $(call quiet-command,$(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/arch/x86/builtin.c, " CC $(TARGET_DIR)$@")]]></rule>
</executable>
-
+
<!-- END OF HACK ALERT -->
<executable name="openbios-builtin.elf" target="target" condition="IMAGE_ELF_EMBEDDED">
<rule>
- $(LD) --warn-common -N -T $(SRCDIR)/arch/x86/ldscript -o $@.nostrip $^
- $(NM) $@.nostrip | sort > $(ODIR)/openbios-builtin.syms
- cp $@.nostrip $@
- $(STRIP) $@</rule>
- <external-object source="target/arch/x86/entry.o"/>
+ $(call quiet-command,$(LD) --warn-common -N -T $(SRCDIR)/arch/x86/ldscript -o $@.nostrip --whole-archive $^," LINK $(TARGET_DIR)$@")
+ $(call quiet-command,$(NM) $@.nostrip | sort > $(ODIR)/openbios-builtin.syms," GEN $(TARGET_DIR)$@.syms")
+ $(call quiet-command,$(STRIP) $@.nostrip -o $@," STRIP $(TARGET_DIR)$@")</rule>
<external-object source="target/arch/x86/builtin.o"/>
<external-object source="libx86.a"/>
<external-object source="libbootstrap.a"/>
- <external-object source="libdrivers.a"/>
- <!-- Needs to be after drivers to avoid missing symbols -->
<external-object source="libmodules.a"/>
+ <external-object source="libdrivers.a"/>
<external-object source="liblibc.a"/>
<external-object source="libfs.a"/>
<external-object source="libgcc.a"/>
</executable>
-
+
</build>
Modified: trunk/openbios-devel/arch/x86/entry.S
===================================================================
--- trunk/openbios-devel/arch/x86/entry.S 2009-08-17 16:58:39 UTC (rev 555)
+++ trunk/openbios-devel/arch/x86/entry.S 2009-08-17 16:58:42 UTC (rev 556)
@@ -302,3 +302,14 @@
_idt:
.fill 20, 8, 0 # idt is unitiailzed
_idt_end:
+
+ .globl arch_nvram_size, arch_nvram_get, arch_nvram_put
+arch_nvram_size:
+ xor %eax, %eax
+ ret
+
+arch_nvram_get:
+ ret
+
+arch_nvram_put:
+ ret
Modified: trunk/openbios-devel/config/xml/dictionary.xsl
===================================================================
--- trunk/openbios-devel/config/xml/dictionary.xsl 2009-08-17 16:58:39 UTC (rev 555)
+++ trunk/openbios-devel/config/xml/dictionary.xsl 2009-08-17 16:58:42 UTC (rev 556)
@@ -95,7 +95,7 @@
</xsl:if>
<xsl:text> </xsl:text>
<!-- rule -->
- <xsl:text>	$(ODIR)/forthstrap</xsl:text>
+ <xsl:text>	$(call quiet-command,$(ODIR)/forthstrap</xsl:text>
<xsl:for-each select="//dictionary[@name = @name]">
<xsl:variable name="conditions">
@@ -131,7 +131,7 @@
</xsl:if>
<xsl:text> $(</xsl:text>
<xsl:value-of select="@name"/>
- <xsl:text>-DICTIONARY) </xsl:text>
+ <xsl:text>-DICTIONARY)," GEN $(TARGET_DIR)$@") </xsl:text>
</xsl:if>
</xsl:if>
</xsl:for-each>
Modified: trunk/openbios-devel/config/xml/object.xsl
===================================================================
--- trunk/openbios-devel/config/xml/object.xsl 2009-08-17 16:58:39 UTC (rev 555)
+++ trunk/openbios-devel/config/xml/object.xsl 2009-08-17 16:58:42 UTC (rev 556)
@@ -63,13 +63,19 @@
<xsl:text> </xsl:text>
</xsl:when>
<xsl:otherwise>
- <xsl:if test="@flags!=''">
- <xsl:text> 	EXTRACFLAGS="</xsl:text>
- <xsl:value-of select="@flags"/>
- <xsl:text>" ;\</xsl:text>
- </xsl:if>
- <!-- FIXME this requires strict spaces in rules.xml -->
- <xsl:value-of select="document('rules.xml',.)//rule[@target=$target][@entity='object']"/>
+ <xsl:choose>
+ <xsl:when test="@flags!=''">
+ <xsl:value-of select="document('rules.xml',.)//rule[@target=$target][@entity='object'][@extracflags='1']"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="@flags"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="document('rules.xml',.)//rule[@target=$target][@entity='object'][@extracflags='2']"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- FIXME this requires strict spaces in rules.xml -->
+ <xsl:value-of select="document('rules.xml',.)//rule[@target=$target][@entity='object']"/>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:otherwise>
</xsl:choose>
Modified: trunk/openbios-devel/config/xml/rules.xml
===================================================================
--- trunk/openbios-devel/config/xml/rules.xml 2009-08-17 16:58:39 UTC (rev 555)
+++ trunk/openbios-devel/config/xml/rules.xml 2009-08-17 16:58:42 UTC (rev 556)
@@ -1,23 +1,31 @@
<rules>
<!-- host compiler build rules -->
<rule target="host" entity="executable">
- $(HOSTCC) $(HOSTCFLAGS) -o $@ $^
+ $(call quiet-command,$(HOSTCC) $(HOSTCFLAGS) -o $@ $^," HOSTCC $(TARGET_DIR)$@")
</rule>
<rule target="host" entity="object">
- $(HOSTCC) $(HOSTCFLAGS) $(HOSTINCLUDES) -c -o $@ $^
+ $(call quiet-command,$(HOSTCC) $(HOSTCFLAGS) $(HOSTINCLUDES) -c -o $@ $^," HOSTCC $(TARGET_DIR)$@")
</rule>
+<rule target="host" entity="object" extracflags="1">
+ $(call quiet-command,$(HOSTCC) $(HOSTCFLAGS) $(HOSTINCLUDES)</rule>
+<rule target="host" entity="object" extracflags="2"> -c -o $@ $^," HOSTCC $(TARGET_DIR)$@")
+</rule>
<rule target="host" entity="library">
- $(AR) cru $@ $^; $(RANLIB) $@
+ $(call quiet--command,$(AR) cru $@ $^; $(RANLIB) $@," HOSTAR $(TARGET_DIR)$@")
</rule>
<!-- target/cross compiler build rules -->
<rule target="target" entity="executable">
- $(CC) $(CFLAGS) -o $@ $^
+ $(call quiet-command,$(CC) $(CFLAGS) -o $@ $^," CC $(TARGET_DIR)$@")
</rule>
<rule target="target" entity="object">
- $(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ $^
+ $(call quiet-command,$(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ $^," CC $(TARGET_DIR)$@")
</rule>
+<rule target="target" entity="object" extracflags="1">
+ $(call quiet-command,$(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES)</rule>
+<rule target="target" entity="object" extracflags="2"> -c -o $@ $^," CC $(TARGET_DIR)$@")
+</rule>
<rule target="target" entity="library">
- $(AR) cru $@ $^; $(RANLIB) $@
+ $(call quiet-command,$(AR) cru $@ $^; $(RANLIB) $@," AR $(TARGET_DIR)$@")
</rule>
</rules>
Modified: trunk/openbios-devel/kernel/bootstrap.c
===================================================================
--- trunk/openbios-devel/kernel/bootstrap.c 2009-08-17 16:58:39 UTC (rev 555)
+++ trunk/openbios-devel/kernel/bootstrap.c 2009-08-17 16:58:42 UTC (rev 556)
@@ -220,7 +220,9 @@
header->checksum=target_long(checksum);
- dump_header(header);
+ if (verbose) {
+ dump_header(header);
+ }
f = fopen(filename, "w");
if (!f) {
@@ -727,8 +729,9 @@
buildconstant("/x", sizeof(u64));
reveal();
- printk("Dictionary initialization finished.\n");
-
+ if (verbose) {
+ printk("Dictionary initialization finished.\n");
+ }
return 0;
}
@@ -873,7 +876,9 @@
size = ftell( file );
fseek( file, 0, SEEK_SET );
- printk("\nEncoding %s [%d bytes]\n", name, size );
+ if (verbose) {
+ printk("\nEncoding %s [%d bytes]\n", name, size );
+ }
fread( dict + dicthead, size, 1, file );
PUSH( pointer2cell(dict + dicthead) );
PUSH( size );
@@ -914,8 +919,10 @@
interpret_source((char *)source);
- printk("interpretion finished. %d errors occured.\n",
- errors);
+ if (verbose || errors > 0) {
+ printk("interpretion finished. %d errors occured.\n",
+ errors);
+ }
}
/*
@@ -964,8 +971,6 @@
const char *optstring = "VvhsI:d:D:?";
- printk(BANNER);
-
while (1) {
#ifdef __GLIBC__
int option_index = 0;
@@ -1014,12 +1019,10 @@
break;
case 'd':
if (!basedict) {
- printk("Using source dictionary '%s'\n", optarg);
basedict = optarg;
}
case 'D':
if(!dictname) {
- printk("Dumping final dictionary to '%s'\n", optarg);
dictname = optarg;
}
break;
@@ -1028,6 +1031,12 @@
}
}
+ if (verbose) {
+ printk(BANNER);
+ printk("Using source dictionary '%s'\n", basedict);
+ printk("Dumping final dictionary to '%s'\n", dictname);
+ }
+
if (argc < optind + 1) {
printk(USAGE, argv[0]);
return 1;
@@ -1085,7 +1094,9 @@
*/
for (cnt=0; cnt<2; cnt++) {
- printk("Compiling dictionary %d/%d\n", cnt+1, 2);
+ if (verbose) {
+ printk("Compiling dictionary %d/%d\n", cnt+1, 2);
+ }
dict=bootstrapdict[cnt];
if(!basedict) {
new_dictionary(argv[optind]);
1
0
Author: blueswirl
Date: 2009-08-17 18:58:39 +0200 (Mon, 17 Aug 2009)
New Revision: 555
Modified:
trunk/openbios-devel/include/sparc64/types.h
Log:
Sparc64: partially revert r515: long long is safer than int64_t
Host headers may define int64_t as different type than long long, especially
on a 64 bit host. This matters with printf formatting.
Signed-off-by: Blue Swirl <blauwirbel(a)gmail.com>
Modified: trunk/openbios-devel/include/sparc64/types.h
===================================================================
--- trunk/openbios-devel/include/sparc64/types.h 2009-08-17 16:58:35 UTC (rev 554)
+++ trunk/openbios-devel/include/sparc64/types.h 2009-08-17 16:58:39 UTC (rev 555)
@@ -29,8 +29,8 @@
#include "autoconf.h"
/* cell based types */
-typedef int64_t cell;
-typedef uint64_t ucell;
+typedef long long cell;
+typedef unsigned long long ucell;
#define FMT_cell "%lld"
#define FMT_ucell "%llu"
1
0
Author: blueswirl
Date: 2009-08-17 18:58:35 +0200 (Mon, 17 Aug 2009)
New Revision: 554
Modified:
trunk/openbios-devel/config/examples/cross-sparc64_config.xml
Log:
Sparc64: omit less useful FS modules to reduce size
Signed-off-by: Blue Swirl <blauwirbel(a)gmail.com>
Modified: trunk/openbios-devel/config/examples/cross-sparc64_config.xml
===================================================================
--- trunk/openbios-devel/config/examples/cross-sparc64_config.xml 2009-08-13 19:11:02 UTC (rev 553)
+++ trunk/openbios-devel/config/examples/cross-sparc64_config.xml 2009-08-17 16:58:35 UTC (rev 554)
@@ -49,20 +49,20 @@
<option name="CONFIG_SUN_PARTS" type="boolean" value="true"/>
<option name="CONFIG_FS" type="boolean" value="true"/>
<option name="CONFIG_HFS" type="boolean" value="false"/>
- <option name="CONFIG_HFSP" type="boolean" value="true"/>
+ <option name="CONFIG_HFSP" type="boolean" value="false"/>
<option name="CONFIG_GRUBFS" type="boolean" value="true"/>
<option name="CONFIG_FSYS_EXT2FS" type="boolean" value="true"/>
- <option name="CONFIG_FSYS_FAT" type="boolean" value="true"/>
- <option name="CONFIG_FSYS_JFS" type="boolean" value="true"/>
- <option name="CONFIG_FSYS_MINIX" type="boolean" value="true"/>
- <option name="CONFIG_FSYS_REISERFS" type="boolean" value="true"/>
- <option name="CONFIG_FSYS_XFS" type="boolean" value="true"/>
+ <option name="CONFIG_FSYS_FAT" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_JFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_MINIX" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_REISERFS" type="boolean" value="false"/>
+ <option name="CONFIG_FSYS_XFS" type="boolean" value="false"/>
<option name="CONFIG_FSYS_UFS" type="boolean" value="true"/>
<option name="CONFIG_FSYS_ISO9660" type="boolean" value="true"/>
<option name="CONFIG_FSYS_FFS" type="boolean" value="true"/>
- <option name="CONFIG_FSYS_VSTAFS" type="boolean" value="true"/>
+ <option name="CONFIG_FSYS_VSTAFS" type="boolean" value="false"/>
<option name="CONFIG_FSYS_NTFS" type="boolean" value="false"/>
- <option name="CONFIG_FSYS_AFFS" type="boolean" value="true"/>
+ <option name="CONFIG_FSYS_AFFS" type="boolean" value="false"/>
<option name="CONFIG_DEBUG_FS" type="boolean" value="false"/>
<option name="CONFIG_DEBUG_EXT2FS" type="boolean" value="false"/>
1
0
Hello!
The reason OpenBIOS violates the strict aliasing rules so often is
because it uses char arrays to represent endian-specific data.
Char arrays may have alignment different from that of the longer types.
That's why casting a pointer to such array to a pointer to a longer type
and dereferencing it is considered unsafe by the compiler. The compiler
assumes that different types would not occupy the same memory unless we
tell it not to make such assumption.
Char arrays serve as protection against misusing endian-specific data as
host-endian integers. The alternative it to use sparse annotated types,
such as __le32. __le32 has the same alignment as u32, but sparse would
recognize attempts to use __le32 in arithmetic operations.
I think switching to sparse annotated types would be a good idea whether
strict aliasing is disabled or not. It makes the code more readable.
It could also fix some hard to find bugs.
--
Regards,
Pavel Roskin
3
2
Hi!
I tried unmapping zero virtual address page for sparc64 and found there is an issue with ob_pci_close; it calls close-deblocker method without deblocker being open. This leads to multiple references to wrong cells, including ones in zero page.
Signed-off-by: igor.v.kovalenko(a)gmail.com
--
Kind regards,
Igor V. Kovalenko
2
2
Author: blueswirl
Date: 2009-08-13 21:11:02 +0200 (Thu, 13 Aug 2009)
New Revision: 553
Modified:
trunk/openbios-devel/drivers/pci.c
Log:
Do not call close-deblocker since ob_pci_open did not open it.
Fix an issue with ob_pci_close; it calls close-deblocker method without
deblocker being open. This leads to multiple references to wrong cells,
including ones in zero page.
Signed-off-by: igor.v.kovalenko(a)gmail.com
Signed-off-by: Blue Swirl <blauwirbel(a)gmail.com>
Modified: trunk/openbios-devel/drivers/pci.c
===================================================================
--- trunk/openbios-devel/drivers/pci.c 2009-08-12 19:55:31 UTC (rev 552)
+++ trunk/openbios-devel/drivers/pci.c 2009-08-13 19:11:02 UTC (rev 553)
@@ -79,7 +79,6 @@
static void
ob_pci_close(int *idx)
{
- selfword("close-deblocker");
}
static void
1
0

Aug. 13, 2009
Hi al,
I want to port OpenBios on INTEL ATOM. Does it support it and how do i move further
Thanks and Regards
Ravindra Bankar
> Date: Wed, 12 Aug 2009 19:29:52 +0200
> To: openbios(a)lists.openbios.org
> From: svn(a)openbios.org
> Subject: [OpenBIOS] r551 - trunk/openbios-devel/config/examples
>
> Author: laurent
> Date: 2009-08-12 19:29:51 +0200 (Wed, 12 Aug 2009)
> New Revision: 551
>
> Modified:
> trunk/openbios-devel/config/examples/cross-ppc_config.xml
> trunk/openbios-devel/config/examples/ppc_config.xml
> Log:
> Re-enable HFS (with HFS+)
>
> Signed-off-by: Laurent Vivier <Laurent(a)vivier.eu>
>
>
> Modified: trunk/openbios-devel/config/examples/cross-ppc_config.xml
> ===================================================================
> --- trunk/openbios-devel/config/examples/cross-ppc_config.xml 2009-08-11 20:47:13 UTC (rev 550)
> +++ trunk/openbios-devel/config/examples/cross-ppc_config.xml 2009-08-12 17:29:51 UTC (rev 551)
> @@ -48,7 +48,7 @@
> <option name="CONFIG_DEBUG_MAC_PARTS" type="boolean" value="false"/>
> <option name="CONFIG_PC_PARTS" type="boolean" value="true"/>
> <option name="CONFIG_FS" type="boolean" value="true"/>
> - <option name="CONFIG_HFS" type="boolean" value="false"/>
> + <option name="CONFIG_HFS" type="boolean" value="true"/>
> <option name="CONFIG_HFSP" type="boolean" value="true"/>
> <option name="CONFIG_GRUBFS" type="boolean" value="true"/>
> <option name="CONFIG_FSYS_EXT2FS" type="boolean" value="true"/>
>
> Modified: trunk/openbios-devel/config/examples/ppc_config.xml
> ===================================================================
> --- trunk/openbios-devel/config/examples/ppc_config.xml 2009-08-11 20:47:13 UTC (rev 550)
> +++ trunk/openbios-devel/config/examples/ppc_config.xml 2009-08-12 17:29:51 UTC (rev 551)
> @@ -49,7 +49,7 @@
> <option name="CONFIG_DEBUG_MAC_PARTS" type="boolean" value="false"/>
> <option name="CONFIG_PC_PARTS" type="boolean" value="true"/>
> <option name="CONFIG_FS" type="boolean" value="true"/>
> - <option name="CONFIG_HFS" type="boolean" value="false"/>
> + <option name="CONFIG_HFS" type="boolean" value="true"/>
> <option name="CONFIG_HFSP" type="boolean" value="true"/>
> <option name="CONFIG_GRUBFS" type="boolean" value="true"/>
> <option name="CONFIG_FSYS_EXT2FS" type="boolean" value="true"/>
>
>
> --
> OpenBIOS http://openbios.org/
> Mailinglist: http://lists.openbios.org/mailman/listinfo
> Free your System - May the Forth be with you
_________________________________________________________________
One stop at MSN India to catch up with what’s hot in the world around you today
http://in.msn.com
1
0

Aug. 12, 2009
Author: laurent
Date: 2009-08-12 21:55:31 +0200 (Wed, 12 Aug 2009)
New Revision: 552
Modified:
trunk/openbios-devel/arch/ppc/qemu/main.c
trunk/openbios-devel/fs/grubfs/grubfs_fs.c
trunk/openbios-devel/modules/disk-label.c
trunk/openbios-devel/modules/mac-parts.c
Log:
This patch allows to boot from bootsector of first bootable partition
using "boot hd:%BOOT"
As explained in:
"PowerPC Microprocessor Common Hardware Reference Platform (CHRP)
System binding to:
IEEE Std 1275-1994 Standard for Boot (Initialization, Configuration)
Firmware
Revision: 1.8"
"Chapter 11.1.2. Open Method Algorith"
Signed-off-by: Laurent Vivier <Laurent(a)vivier.info>
Modified: trunk/openbios-devel/arch/ppc/qemu/main.c
===================================================================
--- trunk/openbios-devel/arch/ppc/qemu/main.c 2009-08-12 17:29:51 UTC (rev 551)
+++ trunk/openbios-devel/arch/ppc/qemu/main.c 2009-08-12 19:55:31 UTC (rev 552)
@@ -321,69 +321,46 @@
close_io( fd );
}
-#define QUIK_SECOND_BASEADDR 0x3e0000
-#define QUIK_FIRST_BASEADDR 0x3f4000
-#define QUIK_SECOND_SIZE (QUIK_FIRST_BASEADDR - QUIK_SECOND_BASEADDR)
-#define QUIK_FIRST_INFO_OFF 0x2c8
+#define OLDWORLD_BOOTCODE_BASEADDR (0x3f4000)
-struct first_info {
- char quik_vers[8];
- int nblocks;
- int blocksize;
- unsigned second_base;
- int conf_part;
- char conf_file[32];
- unsigned blknos[64];
-};
-
static void
-quik_startup( void )
+oldworld_boot( void )
{
int fd;
- int len;
- const char *path = "hd:2";
- union {
- char buffer[1024];
- int first_word;
- struct {
- char pad[QUIK_FIRST_INFO_OFF];
- struct first_info fi;
- } fi;
- } u;
+ int len, total;
+ const char *path = "hd:,%BOOT";
+ char *bootcode;
if ((fd = open_io(path)) == -1) {
ELF_DPRINTF("Can't open %s\n", path);
return;
}
- seek_io(fd, 0);
- len = read_io(fd, u.buffer, sizeof(u));
+
+ total = 0;
+ bootcode = (char*)OLDWORLD_BOOTCODE_BASEADDR;
+ while(1) {
+ if (seek_io(fd, total) == -1)
+ break;
+ len = read_io(fd, bootcode, 512);
+ bootcode += len;
+ total += len;
+ }
+
close_io( fd );
- if (len == -1) {
+ if (total == 0) {
ELF_DPRINTF("Can't read %s\n", path);
return;
}
- /* is it quik ? */
-
- if (memcmp(u.fi.fi.quik_vers, "QUIK", 4))
- return;
-
encode_bootpath(path, "Linux");
- if( ofmem_claim( QUIK_FIRST_BASEADDR, len, 0 ) == -1 )
+ if( ofmem_claim( OLDWORLD_BOOTCODE_BASEADDR, total, 0 ) == -1 )
fatal_error("Claim failed!\n");
- memcpy((char*)QUIK_FIRST_BASEADDR, u.buffer, len);
+ call_elf(0, 0, OLDWORLD_BOOTCODE_BASEADDR);
- /* quik fist level doesn't claim second level memory */
-
- if( ofmem_claim( QUIK_SECOND_BASEADDR, QUIK_SECOND_SIZE, 0 ) == -1 )
- fatal_error("Claim failed!\n");
-
- call_elf(0, 0, QUIK_FIRST_BASEADDR);
-
return;
}
@@ -495,7 +472,7 @@
check_preloaded_kernel();
}
if (boot_device == 'c') {
- quik_startup();
+ oldworld_boot();
}
yaboot_startup();
}
Modified: trunk/openbios-devel/fs/grubfs/grubfs_fs.c
===================================================================
--- trunk/openbios-devel/fs/grubfs/grubfs_fs.c 2009-08-12 17:29:51 UTC (rev 551)
+++ trunk/openbios-devel/fs/grubfs/grubfs_fs.c 2009-08-12 19:55:31 UTC (rev 552)
@@ -298,7 +298,9 @@
}
if( seek_io(curfs->dev_fd, offs) ) {
+#ifdef CONFIG_DEBUG_FS
printk("seek failure\n");
+#endif
return -1;
}
return (read_io(curfs->dev_fd, buf, byte_len) == byte_len) ? 1:0;
Modified: trunk/openbios-devel/modules/disk-label.c
===================================================================
--- trunk/openbios-devel/modules/disk-label.c 2009-08-12 17:29:51 UTC (rev 551)
+++ trunk/openbios-devel/modules/disk-label.c 2009-08-12 19:55:31 UTC (rev 552)
@@ -57,42 +57,46 @@
static void
dlabel_open( dlabel_info_t *di )
{
- char *s, *filename, *parstr;
+ char *s, *filename;
+ char *path;
char block0[512];
phandle_t ph;
int fd, success=0;
xt_t xt;
- parstr = my_args_copy();
- DPRINTF("dlabel-open '%s'\n", parstr );
+ path = my_args_copy();
+ DPRINTF("dlabel-open '%s'\n", path );
+ /* open disk interface */
+
if( (fd=open_ih(my_parent())) == -1 )
goto out;
di->fd = fd;
/* argument format: parnum,filename */
- s = parstr;
+
+ s = path;
filename = NULL;
- if( s ) {
- if( *s == '-' || isdigit(*s) ||
- (*s >= 'a' && *s < ('a' + 8)
- && (*(s + 1) == ',' || *(s + 1) == '\0'))) {
- if( (s=strpbrk(parstr,",")) ) {
- filename = s+1;
- *s = 0;
- }
- } else {
- filename = s;
- parstr = NULL;
- if( *s == ',' )
- filename++;
+ if( *s == '-' || isdigit(*s) ||
+ (*s >= 'a' && *s < ('a' + 8)
+ && (*(s + 1) == ',' || *(s + 1) == '\0'))) {
+ if( (s=strpbrk(path,",")) ) {
+ filename = s+1;
}
+ } else {
+ filename = s;
+ if( *s == ',' )
+ filename++;
}
- DPRINTF("parstr %s filename %s\n", parstr, filename);
+ DPRINTF("filename %s\n", filename);
- /* try to see if there is a filesystem without partition */
+ /* try to see if there is a filesystem without partition,
+ * like ISO9660. This is needed to boot openSUSE 11.1 CD
+ * which uses "boot &device;:1,\suseboot\yaboot.ibm"
+ * whereas HFS+ partition is #2
+ */
- if (atol(parstr) == 1) {
+ if ( atol(path) == 1 ) {
PUSH_ih( my_self() );
selfword("find-filesystem");
ph = POP_ph();
@@ -127,7 +131,7 @@
/* open partition package */
if( ph ) {
- if( !(di->part_ih=open_package(parstr, ph)) )
+ if( !(di->part_ih=open_package(path, ph)) )
goto out;
if( !(xt=find_ih_method("get-info", di->part_ih)) )
goto out;
@@ -143,9 +147,26 @@
call_package(xt, di->part_ih);
di->block_size = POP();
}
+ } else {
+ /* unknown (or missing) partition map,
+ * try the whole disk
+ */
+ di->offs_hi = 0;
+ di->offs_lo = 0;
+ di->size_hi = 0;
+ di->size_lo = 0;
+ di->part_ih = 0;
+ di->type = -1;
+ di->block_size = 512;
+ xt = find_parent_method("block-size");
+ if (xt) {
+ call_parent(xt);
+ di->block_size = POP();
+ }
}
/* probe for filesystem */
+
PUSH_ih( my_self() );
selfword("find-filesystem");
ph = POP_ph();
@@ -153,14 +174,14 @@
push_str( filename );
PUSH_ph( ph );
fword("interpose");
- } else if( filename ) {
+ } else if (filename && strcmp(filename, "%BOOT") != 0) {
goto out;
}
success = 1;
out:
- if( parstr )
- free( parstr );
+ if( path )
+ free( path );
if( !success ) {
dlabel_close( di );
RET(0);
Modified: trunk/openbios-devel/modules/mac-parts.c
===================================================================
--- trunk/openbios-devel/modules/mac-parts.c 2009-08-12 17:29:51 UTC (rev 551)
+++ trunk/openbios-devel/modules/mac-parts.c 2009-08-12 19:55:31 UTC (rev 552)
@@ -49,13 +49,25 @@
desc_map_t dmap;
part_entry_t par;
int ret = 0;
+ int want_bootcode = 0;
+ DPRINTF("partition %s\n", str);
if( str ) {
+ char *tmp;
parnum = atol(str);
if( *str == 0 || *str == ',' )
parnum = -1;
+ tmp = str;
+ while (*tmp && *tmp != ',')
+ tmp++;
+ if (*tmp == ',')
+ tmp++;
+ if (strcmp(tmp, "%BOOT") == 0)
+ want_bootcode = 1;
+ free(str);
}
+ DPRINTF("want_bootcode %d\n", want_bootcode);
DPRINTF("macparts_open %d\n", parnum);
SEEK( 0 );
if( READ(&dmap, sizeof(dmap)) != sizeof(dmap) )
@@ -97,6 +109,10 @@
di->blocksize =(uint)bs;
di->offs = (llong)par.pmPyPartStart * bs;
di->size = (llong)par.pmPartBlkCnt * bs;
+ if (want_bootcode) {
+ di->offs += (llong)par.pmLgBootStart*bs;
+ di->size = (llong)par.pmBootSize;
+ }
ret = -1;
goto out;
}
@@ -132,10 +148,13 @@
di->blocksize =(uint)bs;
di->offs = (llong)par.pmPyPartStart * bs;
di->size = (llong)par.pmPartBlkCnt * bs;
+ if (want_bootcode) {
+ di->offs += (llong)par.pmLgBootStart * bs;
+ di->size = (llong)par.pmBootSize;
+ }
out:
- if (str)
- free(str);
+ DPRINTF("offset 0x%llx size 0x%llx\n", di->offs, di->size);
PUSH( ret);
}
1
0
Author: laurent
Date: 2009-08-12 19:29:51 +0200 (Wed, 12 Aug 2009)
New Revision: 551
Modified:
trunk/openbios-devel/config/examples/cross-ppc_config.xml
trunk/openbios-devel/config/examples/ppc_config.xml
Log:
Re-enable HFS (with HFS+)
Signed-off-by: Laurent Vivier <Laurent(a)vivier.eu>
Modified: trunk/openbios-devel/config/examples/cross-ppc_config.xml
===================================================================
--- trunk/openbios-devel/config/examples/cross-ppc_config.xml 2009-08-11 20:47:13 UTC (rev 550)
+++ trunk/openbios-devel/config/examples/cross-ppc_config.xml 2009-08-12 17:29:51 UTC (rev 551)
@@ -48,7 +48,7 @@
<option name="CONFIG_DEBUG_MAC_PARTS" type="boolean" value="false"/>
<option name="CONFIG_PC_PARTS" type="boolean" value="true"/>
<option name="CONFIG_FS" type="boolean" value="true"/>
- <option name="CONFIG_HFS" type="boolean" value="false"/>
+ <option name="CONFIG_HFS" type="boolean" value="true"/>
<option name="CONFIG_HFSP" type="boolean" value="true"/>
<option name="CONFIG_GRUBFS" type="boolean" value="true"/>
<option name="CONFIG_FSYS_EXT2FS" type="boolean" value="true"/>
Modified: trunk/openbios-devel/config/examples/ppc_config.xml
===================================================================
--- trunk/openbios-devel/config/examples/ppc_config.xml 2009-08-11 20:47:13 UTC (rev 550)
+++ trunk/openbios-devel/config/examples/ppc_config.xml 2009-08-12 17:29:51 UTC (rev 551)
@@ -49,7 +49,7 @@
<option name="CONFIG_DEBUG_MAC_PARTS" type="boolean" value="false"/>
<option name="CONFIG_PC_PARTS" type="boolean" value="true"/>
<option name="CONFIG_FS" type="boolean" value="true"/>
- <option name="CONFIG_HFS" type="boolean" value="false"/>
+ <option name="CONFIG_HFS" type="boolean" value="true"/>
<option name="CONFIG_HFSP" type="boolean" value="true"/>
<option name="CONFIG_GRUBFS" type="boolean" value="true"/>
<option name="CONFIG_FSYS_EXT2FS" type="boolean" value="true"/>
1
0
>
>
>On 11.08.2009, at 23:13, Laurent Vivier <Laurent(a)vivier.eu> wrote:
>
>> Hi,
>>
>> the attached patch allows to boot using "boot hd:%BOOT". This is the
>> method used by OldWorld bootloader, Quik.
>>
>> As I've only tested it with PPC target, I'd like to have some comments
>> before commiting it (If someone can test sparc, I'll be happy).
>>
>
>Since it is part of PPC only CHRP, I think it should be fine to make
>sure the code is only used on PPC, I believe...
It is not as simple as it seems...
All the work is made in mac-parts.c (only used by CHRP), but to do the work it needs to know the filename ("%BOOT"). Until now, disk-label.c (common part) sends a string with only the partition number to the partition module. So this patch modifies disk-label.c to pass the partition number AND the filename. This is the part which can break other architectures. But as it seems all partition managers are using atol() on the argument to find the partition number, it should work fine even if the partition number is followed by a filename.
I think I'll commit this this evening.
Regards,
Laurent
--
--------------------- Laurent(a)vivier.eu ---------------------
"Tout ce qui est impossible reste à accomplir" Jules Verne
"Things are only impossible until they're not" Jean-Luc Picard
1
0