All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] kernel: consolidated pull request
@ 2018-02-28  2:06 Bruce Ashfield
  2018-02-28  2:06 ` [PATCH 1/3] linux-yocto/4.14/4.15: yaffs2 fixes Bruce Ashfield
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Bruce Ashfield @ 2018-02-28  2:06 UTC (permalink / raw)
  To: richard.purdie; +Cc: openembedded-core

Hi all,

I have some more -stable changes queued for the kernels, but didn't want
to sit on these any longer, in particulare the re-work of kernel-devsrc
to not suck up hundreds of megs, or hundreds of seconds of processing.

The 4.12 update is a feature addition, while 4.14/4.15 are yaffs2 warning
fixes.

The commit log for kernel-devsrc explains the changes:

-----------------------

    Subject: [PATCH 3/3] kernel-devsrc: restructure for out of tree (and on  target) module builds

    The existing kernel-devsrc package starts with a full copy of the kernel
    source and then starts to strip out elements that are not required.

    This results in extra time (I/O) and extra space being taken up in the
    final package. The main purpose of the kernel-devsrc package has been to
    build modules against the running kernel, not to include a full copy of
    the source code for re-building the kernel. The end result was a
    600M kernel-devsrc package.

    This restructuring of the package uses an approach similar to other
    distros, where the kernel-devsrc package is for building against the
    running kernel and uses a curated set of copied infrastructure, versus
    a mass copy of the entire kernel.

    The differences in this approach versus other is largely due to the
    architecture support and the split build/source directory of the
    kernel.

    The result is a kernel-devsrc package of about 10M, which is capable
    of running "make scripts" and compiling kernel modules against the
    running kernel.

    Along with the changes to the copying of the infrascture, we also
    have the following changes:

     - a better/more explicit listing of dependencies for on-target
       builds of "make scripts" or "make modules_prepare"

     - The kernel source is installed into /lib/modules/<version>/build
       and a symlink created from /usr/src/kernel to the new location.
       This aligns with the standard location for module support
       code

     - There is also a symlink from /lib/modules/<version>/source -> build
       to reserve a spot for a new package that is simply the kernel
       source. That package is not part of this update.

    [YOCTO #12535]

    Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>

-----------------------

Cheers,

Bruce

The following changes since commit 1b7a9d4f63d07d61d53daac12da275e8ef2feb24:

  buildhistory-diff: honour report_all flag (2018-02-24 10:35:59 +0000)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib zedd/kernel
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=zedd/kernel

Bruce Ashfield (3):
  linux-yocto/4.14/4.15: yaffs2 fixes
  linux-yocto/4.12: add stratix10 SoC development board
  kernel-devsrc: restructure for out of tree (and on target) module
    builds

 meta/recipes-kernel/linux/kernel-devsrc.bb         | 178 ++++++++++++++++-----
 meta/recipes-kernel/linux/linux-yocto-rt_4.12.bb   |   2 +-
 meta/recipes-kernel/linux/linux-yocto-rt_4.14.bb   |   4 +-
 meta/recipes-kernel/linux/linux-yocto-rt_4.15.bb   |   4 +-
 meta/recipes-kernel/linux/linux-yocto-tiny_4.12.bb |   2 +-
 meta/recipes-kernel/linux/linux-yocto-tiny_4.14.bb |   4 +-
 meta/recipes-kernel/linux/linux-yocto-tiny_4.15.bb |   4 +-
 meta/recipes-kernel/linux/linux-yocto_4.12.bb      |  16 +-
 meta/recipes-kernel/linux/linux-yocto_4.14.bb      |  18 +--
 meta/recipes-kernel/linux/linux-yocto_4.15.bb      |  18 +--
 10 files changed, 174 insertions(+), 76 deletions(-)

-- 
2.5.0



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/3] linux-yocto/4.14/4.15: yaffs2 fixes
  2018-02-28  2:06 [PATCH 0/3] kernel: consolidated pull request Bruce Ashfield
@ 2018-02-28  2:06 ` Bruce Ashfield
  2018-03-01  8:53   ` Maxin B. John
  2018-02-28  2:06 ` [PATCH 2/3] linux-yocto/4.12: add stratix10 SoC development board Bruce Ashfield
  2018-02-28  2:06 ` [PATCH 3/3] kernel-devsrc: restructure for out of tree (and on target) module builds Bruce Ashfield
  2 siblings, 1 reply; 9+ messages in thread
From: Bruce Ashfield @ 2018-02-28  2:06 UTC (permalink / raw)
  To: richard.purdie; +Cc: openembedded-core

Integrating the following fixes for yaffs2:

  9f9649fffac9 yaffs2: Adjust the timer callback and init functions
  0ef24a829eee yaffs2: include rawnand.h instead of nand.h

Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 meta/recipes-kernel/linux/linux-yocto-rt_4.14.bb   |  4 ++--
 meta/recipes-kernel/linux/linux-yocto-rt_4.15.bb   |  4 ++--
 meta/recipes-kernel/linux/linux-yocto-tiny_4.14.bb |  4 ++--
 meta/recipes-kernel/linux/linux-yocto-tiny_4.15.bb |  4 ++--
 meta/recipes-kernel/linux/linux-yocto_4.14.bb      | 18 +++++++++---------
 meta/recipes-kernel/linux/linux-yocto_4.15.bb      | 18 +++++++++---------
 6 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_4.14.bb b/meta/recipes-kernel/linux/linux-yocto-rt_4.14.bb
index d1f338f52ca9..b181f2064f97 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_4.14.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_4.14.bb
@@ -11,8 +11,8 @@ python () {
         raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
 }
 
-SRCREV_machine ?= "801d947020635762ac9af9ddf2edfaa1b2858414"
-SRCREV_meta ?= "b4468b54b2a7e7fbdf207ead7ca925bc24976d1b"
+SRCREV_machine ?= "7d5b8bc3ba49d0ea78fbbb7c628ee56a08a60253"
+SRCREV_meta ?= "c5e05f3c61046bf6445adff30d5a03a82677d351"
 
 SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
            git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.14;destsuffix=${KMETA}"
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_4.15.bb b/meta/recipes-kernel/linux/linux-yocto-rt_4.15.bb
index 7e2d6998fea2..d908eeca0ce8 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_4.15.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_4.15.bb
@@ -11,8 +11,8 @@ python () {
         raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
 }
 
-SRCREV_machine ?= "a6a3a6a73d628798fc6eb6832bf829a9ea43f6bd"
-SRCREV_meta ?= "030f397472fc8ea8e7f8a069153bc3b6d52f3d45"
+SRCREV_machine ?= "9f9649fffac97603862fdc90530e0b3ff038eed1"
+SRCREV_meta ?= "ac4dd298328c282f5e70b3ddb469edcad57590cf"
 
 SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
            git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.15;destsuffix=${KMETA}"
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_4.14.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_4.14.bb
index 62d6a34fb0fa..dcf4ff4af6b4 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_4.14.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_4.14.bb
@@ -9,8 +9,8 @@ LINUX_VERSION ?= "4.14.19"
 KMETA = "kernel-meta"
 KCONF_BSP_AUDIT_LEVEL = "2"
 
-SRCREV_machine ?= "537602db26fe2d26c1959f1ecb43966770c10ff2"
-SRCREV_meta ?= "b4468b54b2a7e7fbdf207ead7ca925bc24976d1b"
+SRCREV_machine ?= "57ed1d816d318dfafd0339fade9c694b3c00998d"
+SRCREV_meta ?= "c5e05f3c61046bf6445adff30d5a03a82677d351"
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_4.15.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_4.15.bb
index 72abe438eda5..d7bc84878643 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_4.15.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_4.15.bb
@@ -18,8 +18,8 @@ SRCREV_machine_qemuppc ?= "9c2e6c0fc71526c45fc7ddf3ec91e2e2f27e3da0"
 SRCREV_machine_qemux86 ?= "9c2e6c0fc71526c45fc7ddf3ec91e2e2f27e3da0"
 SRCREV_machine_qemux86-64 ?= "9c2e6c0fc71526c45fc7ddf3ec91e2e2f27e3da0"
 SRCREV_machine_qemumips64 ?= "f9a3a72209bde080e4ecb4fbe7a0f99954643131"
-SRCREV_machine ?= "a6a3a6a73d628798fc6eb6832bf829a9ea43f6bd"
-SRCREV_meta ?= "030f397472fc8ea8e7f8a069153bc3b6d52f3d45"
+SRCREV_machine ?= "9f9649fffac97603862fdc90530e0b3ff038eed1"
+SRCREV_meta ?= "ac4dd298328c282f5e70b3ddb469edcad57590cf"
 
 SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}; \
            git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.15;destsuffix=${KMETA}"
diff --git a/meta/recipes-kernel/linux/linux-yocto_4.14.bb b/meta/recipes-kernel/linux/linux-yocto_4.14.bb
index 070d08e01038..bfae61d28905 100644
--- a/meta/recipes-kernel/linux/linux-yocto_4.14.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_4.14.bb
@@ -11,15 +11,15 @@ KBRANCH_qemux86  ?= "v4.14/standard/base"
 KBRANCH_qemux86-64 ?= "v4.14/standard/base"
 KBRANCH_qemumips64 ?= "v4.14/standard/mti-malta64"
 
-SRCREV_machine_qemuarm ?= "773cb1d2d59644bf9574abed9803f8ec12bbabe1"
-SRCREV_machine_qemuarm64 ?= "537602db26fe2d26c1959f1ecb43966770c10ff2"
-SRCREV_machine_qemumips ?= "5fad9fa9377a7badd71ae4c1f1b1108d8cfcb047"
-SRCREV_machine_qemuppc ?= "537602db26fe2d26c1959f1ecb43966770c10ff2"
-SRCREV_machine_qemux86 ?= "537602db26fe2d26c1959f1ecb43966770c10ff2"
-SRCREV_machine_qemux86-64 ?= "537602db26fe2d26c1959f1ecb43966770c10ff2"
-SRCREV_machine_qemumips64 ?= "141cd6a1644eade83d4d43675a9ab11824ea01ea"
-SRCREV_machine ?= "537602db26fe2d26c1959f1ecb43966770c10ff2"
-SRCREV_meta ?= "b4468b54b2a7e7fbdf207ead7ca925bc24976d1b"
+SRCREV_machine_qemuarm ?= "481c15cd5198aa4de9faa1b0edcf69e08f45540b"
+SRCREV_machine_qemuarm64 ?= "57ed1d816d318dfafd0339fade9c694b3c00998d"
+SRCREV_machine_qemumips ?= "b1adde8239132a9e189acbfd0e1c27d1a4ae695f"
+SRCREV_machine_qemuppc ?= "57ed1d816d318dfafd0339fade9c694b3c00998d"
+SRCREV_machine_qemux86 ?= "57ed1d816d318dfafd0339fade9c694b3c00998d"
+SRCREV_machine_qemux86-64 ?= "57ed1d816d318dfafd0339fade9c694b3c00998d"
+SRCREV_machine_qemumips64 ?= "971d3f31a5caf6035dbff8cefea2323c196178a9"
+SRCREV_machine ?= "57ed1d816d318dfafd0339fade9c694b3c00998d"
+SRCREV_meta ?= "c5e05f3c61046bf6445adff30d5a03a82677d351"
 
 SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}; \
            git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.14;destsuffix=${KMETA}"
diff --git a/meta/recipes-kernel/linux/linux-yocto_4.15.bb b/meta/recipes-kernel/linux/linux-yocto_4.15.bb
index fea14ccf8ea5..daad4309b7af 100644
--- a/meta/recipes-kernel/linux/linux-yocto_4.15.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_4.15.bb
@@ -11,15 +11,15 @@ KBRANCH_qemux86  ?= "v4.15/standard/base"
 KBRANCH_qemux86-64 ?= "v4.15/standard/base"
 KBRANCH_qemumips64 ?= "v4.15/standard/mti-malta64"
 
-SRCREV_machine_qemuarm ?= "312b80a833f6be40034526f3155360f61d78608a"
-SRCREV_machine_qemuarm64 ?= "a6a3a6a73d628798fc6eb6832bf829a9ea43f6bd"
-SRCREV_machine_qemumips ?= "a52de76fa49f7c93031a807d8668ae2d7c2c4d0a"
-SRCREV_machine_qemuppc ?= "a6a3a6a73d628798fc6eb6832bf829a9ea43f6bd"
-SRCREV_machine_qemux86 ?= "a6a3a6a73d628798fc6eb6832bf829a9ea43f6bd"
-SRCREV_machine_qemux86-64 ?= "a6a3a6a73d628798fc6eb6832bf829a9ea43f6bd"
-SRCREV_machine_qemumips64 ?= "3a25d83e268bd34ff12f12011b0b8254e86833a2"
-SRCREV_machine ?= "a6a3a6a73d628798fc6eb6832bf829a9ea43f6bd"
-SRCREV_meta ?= "030f397472fc8ea8e7f8a069153bc3b6d52f3d45"
+SRCREV_machine_qemuarm ?= "5a2a8f7f757b964da55bd3d2a95130051af2c173"
+SRCREV_machine_qemuarm64 ?= "9f9649fffac97603862fdc90530e0b3ff038eed1"
+SRCREV_machine_qemumips ?= "ee76cb3c65f9138c9e580c13feff6d0c6ebf5f9a"
+SRCREV_machine_qemuppc ?= "9f9649fffac97603862fdc90530e0b3ff038eed1"
+SRCREV_machine_qemux86 ?= "9f9649fffac97603862fdc90530e0b3ff038eed1"
+SRCREV_machine_qemux86-64 ?= "9f9649fffac97603862fdc90530e0b3ff038eed1"
+SRCREV_machine_qemumips64 ?= "3b587c8f1db7c5b425b35a98276c6d9b8dd61a2b"
+SRCREV_machine ?= "9f9649fffac97603862fdc90530e0b3ff038eed1"
+SRCREV_meta ?= "ac4dd298328c282f5e70b3ddb469edcad57590cf"
 
 SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}; \
            git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.15;destsuffix=${KMETA}"
-- 
2.5.0



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/3] linux-yocto/4.12: add stratix10 SoC development board
  2018-02-28  2:06 [PATCH 0/3] kernel: consolidated pull request Bruce Ashfield
  2018-02-28  2:06 ` [PATCH 1/3] linux-yocto/4.14/4.15: yaffs2 fixes Bruce Ashfield
