Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH v2] Append KERNEL_VERSION string to kernel module package names
From: ola.redell @ 2017-01-03 14:21 UTC (permalink / raw)
  To: openembedded-core

From: Ola Redell <ola.redell@retotech.se>

The KERNEL_VERSION string is added to kernel module package names in order to
make the kernel modules for different kernel versions distinct packages instead
of different versions of the same package. With this change, when a new kernel
is installed together with its kernel modules (e.g. by upgrade of the packages
kernel and kernel-modules) using some package manager such as apt-get or rpm,
the kernel modules for the older kernel will not be removed. This enables a
fall back to the older kernel if the new one fails.

Signed-off-by: Ola Redell <ola.redell@retotech.se>
---
 meta/classes/kernel-module-split.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/kernel-module-split.bbclass b/meta/classes/kernel-module-split.bbclass
index efe1b42..13cff51 100644
--- a/meta/classes/kernel-module-split.bbclass
+++ b/meta/classes/kernel-module-split.bbclass
@@ -122,7 +122,7 @@ python split_kernel_module_packages () {
     module_regex = '^(.*)\.k?o$'
 
     module_pattern_prefix = d.getVar('KERNEL_MODULE_PACKAGE_PREFIX')
-    module_pattern = module_pattern_prefix + 'kernel-module-%s'
+    module_pattern = module_pattern_prefix + 'kernel-module-%s-' + d.getVar("KERNEL_VERSION", True)
 
     postinst = d.getVar('pkg_postinst_modules')
     postrm = d.getVar('pkg_postrm_modules')
-- 
1.9.1



^ permalink raw reply related

* questions on patching
From: Ola Redell @ 2017-01-03 15:21 UTC (permalink / raw)
  To: openembedded-core

Hi all,

I am a bit new to sending in patches to a list like this and 
specifically to OE-core, so I need a bit of guidance.

I have a fix for a bug I found in Jethro in the kernel.bbclass and I 
have tested my fix there (update-alternatives needs a full path also 
when removing an alternative). Now, the bug is around in many different 
branches (laverne, krogoth and master for sure) but that particular 
patch will only apply to Jethro.

I can make a patch for master but would have problems testing it 
thoroughly there without spending quite a bit of time (which I don't 
have at the moment).

Easy questions:
How should I proceed?
How do I know what branches are actively maintained and for which 
patches are welcome?

I should have asked these questions before sending my earlier patch for 
the kernel-module-split.bbclass since this holds for that too.

Thanks,
Ola





^ permalink raw reply

* OpenEmbedded Stand at FOSDEM
From: Philip Balister @ 2017-01-03 15:32 UTC (permalink / raw)
  To: openembedded-devel@lists.openembedded.org, openembedded-core,
	openembedded-members@lists.openembedded.org,
	openembedded-architecture, Yocto Project

Every year since 2007, OpenEmbedded has a stand at FOSDEM
(http://www.fosdem.org)

From the first year:

https://www.flickr.com/photos/32615155@N00/405229708/in/album-72157594561002629/

Belen and I are sort of organizing this, but both of us are also
involved in devrooms, so we will need a lot of help manning the stand
and getting some demos together.

Demos should try and show how the project makes embedded work easier, by
showing tools and/or cool examples of devices using Linux built with
OpenEmbedded. In previous years, we've shown toaster with data collected
from demos on the table. Collections of devices running images built
from the same recipe and interesting products using Linux by OpenEmbedded.

I'm happy to try and organize demos and staffing, but I could really use
some help this year, so if you are in a position to tak ethe lead on
operating the stand, that would be a huge help to me and the rest of the
project.

Thanks,

Philip


^ permalink raw reply

* Yocto Project Status WW01
From: Jolley, Stephen K @ 2017-01-03 15:38 UTC (permalink / raw)
  To: yocto@yoctoproject.org, openembedded-core@lists.openembedded.org

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

Current Dev Position: YP 2.3 M2 -> M3

Next Deadline: YP 2.3 M2 by Jan 23, 2017


SWAT team rotation: Maxin -> Joshua

https://wiki.yoctoproject.org/wiki/Yocto_Build_Failure_Swat_Team


Key Status/Updates:

*        M1 is having some QA difficulties due to some kind of bad interaction between the PR service and tinfoil2. We're waiting until people are back from vacation and up to speed before we decide what to do about this.

*        Both Ross and Richard decided to spend time away from computers over the holidays so things have not really changed much over the past couple of weeks, there is a small backlog of patches pending which will be worked through this week.

*        M2 will be upon us sooner than we realize and there are some key changes such as recipe specific sysroots pending with some potential for disruption. Wider testing of these patch sets as they're published would be appreciated.


Proposed upcoming dot releases:

YP 2.2.1 Release by Jan. 20, 2017

YP 2.1.3 Release by May. 19, 2017


Key YP 2.3 Dates:

YP 2.3 M1 Release is Dec. 23, 2016

YP 2.3 M2 Cutoff is Jan. 23, 2017

YP 2.3 M2 Release is Feb. 3, 2017

YP 2.3 M3 Cutoff is Feb 27, 2017

YP 2.3 M3 Release is Mar. 10, 2017

YP 2.3 M4 Cutoff is April 3, 2017

YP 2.3 M4 Release is April 28, 2017


Tracking Metrics:

            WDD 2594 (last week 2559)

(https://wiki.yoctoproject.org/charts/combo.html)


Key Status Links for YP:

https://wiki.yoctoproject.org/wiki/Yocto_Project_v2.3_Status

https://wiki.yoctoproject.org/wiki/Yocto_2.3_Schedule

https://wiki.yoctoproject.org/wiki/Yocto_2.3_Features

[If anyone has suggestions for other information you'd like to see on this weekly status update, let us know!]

Thanks,

Stephen K. Jolley
Yocto Project Program Manager
INTEL, MS JF1-255, 2111 N.E. 25th Avenue, Hillsboro, OR 97124
*   Work Telephone:        (503) 712-0534
*    Cell:               (208) 244-4460
* Email:                            stephen.k.jolley@intel.com


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

^ permalink raw reply

* Yocto Project Status WW01
From: Jolley, Stephen K @ 2017-01-03 15:51 UTC (permalink / raw)
  To: yocto@yoctoproject.org, openembedded-core@lists.openembedded.org

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

Current Dev Position: YP 2.3 M2 -> M3

Next Deadline: YP 2.3 M2 by Jan 23, 2017


SWAT team rotation: Maxin -> Joshua

https://wiki.yoctoproject.org/wiki/Yocto_Build_Failure_Swat_Team


Key Status/Updates:

*        M1 is having some QA difficulties due to some kind of bad interaction between the PR service and tinfoil2. We're waiting until people are back from vacation and up to speed before we decide what to do about this.

*        Both Ross and Richard decided to spend time away from computers over the holidays so things have not really changed much over the past couple of weeks, there is a small backlog of patches pending which will be worked through this week.

*        M2 will be upon us sooner than we realize and there are some key changes such as recipe specific sysroots and the oeqa framework rework pending with some potential for disruption. Wider testing of these patch sets as they're published would be appreciated.


Proposed upcoming dot releases:

YP 2.2.1 Release by Jan. 20, 2017

YP 2.1.3 Release by May. 19, 2017


Key YP 2.3 Dates:

YP 2.3 M1 Release is Dec. 23, 2016

YP 2.3 M2 Cutoff is Jan. 23, 2017

YP 2.3 M2 Release is Feb. 3, 2017

YP 2.3 M3 Cutoff is Feb 27, 2017

YP 2.3 M3 Release is Mar. 10, 2017

YP 2.3 M4 Cutoff is April 3, 2017

YP 2.3 M4 Release is April 28, 2017


Tracking Metrics:

            WDD 2594 (last week 2559)

(https://wiki.yoctoproject.org/charts/combo.html)


Key Status Links for YP:

https://wiki.yoctoproject.org/wiki/Yocto_Project_v2.3_Status

https://wiki.yoctoproject.org/wiki/Yocto_2.3_Schedule

https://wiki.yoctoproject.org/wiki/Yocto_2.3_Features


[If anyone has suggestions for other information you'd like to see on this weekly status update, let us know!]

Thanks,

Stephen K. Jolley
Yocto Project Program Manager
INTEL, MS JF1-255, 2111 N.E. 25th Avenue, Hillsboro, OR 97124
*   Work Telephone:        (503) 712-0534
*    Cell:               (208) 244-4460
* Email:                            stephen.k.jolley@intel.com


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

^ permalink raw reply

* Re: Yocto Project Status WW01
From: Richard Purdie @ 2017-01-03 16:16 UTC (permalink / raw)
  To: Jolley, Stephen K, yocto@yoctoproject.org,
	openembedded-core@lists.openembedded.org
In-Reply-To: <9ADD3FDE8B189B4AA2F8A3C711F8155E5732C512@fmsmsx111.amr.corp.intel.com>

On Tue, 2017-01-03 at 15:51 +0000, Jolley, Stephen K wrote:
> Current Dev Position: YP 2.3 M2 -> M3
> Next Deadline: YP 2.3 M2 by Jan 23, 2017
>  
> SWAT team rotation: Maxin -> Joshua
> https://wiki.yoctoproject.org/wiki/Yocto_Build_Failure_Swat_Team
>  
> Key Status/Updates:
> ·        M1 is having some QA difficulties due to some kind of bad
> interaction between the PR service and tinfoil2. We’re waiting until
> people are back from vacation and up to speed before we decide what
> to do about this.

One question which came up was whether just to cherry-pick fixes for M1
into a branch, or whether we use master. For me personally master is
tempting but its probably safer just to use an M1 branch as master has
moved on a fair bit. I wanted to give people an opportunity to express
opinions either way.

Cheers,

Richard


^ permalink raw reply

* [V2][PATCH] sysklogd: do more to properly work with systemd
From: Mark Asselstine @ 2017-01-03 17:01 UTC (permalink / raw)
  To: openembedded-core

It was noticed that syslogd and klogd were no longer running on system
startup, meaning no /var/log/messages etc.. It appears as though
sysklogd has never been updated to follow the expected logging
requirement for systemd as described here:
https://www.freedesktop.org/wiki/Software/systemd/syslog/

As such no service was started and no logging present. Using the above
guidelines we create two new service files syslogd.service and
klogd.service. We make use of tmpfiles.d in order to ensure the
xconsole device node exists and do other minor recipe cleanup to
ensure peaceful coexistence with sysvinit and systemd implementations.

The systemd documentation also asks that for a logger which is not
rsyslog that we also enable 'ForwardToSyslog=' in journald.conf, but
this is already the case so no action is required.

With this change in place syslogd and klogd are started at system
startup and the expected logs are available.

Unfortunately I was not able to find any work done on this upstream or
in other distros so this is my best effort at making this work.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
---

** V2 **
* update to not break sysvinit builds


 meta/recipes-extended/sysklogd/files/klogd.service  | 13 +++++++++++++
 .../recipes-extended/sysklogd/files/syslogd.service | 14 ++++++++++++++
 .../sysklogd/files/tmpfiles.sysklogd.conf           |  1 +
 meta/recipes-extended/sysklogd/sysklogd.inc         | 21 +++++++++++++++++++--
 4 files changed, 47 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-extended/sysklogd/files/klogd.service
 create mode 100644 meta/recipes-extended/sysklogd/files/syslogd.service
 create mode 100644 meta/recipes-extended/sysklogd/files/tmpfiles.sysklogd.conf

diff --git a/meta/recipes-extended/sysklogd/files/klogd.service b/meta/recipes-extended/sysklogd/files/klogd.service
new file mode 100644
index 0000000..0c888c4
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/files/klogd.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Kernel Logging Service
+After=syslogd.service
+
+[Service]
+Type=forking
+ExecStart=/sbin/klogd
+PIDFile=/var/run/klogd.pid
+StandardOutput=null
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-extended/sysklogd/files/syslogd.service b/meta/recipes-extended/sysklogd/files/syslogd.service
new file mode 100644
index 0000000..eeaff3d
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/files/syslogd.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=System Logging Service
+Requires=syslog.socket
+
+[Service]
+Type=forking
+ExecStart=/sbin/syslogd
+PIDFile=/var/run/syslogd.pid
+StandardOutput=null
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
+Alias=syslog.service
diff --git a/meta/recipes-extended/sysklogd/files/tmpfiles.sysklogd.conf b/meta/recipes-extended/sysklogd/files/tmpfiles.sysklogd.conf
new file mode 100644
index 0000000..f4aecd3
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/files/tmpfiles.sysklogd.conf
@@ -0,0 +1 @@
+p /dev/xconsole 0640 root adm
diff --git a/meta/recipes-extended/sysklogd/sysklogd.inc b/meta/recipes-extended/sysklogd/sysklogd.inc
index 5c15ffe..f9af0a4 100644
--- a/meta/recipes-extended/sysklogd/sysklogd.inc
+++ b/meta/recipes-extended/sysklogd/sysklogd.inc
@@ -11,17 +11,24 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
                     file://klogd.c;beginline=2;endline=19;md5=7e87ed0ae6142de079bce738c10c899d \
                    "
 
-inherit update-rc.d update-alternatives
+inherit update-rc.d update-alternatives systemd
 
 SRC_URI = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${PV}.tar.gz \
            file://no-strip-install.patch \
            file://0001-Fix-build-with-musl.patch \
            file://sysklogd \
            file://syslog.conf \
+           file://syslogd.service \
+           file://klogd.service \
+           file://tmpfiles.sysklogd.conf \
            "
 
 SRC_URI_append_e500v2 = " file://no-vectorization.patch"
 
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = "syslogd.service klogd.service"
+SYSTEMD_AUTO_ENABLE = "enable"
+
 INITSCRIPT_NAME = "syslog"
 CONFFILES_${PN} = "${sysconfdir}/syslog.conf.${BPN}"
 
@@ -39,13 +46,23 @@ do_install () {
 	install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf
 	install -d ${D}${sysconfdir}/init.d
 	install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog
+	install -d ${D}${systemd_unitdir}/system
+	install -m 644 ${WORKDIR}/syslogd.service ${D}${systemd_unitdir}/system
+	install -m 644 ${WORKDIR}/klogd.service ${D}${systemd_unitdir}/system
+	if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true', 'false', d)}; then
+		install -d ${D}${exec_prefix}/lib/tmpfiles.d
+		install -m 644 ${WORKDIR}/tmpfiles.sysklogd.conf ${D}${exec_prefix}/lib/tmpfiles.d/sysklogd.conf
+	fi
 }
 
+FILES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES','systemd','${exec_prefix}/lib/tmpfiles.d/sysklogd.conf', '', d)}"
+
 # sysklogd package has no internal systemd support, so we weigh busybox's
 # sysklogd utility over it in case of systemd
 ALTERNATIVE_PRIORITY = "${@bb.utils.contains('DISTRO_FEATURES','systemd','10','100',d)}"
 
-ALTERNATIVE_${PN} = "syslogd klogd syslog-init syslog-conf"
+ALTERNATIVE_${PN} = "syslogd klogd syslog-conf \
+    ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','syslog-init','',d)}"
 
 ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd"
 ALTERNATIVE_LINK_NAME[klogd] = "${base_sbindir}/klogd"
-- 
2.7.4



^ permalink raw reply related

* Re: questions on patching
From: Khem Raj @ 2017-01-03 17:13 UTC (permalink / raw)
  To: Ola Redell; +Cc: Patches and discussions about the oe-core layer
In-Reply-To: <80e2a281-3a69-3ea6-e46a-01b56acc947a@retotech.se>

On Tue, Jan 3, 2017 at 7:21 AM, Ola Redell <ola.redell@retotech.se> wrote:
> Hi all,
>
> I am a bit new to sending in patches to a list like this and specifically to
> OE-core, so I need a bit of guidance.
>
> I have a fix for a bug I found in Jethro in the kernel.bbclass and I have
> tested my fix there (update-alternatives needs a full path also when
> removing an alternative). Now, the bug is around in many different branches
> (laverne, krogoth and master for sure) but that particular patch will only
> apply to Jethro.
>
> I can make a patch for master but would have problems testing it thoroughly
> there without spending quite a bit of time (which I don't have at the
> moment).
>
> Easy questions:
> How should I proceed?

Master should definitely get this patch first. Then you can send
backports for release
branches that you are interested in.

> How do I know what branches are actively maintained and for which patches
> are welcome?

https://wiki.yoctoproject.org/wiki/Stable_branch_maintenance
https://wiki.yoctoproject.org/wiki/Releases

>
> I should have asked these questions before sending my earlier patch for the
> kernel-module-split.bbclass since this holds for that too.
>
> Thanks,
> Ola
>
>
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply

* [PATCH 0/6] poky-tiny improvements
From: Alejandro Hernandez @ 2017-01-03 22:30 UTC (permalink / raw)
  To: openembedded-core

This is the first set of patches meant to improve some of the characteristics
of poky-tiny, these patches are from or based on Tom Zanussi's work; includes
a new image recipe to be able to boot poky-tiny from initrd, along with 
changes to be able to create it using bootimg-efi, make it compatible with 
systemd-boot, and scripts to measure size of the image, kernel and modules.

The following changes since commit ce6e0c09723b4894beef32bba02785afdaff868b:

  bitbake: fetch2/wget: fixup case with no useful netrc data (2016-12-21 23:05:25 +0000)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib hsalejandro/tinymaster2
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=hsalejandro/tinymaster2

Alejandro Hernandez (1):
  core-image-tiny-initramfs: Fix error message shown after a successful
    initrd boot

Tom Zanussi (5):
  image-live-artifacts: Add support for creating image artifacts only
  core-image-tiny-initramfs: Add and image creating image artifacts only
  ksize.py: Python 3 fixes
  scripts/tiny/ksum.py: New tool
  bootimg-efi: Look for image artifacts in a common location

 meta/classes/image-live-artifacts.bbclass          |  64 ++++++++
 meta/classes/image.bbclass                         |   4 +
 .../images/core-image-tiny-initramfs.bb            |  43 ++++++
 scripts/lib/wic/plugins/source/bootimg-efi.py      |  28 +++-
 scripts/tiny/ksize.py                              |  17 ++-
 scripts/tiny/ksum.py                               | 168 +++++++++++++++++++++
 6 files changed, 313 insertions(+), 11 deletions(-)
 create mode 100644 meta/classes/image-live-artifacts.bbclass
 create mode 100644 meta/recipes-core/images/core-image-tiny-initramfs.bb
 create mode 100755 scripts/tiny/ksum.py

-- 
2.6.6



^ permalink raw reply

* [PATCH 1/6] image-live-artifacts: Add support for creating image artifacts only
From: Alejandro Hernandez @ 2017-01-03 22:30 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1482363237.git.alejandro.hernandez@linux.intel.com>

From: Tom Zanussi <tom.zanussi@linux.intel.com>

Rather than create an actual image, just put the image artifacts in an
'artifacts' directory that can then be picked up by wic.

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
---
 meta/classes/image-live-artifacts.bbclass | 64 +++++++++++++++++++++++++++++++
 meta/classes/image.bbclass                |  4 ++
 2 files changed, 68 insertions(+)
 create mode 100644 meta/classes/image-live-artifacts.bbclass

diff --git a/meta/classes/image-live-artifacts.bbclass b/meta/classes/image-live-artifacts.bbclass
new file mode 100644
index 0000000..e056336
--- /dev/null
+++ b/meta/classes/image-live-artifacts.bbclass
@@ -0,0 +1,64 @@
+# Copyright (C) 2004, Advanced Micro Devices, Inc.  All Rights Reserved
+# Released under the MIT license (see packages/COPYING)
+
+# Creates a bootable image using syslinux, your kernel and an optional
+# initrd
+
+#
+# End result is two things:
+#
+# 1. A .hddimg file which is an msdos filesystem containing syslinux, a kernel,
+# an initrd and a rootfs image. These can be written to harddisks directly and
+# also booted on USB flash disks (write them there with dd).
+#
+# 2. A CD .iso image
+
+# Boot process is that the initrd will boot and process which label was selected
+# in syslinux. Actions based on the label are then performed (e.g. installing to
+# an hdd)
+
+# External variables (also used by syslinux.bbclass)
+# ${INITRD} - indicates a list of filesystem images to concatenate and use as an initrd (optional)
+# ${COMPRESSISO} - Transparent compress ISO, reduce size ~40% if set to 1
+# ${NOISO}  - skip building the ISO image if set to 1
+# ${NOHDD}  - skip building the HDD image if set to 1
+# ${HDDIMG_ID} - FAT image volume-id
+# ${ROOTFS} - indicates a filesystem image to include as the root filesystem (optional)
+
+inherit live-vm-common
+
+do_bootimg[depends] += "dosfstools-native:do_populate_sysroot \
+                        mtools-native:do_populate_sysroot \
+                        cdrtools-native:do_populate_sysroot \
+                        virtual/kernel:do_deploy \
+                        ${MLPREFIX}syslinux:do_populate_sysroot \
+                        syslinux-native:do_populate_sysroot \
+                        ${@oe.utils.ifelse(d.getVar('COMPRESSISO', False),'zisofs-tools-native:do_populate_sysroot','')} \
+                        "
+
+
+LABELS_LIVE ?= "boot install"
+
+ARTIFACTS_DIR = "${DEPLOY_DIR_IMAGE}/artifacts"
+
+populate_bootloader() {
+	populate_kernel ${ARTIFACTS_DIR}
+
+	if [ "${PCBIOS}" = "1" ]; then
+		syslinux_hddimg_populate ${ARTIFACTS_DIR}
+	fi
+	if [ "${EFI}" = "1" ]; then
+		efi_hddimg_populate ${ARTIFACTS_DIR}
+	fi
+}
+
+python do_bootimg() {
+    set_live_vm_vars(d, 'LIVE')
+    if d.getVar("PCBIOS", True) == "1":
+        bb.build.exec_func('build_syslinux_cfg', d)
+    if d.getVar("EFI", True) == "1":
+        bb.build.exec_func('build_efi_cfg', d)
+    bb.build.exec_func('populate_bootloader', d)
+}
+
+addtask bootimg before do_image_complete
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 04fd5f9..c3f5f2e 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -130,6 +130,10 @@ do_rootfs[vardeps] += "${@rootfs_variables(d)}"
 do_build[depends] += "virtual/kernel:do_deploy"
 
 def build_live(d):
+    artifacts_only = d.getVar("ARTIFACTS_ONLY", True)
+    if artifacts_only:
+         return "image-live-artifacts"
+
     if bb.utils.contains("IMAGE_FSTYPES", "live", "live", "0", d) == "0": # live is not set but hob might set iso or hddimg
         d.setVar('NOISO', bb.utils.contains('IMAGE_FSTYPES', "iso", "0", "1", d))
         d.setVar('NOHDD', bb.utils.contains('IMAGE_FSTYPES', "hddimg", "0", "1", d))
-- 
2.6.6



^ permalink raw reply related

* [PATCH 2/6] core-image-tiny-initramfs: Add and image creating image artifacts only
From: Alejandro Hernandez @ 2017-01-03 22:30 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1482363237.git.alejandro.hernandez@linux.intel.com>

From: Tom Zanussi <tom.zanussi@linux.intel.com>

Add an image that simply creates image artifacts using
image-live-artifacts support instead of creating an actual image.

The image artifacts can then be subsequently assembled by an external
tool such as wic to create an actual image.

This eliminates redundant image creation when using such tools.
---
 .../images/core-image-tiny-initramfs.bb            | 31 ++++++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 meta/recipes-core/images/core-image-tiny-initramfs.bb

diff --git a/meta/recipes-core/images/core-image-tiny-initramfs.bb b/meta/recipes-core/images/core-image-tiny-initramfs.bb
new file mode 100644
index 0000000..216f3e0
--- /dev/null
+++ b/meta/recipes-core/images/core-image-tiny-initramfs.bb
@@ -0,0 +1,31 @@
+# Simple initramfs image artifact generation for tiny images.
+DESCRIPTION = "Tiny image capable of booting a device. The kernel includes \
+the Minimal RAM-based Initial Root Filesystem (initramfs), which finds the \
+first 'init' program more efficiently.  core-image-tiny-initramfs doesn't \
+actually generate an image but rather generates boot and rootfs artifacts \
+into a common location that can subsequently be picked up by external image \
+generation tools such as wic."
+
+PACKAGE_INSTALL = "initramfs-live-boot packagegroup-core-boot dropbear ${VIRTUAL-RUNTIME_base-utils} udev base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
+
+# Do not pollute the initrd image with rootfs features
+IMAGE_FEATURES = ""
+
+export IMAGE_BASENAME = "core-image-tiny-initramfs"
+IMAGE_LINGUAS = ""
+
+LICENSE = "MIT"
+
+# don't actually generate an image, just the artifacts needed for one
+ARTIFACTS_ONLY ?= "1"
+
+IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
+inherit core-image
+
+IMAGE_ROOTFS_SIZE = "8192"
+IMAGE_ROOTFS_EXTRA_SPACE = "0"
+
+BAD_RECOMMENDATIONS += "busybox-syslog"
+
+# Use the same restriction as initramfs-live-install
+COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
-- 
2.6.6



^ permalink raw reply related

* [PATCH 4/6] scripts/tiny/ksum.py: New tool
From: Alejandro Hernandez @ 2017-01-03 22:30 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1482363237.git.alejandro.hernandez@linux.intel.com>

From: Tom Zanussi <tom.zanussi@linux.intel.com>

'ksum.py' generates a combined summary of vmlinux and module sizes for
a built kernel, as a quick tool for comparing the overall effects of
systemic tinification changes.  Execute from the base directory of the
kernel build you want to summarize.  Setting the 'verbose' flag will
display the sizes for each file included in the summary.

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
---
 scripts/tiny/ksum.py | 168 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 168 insertions(+)
 create mode 100755 scripts/tiny/ksum.py

diff --git a/scripts/tiny/ksum.py b/scripts/tiny/ksum.py
new file mode 100755
index 0000000..d4f3892
--- /dev/null
+++ b/scripts/tiny/ksum.py
@@ -0,0 +1,168 @@
+#!/usr/bin/env python
+# ex:ts=4:sw=4:sts=4:et
+# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#
+# Copyright (c) 2016, Intel Corporation.
+# All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# DESCRIPTION 'ksum.py' generates a combined summary of vmlinux and
+# module sizes for a built kernel, as a quick tool for comparing the
+# overall effects of systemic tinification changes.  Execute from the
+# base directory of the kernel build you want to summarize.  Setting
+# the 'verbose' flag will display the sizes for each file included in
+# the summary.
+#
+# AUTHORS
+# Tom Zanussi <tom.zanussi (at] linux.intel.com>
+#
+
+__version__ = "0.1.0"
+
+# Python Standard Library modules
+import os
+import sys
+import getopt
+from subprocess import *
+
+def usage():
+    prog = os.path.basename(sys.argv[0])
+    print('Usage: %s [OPTION]...' % prog)
+    print('  -v,                 display sizes for each file')
+    print('  -h, --help          display this help and exit')
+    print('')
+    print('Run %s from the top-level Linux kernel build directory.' % prog)
+
+verbose = False
+
+n_ko_files = 0
+ko_file_list = []
+
+ko_text = 0
+ko_data = 0
+ko_bss = 0
+ko_total = 0
+
+vmlinux_file = ""
+vmlinux_level = 0
+
+vmlinux_text = 0
+vmlinux_data = 0
+vmlinux_bss = 0
+vmlinux_total = 0
+
+def is_vmlinux_file(filename):
+    global vmlinux_level
+    if filename == ("vmlinux") and vmlinux_level == 0:
+        vmlinux_level += 1
+        return True
+    return False
+
+def is_ko_file(filename):
+    if filename.endswith(".ko"):
+        return True
+    return False
+
+def collect_object_files():
+    print "Collecting object files recursively from %s..." % os.getcwd()
+    for dirpath, dirs, files in os.walk(os.getcwd()):
+        for filename in files:
+            if is_ko_file(filename):
+                ko_file_list.append(os.path.join(dirpath, filename))
+            elif is_vmlinux_file(filename):
+                global vmlinux_file
+                vmlinux_file = os.path.join(dirpath, filename)
+    print "Collecting object files [DONE]"
+
+def add_ko_file(filename):
+        p = Popen("size -t " + filename, shell=True, stdout=PIPE, stderr=PIPE)
+        output = p.communicate()[0].splitlines()
+        if len(output) > 2:
+            sizes = output[-1].split()[0:4]
+            if verbose:
+                print "     %10d %10d %10d %10d\t" % \
+                    (int(sizes[0]), int(sizes[1]), int(sizes[2]), int(sizes[3])),
+                print "%s" % filename[len(os.getcwd()) + 1:]
+            global n_ko_files, ko_text, ko_data, ko_bss, ko_total
+            ko_text += int(sizes[0])
+            ko_data += int(sizes[1])
+            ko_bss += int(sizes[2])
+            ko_total += int(sizes[3])
+            n_ko_files += 1
+
+def get_vmlinux_totals():
+        p = Popen("size -t " + vmlinux_file, shell=True, stdout=PIPE, stderr=PIPE)
+        output = p.communicate()[0].splitlines()
+        if len(output) > 2:
+            sizes = output[-1].split()[0:4]
+            if verbose:
+                print "     %10d %10d %10d %10d\t" % \
+                    (int(sizes[0]), int(sizes[1]), int(sizes[2]), int(sizes[3])),
+                print "%s" % vmlinux_file[len(os.getcwd()) + 1:]
+            global vmlinux_text, vmlinux_data, vmlinux_bss, vmlinux_total
+            vmlinux_text += int(sizes[0])
+            vmlinux_data += int(sizes[1])
+            vmlinux_bss += int(sizes[2])
+            vmlinux_total += int(sizes[3])
+
+def sum_ko_files():
+    for ko_file in ko_file_list:
+        add_ko_file(ko_file)
+
+def main():
+    try:
+        opts, args = getopt.getopt(sys.argv[1:], "vh", ["help"])
+    except getopt.GetoptError as err:
+        print('%s' % str(err))
+        usage()
+        sys.exit(2)
+
+    for o, a in opts:
+        if o == '-v':
+            global verbose
+            verbose = True
+        elif o in ('-h', '--help'):
+            usage()
+            sys.exit(0)
+        else:
+            assert False, "unhandled option"
+
+    collect_object_files()
+    sum_ko_files()
+    get_vmlinux_totals()
+
+    print "\nTotals:"
+    print "\nvmlinux:"
+    print "    text\tdata\t\tbss\t\ttotal"
+    print "    %-10d\t%-10d\t%-10d\t%-10d" % \
+        (vmlinux_text, vmlinux_data, vmlinux_bss, vmlinux_total)
+    print "\nmodules (%d):" % n_ko_files
+    print "    text\tdata\t\tbss\t\ttotal"
+    print "    %-10d\t%-10d\t%-10d\t%-10d" % \
+        (ko_text, ko_data, ko_bss, ko_total)
+    print "\nvmlinux + modules:"
+    print "    text\tdata\t\tbss\t\ttotal"
+    print "    %-10d\t%-10d\t%-10d\t%-10d" % \
+        (vmlinux_text + ko_text, vmlinux_data + ko_data, \
+         vmlinux_bss + ko_bss, vmlinux_total + ko_total)
+
+if __name__ == "__main__":
+    try:
+        ret = main()
+    except Exception:
+        ret = 1
+        import traceback
+        traceback.print_exc(5)
+    sys.exit(ret)
-- 
2.6.6



^ permalink raw reply related

* [PATCH 3/6] ksize.py: Python 3 fixes
From: Alejandro Hernandez @ 2017-01-03 22:30 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1482363237.git.alejandro.hernandez@linux.intel.com>

From: Tom Zanussi <tom.zanussi@linux.intel.com>

String errors and partial __cmp__ fix.

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
---
 scripts/tiny/ksize.py | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/scripts/tiny/ksize.py b/scripts/tiny/ksize.py
index b9d2b19..ea1ca7f 100755
--- a/scripts/tiny/ksize.py
+++ b/scripts/tiny/ksize.py
@@ -41,7 +41,7 @@ def usage():
 class Sizes:
     def __init__(self, glob):
         self.title = glob
-        p = Popen("size -t " + glob, shell=True, stdout=PIPE, stderr=PIPE)
+        p = Popen("size -t " + str(glob), shell=True, stdout=PIPE, stderr=PIPE)
         output = p.communicate()[0].splitlines()
         if len(output) > 2:
             sizes = output[-1].split()[0:4]
@@ -62,18 +62,18 @@ class Report:
         r = Report(filename, title)
         path = os.path.dirname(filename)
 
-        p = Popen("ls " + path + "/*.o | grep -v built-in.o",
+        p = Popen("ls " + str(path) + "/*.o | grep -v built-in.o",
                   shell=True, stdout=PIPE, stderr=PIPE)
         glob = ' '.join(p.communicate()[0].splitlines())
-        oreport = Report(glob, path + "/*.o")
-        oreport.sizes.title = path + "/*.o"
+        oreport = Report(glob, str(path) + "/*.o")
+        oreport.sizes.title = str(path) + "/*.o"
         r.parts.append(oreport)
 
         if subglob:
             p = Popen("ls " + subglob, shell=True, stdout=PIPE, stderr=PIPE)
             for f in p.communicate()[0].splitlines():
                 path = os.path.dirname(f)
-                r.parts.append(Report.create(f, path, path + "/*/built-in.o"))
+                r.parts.append(Report.create(f, path, str(path) + "/*/built-in.o"))
             r.parts.sort(reverse=True)
 
         for b in r.parts:
@@ -116,6 +116,13 @@ class Report:
                self.deltas["data"], self.deltas["bss"]))
         print("\n")
 
+    def __lt__(this, that):
+        if that is None:
+            return 1
+        if not isinstance(that, Report):
+            raise TypeError
+        return this.sizes.total < that.sizes.total
+
     def __cmp__(this, that):
         if that is None:
             return 1
-- 
2.6.6



^ permalink raw reply related

* [PATCH 5/6] bootimg-efi: Look for image artifacts in a common location
From: Alejandro Hernandez @ 2017-01-03 22:30 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1482363237.git.alejandro.hernandez@linux.intel.com>

From: Tom Zanussi <tom.zanussi@linux.intel.com>

Rather than have each image type look for artifacts in image-specific
locations, move towards having them look for artifacts in a common
location, in this case DEPLOY_DIR_IMAGE/artifacts.

This currently only applies to bootimg-efi images, and only if the
oe-core image classes have been modified to generate artifacts there
(e.g. using image-live-artifacts).

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
---
 scripts/lib/wic/plugins/source/bootimg-efi.py | 28 +++++++++++++++++++++------
 1 file changed, 22 insertions(+), 6 deletions(-)

diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py
index 305e910..2c16a0f 100644
--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -42,7 +42,7 @@ class BootimgEFIPlugin(SourcePlugin):
     name = 'bootimg-efi'
 
     @classmethod
-    def do_configure_grubefi(cls, hdddir, creator, cr_workdir):
+    def do_configure_grubefi(cls, hdddir, creator, cr_workdir, source_params):
         """
         Create loader-specific (grub-efi) config
         """
@@ -82,7 +82,7 @@ class BootimgEFIPlugin(SourcePlugin):
         cfg.close()
 
     @classmethod
-    def do_configure_systemdboot(cls, hdddir, creator, cr_workdir):
+    def do_configure_systemdboot(cls, hdddir, creator, cr_workdir, source_params):
         """
         Create loader-specific systemd-boot/gummiboot config
         """
@@ -98,6 +98,18 @@ class BootimgEFIPlugin(SourcePlugin):
         loader_conf += "default boot\n"
         loader_conf += "timeout %d\n" % bootloader.timeout
 
+        initrd = ""
+
+        if source_params['initrd']:
+	    initrd = source_params['initrd']
+            # obviously we need to have a common common deploy var
+            bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
+            if not bootimg_dir:
+                msger.error("Couldn't find DEPLOY_DIR_IMAGE, exiting\n")
+
+            cp_cmd = "cp %s/%s %s" % (bootimg_dir, initrd, hdddir)
+            exec_cmd(cp_cmd, True)
+
         msger.debug("Writing systemd-boot config %s/hdd/boot/loader/loader.conf" \
                         % cr_workdir)
         cfg = open("%s/hdd/boot/loader/loader.conf" % cr_workdir, "w")
@@ -127,6 +139,9 @@ class BootimgEFIPlugin(SourcePlugin):
             boot_conf += "options LABEL=Boot root=%s %s\n" % \
                              (creator.rootdev, bootloader.append)
 
+           if initrd:
+                boot_conf += "initrd /%s\n" % initrd
+
         msger.debug("Writing systemd-boot config %s/hdd/boot/loader/entries/boot.conf" \
                         % cr_workdir)
         cfg = open("%s/hdd/boot/loader/entries/boot.conf" % cr_workdir, "w")
@@ -148,9 +163,9 @@ class BootimgEFIPlugin(SourcePlugin):
 
         try:
             if source_params['loader'] == 'grub-efi':
-                cls.do_configure_grubefi(hdddir, creator, cr_workdir)
+                cls.do_configure_grubefi(hdddir, creator, cr_workdir, source_params)
             elif source_params['loader'] == 'systemd-boot':
-                cls.do_configure_systemdboot(hdddir, creator, cr_workdir)
+                cls.do_configure_systemdboot(hdddir, creator, cr_workdir, source_params)
             else:
                 msger.error("unrecognized bootimg-efi loader: %s" % source_params['loader'])
         except KeyError:
@@ -167,9 +182,10 @@ class BootimgEFIPlugin(SourcePlugin):
         In this case, prepare content for an EFI (grub) boot partition.
         """
         if not bootimg_dir:
-            bootimg_dir = get_bitbake_var("HDDDIR")
+	    bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
             if not bootimg_dir:
-                msger.error("Couldn't find HDDDIR, exiting\n")
+                 msger.error("Couldn't find DEPLOY_DIR_IMAGE, exiting\n")
+            bootimg_dir += "/artifacts"
             # just so the result notes display it
             creator.set_bootimg_dir(bootimg_dir)
 
-- 
2.6.6



^ permalink raw reply related

* [PATCH 6/6] core-image-tiny-initramfs: Fix error message shown after a successful initrd boot
From: Alejandro Hernandez @ 2017-01-03 22:30 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1482363237.git.alejandro.hernandez@linux.intel.com>

When booting core-image-tiny-initramfs, since we want to live on initrd,
on purpose, we never find a rootfs image to switch root to,
this causes init to show an error as it would with other images,
this patch replaces the message shown to the user, avoiding confusion
when it was indeed a successful boot.

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
---
 meta/recipes-core/images/core-image-tiny-initramfs.bb | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/meta/recipes-core/images/core-image-tiny-initramfs.bb b/meta/recipes-core/images/core-image-tiny-initramfs.bb
index 216f3e0..a1a4f66 100644
--- a/meta/recipes-core/images/core-image-tiny-initramfs.bb
+++ b/meta/recipes-core/images/core-image-tiny-initramfs.bb
@@ -29,3 +29,15 @@ BAD_RECOMMENDATIONS += "busybox-syslog"
 
 # Use the same restriction as initramfs-live-install
 COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
+
+python tinyinitrd () {
+  # Modify our init file so the user knows we drop to shell prompt on purpose
+  newinit = None
+  with open(d.expand('${IMAGE_ROOTFS}/init'), 'r') as init:
+    newinit = init.read()
+    newinit = newinit.replace('Cannot find $ROOT_IMAGE file in /run/media/* , dropping to a shell ', 'Poky Tiny Reference Distribution:')
+  with open(d.expand('${IMAGE_ROOTFS}/init'), 'w') as init:
+    init.write(newinit)
+}
+
+IMAGE_PREPROCESS_COMMAND += "tinyinitrd;"
-- 
2.6.6



^ permalink raw reply related

* Re: [PATCH 1/6] image-live-artifacts: Add support for creating image artifacts only
From: Richard Purdie @ 2017-01-03 22:41 UTC (permalink / raw)
  To: Alejandro Hernandez, openembedded-core
In-Reply-To: <04107922d67fb222e89181e85f914884a34a4141.1482363237.git.alejandro.hernandez@linux.intel.com>

On Tue, 2017-01-03 at 22:30 +0000, Alejandro Hernandez wrote:
> From: Tom Zanussi <tom.zanussi@linux.intel.com>
> 
> Rather than create an actual image, just put the image artifacts in
> an 'artifacts' directory that can then be picked up by wic.
> 
> Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>

I think the idea here is good, the implementation is suboptimal though.
The reason being it introduces more variables which do things outside a
clear namespace (ARTIFACTS_ONLY).

I'd really like to see this code trigger off an entry in IMAGE_FSTYPES
like IMAGE_FSTYPES = "live-artifacts-only" or some other such keyword.
The ultimate idea is we'd get rid of all these class specific variables
and you'd just set IMAGE_FSTYPES according to what you want.

The depends on COMPRESSISO also looks like a cut and paste which I'm
not sure could trigger in this codepath?

Cheers,

Richard


^ permalink raw reply

* Re: [meta-oe][PATCH v2] devtools: Add recipe for Chromium Embedded Controller utilities
From: Moritz Fischer @ 2017-01-04  0:28 UTC (permalink / raw)
  To: openembedded-core; +Cc: koen, Moritz Fischer
In-Reply-To: <1483034519-11162-1-git-send-email-moritz.fischer@ettus.com>

Hi all,

I realized this might have gotten held up by me not being subscibed to the list,
do you want me to resubmit?

On Thu, Dec 29, 2016 at 10:01 AM, Moritz Fischer
<moritz.fischer@ettus.com> wrote:
> Add a recipe to build 'ectool' a utility to interact with the embedded
> controller on Google's chromebooks (and other platforms using it).
>
> Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
> ---
> Changes from v1:
>
> - Replaced DESCRIPTION with SUMMARY (Martin)
> - Use EXTRA_OEMAKE (Martin)
> - Removed FILESEXTRAPATHS (Martin)
> - Changed PV (Martin / Khem)
> - Removed FILES_PN (Khem)
> ---
>  .../chromium-utils/chromium-utils.bb               | 24 ++++++++++++++++++++
>  .../files/0001-build-Add-HOST_LDFLAGS.patch        | 26 ++++++++++++++++++++++
>  2 files changed, 50 insertions(+)
>  create mode 100644 meta/recipes-devtools/chromium-utils/chromium-utils.bb
>  create mode 100644 meta/recipes-devtools/chromium-utils/files/0001-build-Add-HOST_LDFLAGS.patch
>
> diff --git a/meta/recipes-devtools/chromium-utils/chromium-utils.bb b/meta/recipes-devtools/chromium-utils/chromium-utils.bb
> new file mode 100644
> index 0000000..87d866a
> --- /dev/null
> +++ b/meta/recipes-devtools/chromium-utils/chromium-utils.bb
> @@ -0,0 +1,24 @@
> +SUMMARY = "Chromium EC utilities"
> +DEPENDS = "libftdi"
> +LICENSE = "BSD-3-Clause"
> +LIC_FILES_CHKSUM = "file://LICENSE;md5=562c740877935f40b262db8af30bca36"
> +
> +SRCREV = "b19bb1f22a3fd0102030485d324c0321a18827e8"
> +SRC_URI = "git://chromium.googlesource.com/chromiumos/platform/ec;protocol=https \
> +           file://0001-build-Add-HOST_LDFLAGS.patch \
> +          "
> +
> +PV="1.1.9999+${SRCPV}"
> +
> +S = "${WORKDIR}/git"
> +
> +EXTRA_OEMAKE = "'HOSTCC=${CC}' 'HOSTCFLAGS=${CFLAGS}' 'HOST_LDFLAGS=${LDFLAGS}'"
> +
> +do_compile() {
> +    oe_runmake utils
> +}
> +
> +do_install() {
> +    install -m 0755 -d ${D}${bindir}
> +    install -m 0755 ${S}/build/bds/util/ectool ${D}${bindir}/ectool
> +}
> diff --git a/meta/recipes-devtools/chromium-utils/files/0001-build-Add-HOST_LDFLAGS.patch b/meta/recipes-devtools/chromium-utils/files/0001-build-Add-HOST_LDFLAGS.patch
> new file mode 100644
> index 0000000..46e8cad
> --- /dev/null
> +++ b/meta/recipes-devtools/chromium-utils/files/0001-build-Add-HOST_LDFLAGS.patch
> @@ -0,0 +1,26 @@
> +From 56ffeeffea735a6a8f69fc111278ebabe3c7e2d8 Mon Sep 17 00:00:00 2001
> +From: Moritz Fischer <moritz.fischer@ettus.com>
> +Date: Tue, 27 Dec 2016 22:24:07 -0800
> +Subject: [PATCH] build Add HOST_LDFLAGS
> +
> +Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
> +---
> + Makefile.rules | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/Makefile.rules b/Makefile.rules
> +index 404454d..0057ba9 100644
> +--- a/Makefile.rules
> ++++ b/Makefile.rules
> +@@ -60,7 +60,7 @@ cmd_c_to_build = $(BUILDCC) $(BUILD_CFLAGS) \
> +                $(sort $(foreach c,$($(*F)-objs),util/$(c:%.o=%.c)) $*.c) \
> +                $(BUILD_LDFLAGS) \
> +                -MMD -MF $@.d -o $@
> +-cmd_c_to_host = $(HOSTCC) $(HOST_CFLAGS) -MMD -MF $@.d  -o $@ \
> ++cmd_c_to_host = $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -MMD -MF $@.d  -o $@ \
> +                $(sort $(foreach c,$($(*F)-objs),util/$(c:%.o=%.c)) $*.c)
> + cmd_cxx_to_host = $(HOSTCXX) -std=c++0x $(COMMON_WARN) $(HOST_CXXFLAGS)\
> +       -I ./$($(notdir $@)_ROOT) -o $@ $(filter %.cc,$^) $($(notdir $@)_LIBS)
> +--
> +2.4.11
> +
> --
> 2.7.4
>

Thanks,

Moritz


^ permalink raw reply

* Re: [meta-oe][PATCH v2] devtools: Add recipe for Chromium Embedded Controller utilities
From: Martin Jansa @ 2017-01-04  0:51 UTC (permalink / raw)
  To: Moritz Fischer
  Cc: Koen Kooi, Moritz Fischer,
	Patches and discussions about the oe-core layer
In-Reply-To: <CAAtXAHeA6RzdBiRMnrHzD2VHnawA32=3KyXKEVkqQSG2Vo2z4g@mail.gmail.com>

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

The PV still doesn't look right.

On Wed, Jan 4, 2017 at 1:28 AM, Moritz Fischer <moritz.fischer@ettus.com>
wrote:

> Hi all,
>
> I realized this might have gotten held up by me not being subscibed to the
> list,
> do you want me to resubmit?
>
> On Thu, Dec 29, 2016 at 10:01 AM, Moritz Fischer
> <moritz.fischer@ettus.com> wrote:
> > Add a recipe to build 'ectool' a utility to interact with the embedded
> > controller on Google's chromebooks (and other platforms using it).
> >
> > Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
> > ---
> > Changes from v1:
> >
> > - Replaced DESCRIPTION with SUMMARY (Martin)
> > - Use EXTRA_OEMAKE (Martin)
> > - Removed FILESEXTRAPATHS (Martin)
> > - Changed PV (Martin / Khem)
> > - Removed FILES_PN (Khem)
> > ---
> >  .../chromium-utils/chromium-utils.bb               | 24
> ++++++++++++++++++++
> >  .../files/0001-build-Add-HOST_LDFLAGS.patch        | 26
> ++++++++++++++++++++++
> >  2 files changed, 50 insertions(+)
> >  create mode 100644 meta/recipes-devtools/chromium-utils/chromium-utils.
> bb
> >  create mode 100644 meta/recipes-devtools/chromium-utils/files/0001-
> build-Add-HOST_LDFLAGS.patch
> >
> > diff --git a/meta/recipes-devtools/chromium-utils/chromium-utils.bb
> b/meta/recipes-devtools/chromium-utils/chromium-utils.bb
> > new file mode 100644
> > index 0000000..87d866a
> > --- /dev/null
> > +++ b/meta/recipes-devtools/chromium-utils/chromium-utils.bb
> > @@ -0,0 +1,24 @@
> > +SUMMARY = "Chromium EC utilities"
> > +DEPENDS = "libftdi"
> > +LICENSE = "BSD-3-Clause"
> > +LIC_FILES_CHKSUM = "file://LICENSE;md5=562c740877935f40b262db8af30bca
> 36"
> > +
> > +SRCREV = "b19bb1f22a3fd0102030485d324c0321a18827e8"
> > +SRC_URI = "git://chromium.googlesource.com/chromiumos/platform/ec;
> protocol=https \
> > +           file://0001-build-Add-HOST_LDFLAGS.patch \
> > +          "
> > +
> > +PV="1.1.9999+${SRCPV}"
> > +
> > +S = "${WORKDIR}/git"
> > +
> > +EXTRA_OEMAKE = "'HOSTCC=${CC}' 'HOSTCFLAGS=${CFLAGS}'
> 'HOST_LDFLAGS=${LDFLAGS}'"
> > +
> > +do_compile() {
> > +    oe_runmake utils
> > +}
> > +
> > +do_install() {
> > +    install -m 0755 -d ${D}${bindir}
> > +    install -m 0755 ${S}/build/bds/util/ectool ${D}${bindir}/ectool
> > +}
> > diff --git a/meta/recipes-devtools/chromium-utils/files/0001-build-Add-HOST_LDFLAGS.patch
> b/meta/recipes-devtools/chromium-utils/files/0001-
> build-Add-HOST_LDFLAGS.patch
> > new file mode 100644
> > index 0000000..46e8cad
> > --- /dev/null
> > +++ b/meta/recipes-devtools/chromium-utils/files/0001-
> build-Add-HOST_LDFLAGS.patch
> > @@ -0,0 +1,26 @@
> > +From 56ffeeffea735a6a8f69fc111278ebabe3c7e2d8 Mon Sep 17 00:00:00 2001
> > +From: Moritz Fischer <moritz.fischer@ettus.com>
> > +Date: Tue, 27 Dec 2016 22:24:07 -0800
> > +Subject: [PATCH] build Add HOST_LDFLAGS
> > +
> > +Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
> > +---
> > + Makefile.rules | 2 +-
> > + 1 file changed, 1 insertion(+), 1 deletion(-)
> > +
> > +diff --git a/Makefile.rules b/Makefile.rules
> > +index 404454d..0057ba9 100644
> > +--- a/Makefile.rules
> > ++++ b/Makefile.rules
> > +@@ -60,7 +60,7 @@ cmd_c_to_build = $(BUILDCC) $(BUILD_CFLAGS) \
> > +                $(sort $(foreach c,$($(*F)-objs),util/$(c:%.o=%.c))
> $*.c) \
> > +                $(BUILD_LDFLAGS) \
> > +                -MMD -MF $@.d -o $@
> > +-cmd_c_to_host = $(HOSTCC) $(HOST_CFLAGS) -MMD -MF $@.d  -o $@ \
> > ++cmd_c_to_host = $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -MMD -MF
> $@.d  -o $@ \
> > +                $(sort $(foreach c,$($(*F)-objs),util/$(c:%.o=%.c))
> $*.c)
> > + cmd_cxx_to_host = $(HOSTCXX) -std=c++0x $(COMMON_WARN)
> $(HOST_CXXFLAGS)\
> > +       -I ./$($(notdir $@)_ROOT) -o $@ $(filter %.cc,$^) $($(notdir
> $@)_LIBS)
> > +--
> > +2.4.11
> > +
> > --
> > 2.7.4
> >
>
> Thanks,
>
> Moritz
>

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

^ permalink raw reply

* Re: OpenEmbedded Stand at FOSDEM
From: Andreas Müller @ 2017-01-04  1:13 UTC (permalink / raw)
  To: Philip Balister
  Cc: Yocto Project, openembedded-members@lists.openembedded.org,
	openembedded-architecture,
	openembedded-devel@lists.openembedded.org, openembedded-core
In-Reply-To: <65082de4-2ba6-3b18-1845-00b2d637404e@balister.org>

On Tue, Jan 3, 2017 at 4:32 PM, Philip Balister <philip@balister.org> wrote:
> Every year since 2007, OpenEmbedded has a stand at FOSDEM
> (http://www.fosdem.org)
>
> From the first year:
>
> https://www.flickr.com/photos/32615155@N00/405229708/in/album-72157594561002629/
>
> Belen and I are sort of organizing this, but both of us are also
> involved in devrooms, so we will need a lot of help manning the stand
> and getting some demos together.
>
> Demos should try and show how the project makes embedded work easier, by
> showing tools and/or cool examples of devices using Linux built with
> OpenEmbedded. In previous years, we've shown toaster with data collected
> from demos on the table. Collections of devices running images built
> from the same recipe and interesting products using Linux by OpenEmbedded.
>
> I'm happy to try and organize demos and staffing, but I could really use
> some help this year, so if you are in a position to tak ethe lead on
> operating the stand, that would be a huge help to me and the rest of the
> project.
>
> Thanks,
>
> Philip
> --
I could bring along

1. Raspi2 + Hifiberry + Speakers + Midi-Keyboard + Xbox-controller
2. a SDCard full of desktops/multimedia/office/games using 1.
3. 2 days time
4. ?? - let me know

Andreas


^ permalink raw reply

* Re: [PATCH 5/5] hdparm: 9.48 -> 9.50
From: Robert Yang @ 2017-01-04  2:12 UTC (permalink / raw)
  To: Andreas Oberritter, Andre McCurdy; +Cc: OE Core mailing list
In-Reply-To: <d99876dc-4982-496b-2b9d-34540ce09b01@opendreambox.org>


Thanks, updated in the repo:

   git://git.openembedded.org/openembedded-core-contrib rbt/pu
   http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/pu

Robert Yang (5):
   debianutils: 4.8 -> 4.8.1
   mklibs-native: 0.1.41 -> 0.1.43
   quilt: 0.64 -> 0.65
   guile: 2.0.12 -> 2.0.13
   hdparm: 9.48 -> 9.50



Author: Robert Yang <liezhi.yang@windriver.com>
Date:   Tue Dec 20 03:09:45 2016 +0000

     hdparm: 9.48 -> 9.50

     Remove "-e MAKEFLAGS=" from EXTRA_OEMAKE to fix:
     ERROR: hdparm-9.50-r0 do_package: QA Issue: File '/sbin/hdparm.hdparm' from 
hdparm was already stripped, this will prevent future debugging! [already-stripped]
     ERROR: hdparm-9.50-r0 do_package: Fatal QA errors found, failing task.

     The "-e MAKEFLAGS=" would cause submake can't get vars from environment,
     The git log said that it was added for fixing a QA warning, but
     everything is OK after remove it now.

     Signed-off-by: Robert Yang <liezhi.yang@windriver.com>

diff --git a/meta/recipes-extended/hdparm/hdparm_9.48.bb 
b/meta/recipes-extended/hdparm/hdparm_9.50.bb
similarity index 81%
rename from meta/recipes-extended/hdparm/hdparm_9.48.bb
rename to meta/recipes-extended/hdparm/hdparm_9.50.bb
index cd85776cf8f..f89c30e4dda 100644
--- a/meta/recipes-extended/hdparm/hdparm_9.48.bb
+++ b/meta/recipes-extended/hdparm/hdparm_9.50.bb
@@ -20,12 +20,12 @@ FILES_wiper = "${bindir}/wiper.sh"

  RDEPENDS_wiper = "bash gawk stat"

-SRC_URI = "${SOURCEFORGE_MIRROR}/hdparm/${BP}.tar.gz "
+SRC_URI = "${SOURCEFORGE_MIRROR}/hdparm/${BP}.tar.gz"

-SRC_URI[md5sum] = "213efdbe7471fad3408198918e164354"
-SRC_URI[sha256sum] = 
"ce97b4a71cb04146f54cf6f69787e7f97ddfda9836dc803b459d3b3df3a4fbee"
+SRC_URI[md5sum] = "d380062ad6c4b40076736efbb640f1f5"
+SRC_URI[sha256sum] = 
"0892b44bd817c251264a24f6ecbbb010958033e0395d2030f25f1c5608ac780e"

-EXTRA_OEMAKE = '-e MAKEFLAGS= STRIP="echo"'
+EXTRA_OEMAKE = 'STRIP="echo" LDFLAGS="${LDFLAGS}"'

  inherit update-alternatives


// Robert

On 12/22/2016 09:34 PM, Andreas Oberritter wrote:
> On 22.12.2016 04:14, Robert Yang wrote:
>> On 12/22/2016 11:09 AM, Andreas Oberritter wrote:
>>> On 22.12.2016 03:47, Robert Yang wrote:
>>>> On 12/21/2016 09:27 PM, Andre McCurdy wrote:
>>>>> Passing LDFLAGS on the make command line might be a cleaner solution
>>>>> than patching the Makefile.
>>>>
>>>> We can't do that since there is a "-e MAKEFLAGS=" in EXTRA_OEMAKE,
>>>> and its
>>>> Makefile is:
>>>>
>>>> all:
>>>>     make -j2 hdparm
>>>>
>>>> hdparm: hdparm.h sgio.h $(OBJS)
>>>>     $(CC) $(LDFLAGS) -o hdparm $(OBJS)
>>>>     $(STRIP) hdparm
>>>>
>>>> The "make -j2 hdparm" doesn't pass any env vars to sub make since
>>>> MAKEFLAGS=,
>>>> so that need use weak assignment "?=" here.
>>>
>>> You don't need to use target 'all'. Try this:
>>>
>>> do_compile() {
>>>     oe_runmake hdparm
>>> }
>>
>> I know this will work, but "make hdparm" rather than "all" may cause other
>> issues in the future when hdparm gets ugpraded, for example, "all" doesn't
>> only contain "hdmarm". And do we have really have to add a do_compile()
>> here ?
>
> It's certainly easier to delete do_compile in a future version's recipe
> than regenerating patches. hdparm is looking for a new maintainer, btw.
>
> 'hdparm' has been the only target built by 'all' since at least version
> 3.1, which dates back to 1996.
>
> Regards,
> Andreas
>


^ permalink raw reply related

* [PATCH 0/1] busybox: upgrade to 1.26.1
From: Chen Qi @ 2017-01-04  3:22 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit dbb247cac5fbf7b037e4955f9793828451723924:

  bitbake: cookerdata: Convert multiconfig to use BB_CURRENT_MC (2016-12-22 12:36:40 +0000)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib ChenQi/busybox-1.26.1
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/busybox-1.26.1

Chen Qi (1):
  busybox: upgrade to 1.26.1

 ...e-the-behaviour-of-c-parameter-to-match-u.patch |  73 -----------
 ...biproute-handle-table-ids-larger-than-255.patch | 134 -------------------
 ...-n-flushes-pattern-space-terminates-early.patch |  72 -----------
 .../busybox/busybox/CVE-2016-2147.patch            |  57 --------
 .../busybox/busybox/CVE-2016-2147_2.patch          |  32 -----
 .../busybox/busybox/CVE-2016-2148.patch            |  74 -----------
 .../busybox-1.24.1-truncate-open-mode.patch        |  81 ------------
 .../busybox/busybox-1.24.1-unzip-regression.patch  | 143 ---------------------
 .../busybox/busybox/busybox-1.24.1-unzip.patch     | 118 -----------------
 .../busybox/busybox/busybox-cross-menuconfig.patch |  71 ----------
 .../busybox-kbuild-race-fix-commit-d8e61bb.patch   |  53 --------
 .../busybox/busybox-udhcpc-no_deconfig.patch       |  75 ++++++-----
 .../commit-applet_tables-fix-commit-0dddbc1.patch  |  61 ---------
 ...lem_on_mips64_n64_big_endian_musl_systems.patch |  90 -------------
 .../busybox/busybox/makefile-fix-backport.patch    |  40 ------
 .../{busybox_1.24.1.bb => busybox_1.26.1.bb}       |  18 +--
 meta/recipes-core/busybox/busybox_git.bb           |   6 +-
 17 files changed, 42 insertions(+), 1156 deletions(-)
 delete mode 100644 meta/recipes-core/busybox/busybox/0001-flock-update-the-behaviour-of-c-parameter-to-match-u.patch
 delete mode 100644 meta/recipes-core/busybox/busybox/0001-libiproute-handle-table-ids-larger-than-255.patch
 delete mode 100644 meta/recipes-core/busybox/busybox/0001-sed-fix-sed-n-flushes-pattern-space-terminates-early.patch
 delete mode 100644 meta/recipes-core/busybox/busybox/CVE-2016-2147.patch
 delete mode 100644 meta/recipes-core/busybox/busybox/CVE-2016-2147_2.patch
 delete mode 100644 meta/recipes-core/busybox/busybox/CVE-2016-2148.patch
 delete mode 100644 meta/recipes-core/busybox/busybox/busybox-1.24.1-truncate-open-mode.patch
 delete mode 100644 meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip-regression.patch
 delete mode 100644 meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip.patch
 delete mode 100644 meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch
 delete mode 100644 meta/recipes-core/busybox/busybox/busybox-kbuild-race-fix-commit-d8e61bb.patch
 delete mode 100644 meta/recipes-core/busybox/busybox/commit-applet_tables-fix-commit-0dddbc1.patch
 delete mode 100644 meta/recipes-core/busybox/busybox/ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch
 delete mode 100644 meta/recipes-core/busybox/busybox/makefile-fix-backport.patch
 rename meta/recipes-core/busybox/{busybox_1.24.1.bb => busybox_1.26.1.bb} (62%)

-- 
1.9.1



^ permalink raw reply

* [PATCH 1/1] busybox: upgrade to 1.26.1
From: Chen Qi @ 2017-01-04  3:22 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1483500113.git.Qi.Chen@windriver.com>

Upgrade busybox to 1.26.1. Also upgrade the git version to the corresponding
commit.

Patches backported, merged or the problem it covers is solved in another way
upstream are removed. Other patches are rebased.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 ...e-the-behaviour-of-c-parameter-to-match-u.patch |  73 -----------
 ...biproute-handle-table-ids-larger-than-255.patch | 134 -------------------
 ...-n-flushes-pattern-space-terminates-early.patch |  72 -----------
 .../busybox/busybox/CVE-2016-2147.patch            |  57 --------
 .../busybox/busybox/CVE-2016-2147_2.patch          |  32 -----
 .../busybox/busybox/CVE-2016-2148.patch            |  74 -----------
 .../busybox-1.24.1-truncate-open-mode.patch        |  81 ------------
 .../busybox/busybox-1.24.1-unzip-regression.patch  | 143 ---------------------
 .../busybox/busybox/busybox-1.24.1-unzip.patch     | 118 -----------------
 .../busybox/busybox/busybox-cross-menuconfig.patch |  71 ----------
 .../busybox-kbuild-race-fix-commit-d8e61bb.patch   |  53 --------
 .../busybox/busybox-udhcpc-no_deconfig.patch       |  75 ++++++-----
 .../commit-applet_tables-fix-commit-0dddbc1.patch  |  61 ---------
 ...lem_on_mips64_n64_big_endian_musl_systems.patch |  90 -------------
 .../busybox/busybox/makefile-fix-backport.patch    |  40 ------
 .../{busybox_1.24.1.bb => busybox_1.26.1.bb}       |  18 +--
 meta/recipes-core/busybox/busybox_git.bb           |   6 +-
 17 files changed, 42 insertions(+), 1156 deletions(-)
 delete mode 100644 meta/recipes-core/busybox/busybox/0001-flock-update-the-behaviour-of-c-parameter-to-match-u.patch
 delete mode 100644 meta/recipes-core/busybox/busybox/0001-libiproute-handle-table-ids-larger-than-255.patch
 delete mode 100644 meta/recipes-core/busybox/busybox/0001-sed-fix-sed-n-flushes-pattern-space-terminates-early.patch
 delete mode 100644 meta/recipes-core/busybox/busybox/CVE-2016-2147.patch
 delete mode 100644 meta/recipes-core/busybox/busybox/CVE-2016-2147_2.patch
 delete mode 100644 meta/recipes-core/busybox/busybox/CVE-2016-2148.patch
 delete mode 100644 meta/recipes-core/busybox/busybox/busybox-1.24.1-truncate-open-mode.patch
 delete mode 100644 meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip-regression.patch
 delete mode 100644 meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip.patch
 delete mode 100644 meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch
 delete mode 100644 meta/recipes-core/busybox/busybox/busybox-kbuild-race-fix-commit-d8e61bb.patch
 delete mode 100644 meta/recipes-core/busybox/busybox/commit-applet_tables-fix-commit-0dddbc1.patch
 delete mode 100644 meta/recipes-core/busybox/busybox/ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch
 delete mode 100644 meta/recipes-core/busybox/busybox/makefile-fix-backport.patch
 rename meta/recipes-core/busybox/{busybox_1.24.1.bb => busybox_1.26.1.bb} (62%)

diff --git a/meta/recipes-core/busybox/busybox/0001-flock-update-the-behaviour-of-c-parameter-to-match-u.patch b/meta/recipes-core/busybox/busybox/0001-flock-update-the-behaviour-of-c-parameter-to-match-u.patch
deleted file mode 100644
index 8bcbd73d..0000000
--- a/meta/recipes-core/busybox/busybox/0001-flock-update-the-behaviour-of-c-parameter-to-match-u.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 198f18addf1d814c2fefcb492f3b9fbd221669bb Mon Sep 17 00:00:00 2001
-From: "Maxin B. John" <maxin.john@intel.com>
-Date: Wed, 20 Apr 2016 18:24:45 +0300
-Subject: [PATCH] flock: update the behaviour of -c parameter to match upstream
-
-In upstream, -c 'PROG ARGS' means "run sh -c 'PROG ARGS'"
-
-function                                             old     new   delta
-flock_main                                           286     377     +91
-.rodata                                           155849  155890     +41
-
-Upstream-Status: Submitted
-[ http://lists.busybox.net/pipermail/busybox/2016-April/084142.html ]
-
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- util-linux/flock.c | 20 ++++++++++++++------
- 1 file changed, 14 insertions(+), 6 deletions(-)
-
-diff --git a/util-linux/flock.c b/util-linux/flock.c
-index 05a747f..c85a25d 100644
---- a/util-linux/flock.c
-+++ b/util-linux/flock.c
-@@ -20,6 +20,7 @@ int flock_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
- int flock_main(int argc UNUSED_PARAM, char **argv)
- {
- 	int mode, opt, fd;
-+    char *cmd_args[4];
- 	enum {
- 		OPT_s = (1 << 0),
- 		OPT_x = (1 << 1),
-@@ -57,7 +58,6 @@ int flock_main(int argc UNUSED_PARAM, char **argv)
- 	/* If it is "flock FILE -c PROG", then -c isn't caught by getopt32:
- 	 * we use "+" in order to support "flock -opt FILE PROG -with-opts",
- 	 * we need to remove -c by hand.
--	 * TODO: in upstream, -c 'PROG ARGS' means "run sh -c 'PROG ARGS'"
- 	 */
- 	if (argv[0]
- 	 && argv[0][0] == '-'
-@@ -65,7 +65,10 @@ int flock_main(int argc UNUSED_PARAM, char **argv)
- 	    || (ENABLE_LONG_OPTS && strcmp(argv[0] + 1, "-command") == 0)
- 	    )
- 	) {
--		argv++;
-+        if (argc != optind + 3)
-+            bb_error_msg_and_die("-c requires exactly one command argument");
-+        else
-+            argv++;
- 	}
- 
- 	if (OPT_s == LOCK_SH && OPT_x == LOCK_EX && OPT_n == LOCK_NB && OPT_u == LOCK_UN) {
-@@ -89,9 +92,14 @@ int flock_main(int argc UNUSED_PARAM, char **argv)
- 			return EXIT_FAILURE;
- 		bb_perror_nomsg_and_die();
- 	}
--
--	if (argv[0])
--		return spawn_and_wait(argv);
--
-+    if (argv[0]) {
-+        cmd_args[0] = getenv("SHELL");
-+        if (!cmd_args[0])
-+            cmd_args[0] = (char*)DEFAULT_SHELL;
-+        cmd_args[1] = (char*)"-c";
-+        cmd_args[2] = argv[0];
-+        cmd_args[3] = NULL;
-+        return spawn_and_wait(cmd_args);
-+    }
- 	return EXIT_SUCCESS;
- }
--- 
-2.4.0
-
diff --git a/meta/recipes-core/busybox/busybox/0001-libiproute-handle-table-ids-larger-than-255.patch b/meta/recipes-core/busybox/busybox/0001-libiproute-handle-table-ids-larger-than-255.patch
deleted file mode 100644
index aac5b40..0000000
--- a/meta/recipes-core/busybox/busybox/0001-libiproute-handle-table-ids-larger-than-255.patch
+++ /dev/null
@@ -1,134 +0,0 @@
-From b5a9234272e6084557224c73ab7737ed47f09848 Mon Sep 17 00:00:00 2001
-From: Lukasz Nowak <lnowak@tycoint.com>
-Date: Wed, 23 Nov 2016 12:48:21 +0000
-Subject: [PATCH v2] libiproute: handle table ids larger than 255
-
-Linux kernel, starting from 2.6.19 allows ip table ids to have 32-bit values.
-In order to preserve compatibility, the old 8-bit field: rtm_table is still
-in use when table id is lower than 256.
-
-Add support for the 32-bit table id (RTA_TABLE attribute) in:
-- ip route print
-- ip route modify
-- ip rule print
-- ip rule modify
-
-Add printing of table ids to ip route.
-
-Changes are compatible with the mainline iproute2 utilities.
-
-These changes are required for compatibility with ConnMan, which by default
-uses table ids greater than 255.
-
-Upstream-Status: Submitted [http://lists.busybox.net/pipermail/busybox/2016-December/084989.html]
-
-Signed-off-by: Lukasz Nowak <lnowak@tycoint.com>
----
- networking/libiproute/iproute.c | 24 ++++++++++++++++++++----
- networking/libiproute/iprule.c  | 11 +++++++++--
- 2 files changed, 29 insertions(+), 6 deletions(-)
-
-diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c
-index 6ecd5f7..d5af498 100644
---- a/networking/libiproute/iproute.c
-+++ b/networking/libiproute/iproute.c
-@@ -87,6 +87,7 @@ static int FAST_FUNC print_route(const struct sockaddr_nl *who UNUSED_PARAM,
- 	inet_prefix dst;
- 	inet_prefix src;
- 	int host_len = -1;
-+	uint32_t tid;
- 
- 	if (n->nlmsg_type != RTM_NEWROUTE && n->nlmsg_type != RTM_DELROUTE) {
- 		fprintf(stderr, "Not a route: %08x %08x %08x\n",
-@@ -99,6 +100,14 @@ static int FAST_FUNC print_route(const struct sockaddr_nl *who UNUSED_PARAM,
- 	if (len < 0)
- 		bb_error_msg_and_die("wrong nlmsg len %d", len);
- 
-+	memset(tb, 0, sizeof(tb));
-+	parse_rtattr(tb, RTA_MAX, RTM_RTA(r), len);
-+
-+	if (tb[RTA_TABLE])
-+		tid = *(uint32_t *)RTA_DATA(tb[RTA_TABLE]);
-+	else
-+		tid = r->rtm_table;
-+
- 	if (r->rtm_family == AF_INET6)
- 		host_len = 128;
- 	else if (r->rtm_family == AF_INET)
-@@ -128,7 +137,7 @@ static int FAST_FUNC print_route(const struct sockaddr_nl *who UNUSED_PARAM,
- 			}
- 		}
- 	} else {
--		if (G_filter.tb > 0 && G_filter.tb != r->rtm_table) {
-+		if (G_filter.tb > 0 && G_filter.tb != tid) {
- 			return 0;
- 		}
- 	}
-@@ -157,10 +166,8 @@ static int FAST_FUNC print_route(const struct sockaddr_nl *who UNUSED_PARAM,
- 		return 0;
- 	}
- 
--	memset(tb, 0, sizeof(tb));
- 	memset(&src, 0, sizeof(src));
- 	memset(&dst, 0, sizeof(dst));
--	parse_rtattr(tb, RTA_MAX, RTM_RTA(r), len);
- 
- 	if (tb[RTA_SRC]) {
- 		src.bitlen = r->rtm_src_len;
-@@ -283,6 +290,10 @@ static int FAST_FUNC print_route(const struct sockaddr_nl *who UNUSED_PARAM,
- 	if (tb[RTA_OIF]) {
- 		printf("dev %s ", ll_index_to_name(*(int*)RTA_DATA(tb[RTA_OIF])));
- 	}
-+#if ENABLE_FEATURE_IP_RULE
-+	if (tid && tid != RT_TABLE_MAIN && !G_filter.tb)
-+		printf("table %s ", rtnl_rttable_n2a(tid));
-+#endif
- 
- 	/* Todo: parse & show "proto kernel", "scope link" here */
- 
-@@ -434,7 +445,12 @@ IF_FEATURE_IP_RULE(ARG_table,)
- 			NEXT_ARG();
- 			if (rtnl_rttable_a2n(&tid, *argv))
- 				invarg(*argv, "table");
--			req.r.rtm_table = tid;
-+			if (tid < 256)
-+				req.r.rtm_table = tid;
-+			else {
-+				req.r.rtm_table = RT_TABLE_UNSPEC;
-+				addattr32(&req.n, sizeof(req), RTA_TABLE, tid);
-+			}
- #endif
- 		} else if (arg == ARG_dev || arg == ARG_oif) {
- 			NEXT_ARG();
-diff --git a/networking/libiproute/iprule.c b/networking/libiproute/iprule.c
-index 774a3e2..3fac7c5 100644
---- a/networking/libiproute/iprule.c
-+++ b/networking/libiproute/iprule.c
-@@ -119,7 +119,9 @@ static int FAST_FUNC print_rule(const struct sockaddr_nl *who UNUSED_PARAM,
- 		printf("iif %s ", (char*)RTA_DATA(tb[RTA_IIF]));
- 	}
- 
--	if (r->rtm_table)
-+	if (tb[RTA_TABLE])
-+		printf("lookup %s ", rtnl_rttable_n2a(*(uint32_t*)RTA_DATA(tb[RTA_TABLE])));
-+	else if (r->rtm_table)
- 		printf("lookup %s ", rtnl_rttable_n2a(r->rtm_table));
- 
- 	if (tb[RTA_FLOW]) {
-@@ -259,7 +261,12 @@ static int iprule_modify(int cmd, char **argv)
- 			NEXT_ARG();
- 			if (rtnl_rttable_a2n(&tid, *argv))
- 				invarg(*argv, "table ID");
--			req.r.rtm_table = tid;
-+			if (tid < 256)
-+				req.r.rtm_table = tid;
-+			else {
-+				req.r.rtm_table = RT_TABLE_UNSPEC;
-+				addattr32(&req.n, sizeof(req), RTA_TABLE, tid);
-+			}
- 			table_ok = 1;
- 		} else if (key == ARG_dev ||
- 			   key == ARG_iif
--- 
-2.7.4
-
diff --git a/meta/recipes-core/busybox/busybox/0001-sed-fix-sed-n-flushes-pattern-space-terminates-early.patch b/meta/recipes-core/busybox/busybox/0001-sed-fix-sed-n-flushes-pattern-space-terminates-early.patch
deleted file mode 100644
index 4f53984..0000000
--- a/meta/recipes-core/busybox/busybox/0001-sed-fix-sed-n-flushes-pattern-space-terminates-early.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 903542f7331c58007a3ef938d41e1c55fc329648 Mon Sep 17 00:00:00 2001
-From: Dengke Du <dengke.du@windriver.com>
-Date: Wed, 31 Aug 2016 23:40:43 -0400
-Subject: [PATCH] sed: fix "sed n (flushes pattern space, terminates early)"
- testcase failure
-
-This patch fix "sed n (flushes pattern space, terminates early)"
-testcase failure. We can see it at:
-
-	https://git.busybox.net/busybox/commit/?id=76d72376e0244a5cafd4880cdc623e37d86a75e4
-
-Upstream-Status: Backport
-
-Signed-off-by: Dengke Du <dengke.du@windriver.com>
----
- editors/sed.c       | 19 ++++++++++---------
- testsuite/sed.tests |  6 +-----
- 2 files changed, 11 insertions(+), 14 deletions(-)
-
-diff --git a/editors/sed.c b/editors/sed.c
-index 7bbf820..259c39c 100644
---- a/editors/sed.c
-+++ b/editors/sed.c
-@@ -1274,16 +1274,17 @@ static void process_files(void)
- 		case 'n':
- 			if (!G.be_quiet)
- 				sed_puts(pattern_space, last_gets_char);
--			if (next_line) {
--				free(pattern_space);
--				pattern_space = next_line;
--				last_gets_char = next_gets_char;
--				next_line = get_next_line(&next_gets_char, &last_puts_char, last_gets_char);
--				substituted = 0;
--				linenum++;
--				break;
-+			if (next_line == NULL) {
-+				/* If no next line, jump to end of script and exit. */
-+				goto discard_line;
- 			}
--			/* fall through */
-+			free(pattern_space);
-+			pattern_space = next_line;
-+			last_gets_char = next_gets_char;
-+			next_line = get_next_line(&next_gets_char, &last_puts_char, last_gets_char);
-+			substituted = 0;
-+			linenum++;
-+			break;
- 
- 		/* Quit.  End of script, end of input. */
- 		case 'q':
-diff --git a/testsuite/sed.tests b/testsuite/sed.tests
-index 34479e5..96ff7a5 100755
---- a/testsuite/sed.tests
-+++ b/testsuite/sed.tests
-@@ -73,13 +73,9 @@ testing "sed t (test/branch clears test bit)" "sed -e 's/a/b/;:loop;t loop'" \
- testing "sed T (!test/branch)" "sed -e 's/a/1/;T notone;p;: notone;p'" \
- 	"1\n1\n1\nb\nb\nc\nc\n" "" "a\nb\nc\n"
- 
--test x"$SKIP_KNOWN_BUGS" = x"" && {
--# Normal sed end-of-script doesn't print "c" because n flushed the pattern
--# space.  If n hits EOF, pattern space is empty when script ends.
--# Query: how does this interact with no newline at EOF?
- testing "sed n (flushes pattern space, terminates early)" "sed -e 'n;p'" \
- 	"a\nb\nb\nc\n" "" "a\nb\nc\n"
--}
-+
- # non-GNU sed: N does _not_ flush pattern space, therefore c is eaten @ script end
- # GNU sed: N flushes pattern space, therefore c is printed too @ script end
- testing "sed N (flushes pattern space (GNU behavior))" "sed -e 'N;p'" \
--- 
-2.8.1
-
diff --git a/meta/recipes-core/busybox/busybox/CVE-2016-2147.patch b/meta/recipes-core/busybox/busybox/CVE-2016-2147.patch
deleted file mode 100644
index 84cae6a..0000000
--- a/meta/recipes-core/busybox/busybox/CVE-2016-2147.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From d474ffc68290e0a83651c4432eeabfa62cd51e87 Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Thu, 10 Mar 2016 11:47:58 +0100
-Subject: [PATCH] udhcp: fix a SEGV on malformed RFC1035-encoded domain name
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-
-Upstream-Status: Backport
-CVE: CVE-2016-2147
-
-https://git.busybox.net/busybox/commit/?id=d474ffc
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- networking/udhcp/domain_codec.c | 13 +++++++++----
- 1 file changed, 9 insertions(+), 4 deletions(-)
-
-Index: busybox-1.23.2/networking/udhcp/domain_codec.c
-===================================================================
---- busybox-1.23.2.orig/networking/udhcp/domain_codec.c
-+++ busybox-1.23.2/networking/udhcp/domain_codec.c
-@@ -63,11 +63,10 @@ char* FAST_FUNC dname_dec(const uint8_t
- 				if (crtpos + *c + 1 > clen) /* label too long? abort */
- 					return NULL;
- 				if (dst)
--					memcpy(dst + len, c + 1, *c);
-+					/* \3com ---> "com." */
-+					((char*)mempcpy(dst + len, c + 1, *c))[0] = '.';
- 				len += *c + 1;
- 				crtpos += *c + 1;
--				if (dst)
--					dst[len - 1] = '.';
- 			} else {
- 				/* NUL: end of current domain name */
- 				if (retpos == 0) {
-@@ -78,7 +77,10 @@ char* FAST_FUNC dname_dec(const uint8_t
- 					crtpos = retpos;
- 					retpos = depth = 0;
- 				}
--				if (dst)
-+				if (dst && len != 0)
-+					/* \4host\3com\0\4host and we are at \0:
-+					 * \3com was converted to "com.", change dot to space.
-+					 */
- 					dst[len - 1] = ' ';
- 			}
- 
-@@ -228,6 +230,9 @@ int main(int argc, char **argv)
- 	int len;
- 	uint8_t *encoded;
- 
-+        uint8_t str[6] = { 0x00, 0x00, 0x02, 0x65, 0x65, 0x00 };
-+        printf("NUL:'%s'\n",   dname_dec(str, 6, ""));
-+
- #define DNAME_DEC(encoded,pre) dname_dec((uint8_t*)(encoded), sizeof(encoded), (pre))
- 	printf("'%s'\n",       DNAME_DEC("\4host\3com\0", "test1:"));
- 	printf("test2:'%s'\n", DNAME_DEC("\4host\3com\0\4host\3com\0", ""));
diff --git a/meta/recipes-core/busybox/busybox/CVE-2016-2147_2.patch b/meta/recipes-core/busybox/busybox/CVE-2016-2147_2.patch
deleted file mode 100644
index 1473d46..0000000
--- a/meta/recipes-core/busybox/busybox/CVE-2016-2147_2.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 1b7c17391de66502dd7a97c866e0a33681edbb1f Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Fri, 11 Mar 2016 00:26:58 +0100
-Subject: [PATCH] udhcpc: fix a warning in debug code
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-Upsteam-Status: Backport
-CVE: CVE-2016-2147 regression fix
-
-https://git.busybox.net/busybox/commit/?id=1b7c17
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- networking/udhcp/domain_codec.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/networking/udhcp/domain_codec.c b/networking/udhcp/domain_codec.c
-index cee31f1..5a923cc 100644
---- a/networking/udhcp/domain_codec.c
-+++ b/networking/udhcp/domain_codec.c
-@@ -7,6 +7,7 @@
-  * Licensed under GPLv2 or later, see file LICENSE in this source tree.
-  */
- #ifdef DNS_COMPR_TESTING
-+# define _GNU_SOURCE
- # define FAST_FUNC /* nothing */
- # define xmalloc malloc
- # include <stdlib.h>
--- 
-2.3.5
-
diff --git a/meta/recipes-core/busybox/busybox/CVE-2016-2148.patch b/meta/recipes-core/busybox/busybox/CVE-2016-2148.patch
deleted file mode 100644
index af04a7f..0000000
--- a/meta/recipes-core/busybox/busybox/CVE-2016-2148.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 352f79acbd759c14399e39baef21fc4ffe180ac2 Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Fri, 26 Feb 2016 15:54:56 +0100
-Subject: [PATCH] udhcpc: fix OPTION_6RD parsing (could overflow its malloced
- buffer)
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-
-Upstream-Status: Backport
-CVE: CVE-2016-2148
-https://git.busybox.net/busybox/commit/?id=352f79
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- networking/udhcp/common.c | 15 +++++++++++++--
- networking/udhcp/dhcpc.c  |  4 ++--
- 2 files changed, 15 insertions(+), 4 deletions(-)
-
-Index: busybox-1.23.2/networking/udhcp/common.c
-===================================================================
---- busybox-1.23.2.orig/networking/udhcp/common.c
-+++ busybox-1.23.2/networking/udhcp/common.c
-@@ -142,7 +142,7 @@ const char dhcp_option_strings[] ALIGN1
-  * udhcp_str2optset: to determine how many bytes to allocate.
-  * xmalloc_optname_optval: to estimate string length
-  * from binary option length: (option[LEN] / dhcp_option_lengths[opt_type])
-- * is the number of elements, multiply in by one element's string width
-+ * is the number of elements, multiply it by one element's string width
-  * (len_of_option_as_string[opt_type]) and you know how wide string you need.
-  */
- const uint8_t dhcp_option_lengths[] ALIGN1 = {
-@@ -162,7 +162,18 @@ const uint8_t dhcp_option_lengths[] ALIG
- 	[OPTION_S32] =     4,
- 	/* Just like OPTION_STRING, we use minimum length here */
- 	[OPTION_STATIC_ROUTES] = 5,
--	[OPTION_6RD] =    22,  /* ignored by udhcp_str2optset */
-+	[OPTION_6RD] =    12,  /* ignored by udhcp_str2optset */
-+	/* The above value was chosen as follows:
-+	 * len_of_option_as_string[] for this option is >60: it's a string of the form
-+	 * "32 128 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 255.255.255.255 ".
-+	 * Each additional ipv4 address takes 4 bytes in binary option and appends
-+	 * another "255.255.255.255 " 16-byte string. We can set [OPTION_6RD] = 4
-+	 * but this severely overestimates string length: instead of 16 bytes,
-+	 * it adds >60 for every 4 bytes in binary option.
-+	 * We cheat and declare here that option is in units of 12 bytes.
-+	 * This adds more than 60 bytes for every three ipv4 addresses - more than enough.
-+	 * (Even 16 instead of 12 should work, but let's be paranoid).
-+	 */
- };
- 
- 
-Index: busybox-1.23.2/networking/udhcp/dhcpc.c
-===================================================================
---- busybox-1.23.2.orig/networking/udhcp/dhcpc.c
-+++ busybox-1.23.2/networking/udhcp/dhcpc.c
-@@ -103,7 +103,7 @@ static const uint8_t len_of_option_as_st
- 	[OPTION_IP              ] = sizeof("255.255.255.255 "),
- 	[OPTION_IP_PAIR         ] = sizeof("255.255.255.255 ") * 2,
- 	[OPTION_STATIC_ROUTES   ] = sizeof("255.255.255.255/32 255.255.255.255 "),
--	[OPTION_6RD             ] = sizeof("32 128 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 255.255.255.255 "),
-+	[OPTION_6RD             ] = sizeof("132 128 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 255.255.255.255 "),
- 	[OPTION_STRING          ] = 1,
- 	[OPTION_STRING_HOST     ] = 1,
- #if ENABLE_FEATURE_UDHCP_RFC3397
-@@ -214,7 +214,7 @@ static NOINLINE char *xmalloc_optname_op
- 	type = optflag->flags & OPTION_TYPE_MASK;
- 	optlen = dhcp_option_lengths[type];
- 	upper_length = len_of_option_as_string[type]
--		* ((unsigned)(len + optlen - 1) / (unsigned)optlen);
-+		* ((unsigned)(len + optlen) / (unsigned)optlen);
- 
- 	dest = ret = xmalloc(upper_length + strlen(opt_name) + 2);
- 	dest += sprintf(ret, "%s=", opt_name);
diff --git a/meta/recipes-core/busybox/busybox/busybox-1.24.1-truncate-open-mode.patch b/meta/recipes-core/busybox/busybox/busybox-1.24.1-truncate-open-mode.patch
deleted file mode 100644
index cdc9108..0000000
--- a/meta/recipes-core/busybox/busybox/busybox-1.24.1-truncate-open-mode.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-Upstream-Status: Backport
-
-  http://busybox.net/downloads/fixes-1.24.1/
-  https://git.busybox.net/busybox/commit/?id=e111a1640494fe87fc913f94fae3bb805de0fc99
-  https://git.busybox.net/busybox/commit/?h=1_24_stable&id=be729c1d3b5c923f10871dd68ea94156d0f8c803
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
-
-From be729c1d3b5c923f10871dd68ea94156d0f8c803 Mon Sep 17 00:00:00 2001
-From: Ari Sundholm <ari@tuxera.com>
-Date: Mon, 4 Jan 2016 15:40:37 +0200
-Subject: [PATCH] truncate: always set mode when opening file to avoid fortify
- errors
-
-Busybox crashes due to no mode being given when opening:
-$ ./busybox truncate -s 1M foo
-*** invalid open64 call: O_CREAT without mode ***: ./busybox terminated
-======= Backtrace: =========
-/lib/x86_64-linux-gnu/libc.so.6(+0x7338f)[0x7f66d921338f]
-/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x7f66d92aac9c]
-/lib/x86_64-linux-gnu/libc.so.6(+0xeb6aa)[0x7f66d928b6aa]
-./busybox[0x4899f9]
-======= Memory map: ========
-00400000-004d0000 r-xp 00000000 00:1a 137559                             /home/ari/busybox/busybox
-006cf000-006d0000 r--p 000cf000 00:1a 137559                             /home/ari/busybox/busybox
-006d0000-006d1000 rw-p 000d0000 00:1a 137559                             /home/ari/busybox/busybox
-006d1000-006d4000 rw-p 00000000 00:00 0
-014e7000-01508000 rw-p 00000000 00:00 0                                  [heap]
-7f66d8f8a000-7f66d8fa0000 r-xp 00000000 08:07 1579008                    /lib/x86_64-linux-gnu/libgcc_s.so.1
-7f66d8fa0000-7f66d919f000 ---p 00016000 08:07 1579008                    /lib/x86_64-linux-gnu/libgcc_s.so.1
-7f66d919f000-7f66d91a0000 rw-p 00015000 08:07 1579008                    /lib/x86_64-linux-gnu/libgcc_s.so.1
-7f66d91a0000-7f66d935b000 r-xp 00000000 08:07 1578994                    /lib/x86_64-linux-gnu/libc-2.19.so
-7f66d935b000-7f66d955a000 ---p 001bb000 08:07 1578994                    /lib/x86_64-linux-gnu/libc-2.19.so
-7f66d955a000-7f66d955e000 r--p 001ba000 08:07 1578994                    /lib/x86_64-linux-gnu/libc-2.19.so
-7f66d955e000-7f66d9560000 rw-p 001be000 08:07 1578994                    /lib/x86_64-linux-gnu/libc-2.19.so
-7f66d9560000-7f66d9565000 rw-p 00000000 00:00 0
-7f66d9565000-7f66d966a000 r-xp 00000000 08:07 1579020                    /lib/x86_64-linux-gnu/libm-2.19.so
-7f66d966a000-7f66d9869000 ---p 00105000 08:07 1579020                    /lib/x86_64-linux-gnu/libm-2.19.so
-7f66d9869000-7f66d986a000 r--p 00104000 08:07 1579020                    /lib/x86_64-linux-gnu/libm-2.19.so
-7f66d986a000-7f66d986b000 rw-p 00105000 08:07 1579020                    /lib/x86_64-linux-gnu/libm-2.19.so
-7f66d986b000-7f66d988e000 r-xp 00000000 08:07 1578981                    /lib/x86_64-linux-gnu/ld-2.19.so
-7f66d9a64000-7f66d9a67000 rw-p 00000000 00:00 0
-7f66d9a8a000-7f66d9a8d000 rw-p 00000000 00:00 0
-7f66d9a8d000-7f66d9a8e000 r--p 00022000 08:07 1578981                    /lib/x86_64-linux-gnu/ld-2.19.so
-7f66d9a8e000-7f66d9a8f000 rw-p 00023000 08:07 1578981                    /lib/x86_64-linux-gnu/ld-2.19.so
-7f66d9a8f000-7f66d9a90000 rw-p 00000000 00:00 0
-7ffc47761000-7ffc47782000 rw-p 00000000 00:00 0                          [stack]
-7ffc477ab000-7ffc477ad000 r-xp 00000000 00:00 0                          [vdso]
-ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
-Aborted (core dumped)
-$
-
-Fix this by simply always setting the mode, as it doesn't hurt even
-when O_CREAT is not specified.
-
-This bug is a regression introduced in fc3e40e, as xopen(), which
-was originally used, would automatically set the mode.
-
-Signed-off-by: Ari Sundholm <ari@tuxera.com>
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-(cherry picked from commit e111a1640494fe87fc913f94fae3bb805de0fc99)
----
- coreutils/truncate.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/coreutils/truncate.c b/coreutils/truncate.c
-index e5fa656..4c997bf 100644
---- a/coreutils/truncate.c
-+++ b/coreutils/truncate.c
-@@ -64,7 +64,7 @@ int truncate_main(int argc UNUSED_PARAM, char **argv)
- 
- 	argv += optind;
- 	while (*argv) {
--		int fd = open(*argv, flags);
-+		int fd = open(*argv, flags, 0666);
- 		if (fd < 0) {
- 			if (errno != ENOENT || !(opts & OPT_NOCREATE)) {
- 				bb_perror_msg("%s: open", *argv);
--- 
-2.6.2
-
diff --git a/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip-regression.patch b/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip-regression.patch
deleted file mode 100644
index e3c5020..0000000
--- a/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip-regression.patch
+++ /dev/null
@@ -1,143 +0,0 @@
-Upstream-Status: Backport
-
-  http://busybox.net/downloads/fixes-1.24.1/
-  http://git.busybox.net/busybox/commit/?id=092fabcf1df5d46cd22be4ffcd3b871f6180eb9c
-  http://git.busybox.net/busybox/commit/?h=1_24_stable&id=092fabcf1df5d46cd22be4ffcd3b871f6180eb9c
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
-
-From 092fabcf1df5d46cd22be4ffcd3b871f6180eb9c Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Fri, 30 Oct 2015 23:41:53 +0100
-Subject: [PATCH] [g]unzip: fix recent breakage.
-
-Also, do emit error message we so painstakingly pass from gzip internals
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-(cherry picked from commit 6bd3fff51aa74e2ee2d87887b12182a3b09792ef)
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
----
- archival/libarchive/decompress_gunzip.c | 33 +++++++++++++++++++++------------
- testsuite/unzip.tests                   |  1 +
- 2 files changed, 22 insertions(+), 12 deletions(-)
-
-diff --git a/archival/libarchive/decompress_gunzip.c b/archival/libarchive/decompress_gunzip.c
-index c76fd31..357c9bf 100644
---- a/archival/libarchive/decompress_gunzip.c
-+++ b/archival/libarchive/decompress_gunzip.c
-@@ -309,8 +309,7 @@ static int huft_build(const unsigned *b, const unsigned n,
- 	huft_t *q;              /* points to current table */
- 	huft_t r;               /* table entry for structure assignment */
- 	huft_t *u[BMAX];        /* table stack */
--	unsigned v[N_MAX];      /* values in order of bit length */
--	unsigned v_end;
-+	unsigned v[N_MAX + 1];  /* values in order of bit length. last v[] is never used */
- 	int ws[BMAX + 1];       /* bits decoded stack */
- 	int w;                  /* bits decoded */
- 	unsigned x[BMAX + 1];   /* bit offsets, then code stack */
-@@ -365,15 +364,17 @@ static int huft_build(const unsigned *b, const unsigned n,
- 		*xp++ = j;
- 	}
- 
--	/* Make a table of values in order of bit lengths */
-+	/* Make a table of values in order of bit lengths.
-+	 * To detect bad input, unused v[i]'s are set to invalid value UINT_MAX.
-+	 * In particular, last v[i] is never filled and must not be accessed.
-+	 */
-+	memset(v, 0xff, sizeof(v));
- 	p = b;
- 	i = 0;
--	v_end = 0;
- 	do {
- 		j = *p++;
- 		if (j != 0) {
- 			v[x[j]++] = i;
--			v_end = x[j];
- 		}
- 	} while (++i < n);
- 
-@@ -435,7 +436,9 @@ static int huft_build(const unsigned *b, const unsigned n,
- 
- 			/* set up table entry in r */
- 			r.b = (unsigned char) (k - w);
--			if (p >= v + v_end) { // Was "if (p >= v + n)" but v[] can be shorter!
-+			if (/*p >= v + n || -- redundant, caught by the second check: */
-+			    *p == UINT_MAX /* do we access uninited v[i]? (see memset(v))*/
-+			) {
- 				r.e = 99; /* out of values--invalid code */
- 			} else if (*p < s) {
- 				r.e = (unsigned char) (*p < 256 ? 16 : 15);	/* 256 is EOB code */
-@@ -520,8 +523,9 @@ static NOINLINE int inflate_codes(STATE_PARAM_ONLY)
- 		e = t->e;
- 		if (e > 16)
- 			do {
--				if (e == 99)
--					abort_unzip(PASS_STATE_ONLY);;
-+				if (e == 99) {
-+					abort_unzip(PASS_STATE_ONLY);
-+				}
- 				bb >>= t->b;
- 				k -= t->b;
- 				e -= 16;
-@@ -557,8 +561,9 @@ static NOINLINE int inflate_codes(STATE_PARAM_ONLY)
- 			e = t->e;
- 			if (e > 16)
- 				do {
--					if (e == 99)
-+					if (e == 99) {
- 						abort_unzip(PASS_STATE_ONLY);
-+					}
- 					bb >>= t->b;
- 					k -= t->b;
- 					e -= 16;
-@@ -824,8 +829,9 @@ static int inflate_block(STATE_PARAM smallint *e)
- 
- 		b_dynamic >>= 4;
- 		k_dynamic -= 4;
--		if (nl > 286 || nd > 30)
-+		if (nl > 286 || nd > 30) {
- 			abort_unzip(PASS_STATE_ONLY);	/* bad lengths */
-+		}
- 
- 		/* read in bit-length-code lengths */
- 		for (j = 0; j < nb; j++) {
-@@ -906,12 +912,14 @@ static int inflate_block(STATE_PARAM smallint *e)
- 		bl = lbits;
- 
- 		i = huft_build(ll, nl, 257, cplens, cplext, &inflate_codes_tl, &bl);
--		if (i != 0)
-+		if (i != 0) {
- 			abort_unzip(PASS_STATE_ONLY);
-+		}
- 		bd = dbits;
- 		i = huft_build(ll + nl, nd, 0, cpdist, cpdext, &inflate_codes_td, &bd);
--		if (i != 0)
-+		if (i != 0) {
- 			abort_unzip(PASS_STATE_ONLY);
-+		}
- 
- 		/* set up data for inflate_codes() */
- 		inflate_codes_setup(PASS_STATE bl, bd);
-@@ -999,6 +1007,7 @@ inflate_unzip_internal(STATE_PARAM transformer_state_t *xstate)
- 	error_msg = "corrupted data";
- 	if (setjmp(error_jmp)) {
- 		/* Error from deep inside zip machinery */
-+		bb_error_msg(error_msg);
- 		n = -1;
- 		goto ret;
- 	}
-diff --git a/testsuite/unzip.tests b/testsuite/unzip.tests
-index ca0a458..d8738a3 100755
---- a/testsuite/unzip.tests
-+++ b/testsuite/unzip.tests
-@@ -34,6 +34,7 @@ rm foo.zip
- testing "unzip (bad archive)" "uudecode; unzip bad.zip 2>&1; echo \$?" \
- "Archive:  bad.zip
-   inflating: ]3j½r«I^[\x12K-%Ix
-+unzip: corrupted data
- unzip: inflate error
- 1
- " \
--- 
-2.6.2
-
diff --git a/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip.patch b/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip.patch
deleted file mode 100644
index 7186726..0000000
--- a/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip.patch
+++ /dev/null
@@ -1,118 +0,0 @@
-Upstream-Status: Backport
-
-  http://busybox.net/downloads/fixes-1.24.1/
-  http://git.busybox.net/busybox/commit/?id=1de25a6e87e0e627aa34298105a3d17c60a1f44e
-  http://git.busybox.net/busybox/commit/?h=1_24_stable&id=6767af17f11144c7cd3cfe9ef799d7f89a78fe65
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
-
-From 1de25a6e87e0e627aa34298105a3d17c60a1f44e Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Mon, 26 Oct 2015 19:33:05 +0100
-Subject: [PATCH] unzip: test for bad archive SEGVing
-
-function                                             old     new   delta
-huft_build                                          1296    1300      +4
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
----
- archival/libarchive/decompress_gunzip.c | 11 +++++++----
- testsuite/unzip.tests                   | 23 ++++++++++++++++++++++-
- 2 files changed, 29 insertions(+), 5 deletions(-)
-
-diff --git a/archival/libarchive/decompress_gunzip.c b/archival/libarchive/decompress_gunzip.c
-index 7b6f459..30bf451 100644
---- a/archival/libarchive/decompress_gunzip.c
-+++ b/archival/libarchive/decompress_gunzip.c
-@@ -305,11 +305,12 @@ static int huft_build(const unsigned *b, const unsigned n,
- 	unsigned i;             /* counter, current code */
- 	unsigned j;             /* counter */
- 	int k;                  /* number of bits in current code */
--	unsigned *p;            /* pointer into c[], b[], or v[] */
-+	const unsigned *p;      /* pointer into c[], b[], or v[] */
- 	huft_t *q;              /* points to current table */
- 	huft_t r;               /* table entry for structure assignment */
- 	huft_t *u[BMAX];        /* table stack */
- 	unsigned v[N_MAX];      /* values in order of bit length */
-+	unsigned v_end;
- 	int ws[BMAX + 1];       /* bits decoded stack */
- 	int w;                  /* bits decoded */
- 	unsigned x[BMAX + 1];   /* bit offsets, then code stack */
-@@ -324,7 +325,7 @@ static int huft_build(const unsigned *b, const unsigned n,
- 
- 	/* Generate counts for each bit length */
- 	memset(c, 0, sizeof(c));
--	p = (unsigned *) b; /* cast allows us to reuse p for pointing to b */
-+	p = b;
- 	i = n;
- 	do {
- 		c[*p]++; /* assume all entries <= BMAX */
-@@ -365,12 +366,14 @@ static int huft_build(const unsigned *b, const unsigned n,
- 	}
- 
- 	/* Make a table of values in order of bit lengths */
--	p = (unsigned *) b;
-+	p = b;
- 	i = 0;
-+	v_end = 0;
- 	do {
- 		j = *p++;
- 		if (j != 0) {
- 			v[x[j]++] = i;
-+			v_end = x[j];
- 		}
- 	} while (++i < n);
- 
-@@ -432,7 +435,7 @@ static int huft_build(const unsigned *b, const unsigned n,
- 
- 			/* set up table entry in r */
- 			r.b = (unsigned char) (k - w);
--			if (p >= v + n) {
-+			if (p >= v + v_end) { // Was "if (p >= v + n)" but v[] can be shorter!
- 				r.e = 99; /* out of values--invalid code */
- 			} else if (*p < s) {
- 				r.e = (unsigned char) (*p < 256 ? 16 : 15);	/* 256 is EOB code */
-diff --git a/testsuite/unzip.tests b/testsuite/unzip.tests
-index 8677a03..ca0a458 100755
---- a/testsuite/unzip.tests
-+++ b/testsuite/unzip.tests
-@@ -7,7 +7,7 @@
- 
- . ./testing.sh
- 
--# testing "test name" "options" "expected result" "file input" "stdin"
-+# testing "test name" "commands" "expected result" "file input" "stdin"
- #   file input will be file called "input"
- #   test can create a file "actual" instead of writing to stdout
- 
-@@ -30,6 +30,27 @@ testing "unzip (subdir only)" "unzip -q foo.zip foo/ && test -d foo && test ! -f
- rmdir foo
- rm foo.zip
- 
-+# File containing some damaged encrypted stream
-+testing "unzip (bad archive)" "uudecode; unzip bad.zip 2>&1; echo \$?" \
-+"Archive:  bad.zip
-+  inflating: ]3j½r«I^[\x12K-%Ix
-+unzip: inflate error
-+1
-+" \
-+"" "\
-+begin-base64 644 bad.zip
-+UEsDBBQAAgkIAAAAIQA5AAAANwAAADwAAAAQAAcAXTNqwr1ywqtJGxJLLSVJ
-+eCkBD0AdKBk8JzQsIj01JC0/ORJQSwMEFAECCAAAAAAhADoAAAAPAAAANgAA
-+AAwAAQASw73Ct1DCokohPXQiNjoUNTUiHRwgLT4WHlBLAQIQABQAAggIAAAA
-+oQA5AAAANwAAADwAAAAQQAcADAAAACwAMgCAAAAAAABdM2rCvXLCq0kbEkst
-+JUl4KQEPQB0oGSY4Cz4QNgEnJSYIPVBLAQIAABQAAggAAAAAIQAqAAAADwAA
-+BDYAAAAMAAEADQAAADIADQAAAEEAAAASw73Ct1DKokohPXQiNzA+FAI1HCcW
-+NzITNFBLBQUKAC4JAA04Cw0EOhZQSwUGAQAABAIAAgCZAAAAeQAAAAIALhM=
-+====
-+"
-+
-+rm *
-+
- # Clean up scratch directory.
- 
- cd ..
--- 
-2.6.2
-
diff --git a/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch b/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch
deleted file mode 100644
index bda8685..0000000
--- a/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From: Jason Wessel <jason.wessel@windriver.com>
-Date: Sun, 3 Mar 2013 12:31:40 -0600
-Subject: [PATCH] menuconfig,check-lxdiaglog.sh: Allow specification of ncurses location
-
-Upstream-Status: Submitted
-
-[ based on: https://lkml.org/lkml/2013/3/3/103 ]
-
-This patch syncs up with the way the menuconfig ncurses / curses
-is detected and the HOST_EXTRACFLAGS works in the Linux kernel
-and it allows the menuconfig to work with a sysroot version
-of the curses libraries.
-
----
-
-In some cross build environments such as the Yocto Project build
-environment it provides an ncurses library that is compiled
-differently than the host's version.  This causes display corruption
-problems when the host's curses includes are used instead of the
-includes from the provided compiler are overridden.  There is a second
-case where there is no curses libraries at all on the host system and
-menuconfig will just fail entirely.
-
-The solution is simply to allow an override variable in
-check-lxdialog.sh for environments such as the Yocto Project.  Adding
-a CROSS_CURSES_LIB and CROSS_CURSES_INC solves the issue and allowing
-compiling and linking against the right headers and libraries.
-
-Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
-cc: Michal Marek <mmarek@suse.cz>
-cc: linux-kbuild@vger.kernel.org
----
- scripts/kconfig/lxdialog/Makefile          |    2 +-
- scripts/kconfig/lxdialog/check-lxdialog.sh |    8 ++++++++
- 2 files changed, 9 insertions(+), 1 deletion(-)
-
---- a/scripts/kconfig/lxdialog/check-lxdialog.sh
-+++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
-@@ -4,6 +4,10 @@
- # What library to link
- ldflags()
- {
-+	if [ x"$CROSS_CURSES_LIB" != x ]; then
-+		echo "$CROSS_CURSES_LIB"
-+		exit
-+	fi
- 	for ext in so a dylib ; do
- 		for lib in ncursesw ncurses curses ; do
- 			$cc -print-file-name=lib${lib}.${ext} | grep -q /
-@@ -19,6 +23,10 @@ ldflags()
- # Where is ncurses.h?
- ccflags()
- {
-+	if [ x"$CROSS_CURSES_INC" != x ]; then
-+		echo "$CROSS_CURSES_INC"
-+		exit
-+	fi
- 	if [ -f /usr/include/ncursesw/ncurses.h ]; then
- 		echo '-I/usr/include/ncursesw -DCURSES_LOC="<ncurses.h>"'
- 	elif [ -f /usr/include/ncursesw/curses.h ]; then
---- a/scripts/kconfig/lxdialog/Makefile
-+++ b/scripts/kconfig/lxdialog/Makefile
-@@ -5,7 +5,7 @@ check-lxdialog  := $(srctree)/$(src)/che
- 
- # Use reursively expanded variables so we do not call gcc unless
- # we really need to do so. (Do not call gcc as part of make mrproper)
--HOST_EXTRACFLAGS = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags)
-+HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags)
- HOST_LOADLIBES   = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
- 
- HOST_EXTRACFLAGS += -DLOCALE
diff --git a/meta/recipes-core/busybox/busybox/busybox-kbuild-race-fix-commit-d8e61bb.patch b/meta/recipes-core/busybox/busybox/busybox-kbuild-race-fix-commit-d8e61bb.patch
deleted file mode 100644
index 38302e0..0000000
--- a/meta/recipes-core/busybox/busybox/busybox-kbuild-race-fix-commit-d8e61bb.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-Upstream-Status: Backport
-
-Patch addressing a parallel make race in Busybox
-
-  http://git.busybox.net/busybox/commit/?id=d8e61bbf13d0cf38d477255cfd5dc71c5d51d575
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
-From d8e61bbf13d0cf38d477255cfd5dc71c5d51d575 Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Sun, 21 Aug 2016 22:00:20 +0200
-Subject: build system: different fix for
- include/applet_tables.h/include/NUM_APPLETS.h
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-
-diff --git a/applets/Kbuild.src b/applets/Kbuild.src
-index 5cc1827..3aedbbf 100644
---- a/applets/Kbuild.src
-+++ b/applets/Kbuild.src
-@@ -29,7 +29,7 @@ applets/applets.o: include/usage_compressed.h include/applet_tables.h
- 
- applets/applet_tables: .config include/applets.h
- applets/usage:         .config include/applets.h
--applets/usage_pod:     .config include/applets.h include/applet_tables.h include/NUM_APPLETS.h
-+applets/usage_pod:     .config include/applets.h include/applet_tables.h
- 
- quiet_cmd_gen_usage_compressed = GEN     include/usage_compressed.h
-       cmd_gen_usage_compressed = $(srctree_slash)applets/usage_compressed include/usage_compressed.h applets
-@@ -37,8 +37,21 @@ quiet_cmd_gen_usage_compressed = GEN     include/usage_compressed.h
- include/usage_compressed.h: applets/usage $(srctree_slash)applets/usage_compressed
- 	$(call cmd,gen_usage_compressed)
- 
--quiet_cmd_gen_applet_tables = GEN     include/applet_tables.h
-+quiet_cmd_gen_applet_tables = GEN     include/applet_tables.h include/NUM_APPLETS.h
-       cmd_gen_applet_tables = applets/applet_tables include/applet_tables.h include/NUM_APPLETS.h
- 
--include/applet_tables.h include/NUM_APPLETS.h: applets/applet_tables
-+include/NUM_APPLETS.h: applets/applet_tables
-+	$(call cmd,gen_applet_tables)
-+
-+# In fact, include/applet_tables.h depends only on applets/applet_tables,
-+# and is generated by it. But specifying only it can run
-+# applets/applet_tables twice, possibly in parallel.
-+# We say that it also needs NUM_APPLETS.h
-+#
-+# Unfortunately, we need to list the same command,
-+# and it can be executed twice (sequentially).
-+# The alternative is to not list any command,
-+# and then if include/applet_tables.h is deleted, it won't be rebuilt.
-+#
-+include/applet_tables.h: include/NUM_APPLETS.h applets/applet_tables
- 	$(call cmd,gen_applet_tables)
diff --git a/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch b/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch
index 4c9ce3b..dc6f83d 100644
--- a/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch
+++ b/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch
@@ -1,6 +1,3 @@
-From 53626cd06a3ef05ed847daea802ef0aa9661caa7 Mon Sep 17 00:00:00 2001
-From: Anders Darander <anders@chargestorm.se>
-Date: Thu, 3 Nov 2011 08:51:31 +0100
 Subject: [PATCH] busybox-udhcpc-no_deconfig.patch
 
 Upstream-Status: Pending
@@ -28,35 +25,34 @@ Fixed options -b, -a and -P.
 
 Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
 ---
- networking/udhcp/dhcpc.c |   29 +++++++++++++++++++++--------
- 1 files changed, 21 insertions(+), 8 deletions(-)
+ networking/udhcp/dhcpc.c | 28 ++++++++++++++++++++--------
+ 1 file changed, 20 insertions(+), 8 deletions(-)
 
-Index: busybox-1.20.2/networking/udhcp/dhcpc.c
-===================================================================
---- busybox-1.20.2.orig/networking/udhcp/dhcpc.c
-+++ busybox-1.20.2/networking/udhcp/dhcpc.c
-@@ -29,6 +29,9 @@
- #include <netpacket/packet.h>
- #include <linux/filter.h>
+diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
+index 0e23626..4ca17c2 100644
+--- a/networking/udhcp/dhcpc.c
++++ b/networking/udhcp/dhcpc.c
+@@ -49,6 +49,8 @@ struct tpacket_auxdata {
+ };
+ #endif
  
 +/* option whether to down the interface when reconfiguring */
 +static int allow_deconfig = 1;
-+
- /* "struct client_config_t client_config" is in bb_common_bufsiz1 */
  
+ /* "struct client_config_t client_config" is in bb_common_bufsiz1 */
  
-@@ -81,8 +84,9 @@ enum {
+@@ -102,8 +104,9 @@ enum {
  	OPT_x = 1 << 18,
  	OPT_f = 1 << 19,
  	OPT_B = 1 << 20,
 +	OPT_D = 1 << 21,
  /* The rest has variable bit positions, need to be clever */
 -	OPTBIT_B = 20,
-+	OPTBIT_D = 21,
++	OPTBIT_B = 21,
  	USE_FOR_MMU(             OPTBIT_b,)
  	IF_FEATURE_UDHCPC_ARPING(OPTBIT_a,)
  	IF_FEATURE_UDHCP_PORT(   OPTBIT_P,)
-@@ -1040,7 +1044,8 @@ static void perform_renew(void)
+@@ -1108,7 +1111,8 @@ static void perform_renew(void)
  		state = RENEW_REQUESTED;
  		break;
  	case RENEW_REQUESTED: /* impatient are we? fine, square 1 */
@@ -66,26 +62,26 @@ Index: busybox-1.20.2/networking/udhcp/dhcpc.c
  	case REQUESTING:
  	case RELEASED:
  		change_listen_mode(LISTEN_RAW);
-@@ -1064,7 +1069,8 @@ static void perform_release(uint32_t ser
- 		bb_info_msg("Unicasting a release of %s to %s",
- 				inet_ntoa(temp_addr), buffer);
- 		send_release(server_addr, requested_ip); /* unicast */
--		udhcp_run_script(NULL, "deconfig");
-+		if (allow_deconfig)
-+			udhcp_run_script(NULL, "deconfig");
- 	}
- 	bb_info_msg("Entering released state");
+@@ -1144,7 +1148,8 @@ static void perform_release(uint32_t server_addr, uint32_t requested_ip)
+  * Users requested to be notified in all cases, even if not in one
+  * of the states above.
+  */
+-	udhcp_run_script(NULL, "deconfig");
++	if (allow_deconfig)
++		udhcp_run_script(NULL, "deconfig");
  
-@@ -1215,7 +1221,7 @@ int udhcpc_main(int argc UNUSED_PARAM, c
+ 	change_listen_mode(LISTEN_NONE);
+ 	state = RELEASED;
+@@ -1298,7 +1303,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
  	/* O,x: list; -T,-t,-A take numeric param */
- 	opt_complementary = "O::x::T+:t+:A+" IF_UDHCP_VERBOSE(":vv") ;
+ 	IF_UDHCP_VERBOSE(opt_complementary = "vv";)
  	IF_LONG_OPTS(applet_long_options = udhcpc_longopts;)
--	opt = getopt32(argv, "CV:H:h:F:i:np:qRr:s:T:t:SA:O:ox:fB"
-+	opt = getopt32(argv, "CV:H:h:F:i:np:qRr:s:T:t:SA:O:ox:fBD"
+-	opt = getopt32(argv, "CV:H:h:F:i:np:qRr:s:T:+t:+SA:+O:*ox:*fB"
++	opt = getopt32(argv, "CV:H:h:F:i:np:qRr:s:T:+t:+SA:+O:*ox:*fBD"
  		USE_FOR_MMU("b")
- 		IF_FEATURE_UDHCPC_ARPING("a")
+ 		IF_FEATURE_UDHCPC_ARPING("a::")
  		IF_FEATURE_UDHCP_PORT("P:")
-@@ -1316,6 +1322,9 @@ int udhcpc_main(int argc UNUSED_PARAM, c
+@@ -1407,6 +1412,9 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
  		logmode |= LOGMODE_SYSLOG;
  	}
  
@@ -95,7 +91,7 @@ Index: busybox-1.20.2/networking/udhcp/dhcpc.c
  	/* Make sure fd 0,1,2 are open */
  	bb_sanitize_stdio();
  	/* Equivalent of doing a fflush after every \n */
-@@ -1330,7 +1339,8 @@ int udhcpc_main(int argc UNUSED_PARAM, c
+@@ -1421,7 +1429,8 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
  	srand(monotonic_us());
  
  	state = INIT_SELECTING;
@@ -105,17 +101,17 @@ Index: busybox-1.20.2/networking/udhcp/dhcpc.c
  	change_listen_mode(LISTEN_RAW);
  	packet_num = 0;
  	timeout = 0;
-@@ -1484,7 +1494,8 @@ int udhcpc_main(int argc UNUSED_PARAM, c
+@@ -1575,7 +1584,8 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
  				}
  				/* Timed out, enter init state */
- 				bb_info_msg("Lease lost, entering init state");
+ 				bb_error_msg("lease lost, entering init state");
 -				udhcp_run_script(NULL, "deconfig");
 +				if (allow_deconfig)
 +					udhcp_run_script(NULL, "deconfig");
  				state = INIT_SELECTING;
  				client_config.first_secs = 0; /* make secs field count from 0 */
  				/*timeout = 0; - already is */
-@@ -1667,7 +1678,8 @@ int udhcpc_main(int argc UNUSED_PARAM, c
+@@ -1768,7 +1778,8 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
  						send_decline(/*xid,*/ server_addr, packet.yiaddr);
  
  						if (state != REQUESTING)
@@ -125,8 +121,8 @@ Index: busybox-1.20.2/networking/udhcp/dhcpc.c
  						change_listen_mode(LISTEN_RAW);
  						state = INIT_SELECTING;
  						client_config.first_secs = 0; /* make secs field count from 0 */
-@@ -1711,7 +1723,8 @@ int udhcpc_main(int argc UNUSED_PARAM, c
- 				bb_info_msg("Received DHCP NAK");
+@@ -1838,7 +1849,8 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
+ 				bb_error_msg("received %s", "DHCP NAK");
  				udhcp_run_script(&packet, "nak");
  				if (state != REQUESTING)
 -					udhcp_run_script(NULL, "deconfig");
@@ -135,3 +131,6 @@ Index: busybox-1.20.2/networking/udhcp/dhcpc.c
  				change_listen_mode(LISTEN_RAW);
  				sleep(3); /* avoid excessive network traffic */
  				state = INIT_SELECTING;
+-- 
+2.1.0
+
diff --git a/meta/recipes-core/busybox/busybox/commit-applet_tables-fix-commit-0dddbc1.patch b/meta/recipes-core/busybox/busybox/commit-applet_tables-fix-commit-0dddbc1.patch
deleted file mode 100644
index 7f80a1d..0000000
--- a/meta/recipes-core/busybox/busybox/commit-applet_tables-fix-commit-0dddbc1.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-Upstream-Status: Backport
-
-Patch addressing a parallel make race in Busybox
-
-  http://git.busybox.net/busybox/commit/?id=0dddbc1a59795a77679d8c5ef48a2795cb470563
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
-From 0dddbc1a59795a77679d8c5ef48a2795cb470563 Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Tue, 23 Aug 2016 20:21:36 +0200
-Subject: build system: always rewrite NUM_APPLETS.h
-
-Conditional rewrite can keep NUM_APPLETS.h mtime old,
-this causes make to try to regenerate it at every invocation.
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-
-diff --git a/applets/applet_tables.c b/applets/applet_tables.c
-index 8401a15..ef911a4 100644
---- a/applets/applet_tables.c
-+++ b/applets/applet_tables.c
-@@ -192,27 +192,28 @@ int main(int argc, char **argv)
- 	printf("};\n");
- #endif
- 	//printf("#endif /* SKIP_definitions */\n");
-+
- //	printf("\n");
- //	printf("#define MAX_APPLET_NAME_LEN %u\n", MAX_APPLET_NAME_LEN);
- 
- 	if (argv[2]) {
--		char line_old[80];
--		char line_new[80];
- 		FILE *fp;
-+		char line_new[80];
-+//		char line_old[80];
- 
--		line_old[0] = 0;
--		fp = fopen(argv[2], "r");
--		if (fp) {
--			fgets(line_old, sizeof(line_old), fp);
--			fclose(fp);
--		}
- 		sprintf(line_new, "#define NUM_APPLETS %u\n", NUM_APPLETS);
--		if (strcmp(line_old, line_new) != 0) {
-+//		line_old[0] = 0;
-+//		fp = fopen(argv[2], "r");
-+//		if (fp) {
-+//			fgets(line_old, sizeof(line_old), fp);
-+//			fclose(fp);
-+//		}
-+//		if (strcmp(line_old, line_new) != 0) {
- 			fp = fopen(argv[2], "w");
- 			if (!fp)
- 				return 1;
- 			fputs(line_new, fp);
--		}
-+//		}
- 	}
- 
- 	return 0;
diff --git a/meta/recipes-core/busybox/busybox/ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch b/meta/recipes-core/busybox/busybox/ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch
deleted file mode 100644
index 41c5656..0000000
--- a/meta/recipes-core/busybox/busybox/ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From 4ab372d49a6e82b0bf097dedb96d26330c5f2d5f Mon Sep 17 00:00:00 2001
-From: Szabolcs Nagy <nsz@port70.net>
-Date: Sun, 24 Apr 2016 17:39:02 +0200
-Subject: [PATCH] ip: fix problem on mips64 n64 big endian musl systems
-
-Use designated initializers for struct msghdr.
-The struct layout is non-portable and musl libc does not match what busybox expects.
-
-Signed-off-by: Szabolcs Nagy <nsz@port70.net>
-Tested-by: Waldemar Brodkorb <wbx@openadk.org>
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-
-Upstream-Status: Backport
-
-https://git.busybox.net/busybox/commit/?id=4ab372d49a6e82b0bf097dedb96d26330c5f2d5f
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- networking/libiproute/libnetlink.c | 37 ++++++++++++++++++++++++-------------
- 1 file changed, 24 insertions(+), 13 deletions(-)
-
-diff --git a/networking/libiproute/libnetlink.c b/networking/libiproute/libnetlink.c
-index c7533a4..cbb5daf 100644
---- a/networking/libiproute/libnetlink.c
-+++ b/networking/libiproute/libnetlink.c
-@@ -71,11 +71,15 @@ int FAST_FUNC rtnl_dump_request(struct rtnl_handle *rth, int type, void *req, in
- 	struct nlmsghdr nlh;
- 	struct sockaddr_nl nladdr;
- 	struct iovec iov[2] = { { &nlh, sizeof(nlh) }, { req, len } };
-+	/* Use designated initializers, struct layout is non-portable */
- 	struct msghdr msg = {
--		(void*)&nladdr, sizeof(nladdr),
--		iov,  2,
--		NULL, 0,
--		0
-+		.msg_name = (void*)&nladdr,
-+		.msg_namelen = sizeof(nladdr),
-+		.msg_iov = iov,
-+		.msg_iovlen = 2,
-+		.msg_control = NULL,
-+		.msg_controllen = 0,
-+		.msg_flags = 0
- 	};
- 
- 	memset(&nladdr, 0, sizeof(nladdr));
-@@ -104,12 +108,15 @@ static int rtnl_dump_filter(struct rtnl_handle *rth,
- 	while (1) {
- 		int status;
- 		struct nlmsghdr *h;
--
-+		/* Use designated initializers, struct layout is non-portable */
- 		struct msghdr msg = {
--			(void*)&nladdr, sizeof(nladdr),
--			&iov, 1,
--			NULL, 0,
--			0
-+			.msg_name = (void*)&nladdr,
-+			.msg_namelen = sizeof(nladdr),
-+			.msg_iov = &iov,
-+			.msg_iovlen = 1,
-+			.msg_control = NULL,
-+			.msg_controllen = 0,
-+			.msg_flags = 0
- 		};
- 
- 		status = recvmsg(rth->fd, &msg, 0);
-@@ -211,11 +218,15 @@ int FAST_FUNC rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n,
- 	struct sockaddr_nl nladdr;
- 	struct iovec iov = { (void*)n, n->nlmsg_len };
- 	char   *buf = xmalloc(8*1024); /* avoid big stack buffer */
-+	/* Use designated initializers, struct layout is non-portable */
- 	struct msghdr msg = {
--		(void*)&nladdr, sizeof(nladdr),
--		&iov, 1,
--		NULL, 0,
--		0
-+		.msg_name = (void*)&nladdr,
-+		.msg_namelen = sizeof(nladdr),
-+		.msg_iov = &iov,
-+		.msg_iovlen = 1,
-+		.msg_control = NULL,
-+		.msg_controllen = 0,
-+		.msg_flags = 0
- 	};
- 
- 	memset(&nladdr, 0, sizeof(nladdr));
--- 
-2.3.5
-
diff --git a/meta/recipes-core/busybox/busybox/makefile-fix-backport.patch b/meta/recipes-core/busybox/busybox/makefile-fix-backport.patch
deleted file mode 100644
index 2e9842e..0000000
--- a/meta/recipes-core/busybox/busybox/makefile-fix-backport.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 9e5820a86277818c2f83c11c2aa76d7f0a38283e Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Sun, 14 Aug 2016 02:54:27 +0200
-Subject: build system: fix include/NUM_APPLETS.h generation
-
-TBH, it's more like "work around my bad makefile-fu" than "fix"...
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
----
- applets/Kbuild.src | 7 ++-----
- 1 file changed, 2 insertions(+), 5 deletions(-)
-
-Upstream-Status: Backport
-
-diff --git a/applets/Kbuild.src b/applets/Kbuild.src
-index b612399..5cc1827 100644
---- a/applets/Kbuild.src
-+++ b/applets/Kbuild.src
-@@ -29,7 +29,7 @@ applets/applets.o: include/usage_compressed.h include/applet_tables.h
- 
- applets/applet_tables: .config include/applets.h
- applets/usage:         .config include/applets.h
--applets/usage_pod:     .config include/applet_tables.h include/applets.h
-+applets/usage_pod:     .config include/applets.h include/applet_tables.h include/NUM_APPLETS.h
- 
- quiet_cmd_gen_usage_compressed = GEN     include/usage_compressed.h
-       cmd_gen_usage_compressed = $(srctree_slash)applets/usage_compressed include/usage_compressed.h applets
-@@ -40,8 +40,5 @@ include/usage_compressed.h: applets/usage $(srctree_slash)applets/usage_compress
- quiet_cmd_gen_applet_tables = GEN     include/applet_tables.h
-       cmd_gen_applet_tables = applets/applet_tables include/applet_tables.h include/NUM_APPLETS.h
- 
--include/applet_tables.h: applets/applet_tables
--	$(call cmd,gen_applet_tables)
--
--include/NUM_APPLETS.h: applets/applet_tables
-+include/applet_tables.h include/NUM_APPLETS.h: applets/applet_tables
- 	$(call cmd,gen_applet_tables)
--- 
-cgit v0.12
-
diff --git a/meta/recipes-core/busybox/busybox_1.24.1.bb b/meta/recipes-core/busybox/busybox_1.26.1.bb
similarity index 62%
rename from meta/recipes-core/busybox/busybox_1.24.1.bb
rename to meta/recipes-core/busybox/busybox_1.26.1.bb
index afb69d1..85a0ff2 100644
--- a/meta/recipes-core/busybox/busybox_1.24.1.bb
+++ b/meta/recipes-core/busybox/busybox_1.26.1.bb
@@ -27,12 +27,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
            file://inetd \
            file://login-utilities.cfg \
            file://recognize_connmand.patch \
-           file://busybox-cross-menuconfig.patch \
            file://0001-Use-CC-when-linking-instead-of-LD-and-use-CFLAGS-and.patch \
-           file://busybox-1.24.1-unzip.patch \
-           file://busybox-1.24.1-unzip-regression.patch \
-           file://busybox-1.24.1-truncate-open-mode.patch \
-           file://0001-flock-update-the-behaviour-of-c-parameter-to-match-u.patch \
            file://mount-via-label.cfg \
            file://sha1sum.cfg \
            file://sha256sum.cfg \
@@ -44,18 +39,9 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
            file://rcS \
            file://rcK \
            file://runlevel \
-           file://CVE-2016-2148.patch \
-           file://CVE-2016-2147.patch \
-           file://CVE-2016-2147_2.patch \
-           file://ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch \
-           file://makefile-fix-backport.patch \
-           file://0001-sed-fix-sed-n-flushes-pattern-space-terminates-early.patch \
-           file://busybox-kbuild-race-fix-commit-d8e61bb.patch \
-           file://commit-applet_tables-fix-commit-0dddbc1.patch \
            file://makefile-libbb-race.patch \
-           file://0001-libiproute-handle-table-ids-larger-than-255.patch \
 "
 SRC_URI_append_libc-musl = " file://musl.cfg "
 
-SRC_URI[tarball.md5sum] = "be98a40cadf84ce2d6b05fa41a275c6a"
-SRC_URI[tarball.sha256sum] = "37d03132cc078937360b392170b7a1d0e5b322eee9f57c0b82292a8b1f0afe3d"
+SRC_URI[tarball.md5sum] = "044684cb9e4e3253fc31c84f66a5bd9a"
+SRC_URI[tarball.sha256sum] = "0fbbe487fa35cc3258749cf79c259578c1a221013cc4fb60d6a3542590f781f2"
diff --git a/meta/recipes-core/busybox/busybox_git.bb b/meta/recipes-core/busybox/busybox_git.bb
index c2ee3e6..9af2c84 100644
--- a/meta/recipes-core/busybox/busybox_git.bb
+++ b/meta/recipes-core/busybox/busybox_git.bb
@@ -1,8 +1,8 @@
 require busybox.inc
 
-SRCREV = "1b7c17391de66502dd7a97c866e0a33681edbb1f"
+SRCREV = "a12eb9c64d736ffa8e335683f54b33b40fbc7385"
 # Lookout for PV bump too when SRCREV is changed
-PV = "1.25.0+git${SRCPV}"
+PV = "1.26.1+git${SRCPV}"
 
 S = "${WORKDIR}/git"
 
@@ -33,7 +33,6 @@ SRC_URI = "git://busybox.net/busybox.git \
            file://inetd \
            file://login-utilities.cfg \
            file://recognize_connmand.patch \
-           file://busybox-cross-menuconfig.patch \
            file://0001-Use-CC-when-linking-instead-of-LD-and-use-CFLAGS-and.patch \
            file://mount-via-label.cfg \
            file://sha1sum.cfg \
@@ -46,6 +45,7 @@ SRC_URI = "git://busybox.net/busybox.git \
            file://rcS \
            file://rcK \
            file://runlevel \
+           file://makefile-libbb-race.patch \
 "
 SRC_URI_append_libc-musl = " file://musl.cfg "
 
-- 
1.9.1



^ permalink raw reply related

* Re: [PATCH 4/6] scripts/tiny/ksum.py: New tool
From: Khem Raj @ 2017-01-04  6:38 UTC (permalink / raw)
  To: Alejandro Hernandez; +Cc: Patches and discussions about the oe-core layer
In-Reply-To: <0960cf70d3357819843e693eb13c1e7c1f93da8e.1482363237.git.alejandro.hernandez@linux.intel.com>

On Tue, Jan 3, 2017 at 2:30 PM, Alejandro Hernandez
<alejandro.hernandez@linux.intel.com> wrote:
> From: Tom Zanussi <tom.zanussi@linux.intel.com>
>
> 'ksum.py' generates a combined summary of vmlinux and module sizes for
> a built kernel, as a quick tool for comparing the overall effects of
> systemic tinification changes.  Execute from the base directory of the
> kernel build you want to summarize.  Setting the 'verbose' flag will
> display the sizes for each file included in the summary.
>

Does this work with python3 as well?

> Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
> ---
>  scripts/tiny/ksum.py | 168 +++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 168 insertions(+)
>  create mode 100755 scripts/tiny/ksum.py
>
> diff --git a/scripts/tiny/ksum.py b/scripts/tiny/ksum.py
> new file mode 100755
> index 0000000..d4f3892
> --- /dev/null
> +++ b/scripts/tiny/ksum.py
> @@ -0,0 +1,168 @@
> +#!/usr/bin/env python
> +# ex:ts=4:sw=4:sts=4:et
> +# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
> +#
> +# Copyright (c) 2016, Intel Corporation.
> +# All rights reserved.
> +#
> +# This program is free software; you can redistribute it and/or modify
> +# it under the terms of the GNU General Public License version 2 as
> +# published by the Free Software Foundation.
> +#
> +# This program is distributed in the hope that it will be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License along
> +# with this program; if not, write to the Free Software Foundation, Inc.,
> +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
> +#
> +# DESCRIPTION 'ksum.py' generates a combined summary of vmlinux and
> +# module sizes for a built kernel, as a quick tool for comparing the
> +# overall effects of systemic tinification changes.  Execute from the
> +# base directory of the kernel build you want to summarize.  Setting
> +# the 'verbose' flag will display the sizes for each file included in
> +# the summary.
> +#
> +# AUTHORS
> +# Tom Zanussi <tom.zanussi (at] linux.intel.com>
> +#
> +
> +__version__ = "0.1.0"
> +
> +# Python Standard Library modules
> +import os
> +import sys
> +import getopt
> +from subprocess import *
> +
> +def usage():
> +    prog = os.path.basename(sys.argv[0])
> +    print('Usage: %s [OPTION]...' % prog)
> +    print('  -v,                 display sizes for each file')
> +    print('  -h, --help          display this help and exit')
> +    print('')
> +    print('Run %s from the top-level Linux kernel build directory.' % prog)
> +
> +verbose = False
> +
> +n_ko_files = 0
> +ko_file_list = []
> +
> +ko_text = 0
> +ko_data = 0
> +ko_bss = 0
> +ko_total = 0
> +
> +vmlinux_file = ""
> +vmlinux_level = 0
> +
> +vmlinux_text = 0
> +vmlinux_data = 0
> +vmlinux_bss = 0
> +vmlinux_total = 0
> +
> +def is_vmlinux_file(filename):
> +    global vmlinux_level
> +    if filename == ("vmlinux") and vmlinux_level == 0:
> +        vmlinux_level += 1
> +        return True
> +    return False
> +
> +def is_ko_file(filename):
> +    if filename.endswith(".ko"):
> +        return True
> +    return False
> +
> +def collect_object_files():
> +    print "Collecting object files recursively from %s..." % os.getcwd()
> +    for dirpath, dirs, files in os.walk(os.getcwd()):
> +        for filename in files:
> +            if is_ko_file(filename):
> +                ko_file_list.append(os.path.join(dirpath, filename))
> +            elif is_vmlinux_file(filename):
> +                global vmlinux_file
> +                vmlinux_file = os.path.join(dirpath, filename)
> +    print "Collecting object files [DONE]"
> +
> +def add_ko_file(filename):
> +        p = Popen("size -t " + filename, shell=True, stdout=PIPE, stderr=PIPE)
> +        output = p.communicate()[0].splitlines()
> +        if len(output) > 2:
> +            sizes = output[-1].split()[0:4]
> +            if verbose:
> +                print "     %10d %10d %10d %10d\t" % \
> +                    (int(sizes[0]), int(sizes[1]), int(sizes[2]), int(sizes[3])),
> +                print "%s" % filename[len(os.getcwd()) + 1:]
> +            global n_ko_files, ko_text, ko_data, ko_bss, ko_total
> +            ko_text += int(sizes[0])
> +            ko_data += int(sizes[1])
> +            ko_bss += int(sizes[2])
> +            ko_total += int(sizes[3])
> +            n_ko_files += 1
> +
> +def get_vmlinux_totals():
> +        p = Popen("size -t " + vmlinux_file, shell=True, stdout=PIPE, stderr=PIPE)
> +        output = p.communicate()[0].splitlines()
> +        if len(output) > 2:
> +            sizes = output[-1].split()[0:4]
> +            if verbose:
> +                print "     %10d %10d %10d %10d\t" % \
> +                    (int(sizes[0]), int(sizes[1]), int(sizes[2]), int(sizes[3])),
> +                print "%s" % vmlinux_file[len(os.getcwd()) + 1:]
> +            global vmlinux_text, vmlinux_data, vmlinux_bss, vmlinux_total
> +            vmlinux_text += int(sizes[0])
> +            vmlinux_data += int(sizes[1])
> +            vmlinux_bss += int(sizes[2])
> +            vmlinux_total += int(sizes[3])
> +
> +def sum_ko_files():
> +    for ko_file in ko_file_list:
> +        add_ko_file(ko_file)
> +
> +def main():
> +    try:
> +        opts, args = getopt.getopt(sys.argv[1:], "vh", ["help"])
> +    except getopt.GetoptError as err:
> +        print('%s' % str(err))
> +        usage()
> +        sys.exit(2)
> +
> +    for o, a in opts:
> +        if o == '-v':
> +            global verbose
> +            verbose = True
> +        elif o in ('-h', '--help'):
> +            usage()
> +            sys.exit(0)
> +        else:
> +            assert False, "unhandled option"
> +
> +    collect_object_files()
> +    sum_ko_files()
> +    get_vmlinux_totals()
> +
> +    print "\nTotals:"
> +    print "\nvmlinux:"
> +    print "    text\tdata\t\tbss\t\ttotal"
> +    print "    %-10d\t%-10d\t%-10d\t%-10d" % \
> +        (vmlinux_text, vmlinux_data, vmlinux_bss, vmlinux_total)
> +    print "\nmodules (%d):" % n_ko_files
> +    print "    text\tdata\t\tbss\t\ttotal"
> +    print "    %-10d\t%-10d\t%-10d\t%-10d" % \
> +        (ko_text, ko_data, ko_bss, ko_total)
> +    print "\nvmlinux + modules:"
> +    print "    text\tdata\t\tbss\t\ttotal"
> +    print "    %-10d\t%-10d\t%-10d\t%-10d" % \
> +        (vmlinux_text + ko_text, vmlinux_data + ko_data, \
> +         vmlinux_bss + ko_bss, vmlinux_total + ko_total)
> +
> +if __name__ == "__main__":
> +    try:
> +        ret = main()
> +    except Exception:
> +        ret = 1
> +        import traceback
> +        traceback.print_exc(5)
> +    sys.exit(ret)
> --
> 2.6.6
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply

* Re: [PATCH 3/6] ksize.py: Python 3 fixes
From: Khem Raj @ 2017-01-04  6:39 UTC (permalink / raw)
  To: Alejandro Hernandez; +Cc: Patches and discussions about the oe-core layer
In-Reply-To: <5e3840aa19de9b634469c852a7c1446262ab73ab.1482363237.git.alejandro.hernandez@linux.intel.com>

On Tue, Jan 3, 2017 at 2:30 PM, Alejandro Hernandez
<alejandro.hernandez@linux.intel.com> wrote:
> From: Tom Zanussi <tom.zanussi@linux.intel.com>
>
> String errors and partial __cmp__ fix.

may be fold it into previous patch.

>
> Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
> ---
>  scripts/tiny/ksize.py | 17 ++++++++++++-----
>  1 file changed, 12 insertions(+), 5 deletions(-)
>
> diff --git a/scripts/tiny/ksize.py b/scripts/tiny/ksize.py
> index b9d2b19..ea1ca7f 100755
> --- a/scripts/tiny/ksize.py
> +++ b/scripts/tiny/ksize.py
> @@ -41,7 +41,7 @@ def usage():
>  class Sizes:
>      def __init__(self, glob):
>          self.title = glob
> -        p = Popen("size -t " + glob, shell=True, stdout=PIPE, stderr=PIPE)
> +        p = Popen("size -t " + str(glob), shell=True, stdout=PIPE, stderr=PIPE)
>          output = p.communicate()[0].splitlines()
>          if len(output) > 2:
>              sizes = output[-1].split()[0:4]
> @@ -62,18 +62,18 @@ class Report:
>          r = Report(filename, title)
>          path = os.path.dirname(filename)
>
> -        p = Popen("ls " + path + "/*.o | grep -v built-in.o",
> +        p = Popen("ls " + str(path) + "/*.o | grep -v built-in.o",
>                    shell=True, stdout=PIPE, stderr=PIPE)
>          glob = ' '.join(p.communicate()[0].splitlines())
> -        oreport = Report(glob, path + "/*.o")
> -        oreport.sizes.title = path + "/*.o"
> +        oreport = Report(glob, str(path) + "/*.o")
> +        oreport.sizes.title = str(path) + "/*.o"
>          r.parts.append(oreport)
>
>          if subglob:
>              p = Popen("ls " + subglob, shell=True, stdout=PIPE, stderr=PIPE)
>              for f in p.communicate()[0].splitlines():
>                  path = os.path.dirname(f)
> -                r.parts.append(Report.create(f, path, path + "/*/built-in.o"))
> +                r.parts.append(Report.create(f, path, str(path) + "/*/built-in.o"))
>              r.parts.sort(reverse=True)
>
>          for b in r.parts:
> @@ -116,6 +116,13 @@ class Report:
>                 self.deltas["data"], self.deltas["bss"]))
>          print("\n")
>
> +    def __lt__(this, that):
> +        if that is None:
> +            return 1
> +        if not isinstance(that, Report):
> +            raise TypeError
> +        return this.sizes.total < that.sizes.total
> +
>      def __cmp__(this, that):
>          if that is None:
>              return 1
> --
> 2.6.6
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply

* [meta-oe][PATCH v3] devtools: Add recipe for Chromium Embedded Controller utilities
From: Moritz Fischer @ 2017-01-04  6:45 UTC (permalink / raw)
  To: openembedded-core; +Cc: koen, mdf

Add a recipe to build 'ectool' a utility to interact with the embedded
controller on Google's chromebooks (and other platforms using it).

Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
---
Changes from v1:

- Replaced DESCRIPTION with SUMMARY (Martin)
- Use EXTRA_OEMAKE (Martin)
- Removed FILESEXTRAPATHS (Martin)
- Changed PV (Martin / Khem)
- Removed FILES_PN (Khem)

Changes from v2:

- Changed PV (Martin)

---
 .../chromium-utils/chromium-utils.bb               | 24 ++++++++++++++++++++
 .../files/0001-build-Add-HOST_LDFLAGS.patch        | 26 ++++++++++++++++++++++
 2 files changed, 50 insertions(+)
 create mode 100644 meta/recipes-devtools/chromium-utils/chromium-utils.bb
 create mode 100644 meta/recipes-devtools/chromium-utils/files/0001-build-Add-HOST_LDFLAGS.patch

diff --git a/meta/recipes-devtools/chromium-utils/chromium-utils.bb b/meta/recipes-devtools/chromium-utils/chromium-utils.bb
new file mode 100644
index 0000000..f2216fe
--- /dev/null
+++ b/meta/recipes-devtools/chromium-utils/chromium-utils.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Chromium EC utilities"
+DEPENDS = "libftdi"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=562c740877935f40b262db8af30bca36"
+
+SRCREV = "b19bb1f22a3fd0102030485d324c0321a18827e8"
+SRC_URI = "git://chromium.googlesource.com/chromiumos/platform/ec;protocol=https \
+           file://0001-build-Add-HOST_LDFLAGS.patch \
+          "
+
+PV = "1.1.9999+gitr${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OEMAKE = "'HOSTCC=${CC}' 'HOSTCFLAGS=${CFLAGS}' 'HOST_LDFLAGS=${LDFLAGS}'"
+
+do_compile() {
+    oe_runmake utils
+}
+
+do_install() {
+    install -m 0755 -d ${D}${bindir}
+    install -m 0755 ${S}/build/bds/util/ectool ${D}${bindir}/ectool
+}
diff --git a/meta/recipes-devtools/chromium-utils/files/0001-build-Add-HOST_LDFLAGS.patch b/meta/recipes-devtools/chromium-utils/files/0001-build-Add-HOST_LDFLAGS.patch
new file mode 100644
index 0000000..46e8cad
--- /dev/null
+++ b/meta/recipes-devtools/chromium-utils/files/0001-build-Add-HOST_LDFLAGS.patch
@@ -0,0 +1,26 @@
+From 56ffeeffea735a6a8f69fc111278ebabe3c7e2d8 Mon Sep 17 00:00:00 2001
+From: Moritz Fischer <moritz.fischer@ettus.com>
+Date: Tue, 27 Dec 2016 22:24:07 -0800
+Subject: [PATCH] build Add HOST_LDFLAGS
+
+Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
+---
+ Makefile.rules | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.rules b/Makefile.rules
+index 404454d..0057ba9 100644
+--- a/Makefile.rules
++++ b/Makefile.rules
+@@ -60,7 +60,7 @@ cmd_c_to_build = $(BUILDCC) $(BUILD_CFLAGS) \
+ 	         $(sort $(foreach c,$($(*F)-objs),util/$(c:%.o=%.c)) $*.c) \
+ 	         $(BUILD_LDFLAGS) \
+ 	         -MMD -MF $@.d -o $@
+-cmd_c_to_host = $(HOSTCC) $(HOST_CFLAGS) -MMD -MF $@.d  -o $@ \
++cmd_c_to_host = $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -MMD -MF $@.d  -o $@ \
+ 	         $(sort $(foreach c,$($(*F)-objs),util/$(c:%.o=%.c)) $*.c)
+ cmd_cxx_to_host = $(HOSTCXX) -std=c++0x $(COMMON_WARN) $(HOST_CXXFLAGS)\
+ 	-I ./$($(notdir $@)_ROOT) -o $@ $(filter %.cc,$^) $($(notdir $@)_LIBS)
+-- 
+2.4.11
+
-- 
2.7.4



^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox