[openfirmware] [commit] r2504 - cpu/arm/olpc/1.75
repository service
svn at openfirmware.info
Fri Sep 9 03:48:38 CEST 2011
Author: wmb
Date: Fri Sep 9 03:48:38 2011
New Revision: 2504
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2504
Log:
OLPC XO-1.75 - automatically pull and build cforth in a subdirectory
of the OFW build directory.
Added:
cpu/arm/olpc/1.75/cforth-version.fth
cpu/arm/olpc/1.75/cforth.bth
Modified:
cpu/arm/olpc/1.75/olpc.bth
Added: cpu/arm/olpc/1.75/cforth-version.fth
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ cpu/arm/olpc/1.75/cforth-version.fth Fri Sep 9 03:48:38 2011 (r2504)
@@ -0,0 +1,15 @@
+\ This file controls which CForth source version to include in the OFW build
+\ and the method for fetching it
+
+\ If CFORTH_VERSION is "modify", the repository will be cloned with git+ssh: so can push changes.
+\ You need ssh access to the server.
+\ macro: CFORTH_VERSION modify
+
+\ If CFORTH_VERSION is "clone", the repository will be cloned with git:. You won't be able to
+\ push changes, but you will get the full metadata so you can use commands like git grep.
+\ You don't need ssh access to the server.
+\ macro: CFORTH_VERSION clone
+
+\ Otherwise, the source code will be will be downloaded as a tarball via gitweb.
+\ macro: CFORTH_VERSION 59859f04454bc2574ab68cf0fd76ebdbc5f26fb6
+macro: CFORTH_VERSION HEAD
Added: cpu/arm/olpc/1.75/cforth.bth
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ cpu/arm/olpc/1.75/cforth.bth Fri Sep 9 03:48:38 2011 (r2504)
@@ -0,0 +1,42 @@
+purpose: Fetch and compile CForth for the Security Processor
+
+command: &builder &this
+build-now
+
+fload ${BP}/cpu/arm/olpc/1.75/cforth-version.fth
+
+macro: CFORTH_BUILD_DIR cforth/build/arm-xo-1.75
+
+\ Don't re-fetch the cforth source, thus preventing overwrites of development modifications.
+\ If you change cforth-version.fth to specify a different cforth source version, you must
+\ manually delete the old cforth subtree.
+
+" ${CFORTH_BUILD_DIR}/Makefile" expand$ $file-exists? 0= [if]
+ " ${CFORTH_VERSION}" expand$ " modify" $= [if]
+ " git clone -q git+ssh://dev.laptop.org/git/users/wmb/cforth" expand$ $sh
+ [else]
+ " ${CFORTH_VERSION}" expand$ " clone" $= [if]
+ " git clone -q git://dev.laptop.org/users/wmb/cforth" expand$ $sh
+ [else]
+ " wget -q -O - http://dev.laptop.org/git/users/wmb/cforth/snapshot/cforth-${CFORTH_VERSION}.tar.gz | tar xfz -" expand$ $sh
+ " mv cforth-${CFORTH_VERSION} cforth" expand$ $sh
+ " wget -q -O - http://dev.laptop.org/git/users/wmb/cforth/patch | head -1 | cut -f 2 -d ' ' >>${CFORTH_BUILD_DIR}/version" expand$ $sh
+ \ " echo -n const char cforth_version[] = '""' >${CFORTH_BUILD_DIR}/cforth_version.c" expand$ $sh
+ \ " wget -q -O - http://dev.laptop.org/git/users/wmb/cforth/patch | head -1 | cut -f 2 -d ' ' >>${CFORTH_BUILD_DIR}/cforth_version.c" expand$ $sh
+ \ " echo '"";' >>${CFORTH_BUILD_DIR}/cforth_version.c" expand$ $sh
+ [then]
+ [then]
+[then]
+
+" (cd ${CFORTH_BUILD_DIR}; make --no-print-directory)" expand$ $sh
+
+\ If the above make changed either cforth.img or shim.img, copy the new one into this directory,
+\ thus triggering a rebuild of the OFW .rom file
+
+" cforth.img" modtime " ${CFORTH_BUILD_DIR}/cforth.img" expand$ modtime < [if]
+ " (cp ${CFORTH_BUILD_DIR}/cforth.img .)" expand$ $sh
+[then]
+
+" shim.img" modtime " ${CFORTH_BUILD_DIR}/shim.img" expand$ modtime < [if]
+ " (cp ${CFORTH_BUILD_DIR}/shim.img .)" expand$ $sh
+[then]
Modified: cpu/arm/olpc/1.75/olpc.bth
==============================================================================
--- cpu/arm/olpc/1.75/olpc.bth Sat Sep 3 17:55:57 2011 (r2503)
+++ cpu/arm/olpc/1.75/olpc.bth Fri Sep 9 03:48:38 2011 (r2504)
@@ -15,6 +15,7 @@
in: ${BP}/dev/usb2/device/storage/build/usbstorage.fc
in: testicons.bin
in: ${BP}/clients/emacs/arm/emacs
+in: cforth.img
build-now
fload ${BP}/cpu/arm/olpc/1.75/fw-version.fth
@@ -48,8 +49,8 @@
\ Main Processor code loaded into DRAM
image: OBMI 800 d101c000 ${BP}/cpu/arm/olpc/1.75/dummy.img
\ Secure Processor code loaded into SRAM
-image: WTMI 1000 d1018000 ${BP}/../cforth/build/arm-xo-1.75/shim.img
-image: CFTH 2000 d1000000 ${BP}/../cforth/build/arm-xo-1.75/app.img
+image: WTMI 1000 d1018000 shim.img
+image: CFTH 2000 d1000000 cforth.img
\ anonymous: 20000 ${BP}/cpu/arm/olpc/1.75/build/fw.img
reserved:
\ fload ${BP}/cpu/arm/olpc/1.75/ddr_samsung_1g.fth
More information about the openfirmware
mailing list