diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2010-12-30 22:45:29 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2010-12-30 22:45:29 +0100 |
commit | 220a96f9926788ed531717f78e44fdf1e7ab3b34 (patch) | |
tree | 406f65eea71fabd8cf66c2bd1108ec63f8c349ee /scripts/update-sys | |
parent | 38af8185ea05a1c5d1abb32a68a025e3b4afa4d6 (diff) |
rework architecture / embedded systems concept
Make configuration of new targets cheap.
Just add a new file in target/arch/sys-enabled/foo.
See other files for syntax. While doing runtime tests
with the new infrastructure I've updated a lot of other
stuff:
- gcc 4.5.2
- uClibc 0.9.32-rc1 (NPTL)
- strongswan, php, miredo, parted, util-linux-ng, e2fsprogs
I promise, this is the last big fat commit this year ;)
Diffstat (limited to 'scripts/update-sys')
-rwxr-xr-x | scripts/update-sys | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/scripts/update-sys b/scripts/update-sys new file mode 100755 index 000000000..6a40aff36 --- /dev/null +++ b/scripts/update-sys @@ -0,0 +1,48 @@ +#!/bin/sh +topdir=$(readlink -nf $(dirname $0)/.. 2>/dev/null || (cd $(dirname $0)/..; pwd -P)) + +defaults() { + echo 'source "target/config/Config.in.arch.default"' > $topdir/target/config/Config.in.arch + echo 'source "target/config/Config.in.arch.choice"' >> $topdir/target/config/Config.in.arch + echo 'source "target/config/Config.in.system.default"' > $topdir/target/config/Config.in.system + echo 'source "target/config/Config.in.system.choice"' >> $topdir/target/config/Config.in.system + exit 0 +} + +for i in $(ls $topdir/target/);do + if [ -d "$topdir/target/$i/sys-enabled" ];then + cat $topdir/target/$i/sys-enabled/* > $topdir/target/$i/Config.in.systems 2>/dev/null + fi +done +if [ -f $topdir/.config ];then +arch=$(grep ^ADK_TARGET_ARCH $topdir/.config|cut -f 2 -d = | sed -e 's#"##g') +systemsym=$(grep ^ADK_TARGET_SYSTEM_ $topdir/.config|cut -f 1 -d =) +system=$(grep ^ADK_TARGET_SYSTEM= $topdir/.config|cut -f 2 -d = | sed -e 's#"##g') +systems=$(grep ^ADK_TARGET_SYSTEM= $topdir/.config|cut -f 2 -d = | sed -e 's#"##g'|sed -e 's#-#_#g') +archsym=$(echo ADK_LINUX_$arch|tr '[:lower:]-' '[:upper:]') + +if [ -z "$arch" -o -z "$system" ];then + defaults +fi + +cat > $topdir/target/config/Config.in.arch << EOF +source "target/config/Config.in.arch.default" +config $archsym + bool +EOF + +cat > $topdir/target/config/Config.in.system << EOF +source "target/config/Config.in.system.default" +comment "Architecture: $arch" +comment "System: $system" + +config $systemsym + boolean + select $archsym +$(grep select $topdir/target/$arch/sys-available/$system) + default y +EOF +else + defaults +fi +exit 0 |