From 5cab5accf8c7c465f044d719f3fe91936eb9b8ec Mon Sep 17 00:00:00 2001 From: Adrian Dudau Date: Thu, 29 Oct 2015 13:10:50 +0100 Subject: kernel: lose the staging-kernel legacy We give up building the so-called "staging kernel". From now on we'll use the native kernel configuration mechanism and issue two kernel build commands if needed. Signed-off-by: Adrian Dudau --- recipes-kernel/linux/kernel-configure.inc | 49 ----------- recipes-kernel/linux/staging-kernel.inc | 133 ------------------------------ 2 files changed, 182 deletions(-) delete mode 100644 recipes-kernel/linux/kernel-configure.inc delete mode 100644 recipes-kernel/linux/staging-kernel.inc diff --git a/recipes-kernel/linux/kernel-configure.inc b/recipes-kernel/linux/kernel-configure.inc deleted file mode 100644 index f3d0abe..0000000 --- a/recipes-kernel/linux/kernel-configure.inc +++ /dev/null @@ -1,49 +0,0 @@ -SRC_URI += " file://merge_config.sh " - -configure_kernel() { - # Add debug flavour config elements from fragments - # Listed in increasing priority order if conflicts are detected. - # - - # - #combine features cfgs with defconfig - # - addon_features="" - if [ -n "${2}" ]; then - for feature in ${2}; do - addon_features="${addon_features} ${WORKDIR}/${feature}" - done - fi - - # Some meta layers like meta-ti use defconfig file to point to a real - # default config file (use-kernel-config=config_filename) which is found - # under kernel path (${S}/arch/${archname}/configs/). - config=`cat ${1} | grep use-kernel-config | cut -d= -f2` - if [ "x${config}" != "x" ] - then - configfilepath=`find ${S}/arch/ -name ${config} -print | head -n 1` - if [ -f ${configfilepath} ] - then - cp ${configfilepath} ${1} - else - bbfatal "Specified config file:${config} was not found!" - fi - fi - - if [ -e "${S}/scripts/kconfig/merge_config.sh" ]; then - O=${B} ${S}/scripts/kconfig/merge_config.sh -m ${1} ${addon_features} - else - O=${B} ${WORKDIR}/merge_config.sh -m ${1} ${addon_features} - fi - - mv -f ${B}/.config ${B}/.mconfig - - # - #in linux kernel 2.6.33, kconfig does not support alldefconfig yet. - # - if [ "x${PV}" = "x2.6.33" ]; then - oe_runmake KCONFIG_ALLCONFIG=${B}/.mconfig O=${B} allnoconfig - else - oe_runmake KCONFIG_ALLCONFIG=${B}/.mconfig O=${B} alldefconfig - fi -} diff --git a/recipes-kernel/linux/staging-kernel.inc b/recipes-kernel/linux/staging-kernel.inc deleted file mode 100644 index 3ef802d..0000000 --- a/recipes-kernel/linux/staging-kernel.inc +++ /dev/null @@ -1,133 +0,0 @@ -# This .inc file allows building and deploying staging kernel + modules -# with defconfig + fragment cfgs - -require kernel-configure.inc - -STAGING_NAME ?= "RELEASE" -STAGING_KERNEL_FEATURES ?= "" -KERNEL_FEATURES ?= "" -MODULES_IMAGE_BASE_NAME = "modules-${PV}-${PR}-${MACHINE}" -EXTRA_OEMAKE_prepend_task-stagingkernel = "${PARALLEL_MAKE} " - -do_stagingkernel () { - stagingkernel "${STAGING_KERNEL_FEATURES}" ${STAGING_NAME} -} - -stagingkernel () { - - configure_kernel "${KERNEL_DEFCONFIG}" "${1}" - - # Copy defconfig to .config if .config does not exist. This allows - # recipes to manage the .config themselves in do_configure_prepend(). - if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${B}/.config" ]; then - cp "${WORKDIR}/defconfig" "${B}/.config" - fi - yes '' | oe_runmake oldconfig - - if [ ! -z "${INITRAMFS_IMAGE}" ]; then - for img in cpio.gz cpio.lzo cpio.lzma cpio.xz; do - if [ -e "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.$img" ]; then - cp "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.$img" initramfs.$img - fi - done - fi - - # - # Build this alternative kernel - # - - kernel_do_compile - do_compile_kernelmodules - - # - # First install the modules to deploy dir - # - unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE - if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then - oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" modules_install - else - bbnote "no modules to install" - fi - if [ -d "${D}/lib" ]; then - tar -cvzf ${DEPLOY_DIR_IMAGE}/${MODULES_IMAGE_BASE_NAME}-${2}.tgz -C ${D} lib - fi - rm -fr ${D}/lib - - # - # Dont build any dtb:s for the staging kernel - # - - # - # Drop the resulting images in the deploy dir - # - cd ${S} - install -d ${DEPLOY_DIR_IMAGE} - install -m 0644 ${KERNEL_OUTPUT} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}-${2}.bin - mv ${KERNEL_OUTPUT} ${KERNEL_OUTPUT}-${2} - - # - # Install the final config alongside the images - # - cd ${S} - cp .config ${DEPLOY_DIR_IMAGE}/config-${PV}-${PR}-${MACHINE}-${2}.config - rm -f .config - - # - # Create symlinks - # - cd ${DEPLOY_DIR_IMAGE} - rm -f ${KERNEL_IMAGE_SYMLINK_NAME}-${2}.bin - ln -sf ${KERNEL_IMAGE_BASE_NAME}-${2}.bin ${KERNEL_IMAGE_SYMLINK_NAME}-${2}.bin - - rm -f config-${MACHINE}-${2}.config - ln -sf config-${PV}-${PR}-${MACHINE}-${2}.config config-${MACHINE}-${2}.config - -} - -do_stagingkernel[dirs] = "${DEPLOY_DIR_IMAGE} ${B}" - -do_stagingkernel[depends] += "u-boot-mkimage-native:do_populate_sysroot virtual/${TARGET_PREFIX}gcc:do_populate_sysroot virtual/${TARGET_PREFIX}gcc:do_populate_sysroot libgcc:do_populate_sysroot" - -addtask stagingkernel after do_patch before do_configure - -# -# For reference, copy .config to deploy image -# -do_deploy_append () { - - install -d ${DEPLOY_DIR_IMAGE} - - # - # Drop the regular defconfig along side the others for consistency - # - cd ${S} - cp .config ${DEPLOY_DIR_IMAGE}/config-${PV}-${PR}-${MACHINE}.config - - # - # add symlink - # - cd ${DEPLOY_DIR_IMAGE} - rm -f config-${MACHINE}.config - ln -s config-${PV}-${PR}-${MACHINE}.config config-${MACHINE}.config - -} - -# -# Clean staging kernel related files in deploy dir -# -do_cleanstagingkernel () { - - cd ${DEPLOY_DIR_IMAGE} - rm -f *-${STAGING_NAME}.* - - rm -f config-${PV}-${PR}-${MACHINE}.config - rm -f config-${MACHINE}.config - -} - -LDFLAGS="" - -do_cleanstagingkernel[nostamp] = "1" - -addtask cleanstagingkernel after do_cleansstate - -- cgit v1.2.3-54-g00ecf