2 # This file is part of the OpenADK project. OpenADK is copyrighted
3 # material, please see the LICENCE file in the top-level directory.
5 topdir
=$
(readlink
-nf $
(dirname $0)/..
2>/dev
/null ||
(cd $
(dirname $0)/..
; pwd -P))
6 systems
=$
(grep -h config target
/*/systems
/*|cut
-d " " -f 2)
8 printf "# autogenerated via scripts/create-menu\n" > target
/config
/Config.
in.arch
9 printf "source target/config/Config.in.arch.default\n" >> target
/config
/Config.
in.arch
10 printf "source target/config/Config.in.arch.choice\n" >> target
/config
/Config.
in.arch
11 printf "# autogenerated via scripts/create-menu\n" > target
/config
/Config.
in.system
12 printf "source target/config/Config.in.system.default\n" >> target
/config
/Config.
in.system
13 printf "source target/config/Config.in.system.choice\n" >> target
/config
/Config.
in.system
16 if [ -d "$topdir/target/appliances" ];then
17 printf "# autogenerated via scripts/create-menu\n" > $topdir/target
/config
/Config.
in.appliances
18 printf "choice\n" >> $topdir/target
/config
/Config.
in.appliances
19 printf "prompt \"Appliance\"\n\n" >> $topdir/target
/config
/Config.
in.appliances
20 printf "config ADK_CHOOSE_APPLIANCE\n" >> $topdir/target
/config
/Config.
in.appliances
21 printf "\tprompt \"choose an appliance\"\n" >> $topdir/target
/config
/Config.
in.appliances
22 printf "\tbool\n\n" >> $topdir/target
/config
/Config.
in.appliances
23 cat $topdir/target
/appliances
/*.appliance
>> $topdir/target
/config
/Config.
in.appliances
2>/dev
/null
24 printf "\nendchoice\n\n" >> $topdir/target
/config
/Config.
in.appliances
25 printf "menu \"Appliance Options\"\n" >> $topdir/target
/config
/Config.
in.appliances
26 printf "\tvisible if !ADK_CHOOSE_APPLIANCE\n" >> $topdir/target
/config
/Config.
in.appliances
27 cat $topdir/target
/appliances
/*.options
>> $topdir/target
/config
/Config.
in.appliances
2>/dev
/null
28 printf "endmenu\n" >> $topdir/target
/config
/Config.
in.appliances
31 # create system default
32 printf "# autogenerated via scripts/create-menu\n" > $topdir/target
/config
/Config.
in.system.default
34 cat >> $topdir/target
/config
/Config.
in.system.default
<< EOD
35 config ADK_TARGET_SYSTEM
39 system
=${i#ADK_TARGET_SYSTEM_}
40 systemu
=$
(echo $system|
tr '[:upper:]' '[:lower:]')
41 system
=$
(echo $system|
tr '[:upper:]_' '[:lower:]-')
42 system
=$
(echo $system|
sed 's#x86-64#x86_64#')
43 printf "\tdefault \"${system}\" if $i\n" >> $topdir/target
/config
/Config.
in.system.default
46 # create or update systems
47 for i
in $
(ls $topdir/target
/);do
48 if [ -d "$topdir/target/$i/systems" ];then
49 cat $topdir/target
/$i/systems
/* > $topdir/target
/$i/Config.
in.systems
2>/dev
/null
53 # create target/$arch/Config.in.arch and target/config/Config.in.system.choice
54 printf "# autogenerated via scripts/create-menu\n" > target
/config
/Config.
in.system.choice
55 printf "# autogenerated via scripts/create-menu\n" > target
/config
/Config.
in.arch.default
56 for arch
in $
(cat $topdir/target
/arch.lst
);do
57 ARCH
=$
(echo $arch |
tr '[:lower:]' '[:upper:]')
58 printf "choice\n" > $topdir/target
/$arch/Config.
in.arch
59 printf "prompt \"Embedded system\"\n" >> $topdir/target
/$arch/Config.
in.arch
60 printf "depends on ADK_TARGET_ARCH_$ARCH\n" >> $topdir/target
/$arch/Config.
in.arch
61 printf "source target/$arch/Config.in.systems\n" >> $topdir/target
/$arch/Config.
in.arch
62 printf "endchoice\n" >> $topdir/target
/$arch/Config.
in.arch
63 printf "source target/$arch/Config.in.arch\n" >> target
/config
/Config.
in.system.choice
66 cat >> $topdir/target
/config
/Config.
in.arch.default
<< EOD
67 config ADK_TARGET_ARCH
71 for arch
in $
(cat $topdir/target
/arch.lst
);do
72 ARCH
=$
(echo $arch |
tr '[:lower:]' '[:upper:]')
73 printf "\tdefault \"$arch\" if ADK_TARGET_ARCH_$ARCH\n" >> target
/config
/Config.
in.arch.default
76 cat > $topdir/target
/config
/Config.
in.arch.choice
<< EOD
77 # autogenerated via scripts/create-menu
83 for arch
in $
(cat $topdir/target
/arch.lst
);do
84 ARCH
=$
(echo $arch |
tr '[:lower:]' '[:upper:]')
85 printf "config ADK_TARGET_ARCH_$ARCH\n" >> $topdir/target
/config
/Config.
in.arch.choice
86 printf "\tbool \"$arch system\"\n" >> $topdir/target
/config
/Config.
in.arch.choice
87 printf "\thelp\n" >> $topdir/target
/config
/Config.
in.arch.choice
88 printf "\t Support for $ARCH systems.\n\n" >> $topdir/target
/config
/Config.
in.arch.choice
90 printf "endchoice\n" >> $topdir/target
/config
/Config.
in.arch.choice