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