Browse Source

make parts of the menu visible if architecture is choosen to guarentee defaults are set right

Waldemar Brodkorb 8 years ago
parent
commit
aaad058682

+ 6 - 4
Config.in

@@ -20,6 +20,8 @@ source "target/config/Config.in.kernelfmt"
 source "target/config/Config.in.arch"
 source "target/config/Config.in.endian"
 source "target/config/Config.in.archopts"
+
+
 source "target/config/Config.in.system"
 source "target/config/Config.in.systemopts"
 source "target/config/Config.in.subsystem"
@@ -28,11 +30,10 @@ source "target/config/Config.in.cpu"
 source "target/config/Config.in.tasks"
 source "target/config/Config.in.rootfs"
 source "target/config/Config.in.target"
-
 source "target/config/Config.in"
 
 menu "Package selection"
-	visible if ADK_TARGET_OS_LINUX && !ADK_APPLIANCE_TOOLCHAIN
+	visible if ADK_TARGET_OS_LINUX && !ADK_APPLIANCE_TOOLCHAIN && !ADK_TARGET_CHOOSE_ARCH
 source "package/Config.in.auto.global"
 source "package/Config.in"
 menu "Package options"
@@ -41,19 +42,20 @@ endmenu
 endmenu
 
 menu "Runtime configuration"
-	visible if ADK_TARGET_OS_LINUX && !ADK_APPLIANCE_TOOLCHAIN
+	visible if ADK_TARGET_OS_LINUX && !ADK_APPLIANCE_TOOLCHAIN && !ADK_TARGET_CHOOSE_ARCH
 source "target/config/Config.in.runtime"
 endmenu
 
 source "target/config/Config.in.kernelversion"
 
 menu "Kernel configuration"
-	visible if ADK_TARGET_OS_LINUX && ADK_TARGET_KERNEL_CUSTOMISING && !ADK_APPLIANCE_TOOLCHAIN
+	visible if ADK_TARGET_OS_LINUX && ADK_TARGET_KERNEL_CUSTOMISING && !ADK_APPLIANCE_TOOLCHAIN && !ADK_TARGET_CHOOSE_ARCH
 source "target/config/Config.in.kernelcfg"
 source "target/linux/Config.in"
 endmenu
 
 menu "Toolchain settings"
+	visible if !ADK_TARGET_CHOOSE_ARCH
 
 config ADK_VENDOR
 	string "Vendor name"

+ 4 - 1
scripts/create-menu

@@ -15,7 +15,7 @@ printf "source target/config/Config.in.system.choice\n" >> target/config/Config.
 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
+	printf "prompt \"Task\" if !ADK_TARGET_CHOOSE_ARCH\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
@@ -80,6 +80,9 @@ cat > $topdir/target/config/Config.in.arch.choice << EOD
 choice
 prompt "Architecture"
 
+config ADK_TARGET_CHOOSE_ARCH
+	bool "choose architecture"
+
 EOD
 
 for arch in $(cat $topdir/target/arch.lst);do

+ 1 - 1
target/config/Config.in.cpu

@@ -2,7 +2,7 @@
 # material, please see the LICENCE file in the top-level directory.
 
 choice ADK_TARGET_CPU
-prompt "CPU"
+prompt "CPU" if !ADK_TARGET_CHOOSE_ARCH
 
 # aarch64
 config ADK_TARGET_CPU_AARCH64_CORTEX_A53

+ 1 - 1
target/config/Config.in.kernelversion

@@ -2,7 +2,7 @@
 # material, please see the LICENCE file in the top-level directory.
 
 choice
-prompt "Kernel version"
+prompt "Kernel version" if !ADK_TARGET_CHOOSE_ARCH
 depends on ADK_TARGET_OS_LINUX
 default ADK_TARGET_KERNEL_VERSION_4_4_3 if ADK_TARGET_ARCH_ARC
 default ADK_TARGET_KERNEL_VERSION_4_4_3 if ADK_TARGET_ARCH_SPARC

+ 1 - 1
target/config/Config.in.rootfs

@@ -2,7 +2,7 @@
 # material, please see the LICENCE file in the top-level directory.
 
 choice
-prompt "Firmware type"
+prompt "Firmware type" if !ADK_TARGET_CHOOSE_ARCH
 depends on !ADK_APPLIANCE_TOOLCHAIN && !ADK_TARGET_OS_BAREMETAL
 default ADK_TARGET_ROOTFS_ARCHIVE