diff options
Diffstat (limited to 'classes/toradex-kernel-config.bbclass')
-rw-r--r-- | classes/toradex-kernel-config.bbclass | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/classes/toradex-kernel-config.bbclass b/classes/toradex-kernel-config.bbclass new file mode 100644 index 0000000..8c3ad71 --- /dev/null +++ b/classes/toradex-kernel-config.bbclass @@ -0,0 +1,17 @@ +# Assign a config variable in ${B}/.config. +# Should be called in do_configure_append only. +# +# $1 - config variable to be set +# $2 - value [n/y/value] +# +kernel_configure_variable() { + # Remove the original config, to avoid reassigning it. + sed -i -e "/CONFIG_$1[ =]/d" ${B}/.config + + # Assign the config value + if [ "$2" = "n" ]; then + echo "# CONFIG_$1 is not set" >> ${B}/.config + else + echo "CONFIG_$1=$2" >> ${B}/.config + fi +} |