From dd6bdaec7a4ecd19d7a85b647c767d77888998cf Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Thu, 23 Jun 2016 00:31:45 +0200 Subject: linux: integrate apalis-tk1 and clean-up obsolete device trees linux-toradex.inc's functionality is provided with linux-dtb.inc for current device tree enabled kernels. So don't include both include files. Prevents ERROR: QA Issue: kernel-devicetree is listed in PACKAGES multiple times, this leads to packaging errors. [packages-list] Signed-off-by: Marcel Ziswiler Signed-off-by: Max Krummenacher --- recipes-kernel/linux/linux-toradex.inc | 21 ++------ recipes-kernel/linux/linux-toradex_3.10.40.bb | 70 +++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 17 deletions(-) create mode 100644 recipes-kernel/linux/linux-toradex_3.10.40.bb diff --git a/recipes-kernel/linux/linux-toradex.inc b/recipes-kernel/linux/linux-toradex.inc index 5ba4c20..6a4f8a3 100644 --- a/recipes-kernel/linux/linux-toradex.inc +++ b/recipes-kernel/linux/linux-toradex.inc @@ -25,23 +25,7 @@ LOGO_SIZE ?= "." FILES_kernel-devicetree = "/boot/devicetree*" -KERNEL_DEVICETREE_boc01 = "${WORKDIR}/boc01.dts" -KERNEL_DEVICETREE_calamari = "arch/${ARCH}/boot/dts/mpc8536ds.dts" -KERNEL_DEVICETREE_canyonlands = "arch/${ARCH}/boot/dts/canyonlands.dts" -KERNEL_DEVICETREE_kilauea = "arch/${ARCH}/boot/dts/kilauea.dts" -KERNEL_DEVICETREE_lite5200 = "arch/${ARCH}/boot/dts/lite5200.dts" -KERNEL_DEVICETREE_lsppchd = "arch/${ARCH}/boot/dts/kuroboxHD.dts" -KERNEL_DEVICETREE_lsppchg = "arch/${ARCH}/boot/dts/kuroboxHG.dts" -KERNEL_DEVICETREE_mpc8313e-rdb = "arch/${ARCH}/boot/dts/mpc8313erdb.dts" -KERNEL_DEVICETREE_mpc8315e-rdb = "arch/${ARCH}/boot/dts/mpc8315erdb.dts" -KERNEL_DEVICETREE_mpc8323e-rdb = "arch/${ARCH}/boot/dts/mpc832x_rdb.dts" -KERNEL_DEVICETREE_mpc8544ds = "arch/${ARCH}/boot/dts/mpc8544ds.dts" -KERNEL_DEVICETREE_mpc8641-hpcn = "arch/${ARCH}/boot/dts/mpc8641_hpcn.dts" -KERNEL_DEVICETREE_p1020rdb = "arch/${ARCH}/boot/dts/p1020rdb.dts" -KERNEL_DEVICETREE_p2020ds = "arch/${ARCH}/boot/dts/p2020ds.dts" -KERNEL_DEVICETREE_sequoia = "arch/${ARCH}/boot/dts/sequoia.dts" -KERNEL_DEVICETREE_tqm8540 = "arch/${ARCH}/boot/dts/tqm8540.dts" -KERNEL_DEVICETREE_xilinx-ml507 = "arch/${ARCH}/boot/dts/virtex440-ml507.dts" +#KERNEL_DEVICETREE to be specified from machine configuration KERNEL_DEVICETREE_FLAGS = "-R 8 -S 0x3000" @@ -91,6 +75,9 @@ do_devicetree_image() { fi } +do_devicetree_image_tegra124() { +} + addtask devicetree_image after do_install before do_package do_deploy pkg_postinst_kernel-devicetree () { diff --git a/recipes-kernel/linux/linux-toradex_3.10.40.bb b/recipes-kernel/linux/linux-toradex_3.10.40.bb new file mode 100644 index 0000000..ba19964 --- /dev/null +++ b/recipes-kernel/linux/linux-toradex_3.10.40.bb @@ -0,0 +1,70 @@ +SUMMARY = "Linux Kernel for Toradex Tegra124 based modules" +SECTION = "kernel" +LICENSE = "GPLv2" + +LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" + +inherit kernel siteinfo +require recipes-kernel/linux/linux-dtb.inc + +LINUX_VERSION ?= "3.10.40" + +LOCALVERSION = "-${PR}" +SRCREV = "ea39e68486e1c97709d25de332f3f4b607ae0e9a" +PR = "V2.6b2" + +PV = "${LINUX_VERSION}+gitr${SRCREV}" +S = "${WORKDIR}/git" +SRCBRANCH = "toradex_tk1_l4t_r21.5-next" +SRC_URI = "git://git.toradex.com/linux-toradex.git;protocol=git;branch=${SRCBRANCH}" + +COMPATIBLE_MACHINE = "apalis-tk1" + +# One possibiltiy for changes to the defconfig: +config_script () { +# #example change to the .config +# #sets CONFIG_TEGRA_CAMERA unconditionally to 'y' +# sed -i -e /CONFIG_TEGRA_CAMERA/d ${B}/.config +# echo "CONFIG_TEGRA_CAMERA=y" >> ${B}/.config + echo "dummy" > /dev/null +} + +do_configure_prepend () { + #use the defconfig provided in the kernel source tree + #assume its called ${MACHINE}_defconfig, but with '_' instead of '-' + DEFCONFIG="`echo ${MACHINE} | sed -e 's/$/_defconfig/'`" + + cd ${S} + export KBUILD_OUTPUT=${B} + oe_runmake $DEFCONFIG + + #maybe change some configuration + config_script + + #Add Toradex BSP Version as LOCALVERSION + sed -i -e /CONFIG_LOCALVERSION/d ${B}/.config + echo "CONFIG_LOCALVERSION=\"${LOCALVERSION}\"" >> ${B}/.config + + #Add GIT revision to the local version + head=`git --git-dir=${S}/.git rev-parse --verify --short HEAD 2> /dev/null` + printf "%s%s" +g $head > ${S}/.scmversion +} + +kernel_do_compile() { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE + export CC="`echo "${KERNEL_CC}" | sed 's/-mfloat-abi=hard//g'`" + oe_runmake ${KERNEL_IMAGETYPE_FOR_MAKE} ${KERNEL_ALT_IMAGETYPE} LD="${KERNEL_LD}" + if test "${KERNEL_IMAGETYPE_FOR_MAKE}.gz" = "${KERNEL_IMAGETYPE}"; then + gzip -9c < "${KERNEL_IMAGETYPE_FOR_MAKE}" > "${KERNEL_OUTPUT}" + fi +} + +do_compile_kernelmodules() { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE + export CC="`echo "${KERNEL_CC}" | sed 's/-mfloat-abi=hard//g'`" + if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then + oe_runmake ${PARALLEL_MAKE} modules LD="${KERNEL_LD}" + else + bbnote "no modules to compile" + fi +} -- cgit v1.2.3