blob: f847e4e827f2dc74a52f31e5d040359737d0778a [file] [log] [blame]
purpose: Construct the Open Firmware module collection
command: &builder &this
in: ${BP}/cpu/arm/mmp3/ariel/build/fw.img
in: ${BP}/cpu/arm/mmp3/ariel/build/resetvec.img
in: ${BP}/dev/usb2/device/hub/build/hub.fc
in: ${BP}/dev/usb2/device/generic/build/generic.fc
in: ${BP}/dev/usb2/device/net/build/usbnet.fc
in: ${BP}/dev/usb2/device/keyboard/build/usbkbd.fc
in: ${BP}/dev/usb2/device/mouse/build/usbmouse.fc
in: ${BP}/dev/usb2/device/serial/build/usbserial.fc
in: ${BP}/dev/usb2/device/storage/build/usbstorage.fc
in: ${BP}/clients/emacs/arm/emacs
in: cforth.img
build-now
fload ${BP}/cpu/arm/mmp3/ariel/config.fth
\ Always re-create the builton.fth file when we make a new rom.img
fload ${BP}/cpu/x86/pc/builton.bth
fload ${BP}/forth/lib/crc32.fth
hex
: pad-file ( location -- )
ofd @ fsize
2dup u< abort" The ROM image is too large"
?do h# ff ofd @ fputc loop
;
fload ${BP}/cpu/arm/marvell/tim.fth
\ Marvell Non-Trusted Image Module image creation script for XO-4.0 platform.
tim: 00030400 0 DELL PXA212x
flash: SPI'10
timh: TIMH 0 d101f000
image: OBMI 2000 d1000000 cforth.img
reserved:
\ Disable USB download/init by enabling the FFUART for download
\ This works around a PHY init erratum for the B0 chip
uart: 00004646 1
term:
end-reserved
end-tim
h# 20.0000 to reserved-start
h# 20.0000 to reserved-end
.( --- Saving as ofw.rom ) cr
writing ofw.rom
tim$ ofd @ fputs
dropin-offset pad-file
\ Loads the set of drivers that is common to different output formats
" ${BP}/cpu/arm/build/inflate.bin" " inflate" $add-dropin
" fw.img" " firmware" $add-deflated-dropin
\ " fw.img" " firmware" $add-dropin
" resetvec.img" " reset" $add-dropin
" ${BP}/cpu/arm/mmp3/gic.fth" " mmp3-gic-" $add-dropin
" ${BP}/cpu/arm/olpc/4.0/compat.fth" " olpc-compat-" $add-dropin
\ " ${BP}/dev/usb2/hcd/ehci/build/ehci.fc" " class0c0320" $add-deflated-dropin
" ${BP}/dev/usb2/device/hub/build/hub.fc" " usb,class9" $add-deflated-dropin
" ${BP}/dev/usb2/device/generic/build/generic.fc" " usbdevice" $add-deflated-dropin
" ${BP}/dev/usb2/device/net/build/usbnet.fc" " usbnet" $add-deflated-dropin
" ${BP}/dev/usb2/device/keyboard/build/usbkbd.fc" " usb,class3,1,1" $add-deflated-dropin
" ${BP}/dev/usb2/device/mouse/build/usbmouse.fc" " usb,class3,1,2" $add-deflated-dropin
" ${BP}/dev/usb2/device/serial/build/usbserial.fc" " usbserial" $add-deflated-dropin
" ${BP}/dev/usb2/device/storage/build/usbstorage.fc" " usbstorage" $add-deflated-dropin
" builton.fth" " probe-" $add-dropin
" ${BP}/ofw/inet/telnetd.fth" " telnetd" $add-deflated-dropin
" ${BP}/ofw/termemu/gallant.obf" " font" $add-deflated-dropin
" ${BP}/clients/emacs/x86/emacs.rc" " emacs.rc" $add-deflated-dropin
" ${BP}/clients/emacs/emacs.hlp" " emacs.hlp" $add-deflated-dropin
" ${BP}/clients/emacs/arm/emacs" " emacs" $add-deflated-dropin
.( Dropin top is ) ofd @ fsize .x cr
/rom pad-file
\ Insert the machine signature
h# 10 buffer: signature
signature h# 10 blank
signature$ signature swap move
signature-offset ofd @ fseek
signature h# 10 ofd @ fputs
/l buffer: crcbuf
/rom buffer: filebuf
\ Read the entire image, compute the CRC, and store it in the CRC location
0 ofd @ fseek
filebuf /rom ofd @ fgets /rom <> abort" Can't read back image"
0 crctab filebuf /rom ($crc) crcbuf !
crc-offset ofd @ fseek
crcbuf /l ofd @ fputs
ofd @ fclose
\ LICENSE_BEGIN
\ Copyright (c) 2010 FirmWorks
\ Copyright (c) 2020 Lubomir Rintel <lkundrak@v3.sk>
\
\ Permission is hereby granted, free of charge, to any person obtaining
\ a copy of this software and associated documentation files (the
\ "Software"), to deal in the Software without restriction, including
\ without limitation the rights to use, copy, modify, merge, publish,
\ distribute, sublicense, and/or sell copies of the Software, and to
\ permit persons to whom the Software is furnished to do so, subject to
\ the following conditions:
\
\ The above copyright notice and this permission notice shall be
\ included in all copies or substantial portions of the Software.
\
\ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
\ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
\ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
\ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
\ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\
\ LICENSE_END