| require recipes-bsp/gbmc-bsp-common/gbmc-bsp-common.inc |
| |
| FILESEXTRAPATHS:prepend := "${THISDIR}/files:" |
| |
| SRC_URI += "file://gbmc_defconfig" |
| SRC_URI:append:dev = " file://dev.cfg" |
| LINUX_PLATFORMS = "" |
| LINUX_PLATFORMS:npcm7xx = "arm armv7 npcm npcm7xx" |
| LINUX_PLATFORMS:npcm8xx = "arm armv8 npcm npcm8xx" |
| LINUX_PLATFORMS:aspeed-g6 = "arm armv7 ast ast26xx" |
| LINUX_PLATFORMS:aspeed-g7 = "arm armv8 ast ast27xx" |
| |
| SKIP_PLATFORMS = "kudo gbs" |
| |
| # We need to make sure the subsequent fetch gets overridden by our modified patch |
| do_kernel_metadata:append() { |
| if [ -e "${S}/.kernel-meta/configs" ]; then |
| # This is a workaroud for messy defconfigs that have been added to builds |
| # we want to weight them lowest so that our configs are applied after them |
| nl="$(printf '\nx')" |
| nl="${nl%x}" |
| weighted= |
| for file in ${S}/.kernel-meta/configs/*; do |
| base="$(basename "$file")" |
| if [ "$base" = "gbmc_defconfig" ]; then |
| weight=10 |
| elif echo "$base" | grep -q 'defconfig$'; then |
| weight=00 |
| else |
| weight=20 |
| fi |
| weighted="$weighted$weight $base $file$nl" |
| done |
| |
| gbmc-trim-kconfig.sh ${LINUX_VERSION} "${LINUX_PLATFORMS}" \ |
| $(echo "$weighted" | sort | awk '{print $3}') |
| fi |
| } |
| |
| # gbmc-trim-kconfig.sh is a native binary needed for this task |
| addtask do_kernel_metadata after do_prepare_recipe_sysroot |
| |
| do_gbmc_configvalidate() { |
| for p in ${SKIP_PLATFORMS}; do |
| if [ "${MACHINE}" = "$p" ]; then |
| bbwarn "Skipping config validation for ${MACHINE}" |
| return 0 |
| fi |
| done |
| |
| python3 ${STAGING_BINDIR_NATIVE}/ConfigValidator.py ${WORKDIR}/gbmc_defconfig ${B}/.config ${LINUX_VERSION} "${LINUX_PLATFORMS}" || exit 1 |
| } |
| |
| do_gbmc_configvalidate:append:dev() { |
| python3 ${STAGING_BINDIR_NATIVE}/ConfigValidator.py ${WORKDIR}/dev.cfg ${B}/.config ${LINUX_VERSION} "${LINUX_PLATFORMS}" || exit 1 |
| } |
| |
| do_kernel_configcheck[postfuncs] =+ " do_gbmc_configvalidate" |