@ 2018-02-28  2:06 ` Bruce Ashfield
  2018-02-28  2:06 ` [PATCH 3/3] kernel-devsrc: restructure for out of tree (and on target) module builds Bruce Ashfield
  2 siblings, 0 replies; 9+ messages in thread
From: Bruce Ashfield @ 2018-02-28  2:06 UTC (permalink / raw)
  To: richard.purdie; +Cc: openembedded-core

Integrating the patches to introduce support for  stratix10 SOC, which
comprises the following commits:

   22f73c1fe991 drivers: ethernet: stmmac: keep Ethernet clock in enable status on Stratix10 platform
   c3ceae6df341 drivers: ethernet: stmmac: improve phy control during ethernet suspend/resume
   883d8df59543 drivers: ethernet: stmmac: set delay_us value as 0
   063b17881fed arm64: dts: stratix10: add interrupt-parent property in root node
   e991516fa777 arm64: dts: stratix10: correct PMU interrupt number
   555f51414098 arm64: dts: stratix10: add alias for i2c1
   a5dd201f0e8c arm64: dts: stratix10: control FPGA IO from linux kernel
   67e763e631bd mtd: spi-nor: add support for mt25qu02g serial flash
   6068e35ed261 arm64: dts: stratix10: enable qspi feature
   2d019c47939c arm64: dts: stratix10: add USB ECC reset bit
   d9b9d63a6417 FogBugz #516572: add clock to USB nodes
   f4bca65baf07 arm64: dts: stratix10: enable USB on the devkit
   1ed12c04eac6 arm64: dts: stratix10: remove phy node for usb
   b9b8f08f50ca usb: dwc2: add optional usb ecc reset bit
   7a04b5cba903 usb: dwc2: disable erroneous overcurrent condition
   aac3bd2a2e23 dts: stratix10_socdk: enable gpio1 and leds
   9807c107b1c3 arm64: dts: stratix10: fix interrupt number for gpio1
   cbd264cde6bc arm64: dts: stratix10: add gpio header
   f91f7117ef93 gpio: gpio-dwapb: add optional reset
   3aa90a6801aa mtd: spi-nor: Allow Cadence QSPI support for ARM64
   3bb156eb80b6 FogBugz #495013-1: dts: stratix10: Add QSPI support for Stratix10
   81981997697b reset: socfpga: fix for 64-bit compilation
   882cc1f9800d FogBugz #491967-5: dts: stratix10: add ltc2497
   d7b3bc0833a6 FogBugz #492768: Revert "i2c: dw: temporary workaround for i2c clocks"
   60711b82517f arm64: dts: stratix10: add reset property for various peripherals
   f9aeefce1310 arm64: stratix10: add the 'altr,modrst-off' property
   e65b02b3b5b7 arm64: stratix10: include the reset manager bindings
   7ffbb161ee30 reset: socfpga: build the reset-socfpga for Stratix10 SOC
   95197b89dd72 FogBugz #493310: dts: use the clocks for the timers and uarts
   c6ec92c9222a FogBugz #493306: mark the l4_sp_clk as a critical clock
   7caf335dd0fa FogBugz #492768: i2c: dw: temporary workaround for i2c clocks
   b247b5ed60c0 FogBugz #491967-2: dts: stratix10: enable i2c
   b0ea5bac0b3a FogBugz #492420: fix up the correct order of parents for noc_clk
   c81d19a6683b arm64: dts: stratix10: add ethernet/sdmmc support to S10 devkit
   00d6740c9ec9 FogBugz #491251: temporary remove PSCI node
   789aabac6e9d arm64: dts: fix up the gic register for the Stratix10 platform
   9504049ea576 FogBugz #488936-2: Add clocks to emac/sdmmc node
   8ad32e880376 FogBugz #488936-1: dts: bringup SoCFPGA Stratix10 devkit
   f826ccc79752 FogBugz #488843-2: add clock driver for Stratix10 SOC
   56594bb54083 FogBugz #488843-1: dts: clock bindings for the SoCFPGA Stratix10
   2a25f1e19487 FogBugz #488851: dts: use spin-table for SMP
   d36f9d7f16c3 net: stmmac: Adjust dump offset of DMA registers for ethtool
   50eb2994beea Revert "FogBugz #470510: Update stratix10_swvp.dts file for S10 SoC Simics/VP"
   9cc3c6bc11a7 net: stmmac: Add additional registers for dwmac1000_dma ethtool
   4b12474ecb09 FogBugz #470512: Update stratix10_swvp.dts file for S10 SoC Simics/VP
   2e1cf1b70e9a FogBugz #468942-2: Modify QSPI read_delay for Arria10.
   a2baa4e9366e FogBugz #454145: Update stratix10_swvp.dts file for S10 SoC VP
   352eccb9c28e dt-bindings: reset: Add reset manager offsets for Stratix10
   4951f51f6650 FogBugz #458420-2: ARM: dts: add lcd character panel
   52625560a859 FogBugz #458420-1: dts: arria10 socdk: add max1619
   a7926b2fe419 ARM: dts: socfpga: set the i2c frequency
   af2c59f5810f FogBugz #374571: Fix Sysid driver hotplug support.
   b1d136a8001d FogBugz #284482-2: A10 cache coherency is different than A5/C5.
   8dc53e9000e6 FogBugz #284482-1: A10 cache coherency is different than A5/C5.
   cf59a2fb8882 FogBugz #408870: add debugfs interface for fpga config complete timeout
   a2a924222a02 FogBugz #421690: use a unique name to register freeze controller
   db0c754560cb FogBugz #403389-1: Altera Partial Reconfiguration IP Core
   2b11bb966e23 FogBugz #412211: fpga: fix fpga mgr debugfs for module
   546b85ceb86f FogBugz #411427: fpga: memory leaks in fpga manager debugfs
   186529660ef2 FogBugz #405628-1: fpga: doc: add config complete timeout
   e97cb7797091 FogBugz #404467: add missing binding documentation
   9454b288338e FogBugz #411698-3: hwmon: Add Altera A10-SR power supply alarms
   181766fbe257 FogBugz #411698-2: Add Altera A10-SR power supply alarms
   995c713ce65a FogBugz #408205: fix printf format error
   ff30a92ebff5 FogBugz #398879-2: fpga mgr debugfs
   46856886744c FogBugz #398879-1: fpga: doc: documentation for FPGA debugfs
   559f1b2b61f1 FogBugz #365525-3: socfpga: dts: remove fpga image specific info
   6ac61db6de48 ARM: DT: Enable symbols when CONFIG_OF_OVERLAY is used
   784a7fe5585c OF: DT-Overlay configfs interface (v7)
   dcc6ae577325 FogBugz #334039: enable SMP for the Stratix10 SWVP
   83c3f4a2b7dc FogBugz #332965: missing Makefile to build Stratix10 SWVP dts
   5604a2ed0cd1 FogBugz #331066: misc: altera_hwmutex: remove redundant unused of_match_ptr
   e5ad2362d2bc FogBugz #331067: misc: altera_hwmutex: remove .owner
   fdcb3fa5a3a5 FogBugz #332657-2: Stratix 10 Software Virtual Platform
   d64f00ea688a FogBugz #332657-1: Stratix 10 Software Virtual Platform
   86026fe01b25 FogBugz #299928: arria10 swvp: add device tree
   146f064db340 devicetree: net: micrel-ksz90x1.txt: correct documentation
   71244d32db2b TRCom NAND board device tree.
   bb328948b0b5 FogBugz #184650: Cleanup Altera license headers.
   8e855ce4b0c2 misc: sysid: use IS_ERR and PTR_ERR to check for error
   d5e88e198db0 misc: hwmutex: use IS_ERR and PTR_ERR to check for error
   8e7d24910197 FogBugz #236669: Add a Kconfig for ILC driver
   790e85ef4b28 misc: ilc: replace devm_request_and_ioremap with devm_ioremap_and_resource
   1025d2218b88 misc: sysid: replace devm_request_and_ioremap with devm_ioremap_and_resource
   0b1dbbb5a411 misc: hwmutex: replace devm_request_and_ioremap with devm_ioremap_resource
   f78ea9d901c6 FogBugz #240546: Move VIP driver into FB hardware folder
   56c37d32951b FogBugz #177284: add Altera VIP framebuffer driver
   c006613bfc15 FogBugz #229601: newhaven lcd: fix kbuild test robot warnings
   a20f46e5560c FogBugz #101176: add sys entry to set lcd module brightness
   effc29afd46a FogBugz #125882: lcd module needs time to process commands.
   ffab5da4edbf FogBugz #118160: support tilde character on newhaven lcd module
   c72219530e09 FogBugz #114479: load custom character for backslash
   0eb518db5832 FogBugz #107683: handle backspace better in lcd driver
   c62a261496fc tty: newhaven_lcd: Remove devinit and devexit
   717f3b73f7c7 FogBugz #102358: i2c newhaven lcd driver uses faulty hyphen
   394b437bac51 FogBugz #100586: Set lcd backlight brightness to max
   3754d6b77c1b FogBugz #84276: lcd driver on i2c
   115230c21271 FogBugz #143478: drivers/misc: Move sysid from arch to drivers
   8e28bdd388c4 FogBugz #178225: Add Altera interrupt latency counter driver
   095297e45627 FogBugz #144109: Remove extra lines from license header
   6534e0969ae2 FogBugz #143451: Fix mutex compatible string
   8eb7914d1532 FogBugz #138162: Add Altera hardware mutex driver
   075f0367ff60 FogBugz #184646: Turn on all peripheral clocks for a system reboot
   d695a0616fda FogBugz #172665: Sample driver for DMA transfer to FPGA soft IP (FIFO)
   f7b3f6418bbc FogBugz #143478: arch/arm: Move sysid from arch to drivers
   1dd2f4af39a0 ARM: socfpga: Turn on ARM errata for L2 cache
   40146055677a mm/sparsemem: Fix ARM64 boot crash when CONFIG_SPARSEMEM_EXTREME=y

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 meta/recipes-kernel/linux/linux-yocto-rt_4.12.bb   |  2 +-
 meta/recipes-kernel/linux/linux-yocto-tiny_4.12.bb |  2 +-
 meta/recipes-kernel/linux/linux-yocto_4.12.bb      | 16 ++++++++--------
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_4.12.bb b/meta/recipes-kernel/linux/linux-yocto-rt_4.12.bb
index e6a45fd66302..a31c3559e9d9 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_4.12.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_4.12.bb
@@ -11,7 +11,7 @@ python () {
         raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
 }
 
