From 4f16d310b8c77b7c7db074a03352a9159c0d69e9 Mon Sep 17 00:00:00 2001 From: Eric Lee Date: Fri, 26 Aug 2016 14:39:16 +0800 Subject: [PATCH] Modify some recipts for newer yocto update and kernel defconfig file to better support power management --- recipes-core/base-files/base-files_%.bbappend | 2 +- recipes-core/busybox/busybox_%.bbappend | 8 +++++++ recipes-core/busybox/busybox_1.23.1.bbappend | 8 ------- .../init-ifupdown/init-ifupdown_%.bbappend | 2 +- recipes-core/initscripts/initscripts_1.0.bbappend | 2 +- recipes-core/udev/eudev/dra7xx/udev-cache.default | 5 +++++ .../udev/eudev/keystone/udev-cache.default | 5 +++++ recipes-core/udev/eudev/local.rules | 26 ++++++++++++++++++++++ recipes-core/udev/eudev/usb1-rules.sh | 3 +++ recipes-core/udev/eudev/usb2-rules.sh | 3 +++ recipes-core/udev/eudev_%.bbappend | 22 ++++++++++++++++++ recipes-core/udev/udev/dra7xx/udev-cache.default | 5 ----- recipes-core/udev/udev/local.rules | 26 ---------------------- recipes-core/udev/udev/usb1-rules.sh | 3 --- recipes-core/udev/udev/usb2-rules.sh | 3 --- recipes-core/udev/udev_%.bbappend | 21 ----------------- .../linux/linux-smarct437x-staging-4.4/defconfig | 19 ++++++++-------- .../linux/linux-smarct437x-staging_4.4.bb | 17 -------------- 18 files changed, 85 insertions(+), 95 deletions(-) create mode 100644 recipes-core/busybox/busybox_%.bbappend delete mode 100644 recipes-core/busybox/busybox_1.23.1.bbappend create mode 100644 recipes-core/udev/eudev/dra7xx/udev-cache.default create mode 100644 recipes-core/udev/eudev/keystone/udev-cache.default create mode 100644 recipes-core/udev/eudev/local.rules create mode 100755 recipes-core/udev/eudev/usb1-rules.sh create mode 100755 recipes-core/udev/eudev/usb2-rules.sh create mode 100644 recipes-core/udev/eudev_%.bbappend delete mode 100644 recipes-core/udev/udev/dra7xx/udev-cache.default delete mode 100644 recipes-core/udev/udev/local.rules delete mode 100755 recipes-core/udev/udev/usb1-rules.sh delete mode 100755 recipes-core/udev/udev/usb2-rules.sh delete mode 100644 recipes-core/udev/udev_%.bbappend diff --git a/recipes-core/base-files/base-files_%.bbappend b/recipes-core/base-files/base-files_%.bbappend index f65a3a7..b33ed85 100644 --- a/recipes-core/base-files/base-files_%.bbappend +++ b/recipes-core/base-files/base-files_%.bbappend @@ -1,4 +1,4 @@ # look for files in this layer first FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -PR_append = "-smarc4" +PR_append = ".smarc4" diff --git a/recipes-core/busybox/busybox_%.bbappend b/recipes-core/busybox/busybox_%.bbappend new file mode 100644 index 0000000..f468487 --- /dev/null +++ b/recipes-core/busybox/busybox_%.bbappend @@ -0,0 +1,8 @@ +# look for files in this layer first +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +PR_append = ".smarc1" + +SRC_URI += " \ + file://defconfig \ +" diff --git a/recipes-core/busybox/busybox_1.23.1.bbappend b/recipes-core/busybox/busybox_1.23.1.bbappend deleted file mode 100644 index 2fb9773..0000000 --- a/recipes-core/busybox/busybox_1.23.1.bbappend +++ /dev/null @@ -1,8 +0,0 @@ -# look for files in this layer first -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -PR_append = "-smarc1" - -SRC_URI += " \ - file://defconfig \ -" diff --git a/recipes-core/init-ifupdown/init-ifupdown_%.bbappend b/recipes-core/init-ifupdown/init-ifupdown_%.bbappend index 72285b8..2579e72 100644 --- a/recipes-core/init-ifupdown/init-ifupdown_%.bbappend +++ b/recipes-core/init-ifupdown/init-ifupdown_%.bbappend @@ -1,4 +1,4 @@ # look for files in this layer first FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -PR_append = "-smarc0" +PR_append = ".smarc0" diff --git a/recipes-core/initscripts/initscripts_1.0.bbappend b/recipes-core/initscripts/initscripts_1.0.bbappend index b5d2dd1..df56447 100644 --- a/recipes-core/initscripts/initscripts_1.0.bbappend +++ b/recipes-core/initscripts/initscripts_1.0.bbappend @@ -1,5 +1,5 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" -PR_append = "-smarc" +PR_append = ".smarc" do_install_append(){ ln -sf ../init.d/networking ${D}${sysconfdir}/rc5.d/S20networking diff --git a/recipes-core/udev/eudev/dra7xx/udev-cache.default b/recipes-core/udev/eudev/dra7xx/udev-cache.default new file mode 100644 index 0000000..b1aa63f --- /dev/null +++ b/recipes-core/udev/eudev/dra7xx/udev-cache.default @@ -0,0 +1,5 @@ +# Default for /etc/init.d/udev + +# Comment this out to disable device cache +#DEVCACHE="/etc/dev.tar" +PROBE_PLATFORM_BUS="yes" diff --git a/recipes-core/udev/eudev/keystone/udev-cache.default b/recipes-core/udev/eudev/keystone/udev-cache.default new file mode 100644 index 0000000..b1aa63f --- /dev/null +++ b/recipes-core/udev/eudev/keystone/udev-cache.default @@ -0,0 +1,5 @@ +# Default for /etc/init.d/udev + +# Comment this out to disable device cache +#DEVCACHE="/etc/dev.tar" +PROBE_PLATFORM_BUS="yes" diff --git a/recipes-core/udev/eudev/local.rules b/recipes-core/udev/eudev/local.rules new file mode 100644 index 0000000..689e093 --- /dev/null +++ b/recipes-core/udev/eudev/local.rules @@ -0,0 +1,26 @@ +# There are a number of modifiers that are allowed to be used in some +# of the different fields. They provide the following subsitutions: +# +# %n the "kernel number" of the device. +# For example, 'sda3' has a "kernel number" of '3' +# %e the smallest number for that name which does not matches an existing node +# %k the kernel name for the device +# %M the kernel major number for the device +# %m the kernel minor number for the device +# %b the bus id for the device +# %c the string returned by the PROGRAM +# %s{filename} the content of a sysfs attribute +# %% the '%' char itself +# + +# Try and modprobe for drivers for new hardware +ACTION=="add", DEVPATH=="/devices/*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}" + +# Create a symlink to any touchscreen input device +SUBSYSTEM=="input", KERNEL=="event[0-9]*", ENV{ID_INPUT_TOUCHSCREEN}=="1", SYMLINK+="input/touchscreen0" + +# Auto-mount any SD cards +ACTION=="add", KERNEL=="mmcblk[0-9]p[0-9]", SUBSYSTEM=="block", RUN+="/etc/udev/scripts/mount.sh" +ACTION=="remove", KERNEL=="mmcblk[0-9]p[0-9]", SUBSYSTEM=="block", RUN+="/etc/udev/scripts/mount.sh" +ACTION=="add", DEVPATH=="/devices/44000000\.ocp/48880000\.omap_dwc3_1/48890000\.usb/udc*", RUN+="/usr/bin/usb1-rules.sh" +ACTION=="add", DEVPATH=="/devices/44000000\.ocp/488c0000\.omap_dwc3_2/488d0000\.usb/udc*", RUN+="/usr/bin/usb2-rules.sh" diff --git a/recipes-core/udev/eudev/usb1-rules.sh b/recipes-core/udev/eudev/usb1-rules.sh new file mode 100755 index 0000000..51dfd71 --- /dev/null +++ b/recipes-core/udev/eudev/usb1-rules.sh @@ -0,0 +1,3 @@ +#!bin/sh +/sbin/modprobe g_ncm -r +/sbin/modprobe g_ncm diff --git a/recipes-core/udev/eudev/usb2-rules.sh b/recipes-core/udev/eudev/usb2-rules.sh new file mode 100755 index 0000000..f00565e --- /dev/null +++ b/recipes-core/udev/eudev/usb2-rules.sh @@ -0,0 +1,3 @@ +#!bin/sh +/sbin/modprobe g_zero -r +/sbin/modprobe g_zero diff --git a/recipes-core/udev/eudev_%.bbappend b/recipes-core/udev/eudev_%.bbappend new file mode 100644 index 0000000..90359a8 --- /dev/null +++ b/recipes-core/udev/eudev_%.bbappend @@ -0,0 +1,22 @@ +# This fixes an issue with touchscreens not being detected with the default +# local.rules. This can be removed when this change is picked up and +# meta-arago switches to Dora + +# look for files in this layer first +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +PR_append = ".smarc5" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +SRC_URI_append = " \ + file://usb1-rules.sh \ + file://usb2-rules.sh" + +do_install_append() { + install -d ${D}/${bindir} + + install -m 0755 ${WORKDIR}/usb1-rules.sh ${D}${bindir}/usb1-rules.sh + install -m 0755 ${WORKDIR}/usb2-rules.sh ${D}${bindir}/usb2-rules.sh + ln -sf libudev.so.1 ${D}${base_libdir}/libudev.so.0 +} diff --git a/recipes-core/udev/udev/dra7xx/udev-cache.default b/recipes-core/udev/udev/dra7xx/udev-cache.default deleted file mode 100644 index b1aa63f..0000000 --- a/recipes-core/udev/udev/dra7xx/udev-cache.default +++ /dev/null @@ -1,5 +0,0 @@ -# Default for /etc/init.d/udev - -# Comment this out to disable device cache -#DEVCACHE="/etc/dev.tar" -PROBE_PLATFORM_BUS="yes" diff --git a/recipes-core/udev/udev/local.rules b/recipes-core/udev/udev/local.rules deleted file mode 100644 index 689e093..0000000 --- a/recipes-core/udev/udev/local.rules +++ /dev/null @@ -1,26 +0,0 @@ -# There are a number of modifiers that are allowed to be used in some -# of the different fields. They provide the following subsitutions: -# -# %n the "kernel number" of the device. -# For example, 'sda3' has a "kernel number" of '3' -# %e the smallest number for that name which does not matches an existing node -# %k the kernel name for the device -# %M the kernel major number for the device -# %m the kernel minor number for the device -# %b the bus id for the device -# %c the string returned by the PROGRAM -# %s{filename} the content of a sysfs attribute -# %% the '%' char itself -# - -# Try and modprobe for drivers for new hardware -ACTION=="add", DEVPATH=="/devices/*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}" - -# Create a symlink to any touchscreen input device -SUBSYSTEM=="input", KERNEL=="event[0-9]*", ENV{ID_INPUT_TOUCHSCREEN}=="1", SYMLINK+="input/touchscreen0" - -# Auto-mount any SD cards -ACTION=="add", KERNEL=="mmcblk[0-9]p[0-9]", SUBSYSTEM=="block", RUN+="/etc/udev/scripts/mount.sh" -ACTION=="remove", KERNEL=="mmcblk[0-9]p[0-9]", SUBSYSTEM=="block", RUN+="/etc/udev/scripts/mount.sh" -ACTION=="add", DEVPATH=="/devices/44000000\.ocp/48880000\.omap_dwc3_1/48890000\.usb/udc*", RUN+="/usr/bin/usb1-rules.sh" -ACTION=="add", DEVPATH=="/devices/44000000\.ocp/488c0000\.omap_dwc3_2/488d0000\.usb/udc*", RUN+="/usr/bin/usb2-rules.sh" diff --git a/recipes-core/udev/udev/usb1-rules.sh b/recipes-core/udev/udev/usb1-rules.sh deleted file mode 100755 index 51dfd71..0000000 --- a/recipes-core/udev/udev/usb1-rules.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!bin/sh -/sbin/modprobe g_ncm -r -/sbin/modprobe g_ncm diff --git a/recipes-core/udev/udev/usb2-rules.sh b/recipes-core/udev/udev/usb2-rules.sh deleted file mode 100755 index f00565e..0000000 --- a/recipes-core/udev/udev/usb2-rules.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!bin/sh -/sbin/modprobe g_zero -r -/sbin/modprobe g_zero diff --git a/recipes-core/udev/udev_%.bbappend b/recipes-core/udev/udev_%.bbappend deleted file mode 100644 index 05eaca0..0000000 --- a/recipes-core/udev/udev_%.bbappend +++ /dev/null @@ -1,21 +0,0 @@ -# This fixes an issue with touchscreens not being detected with the default -# local.rules. This can be removed when this change is picked up and -# meta-arago switches to Dora - -# look for files in this layer first -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -PR_append = "-smarc4" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -SRC_URI_append = " \ - file://usb1-rules.sh \ - file://usb2-rules.sh" - -do_install_append() { - install -d ${D}/${bindir} - - install -m 0755 ${WORKDIR}/usb1-rules.sh ${D}${bindir}/usb1-rules.sh - install -m 0755 ${WORKDIR}/usb2-rules.sh ${D}${bindir}/usb2-rules.sh -} diff --git a/recipes-kernel/linux/linux-smarct437x-staging-4.4/defconfig b/recipes-kernel/linux/linux-smarct437x-staging-4.4/defconfig index bbaff32..44f0add 100644 --- a/recipes-kernel/linux/linux-smarct437x-staging-4.4/defconfig +++ b/recipes-kernel/linux/linux-smarct437x-staging-4.4/defconfig @@ -604,12 +604,11 @@ CONFIG_ARM_TI_CPUFREQ=y CONFIG_CPU_IDLE=y CONFIG_CPU_IDLE_GOV_LADDER=y CONFIG_CPU_IDLE_GOV_MENU=y -CONFIG_DT_IDLE_STATES=y # # ARM CPU Idle Drivers # -CONFIG_ARM_CPUIDLE=y +# CONFIG_ARM_CPUIDLE is not set # CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set # @@ -1169,7 +1168,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y CONFIG_FIRMWARE_IN_KERNEL=y CONFIG_EXTRA_FIRMWARE="" -CONFIG_EXTRA_FIRMWARE_DIR="firmware" CONFIG_FW_LOADER_USER_HELPER=y CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y CONFIG_WANT_DEV_COREDUMP=y @@ -3671,7 +3669,10 @@ CONFIG_DW_DMAC=y # CONFIG_ASYNC_TX_DMA is not set # CONFIG_DMATEST is not set # CONFIG_AUXDISPLAY is not set -# CONFIG_UIO is not set +CONFIG_UIO=y +CONFIG_UIO_PDRV_GENIRQ=y +CONFIG_UIO_DMEM_GENIRQ=y +# CONFIG_UIO_PRUSS is not set # CONFIG_VFIO is not set # CONFIG_VIRT_DRIVERS is not set CONFIG_VIRTIO=y @@ -3763,7 +3764,7 @@ CONFIG_WKUP_M3_RPROC=y # CONFIG_SOC_BRCMSTB is not set # CONFIG_SUNXI_SRAM is not set CONFIG_SOC_TI=y -CONFIG_AMX3_PM=m +CONFIG_AMX3_PM=y CONFIG_OPP_DOMAIN_TI=y CONFIG_WKUP_M3_IPC=y # CONFIG_PM_DEVFREQ is not set @@ -3779,10 +3780,10 @@ CONFIG_EXTCON_PALMAS=m # CONFIG_EXTCON_SM5502 is not set CONFIG_EXTCON_USB_GPIO=m CONFIG_MEMORY=y -# CONFIG_TI_EMIF is not set +CONFIG_TI_EMIF=y CONFIG_OMAP_GPMC=y -# CONFIG_OMAP_GPMC_DEBUG is not set -CONFIG_TI_EMIF_SRAM=m +CONFIG_OMAP_GPMC_DEBUG=y +CONFIG_TI_EMIF_SRAM=y CONFIG_IIO=y CONFIG_IIO_BUFFER=y # CONFIG_IIO_BUFFER_CB is not set @@ -4646,7 +4647,7 @@ CONFIG_GLOB=y CONFIG_NLATTR=y CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y # CONFIG_CORDIC is not set -# CONFIG_DDR is not set +CONFIG_DDR=y CONFIG_LIBFDT=y CONFIG_OID_REGISTRY=y CONFIG_FONT_SUPPORT=y diff --git a/recipes-kernel/linux/linux-smarct437x-staging_4.4.bb b/recipes-kernel/linux/linux-smarct437x-staging_4.4.bb index 33739d8..bbb9d74 100644 --- a/recipes-kernel/linux/linux-smarct437x-staging_4.4.bb +++ b/recipes-kernel/linux/linux-smarct437x-staging_4.4.bb @@ -72,20 +72,3 @@ MULTI_CONFIG_BASE_SUFFIX = "" SRC_URI = "${EMB_KERNEL_MIRROR};protocol=ssh;branch=${BRANCH} \ file://defconfig \ " - -# Add append for SDK-03.00.00.04 specific changes not in mainline -MACHINE_KERNEL_PR_append = "-smarc2" - -EXTRAPATHS_prepend := "${THISDIR}/${P}:" - -require copy-defconfig.inc - -KERNEL_LOCALVERSION = "-g${@d.getVar('SRCPV', True).partition('+')[2][0:7]}" - -kernel_do_configure_prepend() { - if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ] - then - echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion - echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion - fi -} -- 1.9.1