From 4bfce3b6e2ea095ea3d9f5d2d1018cc0a1e5ce09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20K=C3=BChling?= Date: Sat, 18 Sep 2010 20:47:21 +0200 Subject: Major overhaul and cleanup. Support for .ubi image file installations. Only compile&install a minimum host Gforth for bootstrapping the target Gforth, removing strange emacs-dependencies that cropped up earlier. Image file can now be built on the nanonote using 'gforth-update-image' command. Also, Gforth is now run through a wrapper that calls 'gforth-update-image' automatically, if necessary. Also first attempts at supporting libcc C-interface libraries pre-compiled on the host. Tested to compile on amd64 and i386. --- gforth/files/gforth-update-image.in | 60 +++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 gforth/files/gforth-update-image.in (limited to 'gforth/files/gforth-update-image.in') diff --git a/gforth/files/gforth-update-image.in b/gforth/files/gforth-update-image.in new file mode 100644 index 0000000..5d51434 --- /dev/null +++ b/gforth/files/gforth-update-image.in @@ -0,0 +1,60 @@ +#! /bin/sh +# +# Part of gforth package for OpenWrt: update Gforth pre-compiled interpreter +# image from installed sources +# +# Copyright (C) 2010 David Kuehling +# +# License: GPLv3+, NO WARRANTY +# + +# Rationale for choice of stack sizes, see Gforth Manual chapter 13.6 +FORTHSIZES="--dictionary-size=1M \ + --data-stack-size=16k \ + --fp-stack-size=15872 \ + --return-stack-size=15360 \ + --locals-stack-size=14848" + +STARTUP="exboot.fs startup.fs @asm_fs@ @disasm_fs@" + +FORTHKFLAGS="--die-on-signal -i @kernel_fi@" + +GFORTH_SHARE_DIR=/usr/share/gforth/@PACKAGE_VERSION@ +GFORTH_LIB_DIR=/usr/lib/gforth/@PACKAGE_VERSION@ +GFORTH_BIN_DIR=/usr/bin + +GFORTH_FI=${GFORTH_LIB_DIR}/gforth.fi + +echo "Creating Gforth interpreter image..." + +mkdir -p $GFORTH_LIB_DIR + +check_writable(){ + if [ -f $GFORTH_FI ] && ! [ -w $GFORTH_FI ]; then + return 1 + elif ! [ -w $GFORTH_LIB_DIR ]; then + return 1 + fi + + return 0 +} + +if ! check_writable; then + cat <