-SRCREV_machine ?= "33aa1a4ea44399f12dfb26146ea06db5cd02ca69"
+SRCREV_machine ?= "ba4e0e2d358124def579da9ba5992f6dcb94eea8"
 SRCREV_meta ?= "19d815d5a34bfaad95d87cc097cef18b594daac8"
 
 SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.12.git;branch=${KBRANCH};name=machine \
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_4.12.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_4.12.bb
index 3ff2e1ce1928..79bd962b943e 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_4.12.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_4.12.bb
@@ -9,7 +9,7 @@ LINUX_VERSION ?= "4.12.20"
 KMETA = "kernel-meta"
 KCONF_BSP_AUDIT_LEVEL = "2"
 
-SRCREV_machine ?= "40146055677a69730b2c36da1c8c1b4e9bae7bb0"
+SRCREV_machine ?= "22f73c1fe99198a7b37aa5c76978fe19d301fd88"
 SRCREV_meta ?= "19d815d5a34bfaad95d87cc097cef18b594daac8"
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/meta/recipes-kernel/linux/linux-yocto_4.12.bb b/meta/recipes-kernel/linux/linux-yocto_4.12.bb
index b10b82b77199..57ef700d05d6 100644
--- a/meta/recipes-kernel/linux/linux-yocto_4.12.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_4.12.bb
@@ -11,14 +11,14 @@ KBRANCH_qemux86  ?= "standard/base"
 KBRANCH_qemux86-64 ?= "standard/base"
 KBRANCH_qemumips64 ?= "standard/mti-malta64"
 
-SRCREV_machine_qemuarm ?= "6e5a99db3a495e023041a30d43262047795e645a"
-SRCREV_machine_qemuarm64 ?= "40146055677a69730b2c36da1c8c1b4e9bae7bb0"
-SRCREV_machine_qemumips ?= "43dc47f90007d54c7086cc03b28e946e30135f1c"
-SRCREV_machine_qemuppc ?= "40146055677a69730b2c36da1c8c1b4e9bae7bb0"
-SRCREV_machine_qemux86 ?= "40146055677a69730b2c36da1c8c1b4e9bae7bb0"
-SRCREV_machine_qemux86-64 ?= "40146055677a69730b2c36da1c8c1b4e9bae7bb0"
-SRCREV_machine_qemumips64 ?= "69f0c96d8e47b0dccfb374809d729f0042c77868"
-SRCREV_machine ?= "40146055677a69730b2c36da1c8c1b4e9bae7bb0"
+SRCREV_machine_qemuarm ?= "7122a8d189df29393419b3352ea11482efaa417a"
+SRCREV_machine_qemuarm64 ?= "22f73c1fe99198a7b37aa5c76978fe19d301fd88"
+SRCREV_machine_qemumips ?= "1cff37b7a2bbee4bb99118e57d228ac301fb880b"
+SRCREV_machine_qemuppc ?= "22f73c1fe99198a7b37aa5c76978fe19d301fd88"
+SRCREV_machine_qemux86 ?= "22f73c1fe99198a7b37aa5c76978fe19d301fd88"
+SRCREV_machine_qemux86-64 ?= "22f73c1fe99198a7b37aa5c76978fe19d301fd88"
+SRCREV_machine_qemumips64 ?= "3879cb9ed592f8d5db6b35c51761818ad60494da"
+SRCREV_machine ?= "22f73c1fe99198a7b37aa5c76978fe19d301fd88"
 SRCREV_meta ?= "19d815d5a34bfaad95d87cc097cef18b594daac8"
 
 SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.12.git;name=machine;branch=${KBRANCH}; \
-- 
2.5.0



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/3] kernel-devsrc: restructure for out of tree (and on target) module builds
  2018-02-28  2:06 [PATCH 0/3] kernel: consolidated pull request Bruce Ashfield
  2018-02-28  2:06 ` [PATCH 1/3] linux-yocto/4.14/4.15: yaffs2 fixes Bruce Ashfield
  2018-02-28  2:06 ` [PATCH 2/3] linux-yocto/4.12: add stratix10 SoC development board Bruce Ashfield
@ 2018-02-28  2:06 ` Bruce Ashfield
  2018-02-28 16:38   ` Burton, Ross
  2 siblings, 1 reply; 9+ messages in thread
From: Bruce Ashfield @ 2018-02-28  2:06 UTC (permalink / raw)
  To: richard.purdie; +Cc: openembedded-core

The existing kernel-devsrc package starts with a full copy of the kernel
source and then starts to strip out elements that are not required.

This results in extra time (I/O) and extra space being taken up in the
final package. The main purpose of the kernel-devsrc package has been to
build modules against the running kernel, not to include a full copy of
the source code for re-building the kernel. The end result was a
600M kernel-devsrc package.

This restructuring of the package uses an approach similar to other
distros, where the kernel-devsrc package is for building against the
running kernel and uses a curated set of copied infrastructure, versus
a mass copy of the entire kernel.

The differences in this approach versus other is largely due to the
architecture support and the split build/source directory of the
kernel.

The result is a kernel-devsrc package of about 10M, which is capable
of running "make scripts" and compiling kernel modules against the
running kernel.

Along with the changes to the copying of the infrascture, we also
have the following changes:

 - a better/more explicit listing of dependencies for on-target
   builds of "make scripts" or "make modules_prepare"

 - The kernel source is installed into /lib/modules/<version>/build
   and a symlink created from /usr/src/kernel to the new location.
   This aligns with the standard location for module support
   code

 - There is also a symlink from /lib/modules/<version>/source -> build
   to reserve a spot for a new package that is simply the kernel
   source. That package is not part of this update.

