Author: wmb Date: 2007-09-18 01:06:51 +0200 (Tue, 18 Sep 2007) New Revision: 606
Modified: cpu/x86/basefw.bth dev/mmc/sdhci/sdhci.bth dev/mmc/sdhci/sdhci.fth forth/lib/objects.fth ofw/confvar/loadcv.fth ofw/core/loadmore.fth Log: Added various ifdefs in the build process to accomodate building a stripped-down image for firmware recovery.
Modified: cpu/x86/basefw.bth =================================================================== --- cpu/x86/basefw.bth 2007-09-17 22:52:04 UTC (rev 605) +++ cpu/x86/basefw.bth 2007-09-17 23:06:51 UTC (rev 606) @@ -22,7 +22,9 @@ \ fload ${BP}/forth/lib/showmsgs.fth \ List error messages
fload ${BP}/ofw/core/ofwcore.fth \ Device tree and other OBP routines +[ifndef] no-tools fload ${BP}/ofw/core/ofwfw.fth \ FirmWorks enhancements +[then]
fload ${BP}/ofw/core/memops.fth \ Call memory node methods fload ${BP}/ofw/core/mmuops.fth \ Call MMU node methods @@ -33,14 +35,18 @@ fload ${BP}/cpu/x86/vector.fth \ Interrupt vectors \ fload ${BP}/forth/lib/struct.fth fload ${BP}/cpu/x86/interrup.fth \ Enable and disable interrupts +[ifdef] pssave fload ${BP}/cpu/x86/catchexc.fth
fload ${BP}/cpu/x86/ctrace.fth \ C stack backtrace +[then]
+[ifdef] valid-adr? : mapped? ( adr -- flag ) " translate" mmu-node @ $call-method dup if nip nip then ; ' mapped? to valid-adr? +[then]
fload ${BP}/cpu/x86/descr.fth \ Decode segment descriptors fload ${BP}/cpu/x86/dtacc.fth \ Descriptor table access words @@ -49,7 +55,9 @@ fload ${BP}/ofw/core/silentmd.fth \ NVRAM variable silent-mode?
fload ${BP}/cpu/x86/call.fth \ Primitive subroutine calls +[ifndef] no-tools fload ${BP}/cpu/x86/centry.fth \ Low-level client entry and exit +[then]
[ifdef] v2-compat fload ${BP}/cpu/x86/textops.fth \ S Machine code for 1-bit ops @@ -70,9 +78,11 @@
fload ${BP}/cpu/x86/regacc.fth \ Register access words
+\ [ifndef] no-tools fload ${BP}/ofw/fcode/loadfcod.fth \ S Fcode interpreter
fload ${BP}/ofw/fcode/regcodes.fth \ Register access words +\ [then]
\ File system readers fload ${BP}/ofw/core/initprog.fth \ handle fcode and Forth source @@ -84,15 +94,18 @@ fload ${BP}/ofw/fs/fatfs/loadpkg.fth \ FAT file system reader end-support-package
+[ifndef] no-tools support-package: iso9660-file-system fload ${BP}/ofw/fs/cdfs/loadpkg.fth \ ISO 9660 CD-ROM file system reader end-support-package +[then]
support-package: disk-label fload ${BP}/ofw/disklabel/loadpkg.fth \ Disk label package end-support-package [then]
+[ifndef] no-tools [ifdef] resident-packages fload ${BP}/ofw/fs/fatfs/fdisk2.fth \ Partition map administration [else] @@ -102,6 +115,7 @@ \ defines: init-nt-disk defines: $partition [then] +[then]
[ifndef] no-heads resident dispose 0 0 set-transize \ true is suppress-transient
Modified: dev/mmc/sdhci/sdhci.bth =================================================================== --- dev/mmc/sdhci/sdhci.bth 2007-09-17 22:52:04 UTC (rev 605) +++ dev/mmc/sdhci/sdhci.bth 2007-09-17 23:06:51 UTC (rev 606) @@ -9,6 +9,13 @@
FCode-version2 fload ${BP}/dev/mmc/sdhci/sdhci.fth + +init +new-device + " sdmmc" " $load-driver" eval drop +finish-device + + fload ${BP}/dev/mmc/sdhci/selftest.fth end0
Modified: dev/mmc/sdhci/sdhci.fth =================================================================== --- dev/mmc/sdhci/sdhci.fth 2007-09-17 22:52:04 UTC (rev 605) +++ dev/mmc/sdhci/sdhci.fth 2007-09-17 23:06:51 UTC (rev 606) @@ -608,15 +608,9 @@ h# 7fff h# 60 cw! unmap-regs ; -init
external
-new-device - " sdmmc" " $load-driver" eval drop -finish-device - - \ LICENSE_BEGIN \ Copyright (c) 2006 FirmWorks \
Modified: forth/lib/objects.fth =================================================================== --- forth/lib/objects.fth 2007-09-17 22:52:04 UTC (rev 605) +++ forth/lib/objects.fth 2007-09-17 23:06:51 UTC (rev 606) @@ -137,11 +137,13 @@ \ will not show the action name and its argument on separate lines \ if it happens to be near the end of a line.
+[ifdef] install-decomp : .action ( ip -- ip' ) dup token@ .name ta1+ dup token@ .name ta1+ ; also hidden also ' to ' .action ' skip-(') install-decomp ' addr ' .action ' skip-(') install-decomp previous previous +[then]
: ?has-action ( object-acf action-acf -- object-acf action-acf ) 2dup >body >action# >action-adr .object-error 2drop @@ -158,6 +160,7 @@ -level \ Exit temporary compile state, perhaps run word ;
+[ifdef] object-definer : (object-definer) ( action-acf -- definer ) dup /n - @ ( action-acf #actions ) 1- /token * - /n - token@ ( last-action-acf ) @@ -170,6 +173,7 @@ until ; also hidden ' (object-definer) is object-definer previous +[then]
\ action-compiler: to action-compiler: addr
Modified: ofw/confvar/loadcv.fth =================================================================== --- ofw/confvar/loadcv.fth 2007-09-17 22:52:04 UTC (rev 605) +++ ofw/confvar/loadcv.fth 2007-09-17 23:06:51 UTC (rev 606) @@ -4,7 +4,9 @@ fload ${BP}/ofw/ppp/md5.fth fload ${BP}/ofw/confvar/conftype.fth \ Configuration variable base types fload ${BP}/ofw/confvar/nvramrcg.fth \ NVRAMRC (generic version) +[ifndef] no-tools fload ${BP}/ofw/confvar/nvalias.fth \ Persistent devaliases +[then] fload ${BP}/ofw/confvar/nvcache.fth \ NVRAM cache fload ${BP}/ofw/confvar/nameval.fth \ name=value config variable encoding \ LICENSE_BEGIN
Modified: ofw/core/loadmore.fth =================================================================== --- ofw/core/loadmore.fth 2007-09-17 22:52:04 UTC (rev 605) +++ ofw/core/loadmore.fth 2007-09-17 23:06:51 UTC (rev 606) @@ -1,5 +1,6 @@ purpose: Load file for additional core routines
+[ifndef] no-tools \ Load code to recognize client program header \ fload ${BP}/ofw/core/go.fth \ Initial program state
@@ -9,11 +10,14 @@ \ fload ${BP}/ofw/core/dload.fth \ Diagnostic loading
fload ${BP}/ofw/core/callback.fth \ Client callbacks +[then]
fload ${BP}/ofw/core/deblock.fth \ Block-to-byte conversion package
+[ifndef] no-tools fload ${BP}/ofw/core/dl.fth \ Diagnostic loading fload ${BP}/ofw/core/dlfcode.fth \ Serial line loading +[then]
fload ${BP}/ofw/core/instcons.fth \ install-console