backport noyau linux 5.4 car la 5.10 ne fonctionne pas sur le mmc
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
# Upstream kernel-devicetree.bbclass only supports bundling the DTB with
|
||||
# zImage. The factory u-boot on lego-ev3 EEPROM only supports uImage, so we
|
||||
# append the DTB to the final uImage here.
|
||||
|
||||
do_deploy:append() {
|
||||
if [ "${KERNEL_DEVICETREE_BUNDLE}" = "1" ]; then
|
||||
install -d ${DEPLOYDIR}
|
||||
for dtbf in ${KERNEL_DEVICETREE}; do
|
||||
dtb=`normalize_dtb "$dtbf"`
|
||||
dtb_ext=${dtb##*.}
|
||||
dtb_base_name=`basename $dtb .$dtb_ext`
|
||||
for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do
|
||||
if [ "$type" = "uImage" ]; then
|
||||
cat ${D}/${KERNEL_IMAGEDEST}/$type \
|
||||
${DEPLOYDIR}/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext \
|
||||
> ${DEPLOYDIR}/$type-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext.bin
|
||||
ln -sf $type-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext.bin \
|
||||
${DEPLOYDIR}/$type-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext.bin
|
||||
cat ${D}/${KERNEL_IMAGEDEST}/$type \
|
||||
${DEPLOYDIR}/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext \
|
||||
> ${DEPLOYDIR}/$type
|
||||
fi
|
||||
done
|
||||
done
|
||||
fi
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
# Add concept of machine variants to split DTBs into subsets
|
||||
#
|
||||
# Use these for temporary overrides
|
||||
CMEM_MACHINE = "${MACHINE}"
|
||||
CMEM_MACHINE_am57xx-evm = "am571x am572x am572idk am5729-beagleboneai am574x"
|
||||
CMEM_MACHINE_am57xx-hs-evm = "am571x am572x am572idk am5729-beagleboneai am574x"
|
||||
CMEM_MACHINE_dra7xx-evm = "dra71x dra72x dra74x dra76x"
|
||||
CMEM_MACHINE_dra7xx-hs-evm = "dra71x dra72x dra74x dra76x"
|
||||
|
||||
# Set cmem.dtsi per machine or machine variant
|
||||
CMEM_DTSI = "cmem.dtsi"
|
||||
CMEM_DTSI_am571x = "cmem-am571x.dtsi"
|
||||
CMEM_DTSI_am572idk = "cmem-am572idk.dtsi"
|
||||
CMEM_DTSI_am5729-beagleboneai = "cmem-am5729-beagleboneai.dtsi"
|
||||
CMEM_DTSI_am574x = "cmem-am574x.dtsi"
|
||||
CMEM_DTSI_dra71x = "cmem-dra71x.dtsi"
|
||||
CMEM_DTSI_dra72x = "cmem-dra72x.dtsi"
|
||||
CMEM_DTSI_dra76x = "cmem-dra76x.dtsi"
|
||||
|
||||
# Split device trees between variants
|
||||
CMEM_DEVICETREE = "${KERNEL_DEVICETREE}"
|
||||
CMEM_DEVICETREE_am571x = "am571x-idk.dtb am571x-idk-lcd-osd101t2045.dtb am571x-idk-lcd-osd101t2587.dtb"
|
||||
CMEM_DEVICETREE_am572x = "am57xx-beagle-x15.dtb am57xx-beagle-x15-revc.dtb"
|
||||
CMEM_DEVICETREE_am572idk = "am572x-idk.dtb am572x-idk-lcd-osd101t2045.dtb am572x-idk-lcd-osd101t2587.dtb"
|
||||
CMEM_DEVICETREE_am5729-beagleboneai = "am5729-beagleboneai.dtb"
|
||||
CMEM_DEVICETREE_am574x = "am574x-idk.dtb am574x-idk-lcd-osd101t2587.dtb"
|
||||
CMEM_DEVICETREE_dra71x = "dra71-evm.dtb"
|
||||
CMEM_DEVICETREE_dra72x = "dra72-evm.dtb dra72-evm-lcd-osd101t2045.dtb dra72-evm-lcd-osd101t2587.dtb \
|
||||
dra72-evm-revc.dtb dra72-evm-revc-lcd-osd101t2045.dtb dra72-evm-revc-lcd-osd101t2587.dtb"
|
||||
CMEM_DEVICETREE_dra74x = "dra7-evm.dtb dra7-evm-lcd-osd101t2045.dtb dra7-evm-lcd-osd101t2587.dtb"
|
||||
CMEM_DEVICETREE_dra76x = "dra76-evm.dtb dra76-evm-tfp410.dtb"
|
||||
|
||||
# Flag to enable CMEM injection
|
||||
RESERVE_CMEM ?= "0"
|
||||
|
||||
# Variables which influence setup_cmem
|
||||
CMEM_VARS = "RESERVE_CMEM CMEM_MACHINE"
|
||||
CMEM_VARS += "CMEM_DTSI ${@' '.join(map(lambda s: 'CMEM_DTSI_' + s, (d.getVar('CMEM_MACHINE') or '').split()))}"
|
||||
CMEM_VARS += "CMEM_DEVICETREE ${@' '.join(map(lambda s: 'CMEM_DEVICETREE_' + s, (d.getVar('CMEM_MACHINE') or '').split()))}"
|
||||
|
||||
# Add correct cmem.dtsi to SRC_URI for each variant for a given machine
|
||||
python do_unpack() {
|
||||
old_overrides = d.getVar('OVERRIDES', False)
|
||||
|
||||
# Initialize with empty string to simplify logic to append to SRC_URI
|
||||
cmem_dtsi = set([''])
|
||||
|
||||
for cmem_machine in (d.getVar('CMEM_MACHINE') or '').split():
|
||||
# Create copy of data for additional override
|
||||
localdata = bb.data.createCopy(d)
|
||||
localdata.setVar('OVERRIDES', '%s:%s' % (cmem_machine, old_overrides))
|
||||
bb.data.update_data(localdata)
|
||||
|
||||
cmem_dtsi.add(localdata.getVar('CMEM_DTSI'))
|
||||
|
||||
d.appendVar('SRC_URI', ' file://'.join(cmem_dtsi))
|
||||
bb.build.exec_func('base_do_unpack', d)
|
||||
}
|
||||
|
||||
python do_setup_cmem() {
|
||||
import shutil
|
||||
|
||||
old_overrides = d.getVar('OVERRIDES', False)
|
||||
|
||||
if d.getVar('RESERVE_CMEM') is '1':
|
||||
for cmem_machine in (d.getVar('CMEM_MACHINE') or '').split():
|
||||
# Create copy of data for additional override
|
||||
localdata = bb.data.createCopy(d)
|
||||
localdata.setVar('OVERRIDES', '%s:%s' % (cmem_machine, old_overrides))
|
||||
bb.data.update_data(localdata)
|
||||
|
||||
# Get source directory and dtsi filename
|
||||
src_dir = localdata.getVar('WORKDIR')
|
||||
src_dtsi = localdata.getVar('CMEM_DTSI')
|
||||
|
||||
# Get destination directory and destination dtsi filename which adds
|
||||
# the MACHINE prefix.
|
||||
dst_dir = os.path.join(localdata.getVar('S'), localdata.expand('arch/${ARCH}/boot/dts'))
|
||||
dst_dtsi = localdata.expand('${MACHINE}-${CMEM_DTSI}')
|
||||
|
||||
# Copy cmem.dtsi into source tree
|
||||
if localdata.getVar('ARCH') is 'arm64':
|
||||
shutil.copy(os.path.join(src_dir,src_dtsi), os.path.join(dst_dir,'ti',dst_dtsi))
|
||||
else:
|
||||
shutil.copy(os.path.join(src_dir,src_dtsi), os.path.join(dst_dir,dst_dtsi))
|
||||
|
||||
# Inject dtsi into each dts in list
|
||||
for dtb in (localdata.getVar('CMEM_DEVICETREE') or '').split():
|
||||
dts = dtb[:-4] + '.dts'
|
||||
|
||||
with open(os.path.join(dst_dir,dts), 'a') as dts_file:
|
||||
dts_file.write('\n#include "%s"\n' % dst_dtsi)
|
||||
}
|
||||
|
||||
do_patch[postfuncs] += "do_setup_cmem"
|
||||
do_patch[vardeps] += "${CMEM_VARS}"
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/scripts/dtc/dtc-lexer.l
|
||||
+++ b/scripts/dtc/dtc-lexer.l
|
||||
@@ -23,7 +23,7 @@ LINECOMMENT "//".*\n
|
||||
#include "srcpos.h"
|
||||
#include "dtc-parser.tab.h"
|
||||
|
||||
-YYLTYPE yylloc;
|
||||
+extern YYLTYPE yylloc;
|
||||
extern bool treesource_error;
|
||||
|
||||
/* CAUTION: this will stop working if we ever use yyless() or yyunput() */
|
||||
@@ -0,0 +1,192 @@
|
||||
&pruss_soc_bus {
|
||||
uio_pruss_mdio: uio_mdio@4a332400 {
|
||||
compatible = "ti,davinci_mdio";
|
||||
reg = <0x4a332400 0x90>;
|
||||
clocks = <&dpll_core_m4_ck>;
|
||||
clock-names = "fck";
|
||||
bus_freq = <1000000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uio_pruss_mem: uio_pruss_mem {
|
||||
compatible = "ti,uio-module-drv";
|
||||
mem = <0x4a300000 0x2000>,
|
||||
<0x4a302000 0x2000>,
|
||||
<0x4a310000 0x3000>,
|
||||
<0x4a320000 0x2000>,
|
||||
<0x4a326000 0x2000>,
|
||||
<0x4a32e000 0x31c>,
|
||||
<0x4a332000 0x58>;
|
||||
mem-names = "dram0", "dram1", "shrdram2", "intc", "cfg",
|
||||
"iep", "mii_rt";
|
||||
|
||||
status = "okay";
|
||||
};
|
||||
uio_pruss_mem2: uio_pruss_mem2 {
|
||||
compatible = "ti,uio-module-drv";
|
||||
mem = <0x4a328000 0xd4>,
|
||||
<0x4a330000 0x174>,
|
||||
<0x4a332400 0x90>,
|
||||
<0x40302000 0x0e000>;
|
||||
mem-names = "uart", "ecap", "mdio", "ocmc";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
uio_pruss_evt0: uio_pruss_evt0 {
|
||||
compatible = "ti,uio-module-drv";
|
||||
interrupts = <20>;
|
||||
interrupt-mode = <1>;
|
||||
status = "okay";
|
||||
};
|
||||
uio_pruss_evt1: uio_pruss_evt1 {
|
||||
compatible = "ti,uio-module-drv";
|
||||
interrupts = <21>;
|
||||
interrupt-mode = <1>;
|
||||
status = "okay";
|
||||
};
|
||||
uio_pruss_evt2: uio_pruss_evt2 {
|
||||
compatible = "ti,uio-module-drv";
|
||||
interrupts = <22>;
|
||||
interrupt-mode = <1>;
|
||||
status = "okay";
|
||||
};
|
||||
uio_pruss_evt3: uio_pruss_evt3 {
|
||||
compatible = "ti,uio-module-drv";
|
||||
interrupts = <23>;
|
||||
interrupt-mode = <1>;
|
||||
status = "okay";
|
||||
};
|
||||
uio_pruss_evt4: uio_pruss_evt4 {
|
||||
compatible = "ti,uio-module-drv";
|
||||
interrupts = <24>;
|
||||
interrupt-mode = <1>;
|
||||
status = "okay";
|
||||
};
|
||||
uio_pruss_evt5: uio_pruss_evt5 {
|
||||
compatible = "ti,uio-module-drv";
|
||||
interrupts = <25>;
|
||||
interrupt-mode = <1>;
|
||||
status = "okay";
|
||||
};
|
||||
uio_pruss_evt6: uio_pruss_evt6 {
|
||||
compatible = "ti,uio-module-drv";
|
||||
interrupts = <26>;
|
||||
interrupt-mode = <1>;
|
||||
status = "okay";
|
||||
};
|
||||
uio_pruss_evt7: uio_pruss_evt7 {
|
||||
compatible = "ti,uio-module-drv";
|
||||
interrupts = <27>;
|
||||
interrupt-mode = <1>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
uio_pruss_0_mem: uio_pruss_0_mem {
|
||||
compatible = "ti,uio-module-drv";
|
||||
mem = <0x4a334000 0x2000>,
|
||||
<0x4a322000 0x400>,
|
||||
<0x4a322400 0x100>;
|
||||
mem-names = "iram", "control", "debug";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
uio_pruss_1_mem: uio_pruss_1_mem {
|
||||
compatible = "ti,uio-module-drv";
|
||||
mem = <0x4a338000 0x2000>,
|
||||
<0x4a324000 0x400>,
|
||||
<0x4a324400 0x100>;
|
||||
mem-names = "iram", "control", "debug";
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
&am33xx_pinmux {
|
||||
uio_pruss_mdio_eth_default: uio_pruss_mdio_eht_default {
|
||||
pinctrl-single,pins = <
|
||||
AM33XX_IOPAD(0x88c, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_clk.pr1_mdio_mdclk */
|
||||
AM33XX_IOPAD(0x888, (PIN_INPUT | MUX_MODE5)) /* gpmc_csn3.pr1_mdio_data */
|
||||
AM33XX_IOPAD(0x89c, (PIN_INPUT_PULLUP | MUX_MODE7)) /* gpmc_ben0_cle.gpio2_5 */
|
||||
/* disable CPSW MDIO */
|
||||
AM33XX_IOPAD(0x948, (PIN_INPUT_PULLUP | MUX_MODE7)) /* mdio_data.gpio0_0 */
|
||||
AM33XX_IOPAD(0x94c, (PIN_INPUT_PULLUP | MUX_MODE7)) /* mdio_clk.gpio0_1 */
|
||||
AM33XX_IOPAD(0x8a0, (PIN_INPUT | MUX_MODE2)) /* dss_data0.pr1_mii_mt0_clk */
|
||||
AM33XX_IOPAD(0x8b4, (PIN_OUTPUT | MUX_MODE2)) /* dss_data5.pr1_mii0_txd0 */
|
||||
AM33XX_IOPAD(0x8b0, (PIN_OUTPUT | MUX_MODE2)) /* dss_data4.pr1_mii0_txd1 */
|
||||
AM33XX_IOPAD(0x8ac, (PIN_OUTPUT | MUX_MODE2)) /* dss_data3.pr1_mii0_txd2 */
|
||||
AM33XX_IOPAD(0x8a8, (PIN_OUTPUT | MUX_MODE2)) /* dss_data2.pr1_mii0_txd3 */
|
||||
AM33XX_IOPAD(0x8cc, (PIN_INPUT | MUX_MODE5)) /* dss_data11.pr1_mii0_rxd0 */
|
||||
AM33XX_IOPAD(0x8c8, (PIN_INPUT | MUX_MODE5)) /* dss_data10.pr1_mii0_rxd1 */
|
||||
AM33XX_IOPAD(0x8c4, (PIN_INPUT | MUX_MODE5)) /* dss_data9.pr1_mii0_rxd2 */
|
||||
AM33XX_IOPAD(0x8c0, (PIN_INPUT | MUX_MODE5)) /* dss_data8.pr1_mii0_rxd3 */
|
||||
AM33XX_IOPAD(0x8a4, (PIN_OUTPUT | MUX_MODE2)) /* dss_data1.pr1_mii0_txen */
|
||||
AM33XX_IOPAD(0x8d8, (PIN_INPUT | MUX_MODE5)) /* dss_data14.pr1_mii_mr0_clk */
|
||||
AM33XX_IOPAD(0x8dc, (PIN_INPUT | MUX_MODE5)) /* dss_data15.pr1_mii0_rxdv */
|
||||
AM33XX_IOPAD(0x8d4, (PIN_INPUT | MUX_MODE5)) /* dss_data13.pr1_mii0_rxer */
|
||||
AM33XX_IOPAD(0x8d0, (PIN_INPUT | MUX_MODE5)) /* dss_data12.pr1_mii0_rxlink */
|
||||
AM33XX_IOPAD(0x8e8, (PIN_INPUT | MUX_MODE2)) /* dss_pclk.pr1_mii0_crs */
|
||||
|
||||
AM33XX_IOPAD(0x840, (PIN_INPUT | MUX_MODE5)) /* gpmc_a0.pr1_mii_mt1_clk */
|
||||
AM33XX_IOPAD(0x850, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_a4.pr1_mii1_txd0 */
|
||||
AM33XX_IOPAD(0x84c, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_a3.pr1_mii1_txd1 */
|
||||
AM33XX_IOPAD(0x848, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_a2.pr1_mii1_txd2 */
|
||||
AM33XX_IOPAD(0x844, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_a1.pr1_mii1_txd3 */
|
||||
AM33XX_IOPAD(0x860, (PIN_INPUT | MUX_MODE5)) /* gpmc_a8.pr1_mii1_rxd0 */
|
||||
AM33XX_IOPAD(0x85c, (PIN_INPUT | MUX_MODE5)) /* gpmc_a7.pr1_mii1_rxd1 */
|
||||
AM33XX_IOPAD(0x858, (PIN_INPUT | MUX_MODE5)) /* gpmc_a6.pr1_mii1_rxd2 */
|
||||
AM33XX_IOPAD(0x854, (PIN_INPUT | MUX_MODE5)) /* gpmc_a5.pr1_mii1_rxd3 */
|
||||
AM33XX_IOPAD(0x874, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_wpn.pr1_mii1_txen */
|
||||
AM33XX_IOPAD(0x864, (PIN_INPUT | MUX_MODE5)) /* gpmc_a9.pr1_mii_mr1_clk */
|
||||
AM33XX_IOPAD(0x868, (PIN_INPUT | MUX_MODE5)) /* gpmc_a10.pr1_mii1_rxdv */
|
||||
AM33XX_IOPAD(0x86c, (PIN_INPUT | MUX_MODE5)) /* gpmc_a11.pr1_mii1_rxer */
|
||||
AM33XX_IOPAD(0x878, (PIN_INPUT | MUX_MODE5)) /* gpmc_ben1.pr1_mii1_rxlink */
|
||||
AM33XX_IOPAD(0x8ec, (PIN_INPUT | MUX_MODE2)) /* lcd_ac_bias_en.pr1_mii1_crs */
|
||||
AM33XX_IOPAD(0x870, (PIN_INPUT | MUX_MODE5)) /* gpmc_wait0.pr1_mii1_col */
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
&uio_pruss_mdio {
|
||||
pinctrl-0 = <&uio_pruss_mdio_eth_default>;
|
||||
pinctrl-names = "default";
|
||||
reset-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
|
||||
reset-delay-us = <2>; /* PHY datasheet states 1uS min */
|
||||
status = "okay";
|
||||
|
||||
uio_pruss_eth0_phy: ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
|
||||
uio_pruss_eth1_phy: ethernet-phy@3 {
|
||||
reg = <3>;
|
||||
};
|
||||
};
|
||||
|
||||
&pruss {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&pru0 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&pru1 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&pruss_intc {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&pruss_mdio {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&pruss_emac0 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&pruss_emac1 {
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
use-tisdk-config=ti_sdk_omap2_release
|
||||
@@ -0,0 +1 @@
|
||||
use-tisdk-config=ti_sdk_dra7x_release
|
||||
@@ -0,0 +1 @@
|
||||
use-tisdk-config=ti_sdk_k2g_release
|
||||
@@ -0,0 +1 @@
|
||||
use-tisdk-config=ti_sdk_arm64_release
|
||||
@@ -0,0 +1 @@
|
||||
use-tisdk-config=ti_sdk_keystone_release
|
||||
@@ -0,0 +1 @@
|
||||
use-tisdk-config=ti_sdk_omapl138_release
|
||||
@@ -0,0 +1 @@
|
||||
use-tisdk-config=ti_sdk_am3x_release
|
||||
@@ -0,0 +1 @@
|
||||
use-tisdk-config=ti_sdk_am4x_release
|
||||
@@ -2,10 +2,9 @@
|
||||
# Release under the MIT license (see COPYING.MIT for the terms)
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
|
||||
|
||||
#SRC_URI += " \
|
||||
# file://am335x-pengwyn.dts \
|
||||
# file://0001-dts-makefile.patch \
|
||||
# "
|
||||
SRC_URI += " \
|
||||
file://0001-dtc-lexer-extern-yylloc.patch \
|
||||
"
|
||||
#
|
||||
#do_configure:append() {
|
||||
# cp ${WORKDIR}/am335x-pengwyn.dts ${S}/arch/arm/boot/dts/
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
SECTION = "kernel"
|
||||
DESCRIPTION = "Linux kernel for TI devices"
|
||||
LICENSE = "GPLv2"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
|
||||
|
||||
inherit kernel
|
||||
PACKREV = "5.4"
|
||||
require recipes-kernel/linux/setup-defconfig_${PACKREV}.inc
|
||||
#require recipes-kernel/linux/cmem_${PACKREV}.inc
|
||||
require recipes-kernel/linux/ti-uio_${PACKREV}.inc
|
||||
require recipes-kernel/linux/bundle-devicetree_${PACKREV}.inc
|
||||
|
||||
# Look in the generic major.minor directory for files
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-5.4:"
|
||||
|
||||
# Pull in the devicetree files into the rootfs
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base += "kernel-devicetree"
|
||||
|
||||
# Add run-time dependency for PM firmware to the rootfs
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:ti33x = " amx3-cm3"
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:ti43x = " amx3-cm3"
|
||||
|
||||
# Add run-time dependency for VPE VPDMA firmware to the rootfs
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:dra7xx = " vpdma-fw"
|
||||
|
||||
# Add run-time dependency for Goodix firmware to the rootfs
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:dra7xx = " goodix-fw"
|
||||
|
||||
# Install boot-monitor skern file into /boot dir of rootfs
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:keystone = " boot-monitor"
|
||||
|
||||
# Install ti-sci-fw into /boot dir of rootfs
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:k2g = " ti-sci-fw"
|
||||
|
||||
# Add run-time dependency for SerDes firmware to the rootfs
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:keystone = " serdes-fw"
|
||||
|
||||
# Add run-time dependency for QMSS PDSP firmware to the rootfs
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:keystone = " qmss-pdsp-fw"
|
||||
|
||||
# Add run-time dependency for NETCP PA firmware to the rootfs
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:k2hk = " netcp-pa-fw"
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:k2e = " netcp-pa-fw"
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:k2l = " netcp-pa-fw"
|
||||
|
||||
# Add run-time dependency for PRU Ethernet firmware to the rootfs
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:am57xx-evm = " prueth-fw"
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:am57xx-hs-evm = " prueth-fw"
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:ti43x = " prueth-fw"
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:ti33x = " prueth-fw"
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:k2g = " prueth-fw"
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:am65xx = " prueth-fw-am65x"
|
||||
|
||||
# Add run-time dependency for Cadence MHDP firmware to the rootfs
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:j7-evm = " cadence-mhdp-fw"
|
||||
|
||||
KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
BRANCH = "ti-linux-5.4.y"
|
||||
|
||||
SRCREV = "6f3bf13d53820fc12432d7052744be2ee046fc92"
|
||||
PV = "5.4.28+git${SRCPV}"
|
||||
|
||||
# Append to the MACHINE_KERNEL_PR so that a new SRCREV will cause a rebuild
|
||||
MACHINE_KERNEL_PR:append = "a"
|
||||
PR = "${MACHINE_KERNEL_PR}"
|
||||
|
||||
KERNEL_GIT_URI = "git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git"
|
||||
KERNEL_GIT_PROTOCOL = "git"
|
||||
SRC_URI += "${KERNEL_GIT_URI};protocol=${KERNEL_GIT_PROTOCOL};branch=${BRANCH} \
|
||||
file://defconfig"
|
||||
|
||||
FILES_${KERNEL_PACKAGE_NAME}-devicetree += "/${KERNEL_IMAGEDEST}/*.itb"
|
||||
|
||||
# Special configuration for remoteproc/rpmsg IPC modules
|
||||
module_conf_rpmsg_client_sample = "blacklist rpmsg_client_sample"
|
||||
module_conf_ti_k3_r5_remoteproc = "softdep ti_k3_r5_remoteproc pre: virtio_rpmsg_bus"
|
||||
module_conf_ti_k3_dsp_remoteproc = "softdep ti_k3_dsp_remoteproc pre: virtio_rpmsg_bus"
|
||||
KERNEL_MODULE_PROBECONF += "rpmsg_client_sample ti_k3_r5_remoteproc ti_k3_dsp_remoteproc"
|
||||
@@ -0,0 +1,92 @@
|
||||
# KERNEL_LOCALVERSION can be set to add a tag to the end of the
|
||||
# kernel version string. such as the commit id
|
||||
def get_git_revision(p):
|
||||
import subprocess
|
||||
|
||||
try:
|
||||
return subprocess.Popen("git rev-parse HEAD 2>/dev/null ", cwd=p, shell=True, stdout=subprocess.PIPE, universal_newlines=True).communicate()[0].rstrip()
|
||||
except OSError:
|
||||
return None
|
||||
|
||||
KERNEL_LOCALVERSION = "-g${@get_git_revision('${S}').__str__()[:10]}"
|
||||
|
||||
# Check the defconfig file and see if it points to an in kernel
|
||||
# defconfig that should be used, or if it is a complete config file
|
||||
# Or if it points to a combined defconfig that lists both in kernel
|
||||
# defconfig and associated config fragments.
|
||||
|
||||
do_configure() {
|
||||
# Always copy the defconfig file to .config to keep consistency
|
||||
# between the case where there is a real config and the in kernel
|
||||
# tree config
|
||||
cp ${WORKDIR}/defconfig ${B}/.config
|
||||
|
||||
echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
|
||||
echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion
|
||||
|
||||
# Zero, when using "tisdk" configs, pass control to defconfig_builder
|
||||
config=`cat ${B}/.config | grep use-tisdk-config | cut -d= -f2`
|
||||
if [ -n "$config" ]
|
||||
then
|
||||
${S}/ti_config_fragments/defconfig_builder.sh -w ${S} -t $config
|
||||
oe_runmake -C ${S} O=${B} "$config"_defconfig
|
||||
else
|
||||
# First, check if pointing to a combined config with config fragments
|
||||
config=`cat ${B}/.config | grep use-combined-config | cut -d= -f2`
|
||||
if [ -n "$config" ]
|
||||
then
|
||||
cp ${S}/$config ${B}/.config
|
||||
fi
|
||||
|
||||
# Second, extract any config fragments listed in the defconfig
|
||||
config=`cat ${B}/.config | grep config-fragment | cut -d= -f2`
|
||||
if [ -n "$config" ]
|
||||
then
|
||||
configfrags=""
|
||||
for f in $config
|
||||
do
|
||||
# Check if the config fragment is available
|
||||
if [ ! -e "${S}/$f" ]
|
||||
then
|
||||
echo "Could not find kernel config fragment $f"
|
||||
exit 1
|
||||
else
|
||||
# Sanitize config fragment files to be relative to sources
|
||||
configfrags="$configfrags ${S}/$f"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Third, check if pointing to a known in kernel defconfig
|
||||
config=`cat ${B}/.config | grep use-kernel-config | cut -d= -f2`
|
||||
if [ -n "$config" ]
|
||||
then
|
||||
oe_runmake -C ${S} O=${B} $config
|
||||
else
|
||||
yes '' | oe_runmake -C ${S} O=${B} oldconfig
|
||||
fi
|
||||
fi
|
||||
|
||||
# Fourth, handle config fragments specified in the recipe
|
||||
# The assumption is that the config fragment will be specified with the absolute path.
|
||||
# E.g. ${WORKDIR}/config1.cfg or ${S}/config2.cfg
|
||||
if [ -n "${KERNEL_CONFIG_FRAGMENTS}" ]
|
||||
then
|
||||
for f in ${KERNEL_CONFIG_FRAGMENTS}
|
||||
do
|
||||
# Check if the config fragment is available
|
||||
if [ ! -e "$f" ]
|
||||
then
|
||||
echo "Could not find kernel config fragment $f"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Now that all the fragments are located merge them
|
||||
if [ -n "${KERNEL_CONFIG_FRAGMENTS}" -o -n "$configfrags" ]
|
||||
then
|
||||
( cd ${WORKDIR} && ${S}/scripts/kconfig/merge_config.sh -m -r -O ${B} ${B}/.config $configfrags ${KERNEL_CONFIG_FRAGMENTS} 1>&2 )
|
||||
yes '' | oe_runmake -C ${S} O=${B} oldconfig
|
||||
fi
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
SRC_URI:append:keystone = " file://keystone-uio.dtsi"
|
||||
SRC_URI:append:k2hk = " file://k2hk-uio.dtsi"
|
||||
SRC_URI:append:k2l = " file://k2l-uio.dtsi"
|
||||
SRC_URI:append:k2e = " file://k2e-uio.dtsi"
|
||||
SRC_URI:append:k2g = " file://keystone-k2g-pru-uio.dtsi"
|
||||
SRC_URI:append:dra7xx = " file://am57xx-pru-uio.dtsi \
|
||||
file://am571x-pru-uio.dtsi \
|
||||
"
|
||||
SRC_URI:append:ti33x = " file://am335x-pru-uio.dtsi"
|
||||
SRC_URI:append:ti43x = " file://am437x-pru-uio.dtsi"
|
||||
|
||||
DTSI_LIST = ""
|
||||
DTSI_LIST:append:keystone = " keystone-uio.dtsi"
|
||||
DTSI_LIST:append:k2hk = " k2hk-uio.dtsi"
|
||||
DTSI_LIST:append:k2l = " k2l-uio.dtsi"
|
||||
DTSI_LIST:append:k2e = " k2e-uio.dtsi"
|
||||
|
||||
do_setup_uio() {
|
||||
if [ "${ENABLE_TI_UIO_DEVICES}" == "1" ]
|
||||
then
|
||||
for dtsi in ${DTSI_LIST}
|
||||
do
|
||||
cp ${WORKDIR}/${dtsi} ${S}/arch/arm/boot/dts/
|
||||
for dtb in ${KERNEL_DEVICETREE}
|
||||
do
|
||||
dts=`echo $dtb | sed -e 's|dtb$|dts|'`
|
||||
echo "#include \"${dtsi}\"" >> ${S}/arch/arm/boot/dts/$dts
|
||||
done
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
do_setup_uio:append:dra7xx() {
|
||||
|
||||
if [ "${ENABLE_TI_UIO_DEVICES}" == "1" ]
|
||||
then
|
||||
dtsi="am57xx-pru-uio.dtsi"
|
||||
cp ${WORKDIR}/${dtsi} ${S}/arch/arm/boot/dts/
|
||||
|
||||
dts="am572x-idk-pru-excl-uio.dts"
|
||||
cp ${S}/arch/arm/boot/dts/am572x-idk.dts ${S}/arch/arm/boot/dts/$dts
|
||||
echo "#include \"${dtsi}\"" >> ${S}/arch/arm/boot/dts/$dts
|
||||
|
||||
dts="am574x-idk-pru-excl-uio.dts"
|
||||
cp ${S}/arch/arm/boot/dts/am574x-idk.dts ${S}/arch/arm/boot/dts/$dts
|
||||
echo "#include \"${dtsi}\"" >> ${S}/arch/arm/boot/dts/$dts
|
||||
|
||||
dts="am571x-idk-pru-excl-uio.dts"
|
||||
dtsi="am571x-pru-uio.dtsi"
|
||||
cp ${S}/arch/arm/boot/dts/am571x-idk.dts ${S}/arch/arm/boot/dts/$dts
|
||||
cp ${WORKDIR}/${dtsi} ${S}/arch/arm/boot/dts/
|
||||
echo "#include \"${dtsi}\"" >> ${S}/arch/arm/boot/dts/$dts
|
||||
fi
|
||||
}
|
||||
|
||||
do_setup_uio:append:ti33x() {
|
||||
|
||||
if [ "${ENABLE_TI_UIO_DEVICES}" == "1" ]
|
||||
then
|
||||
dts="am335x-icev2-pru-excl-uio.dts"
|
||||
dtsi="am335x-pru-uio.dtsi"
|
||||
cp ${S}/arch/arm/boot/dts/am335x-icev2-prueth.dts ${S}/arch/arm/boot/dts/$dts
|
||||
cp ${WORKDIR}/${dtsi} ${S}/arch/arm/boot/dts/
|
||||
echo "#include \"${dtsi}\"" >> ${S}/arch/arm/boot/dts/$dts
|
||||
fi
|
||||
}
|
||||
|
||||
do_setup_uio:append:ti43x() {
|
||||
|
||||
if [ "${ENABLE_TI_UIO_DEVICES}" == "1" ]
|
||||
then
|
||||
dts="am437x-idk-pru-excl-uio.dts"
|
||||
dtsi="am437x-pru-uio.dtsi"
|
||||
cp ${S}/arch/arm/boot/dts/am437x-idk-evm.dts ${S}/arch/arm/boot/dts/$dts
|
||||
cp ${WORKDIR}/${dtsi} ${S}/arch/arm/boot/dts/
|
||||
echo "#include \"${dtsi}\"" >> ${S}/arch/arm/boot/dts/$dts
|
||||
fi
|
||||
}
|
||||
|
||||
do_setup_uio:append:k2g() {
|
||||
|
||||
if [ "${ENABLE_TI_UIO_DEVICES}" == "1" ]
|
||||
then
|
||||
dts="keystone-k2g-ice-pru-excl-uio.dts"
|
||||
dtsi="keystone-k2g-pru-uio.dtsi"
|
||||
cp ${S}/arch/arm/boot/dts/keystone-k2g-ice.dts ${S}/arch/arm/boot/dts/$dts
|
||||
cp ${WORKDIR}/${dtsi} ${S}/arch/arm/boot/dts/
|
||||
echo "#include \"${dtsi}\"" >> ${S}/arch/arm/boot/dts/$dts
|
||||
fi
|
||||
}
|
||||
|
||||
do_patch[postfuncs] += "do_setup_uio"
|
||||
Reference in New Issue
Block a user