[YOCTO #12535]

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 meta/recipes-kernel/linux/kernel-devsrc.bb | 178 ++++++++++++++++++++++-------
 1 file changed, 138 insertions(+), 40 deletions(-)

diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb b/meta/recipes-kernel/linux/kernel-devsrc.bb
index c1b5b7786d7c..f55b115e0936 100644
--- a/meta/recipes-kernel/linux/kernel-devsrc.bb
+++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
@@ -30,50 +30,148 @@ do_populate_sysroot[noexec] = "1"
 S = "${STAGING_KERNEL_DIR}"
 B = "${STAGING_KERNEL_BUILDDIR}"
 
-KERNEL_VERSION = "${@get_kernelversion_headers('${S}')}"
-
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
+KERNEL_BUILD_ROOT="/lib/modules/"
+
 do_install() {
-        kerneldir=${D}${KERNEL_SRC_PATH}
-        install -d $kerneldir
-
-        #
-        # Copy the staging dir source (and module build support) into the devsrc structure.
-        # We can keep this copy simple and take everything, since a we'll clean up any build
-        # artifacts afterwards, and the extra i/o is not significant
-        #
-        cd ${B}
-        find . -type d -name '.git*' -prune -o -path '.debug' -prune -o -type f -print0 | cpio --null -pdlu $kerneldir
-        cd ${S}
-	find . -type d -name '.git*' -prune -o -type d -name '.kernel-meta' -prune -o -type f -print0 | cpio --null -pdlu $kerneldir
-
-        # Explicitly set KBUILD_OUTPUT to ensure that the image directory is cleaned and not
-        # The main build artifacts. We clean the directory to avoid QA errors on mismatched
-        # architecture (since scripts and helpers are native format).
-        KBUILD_OUTPUT="$kerneldir"
-        oe_runmake -C $kerneldir CC="${KERNEL_CC}" LD="${KERNEL_LD}" clean _mrproper_scripts
-        # make clean generates an absolute path symlink called "source"
-        # in $kerneldir points to $kerneldir, which doesn't make any
-        # sense, so remove it.
-        if [ -L $kerneldir/source ]; then
-            bbnote "Removing $kerneldir/source symlink"
-            rm -f $kerneldir/source
-        fi
-
-        # As of Linux kernel version 3.0.1, the clean target removes
-        # arch/powerpc/lib/crtsavres.o which is present in
-        # KBUILD_LDFLAGS_MODULE, making it required to build external modules.
-        if [ ${ARCH} = "powerpc" ]; then
-                mkdir -p $kerneldir/arch/powerpc/lib/
-                cp ${B}/arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o
-        fi
-
-        chown -R root:root ${D}
+    kerneldir=${D}${KERNEL_BUILD_ROOT}${KERNEL_VERSION}
+    install -d $kerneldir
+
+    # create the directory structure
+    rm -f $kerneldir/build
+    rm -f $kerneldir/source
+    mkdir -p $kerneldir/build
+
+    # for compatibility with some older variants of this package, we
+    # create  a /usr/src/kernel symlink to /lib/modules/<version>/source
+    mkdir -p ${D}/usr/src
+    (
+	cd ${D}/usr/src
+	ln -s ${KERNEL_BUILD_ROOT}${KERNEL_VERSION}/source kernel
+    )
+
+    # for on target purposes, we unify build and source
+    (
+	cd $kerneldir
+	ln -s build source
+    )
+
+    # first copy everything
+    (
+	cd ${S}
+	cp --parents $(find  -type f -name "Makefile*" -o -name "Kconfig*") $kerneldir/build
+    )
+
+    # then drop all but the needed Makefiles/Kconfig files
+    rm -rf $kerneldir/build/Documentation
+    rm -rf $kerneldir/build/scripts
+    rm -rf $kerneldir/build/include
+
+    # now copy in parts from the build that we'll need later
+    (
+	cd ${B}
+
+	cp Module.symvers $kerneldir/build
+	cp System.map* $kerneldir/build
+	if [ -s Module.markers ]; then
+	    cp Module.markers $kerneldir/build
+	fi
+
+	cp .config $kerneldir/build
+
+	# TODO: this scripts copy will likely blow up QA, so for now, we
+	#       require a more complex 'make scripts' to restore these, versus
+	#       copying them here. Left as a reference to indicate that we
+	#       know the scripts must be dealt with.
+	# cp -a scripts $kerneldir/build
+
+	if [ -f tools/objtool/objtool ]; then
+	    cp -a tools/objtool/objtool $kerneldir/build/tools/objtool/
+	fi
+	if [ -d arch/${ARCH}/scripts ]; then
+	    cp -a arch/${ARCH}/scripts $kerneldir/build/arch/${ARCH}
+	fi
+	if [ -f arch/${ARCH}/*lds ]; then
+	    cp -a arch/${ARCH}/*lds $kerneldir/build/arch/${ARCH}
+	fi
+
+	rm -f $kerneldir/build/scripts/*.o
+	rm -f $kerneldir/build/scripts/*/*.o
+
+	if [ "${ARCH}" = "powerpc" ]; then
+	    cp -a --parents arch/powerpc/lib/crtsavres.[So] $kerneldir/build/
+	fi
+
+	cp -a include $kerneldir/build/include
+    )
+
+    # now grab the chunks from the source tree that we need
+    (
+	cd ${S}
+
+	cp -a scripts $kerneldir/build
+	if [ "${ARCH}" = "arm64" ]; then
+	    # arch/arm64/include/asm/xen references arch/arm
+	    cp -a --parents arch/arm/include/asm/xen $kerneldir/build/
+	    # arch/arm64/include/asm/opcodes.h references arch/arm
+	    cp -a --parents arch/arm/include/asm/opcodes.h $kerneldir/build/
+	fi
+
+	# include the machine specific headers for ARM variants, if available.
+	if [ "${ARCH}" = "arm" ]; then
+	    cp -a --parents arch/${ARCH}/mach-*/include $kerneldir/build/
+
+	    # include a few files for 'make prepare'
+	    cp -a --parents arch/arm/tools/gen-mach-types $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
+	    cp -a --parents arch/arm/tools/mach-types $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
+	fi
+
+	if [ -d arch/${ARCH}/include ]; then
+	    cp -a --parents arch/${ARCH}/include $kerneldir/build/
+	fi
+
+	cp -a include $kerneldir/build
+
+	if [ "${ARCH}" = "x86" ]; then
+	    # files for 'make prepare' to succeed with kernel-devel
+	    cp -a --parents arch/x86/entry/syscalls/syscall_32.tbl $kerneldir/build/
+	    cp -a --parents arch/x86/entry/syscalls/syscalltbl.sh $kerneldir/build/
+	    cp -a --parents arch/x86/entry/syscalls/syscallhdr.sh $kerneldir/build/
+	    cp -a --parents arch/x86/entry/syscalls/syscall_64.tbl $kerneldir/build/
+	    cp -a --parents arch/x86/tools/relocs_32.c $kerneldir/build/
+	    cp -a --parents arch/x86/tools/relocs_64.c $kerneldir/build/
+	    cp -a --parents arch/x86/tools/relocs.c $kerneldir/build/
+	    cp -a --parents arch/x86/tools/relocs_common.c $kerneldir/build/
+	    cp -a --parents arch/x86/tools/relocs.h $kerneldir/build/
+	    cp -a --parents tools/include/tools/le_byteshift.h $kerneldir/build/
+	    cp -a --parents tools/include/tools/be_byteshift.h $kerneldir/build/
+	    cp -a --parents arch/x86/purgatory/purgatory.c $kerneldir/build/
+	    cp -a --parents arch/x86/purgatory/sha256.h $kerneldir/build/
+	    cp -a --parents arch/x86/purgatory/sha256.c $kerneldir/build/
+	    cp -a --parents arch/x86/purgatory/stack.S $kerneldir/build/
+	    cp -a --parents arch/x86/purgatory/string.c $kerneldir/build/
+	    cp -a --parents arch/x86/purgatory/setup-x86_64.S $kerneldir/build/
+	    cp -a --parents arch/x86/purgatory/entry64.S $kerneldir/build/
+	    cp -a --parents arch/x86/boot/string.h $kerneldir/build/
+	    cp -a --parents arch/x86/boot/string.c $kerneldir/build/
+	    cp -a --parents arch/x86/boot/ctype.h $kerneldir/build/
+	fi
+    )
+
+    # Make sure the Makefile and version.h have a matching timestamp so that
+    # external modules can be built
+    touch -r $kerneldir/build/Makefile $kerneldir/build/include/generated/uapi/linux/version.h
+
+    # Copy .config to include/config/auto.conf so "make prepare" is unnecessary.
+    cp $kerneldir/build/.config $kerneldir/build/include/config/auto.conf
+
+    chown -R root:root ${D}
 }
+
 # Ensure we don't race against "make scripts" during cpio
 do_install[lockfiles] = "${TMPDIR}/kernel-scripts.lock"
 
-PACKAGES = "kernel-devsrc"
-FILES_${PN} = "${KERNEL_SRC_PATH}"
-RDEPENDS_${PN} = "bc"
+FILES_${PN} = "${KERNEL_BUILD_ROOT} ${KERNEL_SRC_PATH}"
+FILES_${PN}-dbg += "${KERNEL_BUILD_ROOT}*/build/scripts/*/.debug/*"
+RDEPENDS_${PN} = "bc glibc-utils"
-- 
2.5.0



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/3] kernel-devsrc: restructure for out of tree (and on target) module builds
  2018-02-28  2:06 ` [PATCH 3/3] kernel-devsrc: restructure for out of tree (and on target) module builds Bruce Ashfield
@ 2018-02-28 16:38   ` Burton, Ross
  2018-02-28 16:51     ` Bruce Ashfield
  0 siblings, 1 reply; 9+ messages in thread
From: Burton, Ross @ 2018-02-28 16:38 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 11915 bytes --]

Sorry, but this breaks on ARM:

ERROR: kernel-devsrc-1.0-r0 do_install: Function failed: do_install (log
file is located at
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/log.do_install.25822)
ERROR: Logfile of failure stored in:
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/log.do_install.25822
Log data follows:
| DEBUG: Executing shell function do_install
| cp: with --parents, the destination must be a directory
| Try 'cp --help' for more information.
| WARNING:
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/run.do_install.25822:1
exit 1 from 'rm -rf $kerneldir/build/include'
| ERROR: Function failed: do_install (log file is located at
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/log.do_install.25822)

Ross

On 28 February 2018 at 02:06, Bruce Ashfield <bruce.ashfield@windriver.com>
wrote:

> The existing kernel-devsrc package starts with a full copy of the kernel
> source and then starts to strip out elements that are not required.
>
> This results in extra time (I/O) and extra space being taken up in the
> final package. The main purpose of the kernel-devsrc package has been to
> build modules against the running kernel, not to include a full copy of
> the source code for re-building the kernel. The end result was a
> 600M kernel-devsrc package.
>
> This restructuring of the package uses an approach similar to other
> distros, where the kernel-devsrc package is for building against the
> running kernel and uses a curated set of copied infrastructure, versus
> a mass copy of the entire kernel.
>
> The differences in this approach versus other is largely due to the
> architecture support and the split build/source directory of the
> kernel.
>
> The result is a kernel-devsrc package of about 10M, which is capable
> of running "make scripts" and compiling kernel modules against the
> running kernel.
>
> Along with the changes to the copying of the infrascture, we also
> have the following changes:
>
>  - a better/more explicit listing of dependencies for on-target
>    builds of "make scripts" or "make modules_prepare"
>
>  - The kernel source is installed into /lib/modules/<version>/build
>    and a symlink created from /usr/src/kernel to the new location.
>    This aligns with the standard location for module support
>    code
>
>  - There is also a symlink from /lib/modules/<version>/source -> build
>    to reserve a spot for a new package that is simply the kernel
>    source. That package is not part of this update.
>
> [YOCTO #12535]
>
> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
> ---
>  meta/recipes-kernel/linux/kernel-devsrc.bb | 178
> ++++++++++++++++++++++-------
>  1 file changed, 138 insertions(+), 40 deletions(-)
>
> diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb
> b/meta/recipes-kernel/linux/kernel-devsrc.bb
> index c1b5b7786d7c..f55b115e0936 100644
> --- a/meta/recipes-kernel/linux/kernel-devsrc.bb
> +++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
> @@ -30,50 +30,148 @@ do_populate_sysroot[noexec] = "1"
>  S = "${STAGING_KERNEL_DIR}"
>  B = "${STAGING_KERNEL_BUILDDIR}"
>
> -KERNEL_VERSION = "${@get_kernelversion_headers('${S}')}"
> -
>  PACKAGE_ARCH = "${MACHINE_ARCH}"
>
> +KERNEL_BUILD_ROOT="/lib/modules/"
> +
>  do_install() {
> -        kerneldir=${D}${KERNEL_SRC_PATH}
> -        install -d $kerneldir
> -
> -        #
> -        # Copy the staging dir source (and module build support) into the
> devsrc structure.
> -        # We can keep this copy simple and take everything, since a we'll
> clean up any build
> -        # artifacts afterwards, and the extra i/o is not significant
> -        #
> -        cd ${B}
> -        find . -type d -name '.git*' -prune -o -path '.debug' -prune -o
> -type f -print0 | cpio --null -pdlu $kerneldir
> -        cd ${S}
> -       find . -type d -name '.git*' -prune -o -type d -name
> '.kernel-meta' -prune -o -type f -print0 | cpio --null -pdlu $kerneldir
> -
> -        # Explicitly set KBUILD_OUTPUT to ensure that the image directory
> is cleaned and not
> -        # The main build artifacts. We clean the directory to avoid QA
> errors on mismatched
> -        # architecture (since scripts and helpers are native format).
> -        KBUILD_OUTPUT="$kerneldir"
> -        oe_runmake -C $kerneldir CC="${KERNEL_CC}" LD="${KERNEL_LD}"
> clean _mrproper_scripts
> -        # make clean generates an absolute path symlink called "source"
> -        # in $kerneldir points to $kerneldir, which doesn't make any
> -        # sense, so remove it.
> -        if [ -L $kerneldir/source ]; then
> -            bbnote "Removing $kerneldir/source symlink"
> -            rm -f $kerneldir/source
> -        fi
> -
> -        # As of Linux kernel version 3.0.1, the clean target removes
> -        # arch/powerpc/lib/crtsavres.o which is present in
> -        # KBUILD_LDFLAGS_MODULE, making it required to build external
> modules.
> -        if [ ${ARCH} = "powerpc" ]; then
> -                mkdir -p $kerneldir/arch/powerpc/lib/
> -                cp ${B}/arch/powerpc/lib/crtsavres.o
> $kerneldir/arch/powerpc/lib/crtsavres.o
> -        fi
> -
> -        chown -R root:root ${D}
> +    kerneldir=${D}${KERNEL_BUILD_ROOT}${KERNEL_VERSION}
> +    install -d $kerneldir
> +
> +    # create the directory structure
> +    rm -f $kerneldir/build
> +    rm -f $kerneldir/source
> +    mkdir -p $kerneldir/build
> +
> +    # for compatibility with some older variants of this package, we
> +    # create  a /usr/src/kernel symlink to /lib/modules/<version>/source
> +    mkdir -p ${D}/usr/src
> +    (
> +       cd ${D}/usr/src
> +       ln -s ${KERNEL_BUILD_ROOT}${KERNEL_VERSION}/source kernel
> +    )
> +
> +    # for on target purposes, we unify build and source
> +    (
> +       cd $kerneldir
> +       ln -s build source
> +    )
> +
> +    # first copy everything
> +    (
> +       cd ${S}
> +       cp --parents $(find  -type f -name "Makefile*" -o -name
> "Kconfig*") $kerneldir/build
> +    )
> +
> +    # then drop all but the needed Makefiles/Kconfig files
> +    rm -rf $kerneldir/build/Documentation
> +    rm -rf $kerneldir/build/scripts
> +    rm -rf $kerneldir/build/include
> +
> +    # now copy in parts from the build that we'll need later
> +    (
> +       cd ${B}
> +
> +       cp Module.symvers $kerneldir/build
> +       cp System.map* $kerneldir/build
> +       if [ -s Module.markers ]; then
> +           cp Module.markers $kerneldir/build
> +       fi
> +
> +       cp .config $kerneldir/build
> +
> +       # TODO: this scripts copy will likely blow up QA, so for now, we
> +       #       require a more complex 'make scripts' to restore these,
> versus
> +       #       copying them here. Left as a reference to indicate that we
> +       #       know the scripts must be dealt with.
> +       # cp -a scripts $kerneldir/build
> +
> +       if [ -f tools/objtool/objtool ]; then
> +           cp -a tools/objtool/objtool $kerneldir/build/tools/objtool/
> +       fi
> +       if [ -d arch/${ARCH}/scripts ]; then
> +           cp -a arch/${ARCH}/scripts $kerneldir/build/arch/${ARCH}
> +       fi
> +       if [ -f arch/${ARCH}/*lds ]; then
> +           cp -a arch/${ARCH}/*lds $kerneldir/build/arch/${ARCH}
> +       fi
> +
> +       rm -f $kerneldir/build/scripts/*.o
> +       rm -f $kerneldir/build/scripts/*/*.o
> +
> +       if [ "${ARCH}" = "powerpc" ]; then
> +           cp -a --parents arch/powerpc/lib/crtsavres.[So]
> $kerneldir/build/
> +       fi
> +
> +       cp -a include $kerneldir/build/include
> +    )
> +
> +    # now grab the chunks from the source tree that we need
> +    (
> +       cd ${S}
> +
> +       cp -a scripts $kerneldir/build
> +       if [ "${ARCH}" = "arm64" ]; then
> +           # arch/arm64/include/asm/xen references arch/arm
> +           cp -a --parents arch/arm/include/asm/xen $kerneldir/build/
> +           # arch/arm64/include/asm/opcodes.h references arch/arm
> +           cp -a --parents arch/arm/include/asm/opcodes.h
> $kerneldir/build/
> +       fi
> +
> +       # include the machine specific headers for ARM variants, if
> available.
> +       if [ "${ARCH}" = "arm" ]; then
> +           cp -a --parents arch/${ARCH}/mach-*/include $kerneldir/build/
> +
> +           # include a few files for 'make prepare'
> +           cp -a --parents arch/arm/tools/gen-mach-types
> $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
> +           cp -a --parents arch/arm/tools/mach-types
> $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
> +       fi
> +
> +       if [ -d arch/${ARCH}/include ]; then
> +           cp -a --parents arch/${ARCH}/include $kerneldir/build/
> +       fi
> +
> +       cp -a include $kerneldir/build
> +
> +       if [ "${ARCH}" = "x86" ]; then
> +           # files for 'make prepare' to succeed with kernel-devel
> +           cp -a --parents arch/x86/entry/syscalls/syscall_32.tbl
> $kerneldir/build/
> +           cp -a --parents arch/x86/entry/syscalls/syscalltbl.sh
> $kerneldir/build/
> +           cp -a --parents arch/x86/entry/syscalls/syscallhdr.sh
> $kerneldir/build/
> +           cp -a --parents arch/x86/entry/syscalls/syscall_64.tbl
> $kerneldir/build/
> +           cp -a --parents arch/x86/tools/relocs_32.c $kerneldir/build/
> +           cp -a --parents arch/x86/tools/relocs_64.c $kerneldir/build/
> +           cp -a --parents arch/x86/tools/relocs.c $kerneldir/build/
> +           cp -a --parents arch/x86/tools/relocs_common.c
> $kerneldir/build/
> +           cp -a --parents arch/x86/tools/relocs.h $kerneldir/build/
> +           cp -a --parents tools/include/tools/le_byteshift.h
> $kerneldir/build/
> +           cp -a --parents tools/include/tools/be_byteshift.h
> $kerneldir/build/
> +           cp -a --parents arch/x86/purgatory/purgatory.c
> $kerneldir/build/
> +           cp -a --parents arch/x86/purgatory/sha256.h $kerneldir/build/
> +           cp -a --parents arch/x86/purgatory/sha256.c $kerneldir/build/
> +           cp -a --parents arch/x86/purgatory/stack.S $kerneldir/build/
> +           cp -a --parents arch/x86/purgatory/string.c $kerneldir/build/
> +           cp -a --parents arch/x86/purgatory/setup-x86_64.S
> $kerneldir/build/
> +           cp -a --parents arch/x86/purgatory/entry64.S $kerneldir/build/
> +           cp -a --parents arch/x86/boot/string.h $kerneldir/build/
> +           cp -a --parents arch/x86/boot/string.c $kerneldir/build/
> +           cp -a --parents arch/x86/boot/ctype.h $kerneldir/build/
> +       fi
> +    )
> +
> +    # Make sure the Makefile and version.h have a matching timestamp so
> that
> +    # external modules can be built
> +    touch -r $kerneldir/build/Makefile $kerneldir/build/include/
> generated/uapi/linux/version.h
> +
> +    # Copy .config to include/config/auto.conf so "make prepare" is
> unnecessary.
> +    cp $kerneldir/build/.config $kerneldir/build/include/config/auto.conf
> +
> +    chown -R root:root ${D}
>  }
> +
>  # Ensure we don't race against "make scripts" during cpio
>  do_install[lockfiles] = "${TMPDIR}/kernel-scripts.lock"
>
> -PACKAGES = "kernel-devsrc"
> -FILES_${PN} = "${KERNEL_SRC_PATH}"
> -RDEPENDS_${PN} = "bc"
> +FILES_${PN} = "${KERNEL_BUILD_ROOT} ${KERNEL_SRC_PATH}"
> +FILES_${PN}-dbg += "${KERNEL_BUILD_ROOT}*/build/scripts/*/.debug/*"
> +RDEPENDS_${PN} = "bc glibc-utils"
> --
> 2.5.0
>
>

[-- Attachment #2: Type: text/html, Size: 14329 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/3] kernel-devsrc: restructure for out of tree (and on target) module builds
  2018-02-28 16:38   ` Burton, Ross
@ 2018-02-28 16:51     ` Bruce Ashfield
  2018-02-28 17:38       ` Bruce Ashfield
  0 siblings, 1 reply; 9+ messages in thread
From: Bruce Ashfield @ 2018-02-28 16:51 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

Unfortunately, I can't reproduce that here.

This has been built and tested on all arches by myself and others, but
I can try again .. just no promises when I'll get back to it.

Bruce

On 02/28/2018 11:38 AM, Burton, Ross wrote:
> Sorry, but this breaks on ARM:
> 
> ERROR: kernel-devsrc-1.0-r0 do_install: Function failed: do_install (log 
> file is located at 
> /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/log.do_install.25822)
> ERROR: Logfile of failure stored in: 
> /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/log.do_install.25822
> Log data follows:
> | DEBUG: Executing shell function do_install
> | cp: with --parents, the destination must be a directory
> | Try 'cp --help' for more information.
> | WARNING: 
> /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/run.do_install.25822:1 
> exit 1 from 'rm -rf $kerneldir/build/include'
> | ERROR: Function failed: do_install (log file is located at 
> /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/log.do_install.25822)
> 
> Ross
> 
> On 28 February 2018 at 02:06, Bruce Ashfield 
> <bruce.ashfield@windriver.com <mailto:bruce.ashfield@windriver.com>> wrote:
> 
>     The existing kernel-devsrc package starts with a full copy of the kernel
>     source and then starts to strip out elements that are not required.
> 
>     This results in extra time (I/O) and extra space being taken up in the
>     final package. The main purpose of the kernel-devsrc package has been to
>     build modules against the running kernel, not to include a full copy of
>     the source code for re-building the kernel. The end result was a
>     600M kernel-devsrc package.
> 
>     This restructuring of the package uses an approach similar to other
>     distros, where the kernel-devsrc package is for building against the
>     running kernel and uses a curated set of copied infrastructure, versus
>     a mass copy of the entire kernel.
> 
>     The differences in this approach versus other is largely due to the
>     architecture support and the split build/source directory of the
>     kernel.
> 
>     The result is a kernel-devsrc package of about 10M, which is capable
>     of running "make scripts" and compiling kernel modules against the
>     running kernel.
> 
>     Along with the changes to the copying of the infrascture, we also
>     have the following changes:
> 
>       - a better/more explicit listing of dependencies for on-target
>         builds of "make scripts" or "make modules_prepare"
> 
>       - The kernel source is installed into /lib/modules/<version>/build
>         and a symlink created from /usr/src/kernel to the new location.
>         This aligns with the standard location for module support
>         code
> 
>       - There is also a symlink from /lib/modules/<version>/source -> build
>         to reserve a spot for a new package that is simply the kernel
>         source. That package is not part of this update.
> 
>     [YOCTO #12535]
> 
>     Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com
>     <mailto:bruce.ashfield@windriver.com>>
>     ---
>       meta/recipes-kernel/linux/kernel-devsrc.bb
>     <http://kernel-devsrc.bb> | 178 ++++++++++++++++++++++-------
>       1 file changed, 138 insertions(+), 40 deletions(-)
> 
>     diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb
>     <http://kernel-devsrc.bb>
>     b/meta/recipes-kernel/linux/kernel-devsrc.bb <http://kernel-devsrc.bb>
>     index c1b5b7786d7c..f55b115e0936 100644
>     --- a/meta/recipes-kernel/linux/kernel-devsrc.bb
>     <http://kernel-devsrc.bb>
>     +++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
>     <http://kernel-devsrc.bb>
>     @@ -30,50 +30,148 @@ do_populate_sysroot[noexec] = "1"
>       S = "${STAGING_KERNEL_DIR}"
>       B = "${STAGING_KERNEL_BUILDDIR}"
> 
>     -KERNEL_VERSION = "${@get_kernelversion_headers('${S}')}"
>     -
>       PACKAGE_ARCH = "${MACHINE_ARCH}"
> 
>     +KERNEL_BUILD_ROOT="/lib/modules/"
>     +
>       do_install() {
>     -        kerneldir=${D}${KERNEL_SRC_PATH}
>     -        install -d $kerneldir
>     -
>     -        #
>     -        # Copy the staging dir source (and module build support)
>     into the devsrc structure.
>     -        # We can keep this copy simple and take everything, since a
>     we'll clean up any build
>     -        # artifacts afterwards, and the extra i/o is not significant
>     -        #
>     -        cd ${B}
>     -        find . -type d -name '.git*' -prune -o -path '.debug'
>     -prune -o -type f -print0 | cpio --null -pdlu $kerneldir
>     -        cd ${S}
>     -       find . -type d -name '.git*' -prune -o -type d -name
>     '.kernel-meta' -prune -o -type f -print0 | cpio --null -pdlu $kerneldir
>     -
>     -        # Explicitly set KBUILD_OUTPUT to ensure that the image
>     directory is cleaned and not
>     -        # The main build artifacts. We clean the directory to avoid
>     QA errors on mismatched
>     -        # architecture (since scripts and helpers are native format).
>     -        KBUILD_OUTPUT="$kerneldir"
>     -        oe_runmake -C $kerneldir CC="${KERNEL_CC}"
>     LD="${KERNEL_LD}" clean _mrproper_scripts
>     -        # make clean generates an absolute path symlink called "source"
>     -        # in $kerneldir points to $kerneldir, which doesn't make any
>     -        # sense, so remove it.
>     -        if [ -L $kerneldir/source ]; then
>     -            bbnote "Removing $kerneldir/source symlink"
>     -            rm -f $kerneldir/source
>     -        fi
>     -
>     -        # As of Linux kernel version 3.0.1, the clean target removes
>     -        # arch/powerpc/lib/crtsavres.o which is present in
>     -        # KBUILD_LDFLAGS_MODULE, making it required to build
>     external modules.
>     -        if [ ${ARCH} = "powerpc" ]; then
>     -                mkdir -p $kerneldir/arch/powerpc/lib/
>     -                cp ${B}/arch/powerpc/lib/crtsavres.o
>     $kerneldir/arch/powerpc/lib/crtsavres.o
>     -        fi
>     -
>     -        chown -R root:root ${D}
>     +    kerneldir=${D}${KERNEL_BUILD_ROOT}${KERNEL_VERSION}
>     +    install -d $kerneldir
>     +
>     +    # create the directory structure
>     +    rm -f $kerneldir/build
>     +    rm -f $kerneldir/source
>     +    mkdir -p $kerneldir/build
>     +
>     +    # for compatibility with some older variants of this package, we
>     +    # create  a /usr/src/kernel symlink to
>     /lib/modules/<version>/source
>     +    mkdir -p ${D}/usr/src
>     +    (
>     +       cd ${D}/usr/src
>     +       ln -s ${KERNEL_BUILD_ROOT}${KERNEL_VERSION}/source kernel
>     +    )
>     +
>     +    # for on target purposes, we unify build and source
>     +    (
>     +       cd $kerneldir
>     +       ln -s build source
>     +    )
>     +
>     +    # first copy everything
>     +    (
>     +       cd ${S}
>     +       cp --parents $(find  -type f -name "Makefile*" -o -name
>     "Kconfig*") $kerneldir/build
>     +    )
>     +
>     +    # then drop all but the needed Makefiles/Kconfig files
>     +    rm -rf $kerneldir/build/Documentation
>     +    rm -rf $kerneldir/build/scripts
>     +    rm -rf $kerneldir/build/include
>     +
>     +    # now copy in parts from the build that we'll need later
>     +    (
>     +       cd ${B}
>     +
>     +       cp Module.symvers $kerneldir/build
>     +       cp System.map* $kerneldir/build
>     +       if [ -s Module.markers ]; then
>     +           cp Module.markers $kerneldir/build
>     +       fi
>     +
>     +       cp .config $kerneldir/build
>     +
>     +       # TODO: this scripts copy will likely blow up QA, so for now, we
>     +       #       require a more complex 'make scripts' to restore
>     these, versus
>     +       #       copying them here. Left as a reference to indicate
>     that we
>     +       #       know the scripts must be dealt with.
>     +       # cp -a scripts $kerneldir/build
>     +
>     +       if [ -f tools/objtool/objtool ]; then
>     +           cp -a tools/objtool/objtool $kerneldir/build/tools/objtool/
>     +       fi
>     +       if [ -d arch/${ARCH}/scripts ]; then
>     +           cp -a arch/${ARCH}/scripts $kerneldir/build/arch/${ARCH}
>     +       fi
>     +       if [ -f arch/${ARCH}/*lds ]; then
>     +           cp -a arch/${ARCH}/*lds $kerneldir/build/arch/${ARCH}
>     +       fi
>     +
>     +       rm -f $kerneldir/build/scripts/*.o
>     +       rm -f $kerneldir/build/scripts/*/*.o
>     +
>     +       if [ "${ARCH}" = "powerpc" ]; then
>     +           cp -a --parents arch/powerpc/lib/crtsavres.[So]
>     $kerneldir/build/
>     +       fi
>     +
>     +       cp -a include $kerneldir/build/include
>     +    )
>     +
>     +    # now grab the chunks from the source tree that we need
>     +    (
>     +       cd ${S}
>     +
>     +       cp -a scripts $kerneldir/build
>     +       if [ "${ARCH}" = "arm64" ]; then
>     +           # arch/arm64/include/asm/xen references arch/arm
>     +           cp -a --parents arch/arm/include/asm/xen $kerneldir/build/
>     +           # arch/arm64/include/asm/opcodes.h references arch/arm
>     +           cp -a --parents arch/arm/include/asm/opcodes.h
>     $kerneldir/build/
>     +       fi
>     +
>     +       # include the machine specific headers for ARM variants, if
>     available.
>     +       if [ "${ARCH}" = "arm" ]; then
>     +           cp -a --parents arch/${ARCH}/mach-*/include
>     $kerneldir/build/
>     +
>     +           # include a few files for 'make prepare'
>     +           cp -a --parents arch/arm/tools/gen-mach-types
>     $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
>     +           cp -a --parents arch/arm/tools/mach-types
>     $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
>     +       fi
>     +
>     +       if [ -d arch/${ARCH}/include ]; then
>     +           cp -a --parents arch/${ARCH}/include $kerneldir/build/
>     +       fi
>     +
>     +       cp -a include $kerneldir/build
>     +
>     +       if [ "${ARCH}" = "x86" ]; then
>     +           # files for 'make prepare' to succeed with kernel-devel
>     +           cp -a --parents arch/x86/entry/syscalls/syscall_32.tbl
>     $kerneldir/build/
>     +           cp -a --parents arch/x86/entry/syscalls/syscalltbl.sh
>     $kerneldir/build/
>     +           cp -a --parents arch/x86/entry/syscalls/syscallhdr.sh
>     $kerneldir/build/
>     +           cp -a --parents arch/x86/entry/syscalls/syscall_64.tbl
>     $kerneldir/build/
>     +           cp -a --parents arch/x86/tools/relocs_32.c $kerneldir/build/
>     +           cp -a --parents arch/x86/tools/relocs_64.c $kerneldir/build/
>     +           cp -a --parents arch/x86/tools/relocs.c $kerneldir/build/
>     +           cp -a --parents arch/x86/tools/relocs_common.c
>     $kerneldir/build/
>     +           cp -a --parents arch/x86/tools/relocs.h $kerneldir/build/
>     +           cp -a --parents tools/include/tools/le_byteshift.h
>     $kerneldir/build/
>     +           cp -a --parents tools/include/tools/be_byteshift.h
>     $kerneldir/build/
>     +           cp -a --parents arch/x86/purgatory/purgatory.c
>     $kerneldir/build/
>     +           cp -a --parents arch/x86/purgatory/sha256.h
>     $kerneldir/build/
>     +           cp -a --parents arch/x86/purgatory/sha256.c
>     $kerneldir/build/
>     +           cp -a --parents arch/x86/purgatory/stack.S $kerneldir/build/
>     +           cp -a --parents arch/x86/purgatory/string.c
>     $kerneldir/build/
>     +           cp -a --parents arch/x86/purgatory/setup-x86_64.S
>     $kerneldir/build/
>     +           cp -a --parents arch/x86/purgatory/entry64.S
>     $kerneldir/build/
>     +           cp -a --parents arch/x86/boot/string.h $kerneldir/build/
>     +           cp -a --parents arch/x86/boot/string.c $kerneldir/build/
>     +           cp -a --parents arch/x86/boot/ctype.h $kerneldir/build/
>     +       fi
>     +    )
>     +
>     +    # Make sure the Makefile and version.h have a matching
>     timestamp so that
>     +    # external modules can be built
>     +    touch -r $kerneldir/build/Makefile
>     $kerneldir/build/include/generated/uapi/linux/version.h
>     +
>     +    # Copy .config to include/config/auto.conf so "make prepare" is
>     unnecessary.
>     +    cp $kerneldir/build/.config
>     $kerneldir/build/include/config/auto.conf
>     +
>     +    chown -R root:root ${D}
>       }
>     +
>       # Ensure we don't race against "make scripts" during cpio
>       do_install[lockfiles] = "${TMPDIR}/kernel-scripts.lock"
> 
>     -PACKAGES = "kernel-devsrc"
>     -FILES_${PN} = "${KERNEL_SRC_PATH}"
>     -RDEPENDS_${PN} = "bc"
>     +FILES_${PN} = "${KERNEL_BUILD_ROOT} ${KERNEL_SRC_PATH}"
>     +FILES_${PN}-dbg += "${KERNEL_BUILD_ROOT}*/build/scripts/*/.debug/*"
>     +RDEPENDS_${PN} = "bc glibc-utils"
>     --
>     2.5.0
> 
> 



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/3] kernel-devsrc: restructure for out of tree (and on target) module builds
  2018-02-28 16:51     ` Bruce Ashfield
@ 2018-02-28 17:38       ` Bruce Ashfield
  0 siblings, 0 replies; 9+ messages in thread
From: Bruce Ashfield @ 2018-02-28 17:38 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

On 02/28/2018 11:51 AM, Bruce Ashfield wrote:
> Unfortunately, I can't reproduce that here.
> 
> This has been built and tested on all arches by myself and others, but
> I can try again .. just no promises when I'll get back to it.

Ahaha. 32 bit ARM with a little bit of a manual hack on my machine
and it triggered.

64 bit works fine. Will send a v2 shortly.

Bruce

> 
> Bruce
> 
> On 02/28/2018 11:38 AM, Burton, Ross wrote:
>> Sorry, but this breaks on ARM:
>>
>> ERROR: kernel-devsrc-1.0-r0 do_install: Function failed: do_install 
>> (log file is located at 
>> /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/log.do_install.25822) 
>>
>> ERROR: Logfile of failure stored in: 
>> /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/log.do_install.25822 
>>
>> Log data follows:
>> | DEBUG: Executing shell function do_install
>> | cp: with --parents, the destination must be a directory
>> | Try 'cp --help' for more information.
>> | WARNING: 
>> /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/run.do_install.25822:1 
>> exit 1 from 'rm -rf $kerneldir/build/include'
>> | ERROR: Function failed: do_install (log file is located at 
>> /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/log.do_install.25822) 
>>
>>
>> Ross
>>
>> On 28 February 2018 at 02:06, Bruce Ashfield 
>> <bruce.ashfield@windriver.com <mailto:bruce.ashfield@windriver.com>> 
>> wrote:
>>
>>     The existing kernel-devsrc package starts with a full copy of the 
>> kernel
>>     source and then starts to strip out elements that are not required.
>>
>>     This results in extra time (I/O) and extra space being taken up in 
>> the
>>     final package. The main purpose of the kernel-devsrc package has 
>> been to
>>     build modules against the running kernel, not to include a full 
>> copy of
>>     the source code for re-building the kernel. The end result was a
>>     600M kernel-devsrc package.
>>
>>     This restructuring of the package uses an approach similar to other
>>     distros, where the kernel-devsrc package is for building against the
>>     running kernel and uses a curated set of copied infrastructure, 
>> versus
>>     a mass copy of the entire kernel.
>>
>>     The differences in this approach versus other is largely due to the
>>     architecture support and the split build/source directory of the
>>     kernel.
>>
>>     The result is a kernel-devsrc package of about 10M, which is capable
>>     of running "make scripts" and compiling kernel modules against the
>>     running kernel.
>>
>>     Along with the changes to the copying of the infrascture, we also
>>     have the following changes:
>>
>>       - a better/more explicit listing of dependencies for on-target
>>         builds of "make scripts" or "make modules_prepare"
>>
>>       - The kernel source is installed into /lib/modules/<version>/build
>>         and a symlink created from /usr/src/kernel to the new location.
>>         This aligns with the standard location for module support
>>         code
>>
>>       - There is also a symlink from /lib/modules/<version>/source -> 
>> build
>>         to reserve a spot for a new package that is simply the kernel
>>         source. That package is not part of this update.
>>
>>     [YOCTO #12535]
>>
>>     Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com
>>     <mailto:bruce.ashfield@windriver.com>>
>>     ---
>>       meta/recipes-kernel/linux/kernel-devsrc.bb
>>     <http://kernel-devsrc.bb> | 178 ++++++++++++++++++++++-------
>>       1 file changed, 138 insertions(+), 40 deletions(-)
>>
>>     diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb
>>     <http://kernel-devsrc.bb>
>>     b/meta/recipes-kernel/linux/kernel-devsrc.bb 
>> <http://kernel-devsrc.bb>
>>     index c1b5b7786d7c..f55b115e0936 100644
>>     --- a/meta/recipes-kernel/linux/kernel-devsrc.bb
>>     <http://kernel-devsrc.bb>
>>     +++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
>>     <http://kernel-devsrc.bb>
>>     @@ -30,50 +30,148 @@ do_populate_sysroot[noexec] = "1"
>>       S = "${STAGING_KERNEL_DIR}"
>>       B = "${STAGING_KERNEL_BUILDDIR}"
>>
>>     -KERNEL_VERSION = "${@get_kernelversion_headers('${S}')}"
>>     -
>>       PACKAGE_ARCH = "${MACHINE_ARCH}"
>>
>>     +KERNEL_BUILD_ROOT="/lib/modules/"
>>     +
>>       do_install() {
>>     -        kerneldir=${D}${KERNEL_SRC_PATH}
>>     -        install -d $kerneldir
>>     -
>>     -        #
>>     -        # Copy the staging dir source (and module build support)
>>     into the devsrc structure.
>>     -        # We can keep this copy simple and take everything, since a
>>     we'll clean up any build
>>     -        # artifacts afterwards, and the extra i/o is not significant
>>     -        #
>>     -        cd ${B}
>>     -        find . -type d -name '.git*' -prune -o -path '.debug'
>>     -prune -o -type f -print0 | cpio --null -pdlu $kerneldir
>>     -        cd ${S}
>>     -       find . -type d -name '.git*' -prune -o -type d -name
>>     '.kernel-meta' -prune -o -type f -print0 | cpio --null -pdlu 
>> $kerneldir
>>     -
>>     -        # Explicitly set KBUILD_OUTPUT to ensure that the image
>>     directory is cleaned and not
>>     -        # The main build artifacts. We clean the directory to avoid
>>     QA errors on mismatched
>>     -        # architecture (since scripts and helpers are native 
>> format).
>>     -        KBUILD_OUTPUT="$kerneldir"
>>     -        oe_runmake -C $kerneldir CC="${KERNEL_CC}"
>>     LD="${KERNEL_LD}" clean _mrproper_scripts
>>     -        # make clean generates an absolute path symlink called 
>> "source"
>>     -        # in $kerneldir points to $kerneldir, which doesn't make any
>>     -        # sense, so remove it.
>>     -        if [ -L $kerneldir/source ]; then
>>     -            bbnote "Removing $kerneldir/source symlink"
>>     -            rm -f $kerneldir/source
>>     -        fi
>>     -
>>     -        # As of Linux kernel version 3.0.1, the clean target removes
>>     -        # arch/powerpc/lib/crtsavres.o which is present in
>>     -        # KBUILD_LDFLAGS_MODULE, making it required to build
>>     external modules.
>>     -        if [ ${ARCH} = "powerpc" ]; then
>>     -                mkdir -p $kerneldir/arch/powerpc/lib/
>>     -                cp ${B}/arch/powerpc/lib/crtsavres.o
>>     $kerneldir/arch/powerpc/lib/crtsavres.o
>>     -        fi
>>     -
>>     -        chown -R root:root ${D}
>>     +    kerneldir=${D}${KERNEL_BUILD_ROOT}${KERNEL_VERSION}
>>     +    install -d $kerneldir
>>     +
>>     +    # create the directory structure
>>     +    rm -f $kerneldir/build
>>     +    rm -f $kerneldir/source
>>     +    mkdir -p $kerneldir/build
>>     +
>>     +    # for compatibility with some older variants of this package, we
>>     +    # create  a /usr/src/kernel symlink to
>>     /lib/modules/<version>/source
>>     +    mkdir -p ${D}/usr/src
>>     +    (
>>     +       cd ${D}/usr/src
>>     +       ln -s ${KERNEL_BUILD_ROOT}${KERNEL_VERSION}/source kernel
>>     +    )
>>     +
>>     +    # for on target purposes, we unify build and source
>>     +    (
>>     +       cd $kerneldir
>>     +       ln -s build source
>>     +    )
>>     +
>>     +    # first copy everything
>>     +    (
>>     +       cd ${S}
>>     +       cp --parents $(find  -type f -name "Makefile*" -o -name
>>     "Kconfig*") $kerneldir/build
>>     +    )
>>     +
>>     +    # then drop all but the needed Makefiles/Kconfig files
>>     +    rm -rf $kerneldir/build/Documentation
>>     +    rm -rf $kerneldir/build/scripts
>>     +    rm -rf $kerneldir/build/include
>>     +
>>     +    # now copy in parts from the build that we'll need later
>>     +    (
>>     +       cd ${B}
>>     +
>>     +       cp Module.symvers $kerneldir/build
>>     +       cp System.map* $kerneldir/build
>>     +       if [ -s Module.markers ]; then
>>     +           cp Module.markers $kerneldir/build
>>     +       fi
>>     +
>>     +       cp .config $kerneldir/build
>>     +
>>     +       # TODO: this scripts copy will likely blow up QA, so for 
>> now, we
>>     +       #       require a more complex 'make scripts' to restore
>>     these, versus
>>     +       #       copying them here. Left as a reference to indicate
>>     that we
>>     +       #       know the scripts must be dealt with.
>>     +       # cp -a scripts $kerneldir/build
>>     +
>>     +       if [ -f tools/objtool/objtool ]; then
>>     +           cp -a tools/objtool/objtool 
>> $kerneldir/build/tools/objtool/
>>     +       fi
>>     +       if [ -d arch/${ARCH}/scripts ]; then
>>     +           cp -a arch/${ARCH}/scripts $kerneldir/build/arch/${ARCH}
>>     +       fi
>>     +       if [ -f arch/${ARCH}/*lds ]; then
>>     +           cp -a arch/${ARCH}/*lds $kerneldir/build/arch/${ARCH}
>>     +       fi
>>     +
>>     +       rm -f $kerneldir/build/scripts/*.o
>>     +       rm -f $kerneldir/build/scripts/*/*.o
>>     +
>>     +       if [ "${ARCH}" = "powerpc" ]; then
>>     +           cp -a --parents arch/powerpc/lib/crtsavres.[So]
>>     $kerneldir/build/
>>     +       fi
>>     +
>>     +       cp -a include $kerneldir/build/include
>>     +    )
>>     +
>>     +    # now grab the chunks from the source tree that we need
>>     +    (
>>     +       cd ${S}
>>     +
>>     +       cp -a scripts $kerneldir/build
>>     +       if [ "${ARCH}" = "arm64" ]; then
>>     +           # arch/arm64/include/asm/xen references arch/arm
>>     +           cp -a --parents arch/arm/include/asm/xen 
>> $kerneldir/build/
>>     +           # arch/arm64/include/asm/opcodes.h references arch/arm
>>     +           cp -a --parents arch/arm/include/asm/opcodes.h
>>     $kerneldir/build/
>>     +       fi
>>     +
>>     +       # include the machine specific headers for ARM variants, if
>>     available.
>>     +       if [ "${ARCH}" = "arm" ]; then
>>     +           cp -a --parents arch/${ARCH}/mach-*/include
>>     $kerneldir/build/
>>     +
>>     +           # include a few files for 'make prepare'
>>     +           cp -a --parents arch/arm/tools/gen-mach-types
>>     $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
>>     +           cp -a --parents arch/arm/tools/mach-types
>>     $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
>>     +       fi
>>     +
>>     +       if [ -d arch/${ARCH}/include ]; then
>>     +           cp -a --parents arch/${ARCH}/include $kerneldir/build/
>>     +       fi
>>     +
>>     +       cp -a include $kerneldir/build
>>     +
>>     +       if [ "${ARCH}" = "x86" ]; then
>>     +           # files for 'make prepare' to succeed with kernel-devel
>>     +           cp -a --parents arch/x86/entry/syscalls/syscall_32.tbl
>>     $kerneldir/build/
>>     +           cp -a --parents arch/x86/entry/syscalls/syscalltbl.sh
>>     $kerneldir/build/
>>     +           cp -a --parents arch/x86/entry/syscalls/syscallhdr.sh
>>     $kerneldir/build/
>>     +           cp -a --parents arch/x86/entry/syscalls/syscall_64.tbl
>>     $kerneldir/build/
>>     +           cp -a --parents arch/x86/tools/relocs_32.c 
>> $kerneldir/build/
>>     +           cp -a --parents arch/x86/tools/relocs_64.c 
>> $kerneldir/build/
>>     +           cp -a --parents arch/x86/tools/relocs.c $kerneldir/build/
>>     +           cp -a --parents arch/x86/tools/relocs_common.c
>>     $kerneldir/build/
>>     +           cp -a --parents arch/x86/tools/relocs.h $kerneldir/build/
>>     +           cp -a --parents tools/include/tools/le_byteshift.h
>>     $kerneldir/build/
>>     +           cp -a --parents tools/include/tools/be_byteshift.h
>>     $kerneldir/build/
>>     +           cp -a --parents arch/x86/purgatory/purgatory.c
>>     $kerneldir/build/
>>     +           cp -a --parents arch/x86/purgatory/sha256.h
>>     $kerneldir/build/
>>     +           cp -a --parents arch/x86/purgatory/sha256.c
>>     $kerneldir/build/
>>     +           cp -a --parents arch/x86/purgatory/stack.S 
>> $kerneldir/build/
>>     +           cp -a --parents arch/x86/purgatory/string.c
>>     $kerneldir/build/
>>     +           cp -a --parents arch/x86/purgatory/setup-x86_64.S
>>     $kerneldir/build/
>>     +           cp -a --parents arch/x86/purgatory/entry64.S
>>     $kerneldir/build/
>>     +           cp -a --parents arch/x86/boot/string.h $kerneldir/build/
>>     +           cp -a --parents arch/x86/boot/string.c $kerneldir/build/
>>     +           cp -a --parents arch/x86/boot/ctype.h $kerneldir/build/
>>     +       fi
>>     +    )
>>     +
>>     +    # Make sure the Makefile and version.h have a matching
>>     timestamp so that
>>     +    # external modules can be built
>>     +    touch -r $kerneldir/build/Makefile
>>     $kerneldir/build/include/generated/uapi/linux/version.h
>>     +
>>     +    # Copy .config to include/config/auto.conf so "make prepare" is
>>     unnecessary.
>>     +    cp $kerneldir/build/.config
>>     $kerneldir/build/include/config/auto.conf
>>     +
>>     +    chown -R root:root ${D}
>>       }
>>     +
>>       # Ensure we don't race against "make scripts" during cpio
>>       do_install[lockfiles] = "${TMPDIR}/kernel-scripts.lock"
>>
>>     -PACKAGES = "kernel-devsrc"
>>     -FILES_${PN} = "${KERNEL_SRC_PATH}"
>>     -RDEPENDS_${PN} = "bc"
>>     +FILES_${PN} = "${KERNEL_BUILD_ROOT} ${KERNEL_SRC_PATH}"
>>     +FILES_${PN}-dbg += "${KERNEL_BUILD_ROOT}*/build/scripts/*/.debug/*"
>>     +RDEPENDS_${PN} = "bc glibc-utils"
>>     --
>>     2.5.0
>>
>>
> 



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/3] linux-yocto/4.14/4.15: yaffs2 fixes
  2018-02-28  2:06 ` [PATCH 1/3] linux-yocto/4.14/4.15: yaffs2 fixes Bruce Ashfield
@ 2018-03-01  8:53   ` Maxin B. John
  2018-03-01  9:32     ` Burton, Ross
  0 siblings, 1 reply; 9+ messages in thread
From: Maxin B. John @ 2018-03-01  8:53 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: openembedded-core

Hi Bruce,

On Tue, Feb 27, 2018 at 09:06:54PM -0500, Bruce Ashfield wrote:
> Integrating the following fixes for yaffs2:
> 
>   9f9649fffac9 yaffs2: Adjust the timer callback and init functions
>   0ef24a829eee yaffs2: include rawnand.h instead of nand.h
> 
> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
> ---
>  meta/recipes-kernel/linux/linux-yocto-rt_4.14.bb   |  4 ++--
>  meta/recipes-kernel/linux/linux-yocto-rt_4.15.bb   |  4 ++--
>  meta/recipes-kernel/linux/linux-yocto-tiny_4.14.bb |  4 ++--
>  meta/recipes-kernel/linux/linux-yocto-tiny_4.15.bb |  4 ++--
>  meta/recipes-kernel/linux/linux-yocto_4.14.bb      | 18 +++++++++---------
>  meta/recipes-kernel/linux/linux-yocto_4.15.bb      | 18 +++++++++---------
>  6 files changed, 26 insertions(+), 26 deletions(-)
<snip>

For MIPS, KernelModuleTest fails in autobuilder ( probably due to this change - haven't bisected it)

https://autobuilder.yocto.io/builders/nightly-mips/builds/806/steps/Running%20Sanity%20Tests/logs/stdio

RESULTS - kernelmodule.KernelModuleTest.test_kernel_module - Testcase 1541: FAILED

NOTE: ======================================================================
| NOTE: FAIL: test_kernel_module (kernelmodule.KernelModuleTest)
| NOTE: ----------------------------------------------------------------------
| NOTE: Traceback (most recent call last):
|   File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-mips/build/meta/lib/oeqa/core/decorator/__init__.py", line 32, in wrapped_f
|     return func(*args, **kwargs)
|   File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-mips/build/meta/lib/oeqa/core/decorator/__init__.py", line 32, in wrapped_f
|     return func(*args, **kwargs)
|   File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-mips/build/meta/lib/oeqa/core/decorator/__init__.py", line 32, in wrapped_f
|     return func(*args, **kwargs)
|   File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-mips/build/meta/lib/oeqa/runtime/cases/kernelmodule.py", line 40, in test_kernel_module
|     self.assertEqual(status, 0, msg='\n'.join([cmd, output]))
| AssertionError: 2 != 0 : cd /usr/src/kernel && make scripts
| arch/mips/Makefile:240: arch/mips/Kbuild.platforms: No such file or directory
| make: *** No rule to make target 'arch/mips/Kbuild.platforms'.  Stop.

Best Regards,
Maxin


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/3] linux-yocto/4.14/4.15: yaffs2 fixes
  2018-03-01  8:53   ` Maxin B. John
@ 2018-03-01  9:32     ` Burton, Ross
  0 siblings, 0 replies; 9+ messages in thread
From: Burton, Ross @ 2018-03-01  9:32 UTC (permalink / raw)
  To: Maxin B. John; +Cc: Bruce Ashfield, OE-core

[-- Attachment #1: Type: text/plain, Size: 3008 bytes --]

This is most likely to be the kernel-devsrc change.  There's a number of
failures across the autobuilder, I've just asked Maxin to collate the
failures. :)

On 1 March 2018 at 08:53, Maxin B. John <maxin.john@intel.com> wrote:

> Hi Bruce,
>
> On Tue, Feb 27, 2018 at 09:06:54PM -0500, Bruce Ashfield wrote:
> > Integrating the following fixes for yaffs2:
> >
> >   9f9649fffac9 yaffs2: Adjust the timer callback and init functions
> >   0ef24a829eee yaffs2: include rawnand.h instead of nand.h
> >
> > Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
> > Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
> > ---
> >  meta/recipes-kernel/linux/linux-yocto-rt_4.14.bb   |  4 ++--
> >  meta/recipes-kernel/linux/linux-yocto-rt_4.15.bb   |  4 ++--
> >  meta/recipes-kernel/linux/linux-yocto-tiny_4.14.bb |  4 ++--
> >  meta/recipes-kernel/linux/linux-yocto-tiny_4.15.bb |  4 ++--
> >  meta/recipes-kernel/linux/linux-yocto_4.14.bb      | 18
> +++++++++---------
> >  meta/recipes-kernel/linux/linux-yocto_4.15.bb      | 18
> +++++++++---------
> >  6 files changed, 26 insertions(+), 26 deletions(-)
> <snip>
>
> For MIPS, KernelModuleTest fails in autobuilder ( probably due to this
> change - haven't bisected it)
>
> https://autobuilder.yocto.io/builders/nightly-mips/builds/
> 806/steps/Running%20Sanity%20Tests/logs/stdio
>
> RESULTS - kernelmodule.KernelModuleTest.test_kernel_module - Testcase
> 1541: FAILED
>
> NOTE: ============================================================
> ==========
> | NOTE: FAIL: test_kernel_module (kernelmodule.KernelModuleTest)
> | NOTE: ------------------------------------------------------------
> ----------
> | NOTE: Traceback (most recent call last):
> |   File "/home/pokybuild/yocto-autobuilder/yocto-worker/
> nightly-mips/build/meta/lib/oeqa/core/decorator/__init__.py", line 32, in
> wrapped_f
> |     return func(*args, **kwargs)
> |   File "/home/pokybuild/yocto-autobuilder/yocto-worker/
> nightly-mips/build/meta/lib/oeqa/core/decorator/__init__.py", line 32, in
> wrapped_f
> |     return func(*args, **kwargs)
> |   File "/home/pokybuild/yocto-autobuilder/yocto-worker/
> nightly-mips/build/meta/lib/oeqa/core/decorator/__init__.py", line 32, in
> wrapped_f
> |     return func(*args, **kwargs)
> |   File "/home/pokybuild/yocto-autobuilder/yocto-worker/
> nightly-mips/build/meta/lib/oeqa/runtime/cases/kernelmodule.py", line 40,
> in test_kernel_module
> |     self.assertEqual(status, 0, msg='\n'.join([cmd, output]))
> | AssertionError: 2 != 0 : cd /usr/src/kernel && make scripts
> | arch/mips/Makefile:240: arch/mips/Kbuild.platforms: No such file or
> directory
> | make: *** No rule to make target 'arch/mips/Kbuild.platforms'.  Stop.
>
> Best Regards,
> Maxin
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 4663 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-03-01  9:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-28  2:06 [PATCH 0/3] kernel: consolidated pull request Bruce Ashfield
2018-02-28  2:06 ` [PATCH 1/3] linux-yocto/4.14/4.15: yaffs2 fixes Bruce Ashfield
2018-03-01  8:53   ` Maxin B. John
2018-03-01  9:32     ` Burton, Ross
2018-02-28  2:06 ` [PATCH 2/3] linux-yocto/4.12: add stratix10 SoC development board Bruce Ashfield
2018-02-28  2:06 ` [PATCH 3/3] kernel-devsrc: restructure for out of tree (and on target) module builds Bruce Ashfield
2018-02-28 16:38   ` Burton, Ross
2018-02-28 16:51     ` Bruce Ashfield
2018-02-28 17:38       ` Bruce Ashfield

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.