OpenBIOS
Threads by month
- ----- 2026 -----
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- 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
March 2010
- 11 participants
- 56 discussions
March 13, 2010
Author: mcayland
Date: Sat Mar 13 13:44:22 2010
New Revision: 686
URL: http://tracker.coreboot.org/trac/openbios/changeset/686
Log:
Add missing files from previous refactoring commit and also fix a slight error in libopenbios/build.xml.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland(a)siriusit.co.uk>
Added:
trunk/openbios-devel/packages/build.xml
trunk/openbios-devel/packages/cmdline.fs
trunk/openbios-devel/packages/disk-label.fs
Modified:
trunk/openbios-devel/libopenbios/build.xml
Modified: trunk/openbios-devel/libopenbios/build.xml
==============================================================================
--- trunk/openbios-devel/libopenbios/build.xml Sat Mar 13 11:58:19 2010 (r685)
+++ trunk/openbios-devel/libopenbios/build.xml Sat Mar 13 13:44:22 2010 (r686)
@@ -2,7 +2,6 @@
<library name="openbios" type="static" target="target">
<object source="bindings.c"/>
- <object source="bootinfo-loader.c" condition="PPC"/>
<object source="client.c"/>
<object source="console_common.c"/>
<object source="elfnote.c" condition="X86"/>
Added: trunk/openbios-devel/packages/build.xml
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/openbios-devel/packages/build.xml Sat Mar 13 13:44:22 2010 (r686)
@@ -0,0 +1,25 @@
+<build>
+
+ <library name="packages" type="static" target="target">
+ <object source="bootinfo-loader.c" condition="PPC"/>
+ <object source="cmdline.c" condition="CMDLINE"/>
+ <object source="deblocker.c" condition="DEBLOCKER"/>
+ <object source="disk-label.c" condition="DISK_LABEL"/>
+ <object source="elf-loader.c" condition="PPC"/>
+ <object source="elf-loader.c" condition="SPARC64"/>
+ <object source="init.c"/>
+ <object source="mac-parts.c" condition="MAC_PARTS"/>
+ <object source="misc-files.c" condition="FS"/>
+ <object source="nvram.c"/>
+ <object source="pc-parts.c" condition="PC_PARTS"/>
+ <object source="sun-parts.c" condition="SUN_PARTS"/>
+ <object source="video.c"/>
+ <object source="xcoff-loader.c" condition="PPC"/>
+ </library>
+
+ <dictionary name="openbios" target="forth">
+ <object source="cmdline.fs"/>
+ <object source="disk-label.fs"/>
+ </dictionary>
+
+</build>
Added: trunk/openbios-devel/packages/cmdline.fs
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/openbios-devel/packages/cmdline.fs Sat Mar 13 13:44:22 2010 (r686)
@@ -0,0 +1,41 @@
+\ tag: Utility functions
+\
+\ deblocker / filesystem support
+\
+\ Copyright (C) 2003, 2004 Samuel Rydh
+\
+\ See the file "COPYING" for further information about
+\ the copyright and warranty status of this work.
+\
+
+\ -------------------------------------------------------------
+\ command line editor (/packages/cmdline)
+\ -------------------------------------------------------------
+
+[IFDEF] CONFIG_CMDLINE
+
+dev /packages
+new-device
+ " cmdline" device-name
+
+ :noname
+ " " [active-package], open-package
+ ?dup if
+ " cmdline" rot $call-method
+ else
+ ." cmdline is missing!" cr
+ then
+ \ cmdline must close itself upon return
+ ;
+
+ :noname
+ [ ['] (lit) , swap , ] to outer-interpreter
+ ; SYSTEM-initializer
+
+ external
+ : prepare 0 to my-self ;
+
+finish-device
+
+[THEN]
+device-end
Added: trunk/openbios-devel/packages/disk-label.fs
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/openbios-devel/packages/disk-label.fs Sat Mar 13 13:44:22 2010 (r686)
@@ -0,0 +1,89 @@
+\ tag: Utility functions
+\
+\ deblocker / filesystem support
+\
+\ Copyright (C) 2003, 2004 Samuel Rydh
+\
+\ See the file "COPYING" for further information about
+\ the copyright and warranty status of this work.
+\
+
+dev /packages
+
+\ -------------------------------------------------------------
+\ /packages/disk-label (partition handling)
+\ -------------------------------------------------------------
+
+[IFDEF] CONFIG_DISK_LABEL
+
+new-device
+ " disk-label" device-name
+ external
+
+ variable part-handlers \ list with (probe-xt, phandle) elements
+ variable fs-handlers \ list with (fs-probe-xt, phandle) elements
+
+ : find-part-handler ( block0 -- phandle | 0 )
+ >r part-handlers
+ begin list-get while
+ ( nextlist dictptr )
+ r@ over @ execute if
+ ( nextlist dictptr )
+ na1+ @ r> rot 2drop exit
+ then
+ drop
+ repeat
+ r> drop 0
+ ;
+
+ : find-filesystem ( ih -- ph | 0 )
+ >r fs-handlers
+ begin list-get while
+ ( nextlist dictptr )
+ r@ over @ execute if
+ ( nextlist dictptr )
+ na1+ @ r> rot 2drop exit
+ then
+ drop
+ repeat
+ r> drop 0
+ ;
+
+ : register-part-handler ( handler-ph -- )
+ dup " probe" rot find-method
+ 0= abort" Missing probe method!"
+ ( phandle probe-xt )
+ part-handlers list-add , ,
+ ;
+
+ : register-fs-handler ( handler-ph -- )
+ dup " probe" rot find-method
+ 0= abort" Missing probe method!"
+ ( phandle probe-xt )
+ fs-handlers list-add , ,
+ ;
+finish-device
+
+\ ---------------------------------------------------------------------------
+\ methods to register partion and filesystem packages used by disk-label
+\ ---------------------------------------------------------------------------
+
+device-end
+: register-partition-package ( -- )
+ " register-part-handler" " disk-label" $find-package-method ?dup if
+ active-package swap execute
+ else
+ ." [disk-label] internal error" cr
+ then
+;
+
+: register-fs-package ( -- )
+ " register-fs-handler" " disk-label" $find-package-method ?dup if
+ active-package swap execute
+ else
+ ." [misc-files] internal error" cr
+ then
+;
+
+[THEN]
+device-end
1
0
[commit] r685 - in trunk/openbios-devel: . arch/amd64 arch/ia64 arch/ppc arch/ppc/mol arch/ppc/pearpc arch/sparc32 arch/sparc64 arch/unix arch/x86 arch/x86/xbox config/scripts include libopenbios m...
by repository service March 13, 2010
by repository service March 13, 2010
March 13, 2010
Author: mcayland
Date: Sat Mar 13 11:58:19 2010
New Revision: 685
URL: http://tracker.coreboot.org/trac/openbios/changeset/685
Log:
Refactoring of the OpenBIOS source code, as discussed on the mailing list. The primary aim of this process is to try and arrange
the source files into a structure whereby it is easier to find the relationship between a forth package word and its C
implementation, while also creating a libopenbios library into which more common code from the arch/ tree can eventually be
moved.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland(a)siriusit.co.uk>
Added:
trunk/openbios-devel/libopenbios/ (props changed)
- copied from r683, trunk/openbios-devel/modules/
trunk/openbios-devel/packages/
trunk/openbios-devel/packages/bootinfo-loader.c (contents, props changed)
- copied, changed from r683, trunk/openbios-devel/modules/bootinfo-loader.c
trunk/openbios-devel/packages/cmdline.c (contents, props changed)
- copied, changed from r683, trunk/openbios-devel/modules/cmdline.c
trunk/openbios-devel/packages/deblocker.c (contents, props changed)
- copied, changed from r683, trunk/openbios-devel/modules/deblocker.c
trunk/openbios-devel/packages/disk-label.c (contents, props changed)
- copied, changed from r683, trunk/openbios-devel/modules/disk-label.c
trunk/openbios-devel/packages/elf-loader.c (contents, props changed)
- copied, changed from r683, trunk/openbios-devel/modules/elf-loader.c
trunk/openbios-devel/packages/init.c (contents, props changed)
- copied, changed from r683, trunk/openbios-devel/modules/init.c
trunk/openbios-devel/packages/mac-parts.c (contents, props changed)
- copied, changed from r683, trunk/openbios-devel/modules/mac-parts.c
trunk/openbios-devel/packages/mac-parts.h (props changed)
- copied unchanged from r683, trunk/openbios-devel/modules/mac-parts.h
trunk/openbios-devel/packages/misc-files.c (contents, props changed)
- copied, changed from r683, trunk/openbios-devel/modules/filesystems.c
trunk/openbios-devel/packages/nvram.c (props changed)
- copied unchanged from r683, trunk/openbios-devel/modules/nvram.c
trunk/openbios-devel/packages/packages.h (contents, props changed)
- copied, changed from r683, trunk/openbios-devel/modules/modules.h
trunk/openbios-devel/packages/pc-parts.c (contents, props changed)
- copied, changed from r683, trunk/openbios-devel/modules/pc-parts.c
trunk/openbios-devel/packages/sun-parts.c (contents, props changed)
- copied, changed from r683, trunk/openbios-devel/modules/sun-parts.c
trunk/openbios-devel/packages/video.c (props changed)
- copied unchanged from r683, trunk/openbios-devel/modules/video.c
trunk/openbios-devel/packages/xcoff-loader.c (contents, props changed)
- copied, changed from r683, trunk/openbios-devel/modules/xcoff-loader.c
Deleted:
trunk/openbios-devel/libopenbios/bootinfo-loader.c
trunk/openbios-devel/libopenbios/cmdline.c
trunk/openbios-devel/libopenbios/deblocker.c
trunk/openbios-devel/libopenbios/disk-label.c
trunk/openbios-devel/libopenbios/elf-loader.c
trunk/openbios-devel/libopenbios/filesystems.c
trunk/openbios-devel/libopenbios/init.c
trunk/openbios-devel/libopenbios/mac-parts.c
trunk/openbios-devel/libopenbios/mac-parts.h
trunk/openbios-devel/libopenbios/modules.h
trunk/openbios-devel/libopenbios/nvram.c
trunk/openbios-devel/libopenbios/pc-parts.c
trunk/openbios-devel/libopenbios/sun-parts.c
trunk/openbios-devel/libopenbios/support.fs
trunk/openbios-devel/libopenbios/video.c
trunk/openbios-devel/libopenbios/xcoff-loader.c
trunk/openbios-devel/modules/
Modified:
trunk/openbios-devel/arch/amd64/Kconfig
trunk/openbios-devel/arch/ia64/Kconfig
trunk/openbios-devel/arch/ppc/Kconfig
trunk/openbios-devel/arch/ppc/build.xml
trunk/openbios-devel/arch/ppc/mol/console.c
trunk/openbios-devel/arch/ppc/pearpc/console.c
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/Kconfig
trunk/openbios-devel/arch/x86/build.xml
trunk/openbios-devel/arch/x86/xbox/console.c
trunk/openbios-devel/build.xml
trunk/openbios-devel/config/scripts/switch-arch
trunk/openbios-devel/include/video_subr.h
trunk/openbios-devel/libopenbios/build.xml
Modified: trunk/openbios-devel/arch/amd64/Kconfig
==============================================================================
--- trunk/openbios-devel/arch/amd64/Kconfig Sun Mar 7 17:36:30 2010 (r684)
+++ trunk/openbios-devel/arch/amd64/Kconfig Sat Mar 13 11:58:19 2010 (r685)
@@ -44,5 +44,5 @@
source "kernel/Kconfig"
source "forth/Kconfig"
-source "modules/Kconfig"
+source "libopenbios/Kconfig"
source "drivers/Kconfig"
Modified: trunk/openbios-devel/arch/ia64/Kconfig
==============================================================================
--- trunk/openbios-devel/arch/ia64/Kconfig Sun Mar 7 17:36:30 2010 (r684)
+++ trunk/openbios-devel/arch/ia64/Kconfig Sat Mar 13 11:58:19 2010 (r685)
@@ -18,5 +18,5 @@
source "kernel/Kconfig"
source "forth/Kconfig"
-source "modules/Kconfig"
+source "libopenbios/Kconfig"
source "drivers/Kconfig"
Modified: trunk/openbios-devel/arch/ppc/Kconfig
==============================================================================
--- trunk/openbios-devel/arch/ppc/Kconfig Sun Mar 7 17:36:30 2010 (r684)
+++ trunk/openbios-devel/arch/ppc/Kconfig Sat Mar 13 11:58:19 2010 (r685)
@@ -44,5 +44,5 @@
source "kernel/Kconfig"
source "forth/Kconfig"
-source "modules/Kconfig"
+source "libopenbios/Kconfig"
source "drivers/Kconfig"
Modified: trunk/openbios-devel/arch/ppc/build.xml
==============================================================================
--- trunk/openbios-devel/arch/ppc/build.xml Sun Mar 7 17:36:30 2010 (r684)
+++ trunk/openbios-devel/arch/ppc/build.xml Sat Mar 13 11:58:19 2010 (r685)
@@ -153,7 +153,8 @@
<object source="timebase.S"/>
<external-object source="libbriq.a"/>
<external-object source="libbootstrap.a"/>
- <external-object source="libmodules.a"/>
+ <external-object source="libopenbios.a"/>
+ <external-object source="libpackages.a"/>
<external-object source="libdrivers.a"/>
<external-object source="libfs.a"/>
<external-object source="liblibc.a"/>
@@ -168,7 +169,8 @@
<object source="timebase.S"/>
<external-object source="libpearpc.a"/>
<external-object source="libbootstrap.a"/>
- <external-object source="libmodules.a"/>
+ <external-object source="libopenbios.a"/>
+ <external-object source="libpackages.a"/>
<external-object source="libdrivers.a"/>
<external-object source="libfs.a"/>
<external-object source="liblibc.a"/>
@@ -183,7 +185,8 @@
<object source="timebase.S"/>
<external-object source="libqemu.a"/>
<external-object source="libbootstrap.a"/>
- <external-object source="libmodules.a"/>
+ <external-object source="libopenbios.a"/>
+ <external-object source="libpackages.a"/>
<external-object source="libdrivers.a"/>
<external-object source="libfs.a"/>
<external-object source="liblibc.a"/>
@@ -198,7 +201,8 @@
<object source="start.S"/>
<external-object source="libmol.a"/>
<external-object source="libbootstrap.a"/>
- <external-object source="libmodules.a"/>
+ <external-object source="libopenbios.a"/>
+ <external-object source="libpackages.a"/>
<external-object source="libdrivers.a"/>
<external-object source="libfs.a"/>
<external-object source="liblibc.a"/>
Modified: trunk/openbios-devel/arch/ppc/mol/console.c
==============================================================================
--- trunk/openbios-devel/arch/ppc/mol/console.c Sun Mar 7 17:36:30 2010 (r684)
+++ trunk/openbios-devel/arch/ppc/mol/console.c Sat Mar 13 11:58:19 2010 (r685)
@@ -26,5 +26,5 @@
#define openbios_GetFBInfo(x) OSI_GetFBInfo(x)
-#include "../../../modules/video.c"
-#include "../../../modules/console.c"
+#include "../../../packages/video.c"
+#include "../../../libopenbios/console_common.c"
Modified: trunk/openbios-devel/arch/ppc/pearpc/console.c
==============================================================================
--- trunk/openbios-devel/arch/ppc/pearpc/console.c Sun Mar 7 17:36:30 2010 (r684)
+++ trunk/openbios-devel/arch/ppc/pearpc/console.c Sat Mar 13 11:58:19 2010 (r685)
@@ -39,6 +39,5 @@
#define openbios_GetFBInfo(x) PearPC_GetFBInfo(x)
-#include "../../../modules/video.c"
-
-#include "../../../modules/console.c"
+#include "../../../packages/video.c"
+#include "../../../libopenbios/console_common.c"
Modified: trunk/openbios-devel/arch/sparc32/build.xml
==============================================================================
--- trunk/openbios-devel/arch/sparc32/build.xml Sun Mar 7 17:36:30 2010 (r684)
+++ trunk/openbios-devel/arch/sparc32/build.xml Sat Mar 13 11:58:19 2010 (r685)
@@ -32,7 +32,8 @@
<object source="plainboot.c"/>
<external-object source="libsparc32.a"/>
<external-object source="libbootstrap.a"/>
- <external-object source="libmodules.a"/>
+ <external-object source="libopenbios.a"/>
+ <external-object source="libpackages.a"/>
<external-object source="libdrivers.a"/>
<external-object source="libfs.a"/>
<external-object source="liblibc.a"/>
@@ -66,7 +67,8 @@
<external-object source="target/arch/sparc32/builtin.o"/>
<external-object source="libsparc32.a"/>
<external-object source="libbootstrap.a"/>
- <external-object source="libmodules.a"/>
+ <external-object source="libopenbios.a"/>
+ <external-object source="libpackages.a"/>
<external-object source="libdrivers.a"/>
<external-object source="libfs.a"/>
<external-object source="liblibc.a"/>
Modified: trunk/openbios-devel/arch/sparc64/build.xml
==============================================================================
--- trunk/openbios-devel/arch/sparc64/build.xml Sun Mar 7 17:36:30 2010 (r684)
+++ trunk/openbios-devel/arch/sparc64/build.xml Sat Mar 13 11:58:19 2010 (r685)
@@ -33,7 +33,8 @@
<object source="plainboot.c"/>
<external-object source="libsparc64.a"/>
<external-object source="libbootstrap.a"/>
- <external-object source="libmodules.a"/>
+ <external-object source="libopenbios.a"/>
+ <external-object source="libpackages.a"/>
<external-object source="libdrivers.a"/>
<external-object source="libfs.a"/>
<external-object source="liblibc.a"/>
@@ -68,7 +69,8 @@
<external-object source="target/arch/sparc64/builtin.o"/>
<external-object source="libsparc64.a"/>
<external-object source="libbootstrap.a"/>
- <external-object source="libmodules.a"/>
+ <external-object source="libopenbios.a"/>
+ <external-object source="libpackages.a"/>
<external-object source="libdrivers.a"/>
<external-object source="libfs.a"/>
<external-object source="liblibc.a"/>
Modified: trunk/openbios-devel/arch/unix/build.xml
==============================================================================
--- trunk/openbios-devel/arch/unix/build.xml Sun Mar 7 17:36:30 2010 (r684)
+++ trunk/openbios-devel/arch/unix/build.xml Sat Mar 13 11:58:19 2010 (r685)
@@ -13,7 +13,8 @@
<object source="blk.c" flags="-DBOOTSTRAP"/>
<object source="plugins.c" flags="-DBOOTSTRAP" condition="PLUGINS"/>
<external-object source="libbootstrap.a"/>
- <external-object source="libmodules.a"/>
+ <external-object source="libopenbios.a"/>
+ <external-object source="libpackages.a"/>
<external-object source="libdrivers.a"/>
<external-object source="libfs.a"/>
<external-object source="liblibc.a"/>
Modified: trunk/openbios-devel/arch/x86/Kconfig
==============================================================================
--- trunk/openbios-devel/arch/x86/Kconfig Sun Mar 7 17:36:30 2010 (r684)
+++ trunk/openbios-devel/arch/x86/Kconfig Sat Mar 13 11:58:19 2010 (r685)
@@ -43,5 +43,5 @@
source "kernel/Kconfig"
source "forth/Kconfig"
-source "modules/Kconfig"
+source "libopenbios/Kconfig"
source "drivers/Kconfig"
Modified: trunk/openbios-devel/arch/x86/build.xml
==============================================================================
--- trunk/openbios-devel/arch/x86/build.xml Sun Mar 7 17:36:30 2010 (r684)
+++ trunk/openbios-devel/arch/x86/build.xml Sat Mar 13 11:58:19 2010 (r685)
@@ -30,7 +30,8 @@
<object source="multiboot.c"/>
<external-object source="libx86.a"/>
<external-object source="libbootstrap.a"/>
- <external-object source="libmodules.a"/>
+ <external-object source="libopenbios.a"/>
+ <external-object source="libpackages.a"/>
<external-object source="libdrivers.a"/>
<external-object source="liblibc.a"/>
<external-object source="libfs.a"/>
@@ -45,7 +46,8 @@
<object source="plainboot.c"/>
<external-object source="libx86.a"/>
<external-object source="libbootstrap.a"/>
- <external-object source="libmodules.a"/>
+ <external-object source="libopenbios.a"/>
+ <external-object source="libpackages.a"/>
<external-object source="libdrivers.a"/>
<external-object source="liblibc.a"/>
<external-object source="libfs.a"/>
@@ -79,7 +81,8 @@
<external-object source="target/arch/x86/builtin.o"/>
<external-object source="libx86.a"/>
<external-object source="libbootstrap.a"/>
- <external-object source="libmodules.a"/>
+ <external-object source="libopenbios.a"/>
+ <external-object source="libpackages.a"/>
<external-object source="libdrivers.a"/>
<external-object source="liblibc.a"/>
<external-object source="libfs.a"/>
Modified: trunk/openbios-devel/arch/x86/xbox/console.c
==============================================================================
--- trunk/openbios-devel/arch/x86/xbox/console.c Sun Mar 7 17:36:30 2010 (r684)
+++ trunk/openbios-devel/arch/x86/xbox/console.c Sat Mar 13 11:58:19 2010 (r685)
@@ -19,5 +19,5 @@
int rb, w, h, depth;
} osi_fb_info_t;
-#include "../../../modules/video.c"
-#include "../../../modules/console.c"
+#include "../../../packages/video.c"
+#include "../../../libopenbios/console_common.c"
Modified: trunk/openbios-devel/build.xml
==============================================================================
--- trunk/openbios-devel/build.xml Sun Mar 7 17:36:30 2010 (r684)
+++ trunk/openbios-devel/build.xml Sat Mar 13 11:58:19 2010 (r685)
@@ -5,7 +5,8 @@
<include href="forth/build.xml"/>
<include href="libc/build.xml"/>
<include href="libgcc/build.xml"/>
- <include href="modules/build.xml"/>
+ <include href="libopenbios/build.xml"/>
+ <include href="packages/build.xml"/>
<include href="drivers/build.xml"/>
<include href="fs/build.xml"/>
<include href="arch/build.xml"/>
Modified: trunk/openbios-devel/config/scripts/switch-arch
==============================================================================
--- trunk/openbios-devel/config/scripts/switch-arch Sun Mar 7 17:36:30 2010 (r684)
+++ trunk/openbios-devel/config/scripts/switch-arch Sat Mar 13 11:58:19 2010 (r685)
@@ -177,7 +177,8 @@
mkdir -p $OBJDIR/target/arch/x86/xbox
mkdir -p $OBJDIR/target/libgcc
mkdir -p $OBJDIR/target/kernel
- mkdir -p $OBJDIR/target/modules
+ mkdir -p $OBJDIR/target/libopenbios
+ mkdir -p $OBJDIR/target/packages
mkdir -p $OBJDIR/target/fs
mkdir -p $OBJDIR/target/fs/grubfs
mkdir -p $OBJDIR/target/fs/hfs
Modified: trunk/openbios-devel/include/video_subr.h
==============================================================================
--- trunk/openbios-devel/include/video_subr.h Sun Mar 7 17:36:30 2010 (r684)
+++ trunk/openbios-devel/include/video_subr.h Sat Mar 13 11:58:19 2010 (r685)
@@ -15,14 +15,14 @@
void vga_vbe_init(const char *path, unsigned long fb, uint32_t fb_size,
unsigned long rom, uint32_t rom_size);
-/* modules/video.c */
+/* packages/video.c */
int video_get_res(int *w, int *h);
void draw_pixel(int x, int y, int colind);
void set_color(int ind, unsigned long color);
void video_scroll(int height);
void init_video(unsigned long fb, int width, int height, int depth, int rb);
-/* modules/console_common.c */
+/* libopenbios/console_common.c */
int console_draw_str(const char *str);
int console_init(void);
void console_close(void);
Modified: trunk/openbios-devel/libopenbios/build.xml
==============================================================================
--- trunk/openbios-devel/modules/build.xml Mon Feb 22 19:52:34 2010 (r683)
+++ trunk/openbios-devel/libopenbios/build.xml Sat Mar 13 11:58:19 2010 (r685)
@@ -1,38 +1,24 @@
<build>
- <library name="modules" type="static" target="target">
- <object source="nvram.c"/>
- <object source="init.c"/>
+ <library name="openbios" type="static" target="target">
<object source="bindings.c"/>
+ <object source="bootinfo-loader.c" condition="PPC"/>
<object source="client.c"/>
- <object source="ipchecksum.c"/>
- <object source="video.c"/>
<object source="console_common.c"/>
<object source="elfnote.c" condition="X86"/>
<object source="elfnote.c" condition="AMD64"/>
<object source="elfnote.c" condition="SPARC32"/>
<object source="elfnote.c" condition="SPARC64"/>
<object source="elfload.c" condition="PPC"/>
- <object source="linuxbios.c" condition="LINUXBIOS"/>
- <object source="cmdline.c" condition="CMDLINE"/>
- <object source="deblocker.c" condition="DEBLOCKER"/>
- <object source="disk-label.c" condition="DISK_LABEL"/>
- <object source="filesystems.c" condition="FS"/>
- <object source="mac-parts.c" condition="MAC_PARTS"/>
- <object source="pc-parts.c" condition="PC_PARTS"/>
- <object source="sun-parts.c" condition="SUN_PARTS"/>
<object source="font_8x8.c" condition="FONT_8X8"/>
<object source="font_8x16.c" condition="FONT_8X16"/>
+ <object source="ipchecksum.c"/>
+ <object source="linuxbios.c" condition="LINUXBIOS"/>
<object source="ofmem_common.c" condition="OFMEM"/>
- <object source="elf-loader.c" condition="PPC"/>
- <object source="elf-loader.c" condition="SPARC64"/>
- <object source="xcoff-loader.c" condition="PPC"/>
- <object source="bootinfo-loader.c" condition="PPC"/>
</library>
<dictionary name="openbios" target="forth">
<object source="clib.fs"/>
- <object source="support.fs"/>
<object source="helpers.fs"/>
</dictionary>
Copied and modified: trunk/openbios-devel/packages/bootinfo-loader.c (from r683, trunk/openbios-devel/modules/bootinfo-loader.c)
==============================================================================
--- trunk/openbios-devel/modules/bootinfo-loader.c Mon Feb 22 19:52:34 2010 (r683, copy source)
+++ trunk/openbios-devel/packages/bootinfo-loader.c Sat Mar 13 11:58:19 2010 (r685)
@@ -16,7 +16,7 @@
#include "openbios/config.h"
#include "openbios/bindings.h"
-#include "modules.h"
+#include "packages.h"
#include "ofmem.h"
#include "libc/vsprintf.h"
Copied and modified: trunk/openbios-devel/packages/cmdline.c (from r683, trunk/openbios-devel/modules/cmdline.c)
==============================================================================
--- trunk/openbios-devel/modules/cmdline.c Mon Feb 22 19:52:34 2010 (r683, copy source)
+++ trunk/openbios-devel/packages/cmdline.c Sat Mar 13 11:58:19 2010 (r685)
@@ -16,7 +16,7 @@
#include "openbios/config.h"
#include "openbios/bindings.h"
-#include "modules.h"
+#include "packages.h"
#include "libc/vsprintf.h"
typedef struct {
Copied and modified: trunk/openbios-devel/packages/deblocker.c (from r683, trunk/openbios-devel/modules/deblocker.c)
==============================================================================
--- trunk/openbios-devel/modules/deblocker.c Mon Feb 22 19:52:34 2010 (r683, copy source)
+++ trunk/openbios-devel/packages/deblocker.c Sat Mar 13 11:58:19 2010 (r685)
@@ -17,7 +17,7 @@
#include "openbios/config.h"
#include "openbios/bindings.h"
#include "libc/diskio.h"
-#include "modules.h"
+#include "packages.h"
typedef struct {
ucell mark_hi, mark_lo;
Copied and modified: trunk/openbios-devel/packages/disk-label.c (from r683, trunk/openbios-devel/modules/disk-label.c)
==============================================================================
--- trunk/openbios-devel/modules/disk-label.c Mon Feb 22 19:52:34 2010 (r683, copy source)
+++ trunk/openbios-devel/packages/disk-label.c Sat Mar 13 11:58:19 2010 (r685)
@@ -17,7 +17,7 @@
#include "openbios/config.h"
#include "openbios/bindings.h"
#include "libc/diskio.h"
-#include "modules.h"
+#include "packages.h"
//#define DEBUG_DISK_LABEL
Copied and modified: trunk/openbios-devel/packages/elf-loader.c (from r683, trunk/openbios-devel/modules/elf-loader.c)
==============================================================================
--- trunk/openbios-devel/modules/elf-loader.c Mon Feb 22 19:52:34 2010 (r683, copy source)
+++ trunk/openbios-devel/packages/elf-loader.c Sat Mar 13 11:58:19 2010 (r685)
@@ -16,7 +16,7 @@
#include "openbios/config.h"
#include "openbios/bindings.h"
-#include "modules.h"
+#include "packages.h"
#include "ofmem.h"
#include "openbios/elf.h"
Copied and modified: trunk/openbios-devel/packages/init.c (from r683, trunk/openbios-devel/modules/init.c)
==============================================================================
--- trunk/openbios-devel/modules/init.c Mon Feb 22 19:52:34 2010 (r683, copy source)
+++ trunk/openbios-devel/packages/init.c Sat Mar 13 11:58:19 2010 (r685)
@@ -16,7 +16,7 @@
#include "openbios/config.h"
#include "openbios/kernel.h"
-#include "modules.h"
+#include "packages.h"
void
modules_init( void )
@@ -31,7 +31,7 @@
disklabel_init();
#endif
#ifdef CONFIG_FS
- filesystem_init();
+ files_init();
#endif
#ifdef CONFIG_MAC_PARTS
macparts_init();
Copied and modified: trunk/openbios-devel/packages/mac-parts.c (from r683, trunk/openbios-devel/modules/mac-parts.c)
==============================================================================
--- trunk/openbios-devel/modules/mac-parts.c Mon Feb 22 19:52:34 2010 (r683, copy source)
+++ trunk/openbios-devel/packages/mac-parts.c Sat Mar 13 11:58:19 2010 (r685)
@@ -17,7 +17,7 @@
#include "openbios/config.h"
#include "openbios/bindings.h"
#include "mac-parts.h"
-#include "modules.h"
+#include "packages.h"
#ifdef CONFIG_DEBUG_MAC_PARTS
#define DPRINTF(fmt, args...) \
Copied: trunk/openbios-devel/packages/mac-parts.h (from r683, trunk/openbios-devel/modules/mac-parts.h)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/openbios-devel/packages/mac-parts.h Sat Mar 13 11:58:19 2010 (r685, copy of r683, trunk/openbios-devel/modules/mac-parts.h)
@@ -0,0 +1,88 @@
+/*
+ * Creation Date: <1999/07/06 15:45:12 samuel>
+ * Time-stamp: <2002/10/20 16:31:48 samuel>
+ *
+ * <partition_table.h>
+ *
+ * Headers describing the partition table
+ *
+ * Copyright (C) 1999, 2002 Samuel Rydh (samuel(a)ibrium.se)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation
+ *
+ */
+
+#ifndef _H_PARTITION_TABLE
+#define _H_PARTITION_TABLE
+
+/* This information is based upon IM vol V. */
+
+#define DESC_MAP_SIGNATURE 0x4552
+#define DESC_PART_SIGNATURE 0x504d
+
+enum {
+ kPartitionAUXIsValid = 0x00000001,
+ kPartitionAUXIsAllocated = 0x00000002,
+ kPartitionAUXIsInUse = 0x00000004,
+ kPartitionAUXIsBootValid = 0x00000008,
+ kPartitionAUXIsReadable = 0x00000010,
+ kPartitionAUXIsWriteable = 0x00000020,
+ kPartitionAUXIsBootCodePositionIndependent = 0x00000040,
+ kPartitionISMountedAtStartup = 0x40000000,
+ kPartitionIsStartup = 0x80000000,
+ kPartitionIsChainCompatible = 0x00000100,
+ kPartitionIsRealDeviceDriver = 0x00000200,
+ kPartitionCanChainToNext = 0x00000400,
+};
+
+typedef struct {
+ long ddBlock; /* first block of driver */
+ short ddSize; /* driver size in blocks */
+ short ddType; /* 1 & -1 for SCSI */
+} driver_entry_t;
+
+typedef struct { /* Block 0 of a device */
+ short sbSig; /* always 0x4552 */
+ short sbBlockSize; /* 512 */
+ long sbBlkCount; /* #blocks on device */
+ short sbDevType; /* 0 */
+ short sbDevID; /* 0 */
+ long sbData; /* 0 */
+ short sbDrvrCount; /* #driver descriptors */
+
+ /* driver entries goes here */
+ driver_entry_t drivers[61] __attribute__ ((packed));
+
+ short filler1;
+ long filler2;
+} desc_map_t;
+
+typedef struct { /* Partition descriptor */
+ short pmSig; /* always 0x504d 'PM' */
+ short pmSigPad; /* 0 */
+ ulong pmMapBlkCnt; /* #blocks in partition map */
+ ulong pmPyPartStart; /* first physical block of part. */
+ ulong pmPartBlkCnt; /* #blocks in partition */
+ char pmPartName[32]; /* partition name */
+ char pmPartType[32]; /* partition type */
+
+ /* these fields may or may not be used */
+ ulong pmLgDataStart;
+ ulong pmDataCnt;
+ ulong pmPartStatus;
+ ulong pmLgBootStart;
+ ulong pmBootSize;
+ ulong pmBootLoad;
+ ulong pmBootLoad2;
+ ulong pmBootEntry;
+ ulong pmBootEntry2;
+ ulong pmBootCksum;
+ char pmProcessor[16];
+
+ char filler[376]; /* might contain extra information */
+} part_entry_t;
+
+
+#endif /* _H_PARTITION_TABLE */
Copied and modified: trunk/openbios-devel/packages/misc-files.c (from r683, trunk/openbios-devel/modules/filesystems.c)
==============================================================================
--- trunk/openbios-devel/modules/filesystems.c Mon Feb 22 19:52:34 2010 (r683, copy source)
+++ trunk/openbios-devel/packages/misc-files.c Sat Mar 13 11:58:19 2010 (r685)
@@ -19,7 +19,7 @@
#include "openbios/bindings.h"
#include "openbios/fs.h"
#include "libc/diskio.h"
-#include "modules.h"
+#include "packages.h"
#define PATHBUF_SIZE 256
#define VOLNAME_SIZE 64
@@ -331,7 +331,7 @@
void
-filesystem_init( void )
+files_init( void )
{
REGISTER_NODE( files );
}
Copied: trunk/openbios-devel/packages/nvram.c (from r683, trunk/openbios-devel/modules/nvram.c)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/openbios-devel/packages/nvram.c Sat Mar 13 11:58:19 2010 (r685, copy of r683, trunk/openbios-devel/modules/nvram.c)
@@ -0,0 +1,305 @@
+/*
+ * Creation Date: <2003/12/01 00:26:13 samuel>
+ * Time-stamp: <2004/01/07 19:59:53 samuel>
+ *
+ * <nvram.c>
+ *
+ * medium-level NVRAM handling
+ *
+ * Copyright (C) 2003, 2004 Samuel Rydh (samuel(a)ibrium.se)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * version 2
+ *
+ */
+
+#include "openbios/config.h"
+#include "openbios/bindings.h"
+#include "openbios/nvram.h"
+
+#ifdef CONFIG_DEBUG_NVRAM
+#define DPRINTF(fmt, args...) \
+do { printk("NVRAM: " fmt , ##args); } while (0)
+#else
+#define DPRINTF(fmt, args...) do {} while(0)
+#endif
+
+#define DEF_SYSTEM_SIZE 0xc10
+
+#define NV_SIG_SYSTEM 0x70
+#define NV_SIG_FREE 0x7f
+
+
+typedef struct {
+ uchar signature;
+ uchar checksum;
+ uchar len_hi;
+ uchar len_lo;
+ char name[12];
+ char data[0];
+} nvpart_t;
+
+static struct {
+ char *data;
+ int size;
+
+ nvpart_t *config;
+ int config_size;
+} nvram;
+
+
+/************************************************************************/
+/* generic */
+/************************************************************************/
+
+static unsigned int
+nvpart_checksum( nvpart_t* hdr )
+{
+ unsigned char *p = (unsigned char*)hdr;
+ int i, val = p[0];
+
+ for( i=2; i<16; i++ ) {
+ val += p[i];
+ if( val > 255 )
+ val = (val - 256 + 1) & 0xff;
+ }
+ return val;
+}
+
+static inline int
+nvpart_size( nvpart_t *p )
+{
+ return (p->len_lo | ((int)p->len_hi<<8)) * 16;
+}
+
+static int
+next_nvpart( nvpart_t **p )
+{
+ nvpart_t *end = (nvpart_t*)(nvram.data + nvram.size);
+ int len;
+
+ if( !*p ) {
+ *p = (nvpart_t*)nvram.data;
+ return 1;
+ }
+
+ if( !(len=nvpart_size(*p)) ) {
+ printk("invalid nvram partition length\n");
+ return -1;
+ }
+ *p = (nvpart_t*)((char*)*p + len);
+ if( *p < end )
+ return 1;
+ if( *p == end )
+ return 0;
+ return -1;
+}
+
+static void
+create_free_part( char *ptr, int size )
+{
+ nvpart_t *nvp = (nvpart_t*)ptr;
+ memset( nvp, 0, size );
+
+ strncpy( nvp->name, "777777777777", sizeof(nvp->name) );
+ nvp->signature = NV_SIG_FREE;
+ nvp->len_hi = (size /16) >> 8;
+ nvp->len_lo = size /16;
+ nvp->checksum = nvpart_checksum(nvp);
+}
+
+static int
+create_nv_part( int signature, const char *name, int size )
+{
+ nvpart_t *p = NULL;
+ int fs;
+
+ while( next_nvpart(&p) > 0 ) {
+ if( p->signature != NV_SIG_FREE )
+ continue;
+
+ fs = nvpart_size( p );
+ if( fs < size )
+ size = fs;
+ p->signature = signature;
+ memset( p->name, 0, sizeof(p->name) );
+ strncpy( p->name, name, sizeof(p->name) );
+ p->len_hi = (size>>8)/16;
+ p->len_lo = size/16;
+ p->checksum = nvpart_checksum(p);
+ if( fs > size ) {
+ char *fp = (char*)p + size;
+ create_free_part( fp, fs-size );
+ }
+ return size;
+ }
+ printk("create-failed\n");
+ return -1;
+}
+
+static void
+zap_nvram( void )
+{
+ create_free_part( nvram.data, nvram.size );
+ create_nv_part( NV_SIG_SYSTEM, "common", DEF_SYSTEM_SIZE );
+}
+
+#if 0
+static void
+show_partitions( void )
+{
+ nvpart_t *p = NULL;
+ char buf[13];
+
+ while( next_nvpart(&p) > 0 ) {
+ memcpy( buf, p->name, sizeof(p->name) );
+ buf[12] = 0;
+ printk("[%02x] %-13s: %03x\n",
+ p->signature, buf, nvpart_size(p));
+ }
+}
+#endif
+
+void
+update_nvram( void )
+{
+ PUSH( (ucell)nvram.config->data );
+ PUSH( nvram.config_size );
+ fword("nvram-store-configs");
+ arch_nvram_put( nvram.data );
+}
+
+void
+nvconf_init( void )
+{
+ int once=0;
+
+ /* initialize nvram structure completely */
+ nvram.config = NULL;
+ nvram.config_size = 0;
+
+ nvram.size = arch_nvram_size();
+ nvram.data = malloc( nvram.size );
+ arch_nvram_get( nvram.data );
+
+ bind_func( "update-nvram", update_nvram );
+
+ for( ;; ) {
+ nvpart_t *p = NULL;
+ int err;
+
+ while( (err=next_nvpart(&p)) > 0 ) {
+ if( nvpart_checksum(p) != p->checksum ) {
+ err = -1;
+ break;
+ }
+ if( p->signature == NV_SIG_SYSTEM ) {
+ nvram.config = p;
+ nvram.config_size = nvpart_size(p) - 0x10;
+
+ if( !once++ ) {
+ PUSH( (ucell)p->data );
+ PUSH( nvram.config_size );
+ fword("nvram-load-configs");
+ }
+ }
+ }
+ if( err || !nvram.config ) {
+ printk("nvram error detected, zapping pram\n");
+ zap_nvram();
+ if( !once++ )
+ fword("set-defaults");
+ continue;
+ }
+ break;
+ }
+}
+
+
+/************************************************************************/
+/* nvram */
+/************************************************************************/
+
+typedef struct {
+ uint mark_hi;
+ uint mark_lo;
+} nvram_ibuf_t;
+
+DECLARE_UNNAMED_NODE( nvram, INSTALL_OPEN, sizeof(nvram_ibuf_t ));
+
+/* ( pos_lo pos_hi -- status ) */
+static void
+nvram_seek( nvram_ibuf_t *nd )
+{
+ int pos_hi = POP();
+ int pos_lo = POP();
+
+ DPRINTF("seek %08x %08x\n", pos_hi, pos_lo );
+ nd->mark_lo = pos_lo;
+ nd->mark_hi = pos_hi;
+
+ if( nd->mark_lo >= nvram.size ) {
+ PUSH(-1);
+ return;
+ }
+
+ /* 0=success, -1=failure (1=legacy success) */
+ PUSH(0);
+}
+
+/* ( addr len -- actual ) */
+static void
+nvram_read( nvram_ibuf_t *nd )
+{
+ int len = POP();
+ char *p = (char*)POP();
+ int n=0;
+
+ while( nd->mark_lo < nvram.size && n < len ) {
+ *p++ = nvram.data[nd->mark_lo++];
+ n++;
+ }
+ PUSH(n);
+ DPRINTF("read %08x %x -- %x\n", (int)p, len, n);
+}
+
+/* ( addr len -- actual ) */
+static void
+nvram_write( nvram_ibuf_t *nd )
+{
+ int len = POP();
+ char *p = (char*)POP();
+ int n=0;
+
+ while( nd->mark_lo < nvram.size && n < len ) {
+ nvram.data[nd->mark_lo++] = *p++;
+ n++;
+ }
+ PUSH(n);
+ DPRINTF("write %08x %x -- %x\n", (int)p, len, n );
+}
+
+/* ( -- size ) */
+static void
+nvram_size( __attribute__((unused)) nvram_ibuf_t *nd )
+{
+ DPRINTF("nvram_size %d\n", nvram.size);
+ PUSH( nvram.size );
+}
+
+NODE_METHODS( nvram ) = {
+ { "size", (void*)nvram_size },
+ { "read", (void*)nvram_read },
+ { "write", (void*)nvram_write },
+ { "seek", (void*)nvram_seek },
+};
+
+
+void
+nvram_init( const char *path )
+{
+ nvconf_init();
+
+ REGISTER_NAMED_NODE( nvram, path );
+}
Copied and modified: trunk/openbios-devel/packages/packages.h (from r683, trunk/openbios-devel/modules/modules.h)
==============================================================================
--- trunk/openbios-devel/modules/modules.h Mon Feb 22 19:52:34 2010 (r683, copy source)
+++ trunk/openbios-devel/packages/packages.h Sat Mar 13 11:58:19 2010 (r685)
@@ -2,9 +2,9 @@
* Creation Date: <2003/12/23 00:32:12 samuel>
* Time-stamp: <2003/12/28 14:47:02 samuel>
*
- * <modules.h>
+ * <packages.h>
*
- * Module initialization
+ * Package initialization
*
* Copyright (C) 2003 Samuel Rydh (samuel(a)ibrium.se)
*
@@ -19,7 +19,7 @@
extern void deblocker_init( void );
extern void disklabel_init( void );
-extern void filesystem_init( void );
+extern void files_init( void );
extern void macparts_init( void );
extern void pcparts_init( void );
extern void sunparts_init( void );
Copied and modified: trunk/openbios-devel/packages/pc-parts.c (from r683, trunk/openbios-devel/modules/pc-parts.c)
==============================================================================
--- trunk/openbios-devel/modules/pc-parts.c Mon Feb 22 19:52:34 2010 (r683, copy source)
+++ trunk/openbios-devel/packages/pc-parts.c Sat Mar 13 11:58:19 2010 (r685)
@@ -15,7 +15,7 @@
#include "openbios/config.h"
#include "openbios/bindings.h"
#include "libc/byteorder.h"
-#include "modules.h"
+#include "packages.h"
typedef struct {
ullong offs;
Copied and modified: trunk/openbios-devel/packages/sun-parts.c (from r683, trunk/openbios-devel/modules/sun-parts.c)
==============================================================================
--- trunk/openbios-devel/modules/sun-parts.c Mon Feb 22 19:52:34 2010 (r683, copy source)
+++ trunk/openbios-devel/packages/sun-parts.c Sat Mar 13 11:58:19 2010 (r685)
@@ -15,7 +15,7 @@
#include "openbios/config.h"
#include "openbios/bindings.h"
#include "libc/byteorder.h"
-#include "modules.h"
+#include "packages.h"
#ifdef CONFIG_DEBUG_SUN_PARTS
#define DPRINTF(fmt, args...) \
Copied: trunk/openbios-devel/packages/video.c (from r683, trunk/openbios-devel/modules/video.c)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/openbios-devel/packages/video.c Sat Mar 13 11:58:19 2010 (r685, copy of r683, trunk/openbios-devel/modules/video.c)
@@ -0,0 +1,347 @@
+/*
+ * Creation Date: <2002/10/23 20:26:40 samuel>
+ * Time-stamp: <2004/01/07 19:39:15 samuel>
+ *
+ * <video.c>
+ *
+ * Mac-on-Linux display node
+ *
+ * Copyright (C) 2002, 2003, 2004 Samuel Rydh (samuel(a)ibrium.se)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation
+ *
+ */
+
+#include "openbios/config.h"
+#include "openbios/bindings.h"
+#include "libc/diskio.h"
+#include "ofmem.h"
+#include "openbios/drivers.h"
+#include "video_subr.h"
+
+typedef struct osi_fb_info {
+ unsigned long mphys;
+ int rb, w, h, depth;
+} osi_fb_info_t;
+
+static struct {
+ int has_video;
+ osi_fb_info_t fb;
+ ulong *pal; /* 256 elements */
+} video;
+
+
+int
+video_get_res( int *w, int *h )
+{
+ if( !video.has_video ) {
+ *w = *h = 0;
+ return -1;
+ }
+ *w = video.fb.w;
+ *h = video.fb.h;
+ return 0;
+}
+
+static void
+startup_splash( void )
+{
+#ifdef CONFIG_MOL
+ int fd, s, i, y, x, dx, dy;
+ int width, height;
+ char *pp, *p;
+ char buf[64];
+#endif
+
+ /* only draw logo in 24-bit mode (for now) */
+ if( video.fb.depth < 15 )
+ return;
+#ifdef CONFIG_MOL
+ for( i=0; i<2; i++ ) {
+ if( !BootHGetStrResInd("bootlogo", buf, sizeof(buf), 0, i) )
+ return;
+ *(!i ? &width : &height) = atol(buf);
+ }
+
+ if( (s=width * height * 3) > 0x20000 )
+ return;
+
+ if( (fd=open_io("pseudo:,bootlogo")) >= 0 ) {
+ p = malloc( s );
+ if( read_io(fd, p, s) != s )
+ printk("bootlogo size error\n");
+ close_io( fd );
+
+ dx = (video.fb.w - width)/2;
+ dy = (video.fb.h - height)/3;
+
+ pp = (char*)video.fb.mphys + dy * video.fb.rb + dx * (video.fb.depth >= 24 ? 4 : 2);
+
+ for( y=0 ; y<height; y++, pp += video.fb.rb ) {
+ if( video.fb.depth >= 24 ) {
+ ulong *d = (ulong*)pp;
+ for( x=0; x<width; x++, p+=3, d++ )
+ *d = ((int)p[0] << 16) | ((int)p[1] << 8) | p[2];
+ } else if( video.fb.depth == 15 ) {
+ ushort *d = (ushort*)pp;
+ for( x=0; x<width; x++, p+=3, d++ ) {
+ int col = ((int)p[0] << 16) | ((int)p[1] << 8) | p[2];
+ *d = ((col>>9) & 0x7c00) | ((col>>6) & 0x03e0) | ((col>>3) & 0x1f);
+ }
+ }
+ }
+ free( p );
+ }
+#else
+ /* No bootlogo support yet on other platforms */
+ return;
+#endif
+}
+
+static ulong
+get_color( int col_ind )
+{
+ ulong col;
+ if( !video.has_video || col_ind < 0 || col_ind > 255 )
+ return 0;
+ if( video.fb.depth == 8 )
+ return col_ind;
+ col = video.pal[col_ind];
+ if( video.fb.depth == 24 || video.fb.depth == 32 )
+ return col;
+ if( video.fb.depth == 15 )
+ return ((col>>9) & 0x7c00) | ((col>>6) & 0x03e0) | ((col>>3) & 0x1f);
+ return 0;
+}
+
+void
+draw_pixel( int x, int y, int colind )
+{
+ char *p = (char*)video.fb.mphys + video.fb.rb * y;
+ int color, d = video.fb.depth;
+
+ if( x < 0 || y < 0 || x >= video.fb.w || y >=video.fb.h )
+ return;
+ color = get_color( colind );
+
+ if( d >= 24 )
+ *((ulong*)p + x) = color;
+ else if( d >= 15 )
+ *((short*)p + x) = color;
+ else
+ *(p + x) = color;
+}
+
+static void
+fill_rect( int col_ind, int x, int y, int w, int h )
+{
+ char *pp;
+ ulong col = get_color(col_ind);
+
+ if( !video.has_video || x < 0 || y < 0 || x+w > video.fb.w || y+h > video.fb.h )
+ return;
+
+ pp = (char*)video.fb.mphys + video.fb.rb * y;
+ for( ; h--; pp += video.fb.rb ) {
+ int ww = w;
+ if( video.fb.depth == 24 || video.fb.depth == 32 ) {
+ ulong *p = (ulong*)pp + x;
+ while( ww-- )
+ *p++ = col;
+ } else if( video.fb.depth == 16 || video.fb.depth == 15 ) {
+ ushort *p = (ushort*)pp + x;
+ while( ww-- )
+ *p++ = col;
+ } else {
+ char *p = (char *)((ushort*)pp + x);
+
+ while( ww-- )
+ *p++ = col;
+ }
+ }
+}
+
+static void
+refresh_palette( void )
+{
+#ifdef CONFIG_MOL
+ if( video.fb.depth == 8 )
+ OSI_RefreshPalette();
+#endif
+}
+
+void
+set_color( int ind, ulong color )
+{
+ if( !video.has_video || ind < 0 || ind > 255 )
+ return;
+ video.pal[ind] = color;
+
+#ifdef CONFIG_MOL
+ if( video.fb.depth == 8 )
+ OSI_SetColor( ind, color );
+#elif defined(CONFIG_SPARC32)
+ if( video.fb.depth == 8 ) {
+ dac[0] = ind << 24;
+ dac[1] = ((color >> 16) & 0xff) << 24; // Red
+ dac[1] = ((color >> 8) & 0xff) << 24; // Green
+ dac[1] = (color & 0xff) << 24; // Blue
+ }
+#else
+ vga_set_color(ind, ((color >> 16) & 0xff),
+ ((color >> 8) & 0xff),
+ (color & 0xff));
+#endif
+}
+
+void
+video_scroll( int height )
+{
+ int i, offs, size, *dest, *src;
+
+ offs = video.fb.rb * height;
+ size = (video.fb.h * video.fb.rb - offs)/16;
+ dest = (int*)video.fb.mphys;
+ src = (int*)(video.fb.mphys + offs);
+
+ for( i=0; i<size; i++ ) {
+ dest[0] = src[0];
+ dest[1] = src[1];
+ dest[2] = src[2];
+ dest[3] = src[3];
+ dest += 4;
+ src += 4;
+ }
+}
+
+/************************************************************************/
+/* OF methods */
+/************************************************************************/
+
+DECLARE_NODE( video, INSTALL_OPEN, 0, "Tdisplay" );
+
+/* ( -- width height ) (?) */
+static void
+video_dimensions( void )
+{
+ int w, h;
+ (void) video_get_res( &w, &h );
+ PUSH( w );
+ PUSH( h );
+}
+
+/* ( table start count -- ) (?) */
+static void
+video_set_colors( void )
+{
+ int count = POP();
+ int start = POP();
+ uchar *p = (uchar*)POP();
+ int i;
+
+ for( i=0; i<count; i++, p+=3 ) {
+ ulong col = (p[0] << 16) | (p[1] << 8) | p[2];
+ set_color( i + start, col );
+ }
+ refresh_palette();
+}
+
+/* ( r g b index -- ) */
+static void
+video_color_bang( void )
+{
+ int index = POP();
+ int b = POP();
+ int g = POP();
+ int r = POP();
+ ulong col = ((r << 16) & 0xff0000) | ((g << 8) & 0x00ff00) | (b & 0xff);
+ /* printk("color!: %08lx %08lx %08lx %08lx\n", r, g, b, index ); */
+ set_color( index, col );
+ refresh_palette();
+}
+
+/* ( color_ind x y width height -- ) (?) */
+static void
+video_fill_rect( void )
+{
+ int h = POP();
+ int w = POP();
+ int y = POP();
+ int x = POP();
+ int color_ind = POP();
+
+ fill_rect( color_ind, x, y, w, h );
+}
+
+/* ( addr len -- actual ) */
+static void
+video_write(void)
+{
+ char *addr;
+ int len;
+
+ len = GETTOS();
+ addr = pop_fstr_copy();
+
+ console_draw_str(addr);
+ free(addr);
+ PUSH(len);
+}
+
+NODE_METHODS( video ) = {
+ {"dimensions", video_dimensions },
+ {"set-colors", video_set_colors },
+ {"fill-rectangle", video_fill_rect },
+ {"color!", video_color_bang },
+ {"write", video_write },
+};
+
+
+/************************************************************************/
+/* init */
+/************************************************************************/
+
+void
+init_video( unsigned long fb, int width, int height, int depth, int rb )
+{
+ int i, s, size;
+ phandle_t ph=0;
+
+ video.fb.mphys = fb;
+ video.fb.w = width;
+ video.fb.h = height;
+ video.fb.depth = depth;
+ video.fb.rb = rb;
+ while( (ph=dt_iterate_type(ph, "display")) ) {
+ set_property( ph, "width", (char*)&video.fb.w, 4 );
+ set_property( ph, "height", (char*)&video.fb.h, 4 );
+ set_property( ph, "depth", (char*)&video.fb.depth, 4 );
+ set_property( ph, "linebytes", (char*)&video.fb.rb, 4 );
+ set_property( ph, "address", (char*)&video.fb.mphys, 4 );
+ }
+ video.has_video = 1;
+ video.pal = malloc( 256 * sizeof(ulong) );
+
+ s = (video.fb.mphys & 0xfff);
+ size = ((video.fb.h * video.fb.rb + s) + 0xfff) & ~0xfff;
+ s = video.fb.mphys - s;
+
+#ifdef CONFIG_PPC
+ ofmem_claim_phys( video.fb.mphys, size, 0 );
+ ofmem_claim_virt( video.fb.mphys, size, 0 );
+ ofmem_map( video.fb.mphys, video.fb.mphys, size, -1 );
+#endif
+
+ for( i=0; i<256; i++ )
+ set_color( i, i * 0x010101 );
+
+ set_color( 254, 0xffffcc );
+ fill_rect( 254, 0, 0, video.fb.w, video.fb.h );
+
+ refresh_palette();
+ startup_splash();
+
+ REGISTER_NODE( video );
+}
Copied and modified: trunk/openbios-devel/packages/xcoff-loader.c (from r683, trunk/openbios-devel/modules/xcoff-loader.c)
==============================================================================
--- trunk/openbios-devel/modules/xcoff-loader.c Mon Feb 22 19:52:34 2010 (r683, copy source)
+++ trunk/openbios-devel/packages/xcoff-loader.c Sat Mar 13 11:58:19 2010 (r685)
@@ -16,7 +16,7 @@
#include "openbios/config.h"
#include "openbios/bindings.h"
-#include "modules.h"
+#include "packages.h"
#include "ofmem.h"
#include "openbios/xcoff.h"
1
0
To: Stefan Reinauer (and anyone else who wants to help)
Here is the documentation I said I would make. It is about how to add words to OpenBIOS using C functions. I am not sure where exactly it should go. My suggestion is on the OpenBIOS main page. Tell me what you think of this tutorial.
How to add “words” to the OpenBIOS Dictionary using the C language.
In this example, we are going to implement a forth “word” in C. There are two arrays that need to be looked at. One is located in the file openbios-devel/kernel/bootstrap.c. The other array is located in the file openbios-devel/kernel/primitives.c. The two arrays are used to map a C function to a forth word.
The array in bootstrap.c is where the name of the forth word would go. The array in primitives.c is where the corresponding C function would go. When adding to these arrays, make sure to add at the end of the list. This ensures everything continues to run smoothly.
Here is an example on adding to the dictionary. Say you want to add a word called dog. You can define the C function like this:
static void dog(void)
{
printk(“bark bark!”);
}
Add this function to a .c file. Knowing which file to pick can involve a lot of trial and error. In this example, we will use the file openbios-devel/kernel/forth.c. Be sure to include the static keyword before in the function declaration, or OpenBIOS won’t build successfully.
Now we add the word dog to the end of the forth word list. Open the file bootstrap.c, then find the array called wordnames. When adding the word dog, be sure the name of the word is surrounded in double quotes. Here is how the array should look:
/* the word names are used to generate the prim words in the
* dictionary. This is done by the C written interpreter.
*/
static const char *wordnames[] = {
"(semis)", "", "(lit)", "", "", "", "", "(do)", "(?do)", "(loop)",
"(+loop)", "", "", "", "dup", "2dup", "?dup", "over", "2over", "pick", "drop",
"2drop", "nip", "roll", "rot", "-rot", "swap", "2swap", ">r", "r>",
"r@", "depth", "depth!", "rdepth", "rdepth!", "+", "-", "*", "u*",
"mu/mod", "abs", "negate", "max", "min", "lshift", "rshift", ">>a",
"and", "or", "xor", "invert", "d+", "d-", "m*", "um*", "@", "c@",
"w@", "l@", "!", "+!", "c!", "w!", "l!", "=", ">", "<", "u>", "u<",
"sp@", "move", "fill", "(emit)", "(key?)", "(key)", "execute",
"here", "here!", "dobranch", "do?branch", "unaligned-w@",
"unaligned-w!", "unaligned-l@", "unaligned-l!", "ioc@", "iow@",
"iol@", "ioc!", "iow!", "iol!", "i", "j", "call", "sys-debug",
"$include", "$encode-file", "(debug", "(debug-off)", “dog” // <------- insert here
};
Next we add the C function name to the end of the function list. Open the file primitives.c and add dog (no quotes this time) to the end of the list. You may want to add a comment to the right indicating the word this c function corresponds to, but this isn’t necessary.
sysdebug, /* sys-debug */
do_include, /* $include */
do_encode_file, /* $encode-file */
do_debug_xt, /* (debug */
do_debug_off, /* (debug-off) */
dog /* dog */ //<-------- insert here
};
Now you should be ready to build OpenBIOS. Go to the shell and set the current directory to the root level of openbios-devel folder:
cd openbios-devel
Then change the build script to be able to execute:
chmod 777 ./config/scripts/switch-arch
Set the architure you wish to build openbios for (x86 is used in this example):
./config/scripts/switch-arch x86
Then start building OpenBIOS:
make
Once these commands are done, you need to be able to execute OpenBIOS. In this example we will be using the unix program version of OpenBIOS.
We run the program like this:
./obj-x86/openbios-unix ./obj-x86/openbios-unix.dict
We should then be greeted by the OpenBIOS Banner:
Welcome to OpenBIOS v1.0 built on Mar 9 2010 21:06
Type 'help' for detailed information
[unix] Booting default not supported.
0 >
Type dog at the prompt and see what it says:
0 > dog
bark bark! ok
0 >
Congratulations, you have just taken your first step to improving OpenBIOS.
1
0
Hi, I am trying to create a word that will parse all the characters up to a '}' on the same line. Does anyone have any idea as to how I can make this word read the characters in the input buffer while the interpret word is running? I thought about changing the value of the state variable to go from compile to interpret mode, but I still don't know how to access the input buffer. Any help would be great.
2
1
Author: blueswirl
Date: Sun Mar 7 17:36:30 2010
New Revision: 684
URL: http://tracker.coreboot.org/trac/openbios/changeset/684
Log:
Fix Unix target build on PPC host
Signed-off-by: Blue Swirl <blauwirbel(a)gmail.com>
Modified:
trunk/openbios-devel/arch/unix/unix.c
Modified: trunk/openbios-devel/arch/unix/unix.c
==============================================================================
--- trunk/openbios-devel/arch/unix/unix.c Mon Feb 22 19:52:34 2010 (r683)
+++ trunk/openbios-devel/arch/unix/unix.c Sun Mar 7 17:36:30 2010 (r684)
@@ -73,6 +73,13 @@
return 0;
}
+#ifdef CONFIG_PPC
+extern void flush_icache_range(char *start, char *stop);
+
+void flush_icache_range(char *start, char *stop)
+{
+}
+#endif
#if 0
static void write_dictionary(char *filename)
1
0
March 1, 2010
I want to build ofw for qemu,I do according the instruction on
https://www.openfirmware.info/Building_OFW_for_QEMU
I get the error
make: *** ../../../mingw32_nt-5.1:no such file or directory stop
make :*** ../../../mingw32_nt-5.1/forth error2
I type the msysinfo command and get
$ msysinfo
msysinfo-1.3: Send this to the MSYS support list:
MSYS 1.0.11(0.46/3/2) 2009-07-11 17:46 i686 unknown; targ=MINGW32
GNU bash, version 3.1.0(1)-release (i686-pc-msys); ENV=.profile
GNU Make 3.81This program built for i686-pc-msys; MAKE_MODE=unix
gcc.exe (GCC) 4.4.0; targ=MINGW32
GNU ld (GNU Binutils) 2.20
2009-07-12 02:34:34.000000000 +0800 /bin/msys-1.0.dll
2009-07-12 02:34:34.000000000 +0800 /bin/msys-bz2-1.dll
2009-07-31 13:14:14.000000000 +0800 /bin/msys-ltdl-7.dll
2003-01-02 08:05:27.000000000 +0800 /bin/msysltdl-3.dll
2009-07-12 02:34:33.000000000 +0800 /bin/make.exe
09-06-23 10:46:39.000000000 +0800 /mingw/bin/gcc.exe
2009-10-24 07:13:00.000000000 +0800 /mingw/bin/ld.exe
HOME=/home
Sysname=MINGW32_NT-5.1 OSTYPE=msys TERM=cygwin
PATH=.:/usr/local/bin:/mingw/bin:/bin:/c/Program Files/CollabNet
Subversion Client:/d/Perl/bin/:/c/Program Files/Java/jdk1.6.0_0
4/bin/:/d/oracle/ora92/bin:/c/Program Files/Oracle/jre/1.3.1/bin
:/c/Program Files/Oracle/jre/1.1.8/bin:/c/WINDOWS/system32:/c/WI
NDOWS:/c/WINDOWS/System32/Wbem:/c/PROGRA~1/Borland/Delphi6/Bin:/
c/PROGRA~1/Borland/Delphi6/Projects/Bpl:c:/tuxedo:/c/tuxedo/bin:
/c/MSSQL/BINN:/d/Program Files/Common Files/Powersoft Shared:/d/
Program Files/Powersoft/PowerBuilder 5.0/Advanced Developer Tool
kit/Foundation Class Library:/d/SQLANY50/win32:/d/Program Files/
Powersoft/InfoMaker 5.0:/d/Program Files/pb5i32dk:/c/Program Fil
es/Microsoft SQL Server/80/Tools/BINN:/c/Program Files/Microsoft
SQL Server/90/Tools/binn/:/c/Program Files/Qemu/:/c/Program Fil
es/TortoiseSVN/bin:/c/Program Files/apache-maven-2.2.1/bin:/c/Su
n/AppServer/bin:/mingw/bin:/c/Program Files/OpenVPN/bin
$ ls -tx /home
.bash_history tmp/
appreciate any help
1
0