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/create-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/create-sys')
-rwxr-xr-x | scripts/create-sys | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/scripts/create-sys b/scripts/create-sys new file mode 100755 index 000000000..7af098868 --- /dev/null +++ b/scripts/create-sys @@ -0,0 +1,46 @@ +#!/usr/bin/env bash +topdir=$(readlink -nf $(dirname $0)/.. 2>/dev/null || (cd $(dirname $0)/..; pwd -P)) +systems=$(grep -h config target/*/sys-available/*|cut -d " " -f 2) + +while read arch; do + count=1 + cd $topdir/target/$arch/sys-enabled/ && + ln -sf ../sys-available/toolchain 0-toolchain + for i in $(ls $topdir/target/$arch/sys-available/|grep -v toolchain);do + cd $topdir/target/$arch/sys-enabled/ && + ln -sf ../sys-available/$i $count-$i + count=$((count+1)) + done +done <${topdir}/target/arch.lst + +cat > $topdir/target/config/Config.in.system.default << EOD +config ADK_qemu + boolean + +config ADK_toolchain + boolean + +EOD + +for j in $systems;do + system=${j#ADK_TARGET_SYSTEM_} + systemu=$(echo $system|tr '[:upper:]' '[:lower:]') + printf "config ADK_$systemu\n" >> $topdir/target/config/Config.in.system.default + printf "\tboolean\n\n" >> $topdir/target/config/Config.in.system.default +done + +cat >> $topdir/target/config/Config.in.system.default << EOD + +config ADK_TARGET_SYSTEM + string + default "toolchain" if ADK_toolchain + default "qemu" if ADK_qemu +EOD +for i in $systems;do + system=${i#ADK_TARGET_SYSTEM_} + systemu=$(echo $system|tr '[:upper:]' '[:lower:]') + system=$(echo $system|tr '[:upper:]_' '[:lower:]-') + system=$(echo $system|sed 's#x86-64#x86_64#') + printf "\tdefault \"$system\" if ADK_$systemu\n" >> $topdir/target/config/Config.in.system.default +done +exit 0 |