diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2016-03-05 12:51:42 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2016-03-07 06:42:57 +0100 |
commit | c384dc577bd32f3315bacb410fc31610b41f742c (patch) | |
tree | 903aaed00f4b82d5e1eada2bd4fea8a7f3387ded /scripts/create-menu | |
parent | 68d4e79f35039b31ae835e82241a567b0ad66aa8 (diff) |
rework menu based config system
After the addition of bare metal toolchains the menu system allowed
to create non-valid configurations. I reworked it so we can also
add other operating system support if we wish.
So first you choose your operating system, then your architecture
and endianess, after that your embedded system, emulator or
generic device and then you choose your task you want to run.
Tasks may be toolchain, a new appliance/application or some preconfigured
sets of packages and configurations as kodi, mpd, firefox and more.
The tasks are limited to a plausible choice of hardware and software.
Deduplicate CPU configuration.
You don't wanna compile Kodi for a H8/300 microcontroller ;)
Diffstat (limited to 'scripts/create-menu')
-rwxr-xr-x | scripts/create-menu | 45 |
1 files changed, 28 insertions, 17 deletions
diff --git a/scripts/create-menu b/scripts/create-menu index 3624776e7..e0552d44b 100755 --- a/scripts/create-menu +++ b/scripts/create-menu @@ -11,20 +11,13 @@ printf "# autogenerated via scripts/create-menu\n" > target/config/Config.in.sys printf "source target/config/Config.in.system.default\n" >> target/config/Config.in.system printf "source target/config/Config.in.system.choice\n" >> target/config/Config.in.system -# update appliances -if [ -d "$topdir/target/appliances" ];then - printf "# autogenerated via scripts/create-menu\n" > $topdir/target/config/Config.in.appliances - printf "choice\n" >> $topdir/target/config/Config.in.appliances - printf "prompt \"Appliance\"\n\n" >> $topdir/target/config/Config.in.appliances - printf "config ADK_CHOOSE_APPLIANCE\n" >> $topdir/target/config/Config.in.appliances - printf "\tprompt \"choose an appliance\"\n" >> $topdir/target/config/Config.in.appliances - printf "\tbool\n\n" >> $topdir/target/config/Config.in.appliances - cat $topdir/target/appliances/*.appliance >> $topdir/target/config/Config.in.appliances 2>/dev/null - printf "\nendchoice\n\n" >> $topdir/target/config/Config.in.appliances - printf "menu \"Appliance Options\"\n" >> $topdir/target/config/Config.in.appliances - printf "\tvisible if !ADK_CHOOSE_APPLIANCE\n" >> $topdir/target/config/Config.in.appliances - cat $topdir/target/appliances/*.options >> $topdir/target/config/Config.in.appliances 2>/dev/null - printf "endmenu\n" >> $topdir/target/config/Config.in.appliances +# update tasks +if [ -d "$topdir/tasks" ];then + printf "# autogenerated via scripts/create-menu\n" > $topdir/target/config/Config.in.tasks + printf "choice\n" >> $topdir/target/config/Config.in.tasks + printf "prompt \"Task\"\n\n" >> $topdir/target/config/Config.in.tasks + cat $topdir/tasks/* >> $topdir/target/config/Config.in.tasks 2>/dev/null + printf "\nendchoice\n\n" >> $topdir/target/config/Config.in.tasks fi # create system default @@ -43,9 +36,19 @@ for i in $systems;do done # create or update systems +for arch in $(cat $topdir/target/arch.lst);do + ARCH=$(echo $arch | tr '[:lower:]' '[:upper:]') + printf "config ADK_TARGET_SYSTEM_GENERIC_$ARCH\n" > $topdir/target/$arch/Config.in.systems + printf "\tbool \"Generic\"\n" >> $topdir/target/$arch/Config.in.systems + printf "\tselect ADK_TARGET_GENERIC\n" >> $topdir/target/$arch/Config.in.systems + printf "\thelp\n" >> $topdir/target/$arch/Config.in.systems + printf "\t Generic $ARCH system.\n\n" >> $topdir/target/$arch/Config.in.systems + printf "\tdefault \"generic-${arch}\" if ADK_TARGET_SYSTEM_GENERIC_$ARCH\n" >> $topdir/target/config/Config.in.system.default +done + for i in $(ls $topdir/target/);do if [ -d "$topdir/target/$i/systems" ];then - cat $topdir/target/$i/systems/* > $topdir/target/$i/Config.in.systems 2>/dev/null + cat $topdir/target/$i/systems/* >> $topdir/target/$i/Config.in.systems 2>/dev/null fi done @@ -55,7 +58,7 @@ printf "# autogenerated via scripts/create-menu\n" > target/config/Config.in.arc for arch in $(cat $topdir/target/arch.lst);do ARCH=$(echo $arch | tr '[:lower:]' '[:upper:]') printf "choice\n" > $topdir/target/$arch/Config.in.arch - printf "prompt \"Embedded system\"\n" >> $topdir/target/$arch/Config.in.arch + printf "prompt \"System\"\n" >> $topdir/target/$arch/Config.in.arch printf "depends on ADK_TARGET_ARCH_$ARCH\n" >> $topdir/target/$arch/Config.in.arch printf "source target/$arch/Config.in.systems\n" >> $topdir/target/$arch/Config.in.arch printf "endchoice\n" >> $topdir/target/$arch/Config.in.arch @@ -82,7 +85,15 @@ EOD for arch in $(cat $topdir/target/arch.lst);do ARCH=$(echo $arch | tr '[:lower:]' '[:upper:]') printf "config ADK_TARGET_ARCH_$ARCH\n" >> $topdir/target/config/Config.in.arch.choice - printf "\tbool \"$arch system\"\n" >> $topdir/target/config/Config.in.arch.choice + printf "\tbool \"$arch\"\n" >> $topdir/target/config/Config.in.arch.choice + case $arch in + alpha|ia64|sh|sparc64|s390|tile|ppc64|mips64|x86_64) + printf "\tdepends on ADK_TARGET_OS_LINUX\n" >> $topdir/target/config/Config.in.arch.choice + ;; + nds32|moxie|v850) + printf "\tdepends on ADK_TARGET_OS_BAREMETAL\n" >> $topdir/target/config/Config.in.arch.choice + ;; + esac printf "\thelp\n" >> $topdir/target/config/Config.in.arch.choice printf "\t Support for $ARCH systems.\n\n" >> $topdir/target/config/Config.in.arch.choice done |