Re: [OE-core] [PATCH 2/4] systemd: upgrade to 236

2018-02-28 Thread ChenQi

On 02/28/2018 07:41 PM, Alexander Kanavin wrote:

On 02/28/2018 07:56 AM, Chen Qi wrote:

Upgrade systemd to 236.


Latest upstream release is 237, should we use that?

Alex



Thanks for reminding me of this.
I'll try to use the latest 237 version in V2.

Best Regards,
Chen Qi
--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 4/4] systemd-boot: upgrade to 236

2018-02-28 Thread ChenQi

On 02/28/2018 09:32 PM, Burton, Ross wrote:

No, still broken:

ERROR: systemd-boot-236-r0 do_compile: oe_runmake failed
ERROR: systemd-boot-236-r0 do_compile: Function failed: do_compile 
(log file is located at 
/data/poky-tmp/master/work/corei7-64-intel-common-poky-linux/systemd-boot/236-r0/temp/log.do_compile.31074)
ERROR: Logfile of failure stored in: 
/data/poky-tmp/master/work/corei7-64-intel-common-poky-linux/systemd-boot/236-r0/temp/log.do_compile.31074

Log data follows:
| DEBUG: Executing shell function do_compile
| [1/10] Generating console.c.o with a custom command.
| [2/10] Generating graphics.c.o with a custom command.
| [3/10] Generating pe.c.o with a custom command.
| [4/10] Generating measure.c.o with a custom command.
| [5/10] Generating disk.c.o with a custom command.
| [6/10] Generating util.c.o with a custom command.
| [7/10] Generating shim.c.o with a custom command.
| [8/10] Generating boot.c.o with a custom command.
| [9/10] Generating systemd_boot.so with a custom command.
| [10/10] Generating systemd-bootx64.efi with a custom command.
| NOTE: make -j 20 linuxx64.efi.stub
| make: *** No rule to make target 'linuxx64.efi.stub'. Stop.
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at 
/data/poky-tmp/master/work/corei7-64-intel-common-poky-linux/systemd-boot/236-r0/temp/log.do_compile.31074)
ERROR: Task 
(/home/ross/Yocto/poky/meta/recipes-core/systemd/systemd-boot_236.bb:do_compile) 
failed with exit code '1'


Ross



I'll try to reproduce this problem and solve it.

Best Regards,
Chen Qi

On 28 February 2018 at 13:30, Burton, Ross > wrote:


ERROR: systemd-boot-236-r0 do_compile: Function failed: do_compile
(log file is located at

/data/poky-tmp/master/work/corei7-64-intel-common-poky-linux/systemd-boot/236-r0/temp/log.do_compile.10165)
ERROR: Logfile of failure stored in:

/data/poky-tmp/master/work/corei7-64-intel-common-poky-linux/systemd-boot/236-r0/temp/log.do_compile.10165
Log data follows:
| DEBUG: Executing shell function do_compile
|

/data/poky-tmp/master/work/corei7-64-intel-common-poky-linux/systemd-boot/236-r0/temp/run.do_compile.10165:
109: [: x86_64: unexpected operator
| ninja: error: unknown target 'src/boot/efi/systemd-bootia32.efi'

+  if [ "${TARGET_ARCH}" == "x86_64" ]; then

Remember that == is a bashism and the correct operator for [ is =.

(fix squashed here)

Ross

On 28 February 2018 at 05:56, Chen Qi > wrote:

Upgrade systemd-boot to 236.

As systemd has dropped autotools support, fix configure and
compile
failures related to meson.

Signed-off-by: Chen Qi >
---
 meta/recipes-core/systemd/systemd-boot_234.bb
 | 43 ---
 meta/recipes-core/systemd/systemd-boot_236.bb
 | 49 +
 .../systemd/0001-Also-check-i586-for-ia32.patch   | 28 ++
 ...efi_cc-and-efi_ld-correctly-when-cross-co.patch | 62
++
 4 files changed, 139 insertions(+), 43 deletions(-)
 delete mode 100644
meta/recipes-core/systemd/systemd-boot_234.bb

 create mode 100644
meta/recipes-core/systemd/systemd-boot_236.bb

 create mode 100644
meta/recipes-core/systemd/systemd/0001-Also-check-i586-for-ia32.patch
 create mode 100644

meta/recipes-core/systemd/systemd/0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch

diff --git a/meta/recipes-core/systemd/systemd-boot_234.bb

b/meta/recipes-core/systemd/systemd-boot_234.bb

deleted file mode 100644
index 88a14ac..000
--- a/meta/recipes-core/systemd/systemd-boot_234.bb

+++ /dev/null
@@ -1,43 +0,0 @@
-require systemd.inc
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemd:"
-
-DEPENDS = "intltool-native libcap util-linux gnu-efi
gperf-native"
-
-SRC_URI +=
"file://0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch"
-
-inherit autotools pkgconfig gettext
-inherit deploy
-
-EFI_CC ?= "${CC}"
-# Man pages are packaged through the main systemd recipe
-EXTRA_OECONF = " --enable-gnuefi \
- --with-efi-includedir=${STAGING_INCDIR} \
- --with-efi-ldsdir=${STAGING_LIBDIR} \
- --with-efi-libdir=${STAGING_LIBDIR} \
  

Re: [OE-core] [PATCH v3 04/21] grub-efi: if installed and EFI_PROVIDER, install as bootx64 or bootia32

2018-02-28 Thread Anuj Mittal
Hi Cal,

On 03/01/2018 10:15 AM, California Sullivan wrote:
> This way we could theoretically support multiple bootloaders, and we
> keep the convention of boot(x64|ia32).
> 
> Signed-off-by: California Sullivan 
> ---
>  meta/recipes-bsp/grub/grub-efi_2.02.bb | 13 -
>  1 file changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/meta/recipes-bsp/grub/grub-efi_2.02.bb 
> b/meta/recipes-bsp/grub/grub-efi_2.02.bb
> index c5a68f01cef..ed27b90fdbc 100644
> --- a/meta/recipes-bsp/grub/grub-efi_2.02.bb
> +++ b/meta/recipes-bsp/grub/grub-efi_2.02.bb
> @@ -15,16 +15,19 @@ S = "${WORKDIR}/grub-${PV}"
>  python __anonymous () {
>  import re
>  target = d.getVar('TARGET_ARCH')
> +prefix = "" if d.getVar('EFI_PROVIDER') == "grub-efi" else "grub-efi-"
>  if target == "x86_64":
>  grubtarget = 'x86_64'
> -grubimage = "grub-efi-bootx64.efi"
> +grubimage = prefix + "bootx64.efi"
>  elif re.match('i.86', target):
>  grubtarget = 'i386'
> -grubimage = "grub-efi-bootia32.efi"
> +grubimage = prefix + "bootia32.efi"
>  else:
>  raise bb.parse.SkipRecipe("grub-efi is incompatible with target %s" 
> % target)
>  d.setVar("GRUB_TARGET", grubtarget)
>  d.setVar("GRUB_IMAGE", grubimage)
> +prefix = "grub-efi-" if prefix == "" else ""
> +d.setVar("GRUB_IMAGE_PREFIX", prefix)
>  }
>  
>  inherit deploy
> @@ -41,7 +44,7 @@ do_mkimage() {
>   # Search for the grub.cfg on the local boot media by using the
>   # built in cfg file provided via this recipe
>   grub-mkimage -c ../cfg -p /EFI/BOOT -d ./grub-core/ \
> --O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE} \
> +-O ${GRUB_TARGET}-efi -o 
> ./${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} \
>  ${GRUB_BUILDIN}
>  }
>  
> @@ -55,7 +58,7 @@ do_install_append_class-target() {
>   install -d ${D}/boot
>   install -d ${D}/boot/EFI
>   install -d ${D}/boot/EFI/BOOT
> - install -m 644 ${B}/${GRUB_IMAGE} ${D}/boot/EFI/BOOT/
> + install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} 
> ${D}/boot/EFI/BOOT/${GRUB_IMAGE}
>  }
>  
>  do_install_class-native() {
> @@ -79,7 +82,7 @@ GRUB_BUILDIN ?= "boot linux ext2 fat serial part_msdos 
> part_gpt normal \
>   efi_gop iso9660 configfile search loadenv test"
>  
>  do_deploy() {
> - install -m 644 ${B}/${GRUB_IMAGE} ${DEPLOYDIR}
> + install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} ${DEPLOYDIR}
>  }
>  
>  do_deploy_class-native() {
> 

Should FILES_${PN} also be changed to add prefix?

Thanks,
Anuj

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3 13/21] systemd-boot*.bbclass: Don't use vmlinuz

2018-02-28 Thread California Sullivan
We can't guarantee vmlinuz anymore. Use KERNEL_IMAGETYPE instead.

Signed-off-by: California Sullivan 
---
 meta/classes/systemd-boot-cfg.bbclass | 6 +-
 meta/classes/systemd-boot.bbclass | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/meta/classes/systemd-boot-cfg.bbclass 
b/meta/classes/systemd-boot-cfg.bbclass
index 46eeae126ae..360c86cbd34 100644
--- a/meta/classes/systemd-boot-cfg.bbclass
+++ b/meta/classes/systemd-boot-cfg.bbclass
@@ -1,3 +1,5 @@
+KERNEL_IMAGETYPE ??= "bzImage"
+
 SYSTEMD_BOOT_CFG ?= "${S}/loader.conf"
 SYSTEMD_BOOT_ENTRIES ?= ""
 SYSTEMD_BOOT_TIMEOUT ?= "10"
@@ -52,7 +54,9 @@ python build_efi_cfg() {
 localdata.setVar('OVERRIDES', label + ':' + overrides)
 
 entrycfg.write('title %s\n' % label)
-entrycfg.write('linux /vmlinuz\n')
+
+kernel = localdata.getVar("KERNEL_IMAGETYPE")
+entrycfg.write('linux /%s\n' % kernel)
 
 append = localdata.getVar('APPEND')
 initrd = localdata.getVar('INITRD')
diff --git a/meta/classes/systemd-boot.bbclass 
b/meta/classes/systemd-boot.bbclass
index 14538fe2d7a..3cd6811a6ce 100644
--- a/meta/classes/systemd-boot.bbclass
+++ b/meta/classes/systemd-boot.bbclass
@@ -45,7 +45,7 @@ efi_iso_populate() {
 mkdir -p ${EFIIMGDIR}/${EFIDIR}
 cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR}
 cp -r $iso_dir/loader ${EFIIMGDIR}
-cp $iso_dir/vmlinuz ${EFIIMGDIR}
+cp $iso_dir/${KERNEL_IMAGETYPE} ${EFIIMGDIR}
 EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
 echo "fs0:${EFIPATH}\\${DEST_EFI_IMAGE}" > ${EFIIMGDIR}/startup.nsh
 if [ -f "$iso_dir/initrd" ] ; then
-- 
2.14.3

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3 11/21] systemd-boot.bbclass: break out configuration creation

2018-02-28 Thread California Sullivan
This class is useful on its own and can be used to create configuration
recipes.

Signed-off-by: California Sullivan 
---
 ...stemd-boot.bbclass => systemd-boot-cfg.bbclass} | 57 --
 meta/classes/systemd-boot.bbclass  | 70 +-
 2 files changed, 1 insertion(+), 126 deletions(-)
 copy meta/classes/{systemd-boot.bbclass => systemd-boot-cfg.bbclass} (50%)

diff --git a/meta/classes/systemd-boot.bbclass 
b/meta/classes/systemd-boot-cfg.bbclass
similarity index 50%
copy from meta/classes/systemd-boot.bbclass
copy to meta/classes/systemd-boot-cfg.bbclass
index 937307076f7..46eeae126ae 100644
--- a/meta/classes/systemd-boot.bbclass
+++ b/meta/classes/systemd-boot-cfg.bbclass
@@ -1,18 +1,3 @@
-# Copyright (C) 2016 Intel Corporation
-#
-# Released under the MIT license (see COPYING.MIT)
-
-# systemd-boot.bbclass - The "systemd-boot" is essentially the gummiboot 
merged into systemd.
-#The original standalone gummiboot project is dead 
without any more
-#maintenance.
-#
-# Set EFI_PROVIDER = "systemd-boot" to use systemd-boot on your live images 
instead of grub-efi
-# (images built by image-live.bbclass)
-
-do_bootimg[depends] += "${MLPREFIX}systemd-boot:do_deploy"
-
-EFIDIR = "/EFI/BOOT"
-
 SYSTEMD_BOOT_CFG ?= "${S}/loader.conf"
 SYSTEMD_BOOT_ENTRIES ?= ""
 SYSTEMD_BOOT_TIMEOUT ?= "10"
@@ -20,48 +5,6 @@ SYSTEMD_BOOT_TIMEOUT ?= "10"
 # Need UUID utility code.
 inherit fs-uuid
 
-efi_populate() {
-DEST=$1
-
-EFI_IMAGE="systemd-bootia32.efi"
-DEST_EFI_IMAGE="bootia32.efi"
-if [ "${TARGET_ARCH}" = "x86_64" ]; then
-EFI_IMAGE="systemd-bootx64.efi"
-DEST_EFI_IMAGE="bootx64.efi"
-fi
-
-install -d ${DEST}${EFIDIR}
-# systemd-boot requires these paths for configuration files
-# they are not customizable so no point in new vars
-install -d ${DEST}/loader
-install -d ${DEST}/loader/entries
-install -m 0644 ${DEPLOY_DIR_IMAGE}/${EFI_IMAGE} 
${DEST}${EFIDIR}/${DEST_EFI_IMAGE}
-EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
-printf 'fs0:%s\%s\n' "$EFIPATH" "$DEST_EFI_IMAGE" >${DEST}/startup.nsh
-install -m 0644 ${SYSTEMD_BOOT_CFG} ${DEST}/loader/loader.conf
-for i in ${SYSTEMD_BOOT_ENTRIES}; do
-install -m 0644 ${i} ${DEST}/loader/entries
-done
-}
-
-efi_iso_populate() {
-iso_dir=$1
-efi_populate $iso_dir
-mkdir -p ${EFIIMGDIR}/${EFIDIR}
-cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR}
-cp -r $iso_dir/loader ${EFIIMGDIR}
-cp $iso_dir/vmlinuz ${EFIIMGDIR}
-EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
-echo "fs0:${EFIPATH}\\${DEST_EFI_IMAGE}" > ${EFIIMGDIR}/startup.nsh
-if [ -f "$iso_dir/initrd" ] ; then
-cp $iso_dir/initrd ${EFIIMGDIR}
-fi
-}
-
-efi_hddimg_populate() {
-efi_populate $1
-}
-
 python build_efi_cfg() {
 s = d.getVar("S")
 labels = d.getVar('LABELS')
diff --git a/meta/classes/systemd-boot.bbclass 
b/meta/classes/systemd-boot.bbclass
index 937307076f7..14538fe2d7a 100644
--- a/meta/classes/systemd-boot.bbclass
+++ b/meta/classes/systemd-boot.bbclass
@@ -12,11 +12,6 @@
 do_bootimg[depends] += "${MLPREFIX}systemd-boot:do_deploy"
 
 EFIDIR = "/EFI/BOOT"
-
-SYSTEMD_BOOT_CFG ?= "${S}/loader.conf"
-SYSTEMD_BOOT_ENTRIES ?= ""
-SYSTEMD_BOOT_TIMEOUT ?= "10"
-
 # Need UUID utility code.
 inherit fs-uuid
 
@@ -62,67 +57,4 @@ efi_hddimg_populate() {
 efi_populate $1
 }
 
-python build_efi_cfg() {
-s = d.getVar("S")
-labels = d.getVar('LABELS')
-if not labels:
-bb.debug(1, "LABELS not defined, nothing to do")
-return
-
-if labels == []:
-bb.debug(1, "No labels, nothing to do")
-return
-
-cfile = d.getVar('SYSTEMD_BOOT_CFG')
-cdir = os.path.dirname(cfile)
-if not os.path.exists(cdir):
-os.makedirs(cdir)
-try:
- cfgfile = open(cfile, 'w')
-except OSError:
-bb.fatal('Unable to open %s' % cfile)
-
-cfgfile.write('# Automatically created by OE\n')
-cfgfile.write('default %s\n' % (labels.split()[0]))
-timeout = d.getVar('SYSTEMD_BOOT_TIMEOUT')
-if timeout:
-cfgfile.write('timeout %s\n' % timeout)
-else:
-cfgfile.write('timeout 10\n')
-cfgfile.close()
-
-for label in labels.split():
-localdata = d.createCopy()
-
-overrides = localdata.getVar('OVERRIDES')
-if not overrides:
-bb.fatal('OVERRIDES not defined')
-
-entryfile = "%s/%s.conf" % (s, label)
-if not os.path.exists(s):
-os.makedirs(s)
-d.appendVar("SYSTEMD_BOOT_ENTRIES", " " + entryfile)
-try:
-entrycfg = open(entryfile, "w")
-except OSError:
-bb.fatal('Unable to open %s' % entryfile)
-localdata.setVar('OVERRIDES', label + ':' + 

[OE-core] [PATCH v3 15/21] packagegroup-core-boot: add kernel for EFI systems

2018-02-28 Thread California Sullivan
Previously this wasn't needed because the kernel was added at image
creation time to the boot partition. Now that the boot partition is
created from the /boot/ partition of the rootfs, it needs to be
installed there.

Signed-off-by: California Sullivan 
---
 meta/recipes-core/packagegroups/packagegroup-core-boot.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/packagegroups/packagegroup-core-boot.bb 
b/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
index 0fcb8ba9193..76cd7fc4ebf 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
@@ -37,7 +37,7 @@ RDEPENDS_${PN} = "\
 ${VIRTUAL-RUNTIME_base-utils} \
 ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "${SYSVINIT_SCRIPTS}", 
"", d)} \
 ${@bb.utils.contains("MACHINE_FEATURES", "keyboard", 
"${VIRTUAL-RUNTIME_keymaps}", "", d)} \
-${@bb.utils.contains("MACHINE_FEATURES", "efi", "${EFI_PROVIDER}", "", d)} 
\
+${@bb.utils.contains("MACHINE_FEATURES", "efi", "${EFI_PROVIDER} kernel", 
"", d)} \
 netbase \
 ${VIRTUAL-RUNTIME_login_manager} \
 ${VIRTUAL-RUNTIME_init_manager} \
-- 
2.14.3

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3 10/21] syslinux.bbclass: don't use vmlinuz

2018-02-28 Thread California Sullivan
We can't guarantee the kernel will be named vmlinuz anymore. Use
KERNEL_IMAGETYPE instead.

Signed-off-by: California Sullivan 
---
 meta/classes/syslinux.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/classes/syslinux.bbclass b/meta/classes/syslinux.bbclass
index d6f882420e4..959aed4fb8f 100644
--- a/meta/classes/syslinux.bbclass
+++ b/meta/classes/syslinux.bbclass
@@ -21,6 +21,7 @@ do_bootimg[depends] += 
"${MLPREFIX}syslinux:do_populate_sysroot \
 syslinux-native:do_populate_sysroot"
 
 ISOLINUXDIR ?= "/isolinux"
+KERNEL_IMAGETYPE ??= "bzImage"
 SYSLINUXDIR = "/"
 # The kernel has an internal default console, which you can override with
 # a console=...some_tty...
@@ -173,8 +174,9 @@ python build_syslinux_cfg () {
 if not root:
 bb.fatal('SYSLINUX_ROOT not defined')
 
+kernel = localdata.getVar('KERNEL_IMAGETYPE')
 for btype in btypes:
-cfgfile.write('LABEL %s%s\nKERNEL /vmlinuz\n' % (btype[0], label))
+cfgfile.write('LABEL %s%s\nKERNEL /%s\n' % (btype[0], label, 
kernel))
 
 exargs = d.getVar('SYSLINUX_KERNEL_ARGS')
 if exargs:
-- 
2.14.3

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3 08/21] wic: add wks file to make use of exclude-path functionality

2018-02-28 Thread California Sullivan
Using --exclude-path and a wks.in file we can create an image that takes
the /boot/ directory for the boot partition, has an empty /boot/
directory in the rootfs partition. The boot partition gets mounted to
/boot/ after startup.

Signed-off-by: California Sullivan 
---
 scripts/lib/wic/canned-wks/efi-bootdisk.wks.in | 3 +++
 1 file changed, 3 insertions(+)
 create mode 100644 scripts/lib/wic/canned-wks/efi-bootdisk.wks.in

diff --git a/scripts/lib/wic/canned-wks/efi-bootdisk.wks.in 
b/scripts/lib/wic/canned-wks/efi-bootdisk.wks.in
new file mode 100644
index 000..7300e65e32d
--- /dev/null
+++ b/scripts/lib/wic/canned-wks/efi-bootdisk.wks.in
@@ -0,0 +1,3 @@
+bootloader --ptable gpt
+part /boot --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/boot --fstype=vfat 
--label boot --active --align 1024 --use-uuid --overhead-factor 1.0
+part / --source rootfs --fstype=ext4 --label root --align 1024 --exclude-path 
boot/
-- 
2.14.3

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3 09/21] init-install-efi.sh: Update to support installing multiple kernels

2018-02-28 Thread California Sullivan
We can no longer rely on the kernel having a static name of "vmlinuz".
This means we can't use it as a sentinel value in our sed commands, and
we can't just copy vmlinuz to the boot directory.

Instead, we'll use "root=" as the sentinel value for our sed commands,
and we'll search for common kernel names to copy into our boot
directory.

Signed-off-by: California Sullivan 
---
 meta/recipes-core/initrdscripts/files/init-install-efi.sh | 15 ++-
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh 
b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index 706418fa9c5..f946d971d11 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -244,10 +244,9 @@ if [ -f /run/media/$1/EFI/BOOT/grub.cfg ]; then
 sed -i "/initrd /d" $GRUBCFG
 # Delete any LABEL= strings
 sed -i "s/ LABEL=[^ ]*/ /" $GRUBCFG
-# Delete any root= strings
-sed -i "s/ root=[^ ]*/ /g" $GRUBCFG
-# Add the root= and other standard boot options
-sed -i "s@linux /vmlinuz *@linux /vmlinuz root=PARTUUID=$root_part_uuid rw 
$rootwait quiet @" $GRUBCFG
+# Replace root= and add additional standard boot options
+# We use root as a sentinel value, as vmlinuz is no longer guaranteed
+sed -i "s/ root=[^ ]*/ root=PARTUUID=$root_part_uuid rw $rootwait quiet 
/g" $GRUBCFG
 fi
 
 if [ -d /run/media/$1/loader ]; then
@@ -269,7 +268,13 @@ fi
 
 umount /tgt_root
 
-cp /run/media/$1/vmlinuz /boot
+# Copy kernel artifacts. To add more artifacts just add to types
+# For now just support kernel types already being used by something in OE-core
+for types in bzImage zImage vmlinux vmlinuz fitImage; do
+for kernel in `find /run/media/$1/ -name $types*`; do
+cp $kernel /boot
+done
+done
 
 umount /boot
 
-- 
2.14.3

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3 07/21] grub-efi*.bbclass: don't reference vmlinuz

2018-02-28 Thread California Sullivan
Rather than renaming the kernel to vmlinuz and assuming the name is
vmlinuz in the grub.cfg, copy to ${KERNEL_IMAGETYPE} and also use that
value in the grub.cfg file.

Signed-off-by: California Sullivan 
---
 meta/classes/grub-efi-cfg.bbclass | 4 +++-
 meta/classes/grub-efi.bbclass | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/classes/grub-efi-cfg.bbclass 
b/meta/classes/grub-efi-cfg.bbclass
index 730323c72e6..85173c91fc3 100644
--- a/meta/classes/grub-efi-cfg.bbclass
+++ b/meta/classes/grub-efi-cfg.bbclass
@@ -22,6 +22,7 @@ GRUB_CFG_LIVE = "${S}/grub_live.cfg"
 GRUB_TIMEOUT ?= "10"
 #FIXME: build this from the machine config
 GRUB_OPTS ?= "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"
+KERNEL_IMAGETYPE ??= "bzImage"
 
 EFIDIR = "/EFI/BOOT"
 GRUB_ROOT ?= "${ROOT}"
@@ -97,7 +98,8 @@ python build_efi_cfg() {
 lb = label
 if label == "install":
 lb = "install-efi"
-cfgfile.write('linux /vmlinuz LABEL=%s' % (lb))
+kernel = localdata.getVar('KERNEL_IMAGETYPE')
+cfgfile.write('linux /%s LABEL=%s' % (kernel, lb))
 
 cfgfile.write(' %s' % replace_rootfs_uuid(d, root))
 
diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass
index 4b5704c19cc..90badc03a0e 100644
--- a/meta/classes/grub-efi.bbclass
+++ b/meta/classes/grub-efi.bbclass
@@ -26,7 +26,7 @@ efi_iso_populate() {
# Build a EFI directory to create efi.img
mkdir -p ${EFIIMGDIR}/${EFIDIR}
cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR}
-   cp $iso_dir/vmlinuz ${EFIIMGDIR}
+   cp $iso_dir/${KERNEL_IMAGETYPE} ${EFIIMGDIR}
EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
printf 'fs0:%s\%s\n' "$EFIPATH" "$GRUB_IMAGE" > ${EFIIMGDIR}/startup.nsh
if [ -f "$iso_dir/initrd" ] ; then
-- 
2.14.3

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3 12/21] systemd: add systemd-bootconf recipe

2018-02-28 Thread California Sullivan
Reuses our systemd-boot-cfg bbclass to generate systemd-boot
configuration files.

Signed-off-by: California Sullivan 
---
 meta/recipes-core/systemd/systemd-bootconf_1.00.bb | 31 ++
 1 file changed, 31 insertions(+)
 create mode 100644 meta/recipes-core/systemd/systemd-bootconf_1.00.bb

diff --git a/meta/recipes-core/systemd/systemd-bootconf_1.00.bb 
b/meta/recipes-core/systemd/systemd-bootconf_1.00.bb
new file mode 100644
index 000..e9c2466456c
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd-bootconf_1.00.bb
@@ -0,0 +1,31 @@
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = 
"file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+SUMMARY = "Basic systemd-boot configuration files"
+
+RPROVIDES_${PN} += "virtual/systemd-bootconf"
+
+inherit systemd-boot-cfg
+
+S = "${WORKDIR}"
+
+LABELS = "boot"
+
+ROOT ?= "root=/dev/sda2"
+APPEND_append = " ${ROOT}"
+
+python do_configure() {
+bb.build.exec_func('build_efi_cfg', d)
+}
+
+do_configure[vardeps] += "APPEND"
+
+do_install() {
+   install -d ${D}/boot
+   install -d ${D}/boot/loader
+   install -d ${D}/boot/loader/entries
+   install loader.conf ${D}/boot/loader/
+   rm loader.conf
+   install *.conf ${D}/boot/loader/entries/
+}
+
+FILES_${PN} = "/boot/loader/* /boot/loader/entries/*"
-- 
2.14.3

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3 16/21] init-install.sh: support multiple kernels and don't assume vmlinuz

2018-02-28 Thread California Sullivan
Since kernels will not necessarily be installed as vmlinuz anymore,
don't assume that's its name for either the bootloader config or the
copy of the kernel.

Also, allow installing multiple kernels by searching for common kernel
names.

Signed-off-by: California Sullivan 
---
 .../initrdscripts/files/init-install.sh| 37 --
 1 file changed, 34 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh 
b/meta/recipes-core/initrdscripts/files/init-install.sh
index dade059c8f1..713a83092bf 100644
--- a/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -256,9 +256,34 @@ fi
 umount /tgt_root
 umount /src_root
 
+echo "Looking for kernels to use as boot target.."
+# Find kernel to boot to
+# Give user options if multiple are found
+kernels="$(find /run/media/$1/ -type f  \
+   -name bzImage* -o -name zImage* \
+   -o -name vmlinux* -o -name vmlinuz* \
+   -o -name fitImage* \
+   | sed s:.*/::)"
+if [ -n "$(echo $kernels)" ]; then
+# only one kernel entry if no space
+if [ -z "$(echo $kernels | grep " ")" ]; then
+kernel=$kernels
+echo "$kernel will be used as the boot target"
+else
+echo "Which kernel do we want to boot by default? The following 
kernels were found:"
+echo $kernels
+read answer
+kernel=$answer
+fi
+else
+echo "No kernels found, exiting..."
+exit 1
+fi
+
 # Handling of the target boot partition
 mount $bootfs /boot
 echo "Preparing boot partition..."
+
 if [ -f /etc/grub.d/00_header -a $grub_version -ne 0 ] ; then
 echo "Preparing custom grub2 menu..."
 root_part_uuid=$(blkid -o value -s PARTUUID ${rootfs})
@@ -268,7 +293,7 @@ if [ -f /etc/grub.d/00_header -a $grub_version -ne 0 ] ; 
then
 cat >$GRUBCFG <<_EOF
 menuentry "Linux" {
 search --no-floppy --fs-uuid $boot_uuid --set root
-linux /vmlinuz root=PARTUUID=$root_part_uuid $rootwait rw $5 $3 $4 quiet
+linux /$kernel root=PARTUUID=$root_part_uuid $rootwait rw $5 $3 $4 quiet
 }
 _EOF
 chmod 0444 $GRUBCFG
@@ -282,10 +307,16 @@ if [ $grub_version -eq 0 ] ; then
 echo "timeout 30" >> /boot/grub/menu.lst
 echo "title Live Boot/Install-Image" >> /boot/grub/menu.lst
 echo "root  (hd0,0)" >> /boot/grub/menu.lst
-echo "kernel /vmlinuz root=$rootfs rw $3 $4 quiet" >> /boot/grub/menu.lst
+echo "kernel /$kernel root=$rootfs rw $3 $4 quiet" >> /boot/grub/menu.lst
 fi
 
-cp /run/media/$1/vmlinuz /boot/
+# Copy kernel artifacts. To add more artifacts just add to types
+# For now just support kernel types already being used by something in OE-core
+for types in bzImage zImage vmlinux vmlinuz fitImage; do
+for kernel in `find /run/media/$1/ -name $types*`; do
+cp $kernel /boot
+done
+done
 
 umount /boot
 
-- 
2.14.3

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3 20/21] systemd-boot-cfg.bbclass: Don't reference or set OVERRIDES

2018-02-28 Thread California Sullivan
There's no need to add to the local copy of overrides and then not do
anything with it.

Now that this function is being used in package creation it was causing
sstate issues as well, as MACHINE is always in OVERRIDES, so something
trivial such as the name of the MACHINE would cause the hash to change.

Signed-off-by: California Sullivan 
---
 meta/classes/systemd-boot-cfg.bbclass | 5 -
 1 file changed, 5 deletions(-)

diff --git a/meta/classes/systemd-boot-cfg.bbclass 
b/meta/classes/systemd-boot-cfg.bbclass
index 360c86cbd34..107758548c6 100644
--- a/meta/classes/systemd-boot-cfg.bbclass
+++ b/meta/classes/systemd-boot-cfg.bbclass
@@ -39,10 +39,6 @@ python build_efi_cfg() {
 for label in labels.split():
 localdata = d.createCopy()
 
-overrides = localdata.getVar('OVERRIDES')
-if not overrides:
-bb.fatal('OVERRIDES not defined')
-
 entryfile = "%s/%s.conf" % (s, label)
 if not os.path.exists(s):
 os.makedirs(s)
@@ -51,7 +47,6 @@ python build_efi_cfg() {
 entrycfg = open(entryfile, "w")
 except OSError:
 bb.fatal('Unable to open %s' % entryfile)
-localdata.setVar('OVERRIDES', label + ':' + overrides)
 
 entrycfg.write('title %s\n' % label)
 
-- 
2.14.3

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3 14/21] systemd-boot: add package that installs to boot

2018-02-28 Thread California Sullivan
If the EFI_PROVIDER is systemd-boot, install as boot(x64|ia32) as per
convention. If its not the EFI_PROVIDER, install as
systemd-boot(x64|ia32), as to not collide with other possible
bootloaders.

Signed-off-by: California Sullivan 
---
 meta/recipes-core/systemd/systemd-boot_234.bb | 28 ---
 1 file changed, 25 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd-boot_234.bb 
b/meta/recipes-core/systemd/systemd-boot_234.bb
index 88a14ac61ec..2d29df8be7c 100644
--- a/meta/recipes-core/systemd/systemd-boot_234.bb
+++ b/meta/recipes-core/systemd/systemd-boot_234.bb
@@ -18,6 +18,26 @@ EXTRA_OECONF = " --enable-gnuefi \
  EFI_CC='${EFI_CC}' \
"
 
+# install to the image as boot*.efi if its the EFI_PROVIDER,
+# otherwise install as the full name.
+# This allows multiple bootloaders to coexist in a single image.
+python __anonymous () {
+import re
+target = d.getVar('TARGET_ARCH')
+prefix = "" if d.getVar('EFI_PROVIDER', True) == "systemd-boot" else 
"systemd-"
+if target == "x86_64":
+systemdimage = prefix + "bootx64.efi"
+else:
+systemdimage = prefix + "bootia32.efi"
+d.setVar("SYSTEMD_BOOT_IMAGE", systemdimage)
+prefix = "systemd-" if prefix == "" else ""
+d.setVar("SYSTEMD_BOOT_IMAGE_PREFIX", prefix)
+}
+
+FILES_${PN} = "/boot/EFI/BOOT/${SYSTEMD_BOOT_IMAGE}"
+
+RDEPENDS_${PN} += "virtual/systemd-bootconf"
+
 # Imported from the old gummiboot recipe
 TUNE_CCARGS_remove = "-mfpmath=sse"
 COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"
@@ -29,12 +49,14 @@ do_compile() {
SYSTEMD_BOOT_EFI_ARCH="x64"
fi
 
-   oe_runmake systemd-boot${SYSTEMD_BOOT_EFI_ARCH}.efi
+   oe_runmake ${SYSTEMD_BOOT_IMAGE_PREFIX}${SYSTEMD_BOOT_IMAGE}
 }
 
 do_install() {
-   # Bypass systemd installation with a NOP
-   :
+   install -d ${D}/boot
+   install -d ${D}/boot/EFI
+   install -d ${D}/boot/EFI/BOOT
+   install ${B}/systemd-boot*.efi ${D}/boot/EFI/BOOT/${SYSTEMD_BOOT_IMAGE}
 }
 
 do_deploy () {
-- 
2.14.3

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3 17/21] layer.conf: add -bootconf recipes to SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS

2018-02-28 Thread California Sullivan
The bootloaders depend on these to be functional in the non-deploy case,
but changes in them don't require rebuilding of the packages.

Signed-off-by: California Sullivan 
---
 meta/conf/layer.conf | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/conf/layer.conf b/meta/conf/layer.conf
index 67820588d37..7193f113885 100644
--- a/meta/conf/layer.conf
+++ b/meta/conf/layer.conf
@@ -61,10 +61,12 @@ SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \
   initramfs-module-install->grub \
   initramfs-module-install->parted \
   initramfs-module-install->util-linux \
+  grub-efi->grub-bootconf \
   liberation-fonts->fontconfig \
   cantarell-fonts->fontconfig \
   gnome-icon-theme->librsvg \
   font-alias->font-util \
+  systemd-boot->systemd-bootconf \
   weston-init->weston \
   weston-init->kbd \
 "
-- 
2.14.3

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3 19/21] grub-efi-cfg.bbclass: Don't reference or set OVERRIDES

2018-02-28 Thread California Sullivan
There's no need to add to the local copy of overrides and then not do
anything with it.

Now that this function is being used in package creation it was causing
sstate issues as well, as MACHINE is always in OVERRIDES, so something
trivial such as the name of the MACHINE would cause the hash to change.

Signed-off-by: California Sullivan 
---
 meta/classes/grub-efi-cfg.bbclass | 6 --
 1 file changed, 6 deletions(-)

diff --git a/meta/classes/grub-efi-cfg.bbclass 
b/meta/classes/grub-efi-cfg.bbclass
index 85173c91fc3..d2226af97a7 100644
--- a/meta/classes/grub-efi-cfg.bbclass
+++ b/meta/classes/grub-efi-cfg.bbclass
@@ -87,13 +87,7 @@ python build_efi_cfg() {
 for label in labels.split():
 localdata = d.createCopy()
 
-overrides = localdata.getVar('OVERRIDES')
-if not overrides:
-bb.fatal('OVERRIDES not defined')
-
 for btype in btypes:
-localdata.setVar('OVERRIDES', label + ':' + overrides)
-
 cfgfile.write('\nmenuentry \'%s%s\'{\n' % (label, btype[0]))
 lb = label
 if label == "install":
-- 
2.14.3

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3 18/21] selftests: Add test case for booting a generic EFI boot partition image

2018-02-28 Thread California Sullivan
Simple test case that adds 'efi' to MACHINE_FEATURES, sets WKS_FILE to
"efi-bootdisk.wks.in", installed required boot items, and attempts to
boot the wic image.

Quick check to make sure that the feature actually works.

Signed-off-by: California Sullivan 
---
 meta/lib/oeqa/selftest/cases/efibootpartition.py | 45 
 1 file changed, 45 insertions(+)
 create mode 100644 meta/lib/oeqa/selftest/cases/efibootpartition.py

diff --git a/meta/lib/oeqa/selftest/cases/efibootpartition.py 
b/meta/lib/oeqa/selftest/cases/efibootpartition.py
new file mode 100644
index 000..0c832566965
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/efibootpartition.py
@@ -0,0 +1,45 @@
+# Based on runqemu.py test file
+#
+# Copyright (c) 2017 Wind River Systems, Inc.
+#
+
+import re
+
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import bitbake, runqemu, get_bb_var
+
+class GenericEFITest(OESelftestTestCase):
+"""EFI booting test class"""
+
+buffer = True
+cmd_common = "runqemu nographic serial wic ovmf"
+efi_provider = "systemd-boot"
+image = "core-image-minimal"
+machine = "qemux86-64"
+recipes_built = False
+
+@classmethod
+def setUpLocal(self):
+super(GenericEFITest, self).setUpLocal(self)
+
+self.write_config(self,
+"""
+EFI_PROVIDER = "%s"
+IMAGE_FSTYPES_pn-%s_append = " wic"
+MACHINE = "%s"
+MACHINE_FEATURES_append = " efi"
+WKS_FILE = "efi-bootdisk.wks.in"
+IMAGE_INSTALL_append = " grub-efi systemd-boot kernel-image-bzimage"
+"""
+% (self.efi_provider, self.image, self.machine))
+if not self.recipes_built:
+bitbake("ovmf")
+bitbake(self.image)
+self.recipes_built = True
+
+@classmethod
+def test_boot_efi(self):
+"""Test generic boot partition with qemu"""
+cmd = "%s %s" % (self.cmd_common, self.machine)
+with runqemu(self.image, ssh=False, launch_cmd=cmd) as qemu:
+self.assertTrue(qemu.runner.logged, "Failed: %s" % cmd)
-- 
2.14.3

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3 01/21] grub-efi.bbclass: split out configuration portion

2018-02-28 Thread California Sullivan
This part is useful on its own, whereas the whole class together is
specific for image-live.

Signed-off-by: California Sullivan 
---
 .../{grub-efi.bbclass => grub-efi-cfg.bbclass} |  40 ---
 meta/classes/grub-efi.bbclass  | 122 +
 2 files changed, 1 insertion(+), 161 deletions(-)
 copy meta/classes/{grub-efi.bbclass => grub-efi-cfg.bbclass} (76%)

diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi-cfg.bbclass
similarity index 76%
copy from meta/classes/grub-efi.bbclass
copy to meta/classes/grub-efi-cfg.bbclass
index 610479b85d1..730323c72e6 100644
--- a/meta/classes/grub-efi.bbclass
+++ b/meta/classes/grub-efi-cfg.bbclass
@@ -16,8 +16,6 @@
 # ${GRUB_TIMEOUT} - timeout before executing the deault label (optional)
 # ${GRUB_ROOT} - grub's root device.
 
-do_bootimg[depends] += "${MLPREFIX}grub-efi:do_deploy"
-
 GRUB_SERIAL ?= "console=ttyS0,115200"
 GRUB_CFG_VM = "${S}/grub_vm.cfg"
 GRUB_CFG_LIVE = "${S}/grub_live.cfg"
@@ -32,44 +30,6 @@ APPEND ?= ""
 # Need UUID utility code.
 inherit fs-uuid
 
-efi_populate() {
-   # DEST must be the root of the image so that EFIDIR is not
-   # nested under a top level directory.
-   DEST=$1
-
-   install -d ${DEST}${EFIDIR}
-
-   GRUB_IMAGE="grub-efi-bootia32.efi"
-   DEST_IMAGE="bootia32.efi"
-   if [ "${TARGET_ARCH}" = "x86_64" ]; then
-   GRUB_IMAGE="grub-efi-bootx64.efi"
-   DEST_IMAGE="bootx64.efi"
-   fi
-   install -m 0644 ${DEPLOY_DIR_IMAGE}/${GRUB_IMAGE} 
${DEST}${EFIDIR}/${DEST_IMAGE}
-   EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
-   printf 'fs0:%s\%s\n' "$EFIPATH" "$DEST_IMAGE" >${DEST}/startup.nsh
-
-   install -m 0644 ${GRUB_CFG} ${DEST}${EFIDIR}/grub.cfg
-}
-
-efi_iso_populate() {
-   iso_dir=$1
-   efi_populate $iso_dir
-   # Build a EFI directory to create efi.img
-   mkdir -p ${EFIIMGDIR}/${EFIDIR}
-   cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR}
-   cp $iso_dir/vmlinuz ${EFIIMGDIR}
-   EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
-   printf 'fs0:%s\%s\n' "$EFIPATH" "$GRUB_IMAGE" > ${EFIIMGDIR}/startup.nsh
-   if [ -f "$iso_dir/initrd" ] ; then
-   cp $iso_dir/initrd ${EFIIMGDIR}
-   fi
-}
-
-efi_hddimg_populate() {
-   efi_populate $1
-}
-
 python build_efi_cfg() {
 import sys
 
diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass
index 610479b85d1..4b5704c19cc 100644
--- a/meta/classes/grub-efi.bbclass
+++ b/meta/classes/grub-efi.bbclass
@@ -1,36 +1,4 @@
-# grub-efi.bbclass
-# Copyright (c) 2011, Intel Corporation.
-# All rights reserved.
-#
-# Released under the MIT license (see packages/COPYING)
-
-# Provide grub-efi specific functions for building bootable images.
-
-# External variables
-# ${INITRD} - indicates a list of filesystem images to concatenate and use as 
an initrd (optional)
-# ${ROOTFS} - indicates a filesystem image to include as the root filesystem 
(optional)
-# ${GRUB_GFXSERIAL} - set this to 1 to have graphics and serial in the boot 
menu
-# ${LABELS} - a list of targets for the automatic config
-# ${APPEND} - an override list of append strings for each label
-# ${GRUB_OPTS} - additional options to add to the config, ';' delimited # 
(optional)
-# ${GRUB_TIMEOUT} - timeout before executing the deault label (optional)
-# ${GRUB_ROOT} - grub's root device.
-
-do_bootimg[depends] += "${MLPREFIX}grub-efi:do_deploy"
-
-GRUB_SERIAL ?= "console=ttyS0,115200"
-GRUB_CFG_VM = "${S}/grub_vm.cfg"
-GRUB_CFG_LIVE = "${S}/grub_live.cfg"
-GRUB_TIMEOUT ?= "10"
-#FIXME: build this from the machine config
-GRUB_OPTS ?= "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"
-
-EFIDIR = "/EFI/BOOT"
-GRUB_ROOT ?= "${ROOT}"
-APPEND ?= ""
-
-# Need UUID utility code.
-inherit fs-uuid
+inherit grub-efi-cfg
 
 efi_populate() {
# DEST must be the root of the image so that EFIDIR is not
@@ -69,91 +37,3 @@ efi_iso_populate() {
 efi_hddimg_populate() {
efi_populate $1
 }
-
-python build_efi_cfg() {
-import sys
-
-workdir = d.getVar('WORKDIR')
-if not workdir:
-bb.error("WORKDIR not defined, unable to package")
-return
-
-gfxserial = d.getVar('GRUB_GFXSERIAL') or ""
-
-labels = d.getVar('LABELS')
-if not labels:
-bb.debug(1, "LABELS not defined, nothing to do")
-return
-
-if labels == []:
-bb.debug(1, "No labels, nothing to do")
-return
-
-cfile = d.getVar('GRUB_CFG')
-if not cfile:
-bb.fatal('Unable to read GRUB_CFG')
-
-try:
- cfgfile = open(cfile, 'w')
-except OSError:
-bb.fatal('Unable to open %s' % cfile)
-
-cfgfile.write('# Automatically created by OE\n')
-
-opts = d.getVar('GRUB_OPTS')
-if opts:
-for opt in opts.split(';'):
-cfgfile.write('%s\n' % opt)
-
-cfgfile.write('default=%s\n' % (labels.split()[0]))
-
-timeout = 

[OE-core] [PATCH v3 03/21] grub-efi: install to /boot/

2018-02-28 Thread California Sullivan
Since /boot/ will be recipe/package controlled now we can't just deploy.

Signed-off-by: California Sullivan 
---
 meta/recipes-bsp/grub/grub-bootconf_1.00.bb |  2 +-
 meta/recipes-bsp/grub/grub-efi_2.02.bb  | 34 +++--
 2 files changed, 28 insertions(+), 8 deletions(-)

diff --git a/meta/recipes-bsp/grub/grub-bootconf_1.00.bb 
b/meta/recipes-bsp/grub/grub-bootconf_1.00.bb
index d376fde68b1..750f8c808a8 100644
--- a/meta/recipes-bsp/grub/grub-bootconf_1.00.bb
+++ b/meta/recipes-bsp/grub/grub-bootconf_1.00.bb
@@ -23,7 +23,7 @@ do_install() {
install -d ${D}/boot
install -d ${D}/boot/EFI
install -d ${D}/boot/EFI/BOOT
-   install -m 0744 grub-bootconf ${D}/boot/EFI/BOOT/grub.cfg
+   install grub-bootconf ${D}/boot/EFI/BOOT/grub.cfg
 }
 
 FILES_${PN} = "/boot/EFI/BOOT/grub.cfg"
diff --git a/meta/recipes-bsp/grub/grub-efi_2.02.bb 
b/meta/recipes-bsp/grub/grub-efi_2.02.bb
index d5aa64c75f7..c5a68f01cef 100644
--- a/meta/recipes-bsp/grub/grub-efi_2.02.bb
+++ b/meta/recipes-bsp/grub/grub-efi_2.02.bb
@@ -3,7 +3,7 @@ require grub2.inc
 GRUBPLATFORM = "efi"
 
 DEPENDS_append_class-target = " grub-efi-native"
-RDEPENDS_${PN}_class-target = "diffutils freetype grub-common"
+RDEPENDS_${PN}_class-target = "diffutils freetype grub-common 
virtual/grub-bootconf"
 
 SRC_URI += " \
file://cfg \
@@ -36,6 +36,28 @@ EXTRA_OECONF += "--enable-efiemu=no"
 # and many other places in the grub code when compiled with some native gcc 
compilers (specifically, gentoo)
 CFLAGS_append_class-native = " -Wno-error=trampolines"
 
+do_mkimage() {
+   cd ${B}
+   # Search for the grub.cfg on the local boot media by using the
+   # built in cfg file provided via this recipe
+   grub-mkimage -c ../cfg -p /EFI/BOOT -d ./grub-core/ \
+  -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE} \
+  ${GRUB_BUILDIN}
+}
+
+addtask mkimage before do_install after do_compile
+
+do_mkimage_class-native() {
+   :
+}
+
+do_install_append_class-target() {
+   install -d ${D}/boot
+   install -d ${D}/boot/EFI
+   install -d ${D}/boot/EFI/BOOT
+   install -m 644 ${B}/${GRUB_IMAGE} ${D}/boot/EFI/BOOT/
+}
+
 do_install_class-native() {
install -d ${D}${bindir}
install -m 755 grub-mkimage ${D}${bindir}
@@ -57,11 +79,6 @@ GRUB_BUILDIN ?= "boot linux ext2 fat serial part_msdos 
part_gpt normal \
  efi_gop iso9660 configfile search loadenv test"
 
 do_deploy() {
-   # Search for the grub.cfg on the local boot media by using the
-   # built in cfg file provided via this recipe
-   grub-mkimage -c ../cfg -p /EFI/BOOT -d ./grub-core/ \
-  -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE} \
-  ${GRUB_BUILDIN}
install -m 644 ${B}/${GRUB_IMAGE} ${DEPLOYDIR}
 }
 
@@ -72,7 +89,10 @@ do_deploy_class-native() {
 addtask deploy after do_install before do_build
 
 FILES_${PN} = "${libdir}/grub/${GRUB_TARGET}-efi \
-"
+   ${datadir}/grub \
+   /boot/EFI/BOOT/${GRUB_IMAGE} \
+   "
+
 
 # 64-bit binaries are expected for the bootloader with an x32 userland
 INSANE_SKIP_${PN}_append_linux-gnux32 = " arch"
-- 
2.14.3

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3 21/21] maintainers.inc: add myself as -bootconf recipe maintainer

2018-02-28 Thread California Sullivan
Signed-off-by: California Sullivan 
---
 meta/conf/distro/include/maintainers.inc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/conf/distro/include/maintainers.inc 
b/meta/conf/distro/include/maintainers.inc
index 50392487903..ba5e6137e77 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -236,6 +236,7 @@ RECIPE_MAINTAINER_pn-gptfdisk = "Alexander Kanavin 

 RECIPE_MAINTAINER_pn-grep = "Denys Dmytriyenko "
 RECIPE_MAINTAINER_pn-groff = "Hongxu Jia "
 RECIPE_MAINTAINER_pn-grub = "Alexander Kanavin "
+RECIPE_MAINTAINER_pn-grub-bootconf = "California Sullivan 
"
 RECIPE_MAINTAINER_pn-grub-efi = "Alexander Kanavin 
"
 RECIPE_MAINTAINER_pn-gsettings-desktop-schemas = "Maxin B. John 
"
 RECIPE_MAINTAINER_pn-gst-examples = "Anuj Mittal "
@@ -683,6 +684,7 @@ RECIPE_MAINTAINER_pn-sysstat = "Chen Qi 
"
 RECIPE_MAINTAINER_pn-systemd = "Chen Qi "
 RECIPE_MAINTAINER_pn-systemd-boot = "Chen Qi "
 RECIPE_MAINTAINER_pn-systemd-bootchart = "Chen Qi "
+RECIPE_MAINTAINER_pn-systemd-bootconf = "California Sullivan 
"
 RECIPE_MAINTAINER_pn-systemd-compat-units = "Chen Qi "
 RECIPE_MAINTAINER_pn-systemd-serialgetty = "Chen Qi "
 RECIPE_MAINTAINER_pn-systemd-systemctl-native = "Chen Qi 
"
-- 
2.14.3

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3 05/21] packagegroup-core-boot: add bootloader to EFI systems

2018-02-28 Thread California Sullivan
Since the bootloader is now installed instead of added at image creation
time, this is necessary for booting.

Also set the default to grub-efi. This is done because a default of
grub-efi is already used by live-vm-common.bbclass, and in the event
that EFI_PROVIDER isn't defined errors would occur.

Signed-off-by: California Sullivan 
---
 meta/recipes-core/packagegroups/packagegroup-core-boot.bb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-core/packagegroups/packagegroup-core-boot.bb 
b/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
index 04bc0f2b693..0fcb8ba9193 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
@@ -23,6 +23,8 @@ VIRTUAL-RUNTIME_init_manager ?= "sysvinit"
 VIRTUAL-RUNTIME_initscripts ?= "initscripts"
 VIRTUAL-RUNTIME_keymaps ?= "keymaps"
 
+EFI_PROVIDER ??= "grub-efi"
+
 SYSVINIT_SCRIPTS = "${@bb.utils.contains('MACHINE_FEATURES', 'rtc', 
'${VIRTUAL-RUNTIME_base-utils-hwclock}', '', d)} \
 modutils-initscripts \
 init-ifupdown \
@@ -35,6 +37,7 @@ RDEPENDS_${PN} = "\
 ${VIRTUAL-RUNTIME_base-utils} \
 ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "${SYSVINIT_SCRIPTS}", 
"", d)} \
 ${@bb.utils.contains("MACHINE_FEATURES", "keyboard", 
"${VIRTUAL-RUNTIME_keymaps}", "", d)} \
+${@bb.utils.contains("MACHINE_FEATURES", "efi", "${EFI_PROVIDER}", "", d)} 
\
 netbase \
 ${VIRTUAL-RUNTIME_login_manager} \
 ${VIRTUAL-RUNTIME_init_manager} \
-- 
2.14.3

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3 06/21] live-vm-common.bbclass: Don't use vmlinuz or VM_DEFAULT_KERNEL

2018-02-28 Thread California Sullivan
I can't find VM_DEFAULT_KERNEL used anywhere else, and we should not be
statically installing the kernel as vmlinuz.

Signed-off-by: California Sullivan 
---
 meta/classes/live-vm-common.bbclass | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/meta/classes/live-vm-common.bbclass 
b/meta/classes/live-vm-common.bbclass
index e1d8b1843b6..714d6d4788c 100644
--- a/meta/classes/live-vm-common.bbclass
+++ b/meta/classes/live-vm-common.bbclass
@@ -33,18 +33,17 @@ inherit ${EFI_CLASS}
 inherit ${PCBIOS_CLASS}
 
 KERNEL_IMAGETYPE ??= "bzImage"
-VM_DEFAULT_KERNEL ??= "${KERNEL_IMAGETYPE}"
 
 populate_kernel() {
dest=$1
install -d $dest
 
# Install bzImage, initrd, and rootfs.img in DEST for all loaders to 
use.
-   bbnote "Trying to install ${DEPLOY_DIR_IMAGE}/${VM_DEFAULT_KERNEL} as 
$dest/vmlinuz"
-   if [ -e ${DEPLOY_DIR_IMAGE}/${VM_DEFAULT_KERNEL} ]; then
-   install -m 0644 ${DEPLOY_DIR_IMAGE}/${VM_DEFAULT_KERNEL} 
$dest/vmlinuz
+   bbnote "Trying to install ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} as 
$dest/${KERNEL_IMAGETYPE}"
+   if [ -e ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} ]; then
+   install -m 0644 ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} 
$dest/${KERNEL_IMAGETYPE}
else
-   bbwarn "${DEPLOY_DIR_IMAGE}/${VM_DEFAULT_KERNEL} doesn't exist"
+   bbwarn "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} doesn't exist"
fi
 
# initrd is made of concatenation of multiple filesystem images
-- 
2.14.3

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3 00/21] EFI image enhancements

2018-02-28 Thread California Sullivan
EFI images require a boot partition containing the bootloader, the
kernel, the bootloader configuration, and any other EFI binaries that
your platform needs. Currently, the boot partition is done at image
creation time rather than through packages, making it very difficult to
add to its contents. As an example, we currently have no way to make use
of the multiple kernel enhancement that was recently added.

We should instead be treating the boot partition like anything else and
be installing needed items via packages. This can be done by treating
the /boot/ directory as the boot partion, pointing wic at it via the
--rootfs-dir option for the EFI partition, and using the new
--exclude-path option to not include the contents of /boot/ in the main
rootfs. This is the kickstart file in patch 0008.

What's left is installing everything in the correct location, which is
what the majority of the remaining patches entails.

I reused the grub-efi and systemd-boot bbclasses to create the
configuration files, and one change that was required due to that is the
removal of the assumption that kernels are installed as "vmlinuz", which
was normal in the past. This change was needed in order to make use of
the new normal kernel install, where the default kernel is installed to
/boot/ as ${KERNEL_IMAGETYPE}.

This has some cascading effects and required changes in install scripts
as well, as they too assumed the kernel would be named vmlinuz. When
updating these I also added functionality allowing them to install
multiple kernels.

The image enhancements can be tested in qemu by adding the following to
your local.conf:
MACHINE="qemux86"
# or qemux86-64
WKS_FILE = "efi-bootdisk.wks.in"
MACHINE_FEATURES_append = " efi"
IMAGE_INSTALL_append = " grub-efi systemd-boot kernel-image-bzimage"
# kernel-image-bzimage is neccessary due to
# RDEPENDS_${KERNEL_PACKAGE_NAME}-base = "" in qemu.inc
IMAGE_FSTYPES_pn-core-image-minimal_append = " wic"

And then running the following:
bitbake core-image-minimal ovmf
runqemu wic ovmf

The image will contain two bootloaders in the boot partition, and will
boot successfully with either.

Please note that without setting the EFI_PROVIDER variable, neither
bootloader will be installed as the standard boot(x64|ia32), and will
have to be ran manually through the EFI shell.

There is still one unfortunate issue with this patchset - I wasn't able
to get random UUIDs working completely right before feature freeze, so
instead the bootconf recipes assume that the rootfs will be /dev/sda2.
This can be changed via the ROOT variable which originated from the
grub-efi.bbclass. For this reason, I'm not making the efi-bootdisk
kickstart file default for anything, only making it available for this
release.

The issue with random UUIDs is that both wic and the bootloader
configurations need the same random value, and wic needs it at parse
time in order to specify it in a kickstart file. This is doable, but a
little nasty, by writing a value to a file and adding helper functions
to assign that value to a variable. The issue here is package upgrades.
I know of no way to ensure that that file generated at parse time
persists between builds, and if someone tries to do a package upgrade on
thier configuration file that now has a different UUID, they would no
longer have the same UUID as their rootfs, causing boot failures.

One additional issue is that the kernel is installed to /boot/ in iso
and hddimgs, when the real kernel and bootloaders are in the separate
EFI partition. This can be fixed via the following patch and one
additional line of configuration for those image types:
http://lists.openembedded.org/pipermail/openembedded-core/2018-January/146828.html

Please review this patcheset and let me know of any issues you see or
encounter. Also, I have a contrib branch available to pull from here:
https://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=clsulliv/image-creation-sda2

A previous iteration including the UUID stuff that's not included here
is available at clsulliv/image-creation-exclude-path

Thanks,
Cal

V2 changes:
* ROOT is now overridable. Woops.
* Fix fixup in 'systemd-boot: add package that installs to boot' that
belonged in the systemd-bootconf recipe patch.
* Add -bootconf recipes to SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS to avoid
rebuilding grub-efi/systemd-boot when not necessary.
* Add basic test case that leverages the generic EFI boot partition.

V3 changes:
* Autobuilder testing revealed two failing tests with this patchset:

https://autobuilder.yocto.io/builders/nightly-oe-selftest/builds/858/steps/Running%20oe-selftest/logs/stdio
Patches 19-21 fix these.

California Sullivan (21):
  grub-efi.bbclass: split out configuration portion
  grub: create recipe for configuration
  grub-efi: install to /boot/
  grub-efi: if installed and EFI_PROVIDER, install as bootx64 or
bootia32
  packagegroup-core-boot: add bootloader to EFI systems
  live-vm-common.bbclass: Don't use 

[OE-core] [PATCH v3 04/21] grub-efi: if installed and EFI_PROVIDER, install as bootx64 or bootia32

2018-02-28 Thread California Sullivan
This way we could theoretically support multiple bootloaders, and we
keep the convention of boot(x64|ia32).

Signed-off-by: California Sullivan 
---
 meta/recipes-bsp/grub/grub-efi_2.02.bb | 13 -
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-bsp/grub/grub-efi_2.02.bb 
b/meta/recipes-bsp/grub/grub-efi_2.02.bb
index c5a68f01cef..ed27b90fdbc 100644
--- a/meta/recipes-bsp/grub/grub-efi_2.02.bb
+++ b/meta/recipes-bsp/grub/grub-efi_2.02.bb
@@ -15,16 +15,19 @@ S = "${WORKDIR}/grub-${PV}"
 python __anonymous () {
 import re
 target = d.getVar('TARGET_ARCH')
+prefix = "" if d.getVar('EFI_PROVIDER') == "grub-efi" else "grub-efi-"
 if target == "x86_64":
 grubtarget = 'x86_64'
-grubimage = "grub-efi-bootx64.efi"
+grubimage = prefix + "bootx64.efi"
 elif re.match('i.86', target):
 grubtarget = 'i386'
-grubimage = "grub-efi-bootia32.efi"
+grubimage = prefix + "bootia32.efi"
 else:
 raise bb.parse.SkipRecipe("grub-efi is incompatible with target %s" % 
target)
 d.setVar("GRUB_TARGET", grubtarget)
 d.setVar("GRUB_IMAGE", grubimage)
+prefix = "grub-efi-" if prefix == "" else ""
+d.setVar("GRUB_IMAGE_PREFIX", prefix)
 }
 
 inherit deploy
@@ -41,7 +44,7 @@ do_mkimage() {
# Search for the grub.cfg on the local boot media by using the
# built in cfg file provided via this recipe
grub-mkimage -c ../cfg -p /EFI/BOOT -d ./grub-core/ \
-  -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE} \
+  -O ${GRUB_TARGET}-efi -o 
./${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} \
   ${GRUB_BUILDIN}
 }
 
@@ -55,7 +58,7 @@ do_install_append_class-target() {
install -d ${D}/boot
install -d ${D}/boot/EFI
install -d ${D}/boot/EFI/BOOT
-   install -m 644 ${B}/${GRUB_IMAGE} ${D}/boot/EFI/BOOT/
+   install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} 
${D}/boot/EFI/BOOT/${GRUB_IMAGE}
 }
 
 do_install_class-native() {
@@ -79,7 +82,7 @@ GRUB_BUILDIN ?= "boot linux ext2 fat serial part_msdos 
part_gpt normal \
  efi_gop iso9660 configfile search loadenv test"
 
 do_deploy() {
-   install -m 644 ${B}/${GRUB_IMAGE} ${DEPLOYDIR}
+   install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} ${DEPLOYDIR}
 }
 
 do_deploy_class-native() {
-- 
2.14.3

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3 02/21] grub: create recipe for configuration

2018-02-28 Thread California Sullivan
This makes use of the grub-efi-cfg bbclass that was split out to create
a grub.cfg file just like the old one.

Signed-off-by: California Sullivan 
---
 meta/recipes-bsp/grub/grub-bootconf_1.00.bb | 29 +
 1 file changed, 29 insertions(+)
 create mode 100644 meta/recipes-bsp/grub/grub-bootconf_1.00.bb

diff --git a/meta/recipes-bsp/grub/grub-bootconf_1.00.bb 
b/meta/recipes-bsp/grub/grub-bootconf_1.00.bb
new file mode 100644
index 000..d376fde68b1
--- /dev/null
+++ b/meta/recipes-bsp/grub/grub-bootconf_1.00.bb
@@ -0,0 +1,29 @@
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = 
"file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+SUMMARY = "Basic grub.cfg for use in EFI systems"
+
+RPROVIDES_${PN} += "virtual/grub-bootconf"
+
+inherit grub-efi-cfg
+
+S = "${WORKDIR}"
+
+GRUB_CFG = "${S}/grub-bootconf"
+LABELS = "boot"
+
+ROOT ?= "root=/dev/sda2"
+
+python do_configure() {
+bb.build.exec_func('build_efi_cfg', d)
+}
+
+do_configure[vardeps] += "APPEND ROOT"
+
+do_install() {
+   install -d ${D}/boot
+   install -d ${D}/boot/EFI
+   install -d ${D}/boot/EFI/BOOT
+   install -m 0744 grub-bootconf ${D}/boot/EFI/BOOT/grub.cfg
+}
+
+FILES_${PN} = "/boot/EFI/BOOT/grub.cfg"
-- 
2.14.3

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 0/4] use qemuboot.json to replace qemuboot.conf

2018-02-28 Thread Robert Yang

Ping.

// Robert

On 02/02/2018 11:23 AM, Robert Yang wrote:

The qemuboot.conf uses configparser which can't suport upper case as key, and
json is more clearer than configparser and is widely used in oe-core, so use
qemuboot.json to replace qemuboot.conf.

// Robert

The following changes since commit a0988c3374e964170d1d24fc230306b887432d31:

   tcmode-default.inc: drop preferred version of gzip-native (2018-01-31 
17:01:12 +)

are available in the git repository at:

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

Robert Yang (4):
   qemuboot.bbclass: qemuboot.conf -> qemuboot.json
   runqemu: qemuboot.conf -> qemuboot.json
   runqemu: check for qemuboot.conf and raise error
   selftest/cases/runqemu.py: qemuboot.conf -> qemuboot.json

  meta/classes/qemuboot.bbclass   | 17 
  meta/lib/oeqa/selftest/cases/runqemu.py | 12 +++---
  scripts/runqemu | 73 +
  3 files changed, 52 insertions(+), 50 deletions(-)


--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] tune-octeon: change Octeon II to soft-float

2018-02-28 Thread Ruslan Babayev



0001-tune-octeon-change-Octeon-II-to-soft-float.patch
Description: Binary data
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3] opkg-utils: upgrade to version 0.3.6

2018-02-28 Thread Alejandro del Castillo
0.3.5 -> 0.3.6

Patches:
 - Add support for tar versions that don't support --sort
 - Use local time when setting the modication time on the archives

Signed-off-by: Alejandro del Castillo 
---
 ...rt-name-on-versions-of-tar-which-support-.patch | 54 ++
 ...Use-local-time-for-build_date-since-opkg-.patch | 47 +++
 .../opkg-utils/opkg-utils/tar_ignore_error.patch   | 13 +++---
 .../{opkg-utils_0.3.5.bb => opkg-utils_0.3.6.bb}   |  6 ++-
 4 files changed, 112 insertions(+), 8 deletions(-)
 create mode 100644 
meta/recipes-devtools/opkg-utils/opkg-utils/0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch
 create mode 100644 
meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Use-local-time-for-build_date-since-opkg-.patch
 rename meta/recipes-devtools/opkg-utils/{opkg-utils_0.3.5.bb => 
opkg-utils_0.3.6.bb} (88%)

diff --git 
a/meta/recipes-devtools/opkg-utils/opkg-utils/0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch
 
b/meta/recipes-devtools/opkg-utils/opkg-utils/0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch
new file mode 100644
index 00..4fbaa26d18
--- /dev/null
+++ 
b/meta/recipes-devtools/opkg-utils/opkg-utils/0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch
@@ -0,0 +1,54 @@
+From ef5db062b7d25e6070acc6922ea48f50491313b5 Mon Sep 17 00:00:00 2001
+From: Michael Hansen 
+Date: Mon, 26 Feb 2018 09:42:56 -0800
+Subject: [PATCH 1/2] Only use --sort=name on versions of tar which support it.
+ This fixes compatibility with bsdtar and old versions of GNU tar (e.g.
+ RHEL6).
+
+Upstream-Status: Backport
+
+Signed-off-by: Michael Hansen 
+Signed-off-by: Alejandro del Castillo 
+---
+ opkg-build | 11 ---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/opkg-build b/opkg-build
+index 265906f..094d69f 100755
+--- a/opkg-build
 b/opkg-build
+@@ -232,6 +232,11 @@ if [ $compressor = "gzip" ] ; then
+   compressorargs=$zipargs
+ fi
+ 
++tsortargs=
++if tar --help 2>&1 | grep -- "--sort=" > /dev/null; then
++  tsortargs="--sort=name"
++fi
++
+ shift $(($OPTIND - 1))
+ 
+ # continue on to process additional arguments
+@@ -280,8 +285,8 @@ mkdir $tmp_dir
+ build_date="$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" 
+%Y-%m-%d)"
+ 
+ echo $CONTROL > $tmp_dir/tarX
+-( cd $pkg_dir && tar $ogargs --sort=name --mtime=$build_date -X $tmp_dir/tarX 
-c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext )
+-( cd $pkg_dir/$CONTROL && tar $ogargs --sort=name --mtime=$build_date -c 
$tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz )
++( cd $pkg_dir && tar $ogargs $tsortargs --mtime=$build_date -X $tmp_dir/tarX 
-c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext )
++( cd $pkg_dir/$CONTROL && tar $ogargs $tsortargs --mtime=$build_date -c 
$tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz )
+ rm $tmp_dir/tarX
+ 
+ echo "2.0" > $tmp_dir/debian-binary
+@@ -296,7 +301,7 @@ rm -f $pkg_file
+ if [ "$outer" = "ar" ] ; then
+   ( cd $tmp_dir && ar -crfD $pkg_file ./debian-binary ./control.tar.gz 
./data.tar.$cext )
+ else
+-  ( cd $tmp_dir && tar -c --sort=name --mtime=$build_date $tarformat 
./debian-binary ./control.tar.gz ./data.tar.$cext | gzip $zipargs > $pkg_file )
++  ( cd $tmp_dir && tar -c $tsortargs --mtime=$build_date $tarformat 
./debian-binary ./control.tar.gz ./data.tar.$cext | gzip $zipargs > $pkg_file )
+ fi
+ 
+ rm $tmp_dir/debian-binary $tmp_dir/data.tar.$cext $tmp_dir/control.tar.gz
+-- 
+2.16.1
+
diff --git 
a/meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Use-local-time-for-build_date-since-opkg-.patch
 
b/meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Use-local-time-for-build_date-since-opkg-.patch
new file mode 100644
index 00..cfb9a77fb4
--- /dev/null
+++ 
b/meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Use-local-time-for-build_date-since-opkg-.patch
@@ -0,0 +1,47 @@
+From 5727826b51cf99feaff3483a9df8af2043e7efc1 Mon Sep 17 00:00:00 2001
+From: Michael Hansen 
+Date: Mon, 26 Feb 2018 10:17:01 -0800
+Subject: [PATCH 2/2] opkg-build: Use local time for build_date, since opkg
+ extracts files assuming local time rather than UTC. Also increase resolution
+ of build date down to the second, rather than clamping to midnight of the
+ current date.
+
+Upstream-Status: Backport
+
+Signed-off-by: Michael Hansen 
+Signed-off-by: Alejandro del Castillo 
+---
+ opkg-build | 8 
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/opkg-build b/opkg-build
+index 094d69f..0050c2b 100755
+--- a/opkg-build
 b/opkg-build
+@@ -282,11 +282,11 @@ fi
+ tmp_dir=$dest_dir/IPKG_BUILD.$$
+ mkdir $tmp_dir
+ 
+-build_date="$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" 

Re: [OE-core] [meta-oe][PATCH v3] libepoxy: New recipe updated to latest release

2018-02-28 Thread Peter Kjellerstedt
> -Original Message-
> From: openembedded-core-boun...@lists.openembedded.org
> [mailto:openembedded-core-boun...@lists.openembedded.org] On Behalf Of
> Francesco Giancane
> Sent: den 28 februari 2018 23:09
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [meta-oe][PATCH v3] libepoxy: New recipe updated to latest 
> release

This isn't in meta-oe, it's in meta. ;)

I suggest changing the subject to:

libepoxy: Update to 1.5.0

since it's not a new recipe, and "latest release" carries a lot 
less information than the actual version.

> libepoxy 1.4.3 did not compile successfully because of
> implicit symbol definitions and link-time errors.
> A new recipe with latest libepoxy release (1.5.0) which
> successfully compiles is provided.

I'd remove the second sentence. All that information is 
conveyed by the updated subject anyway.

> Patch to disable 'dlvsym' has also been forward-ported
> to be applicable to version 1.5.0.
> The patch 'Add-fallback-definition-for-EGL-CAST.patch' is
> mainline now; thus it can be safely removed.
> Also, the patch
> 0001-Define-MESA_EGL_NO_X11_HEADERS-before-including-eglp.patch
> is no longer required since mainline fixed this too.
> 
> Signed-off-by: Francesco Giancane 
> ---
>  ..._EGL_NO_X11_HEADERS-before-including-eglp.patch | 30 
>  ...sible-to-disable-the-use-of-dlvsym-needed.patch | 26 +
>  .../Add-fallback-definition-for-EGL-CAST.patch | 33 
> --
>  .../{libepoxy_1.4.3.bb => libepoxy_1.5.0.bb}   | 10 +++
>  4 files changed, 18 insertions(+), 81 deletions(-)
>  delete mode 100644 
> meta/recipes-graphics/libepoxy/libepoxy/0001-Define-MESA_EGL_NO_X11_HEADERS-before-including-eglp.patch
>  delete mode 100644 
> meta/recipes-graphics/libepoxy/libepoxy/Add-fallback-definition-for-EGL-CAST.patch
>  rename meta/recipes-graphics/libepoxy/{libepoxy_1.4.3.bb => 
> libepoxy_1.5.0.bb} (61%)
> 
> diff --git 
> a/meta/recipes-graphics/libepoxy/libepoxy/0001-Define-MESA_EGL_NO_X11_HEADERS-before-including-eglp.patch
>  
> b/meta/recipes-graphics/libepoxy/libepoxy/0001-Define-MESA_EGL_NO_X11_HEADERS-before-including-eglp.patch
> deleted file mode 100644
> index ebe5754a7a..00
> --- 
> a/meta/recipes-graphics/libepoxy/libepoxy/0001-Define-MESA_EGL_NO_X11_HEADERS-before-including-eglp.patch
> +++ /dev/null
> @@ -1,30 +0,0 @@
> -From 62e178ddae24c7633d2a03b129dc52261e0a15bf Mon Sep 17 00:00:00 2001
> -From: Khem Raj 
> -Date: Wed, 7 Feb 2018 00:48:03 -0800
> -Subject: [PATCH] Define MESA_EGL_NO_X11_HEADERS before including 
> eglplatform.h
> - when X11 is disabled
> -
> -This helps in compiling when GL implementations e.g. mesa use
> -this define to exclude X11 headers
> -
> -Signed-off-by: Khem Raj 
> 
> -Upstream-Status: Submitted
> [https://github.com/anholt/libepoxy/pull/153]
> -
> - src/dispatch_common.h | 3 +++
> - 1 file changed, 3 insertions(+)
> -
> -Index: libepoxy-1.4.3/src/dispatch_common.h
> -===
>  libepoxy-1.4.3.orig/src/dispatch_common.h
> -+++ libepoxy-1.4.3/src/dispatch_common.h
> -@@ -46,6 +46,9 @@
> - #include "epoxy/glx.h"
> - #endif
> - #if PLATFORM_HAS_EGL
> -+#if !PLATFORM_HAS_GLX
> -+#define MESA_EGL_NO_X11_HEADERS 1
> -+#endif
> - #include "epoxy/egl.h"
> - #endif
> - #if PLATFORM_HAS_WGL
> diff --git 
> a/meta/recipes-graphics/libepoxy/libepoxy/0001-Make-it-possible-to-disable-the-use-of-dlvsym-needed.patch
>  
> b/meta/recipes-graphics/libepoxy/libepoxy/0001-Make-it-possible-to-disable-the-use-of-dlvsym-needed.patch
> index c2a2fa3453..5bddc12033 100644
> --- 
> a/meta/recipes-graphics/libepoxy/libepoxy/0001-Make-it-possible-to-disable-the-use-of-dlvsym-needed.patch
> +++ 
> b/meta/recipes-graphics/libepoxy/libepoxy/0001-Make-it-possible-to-disable-the-use-of-dlvsym-needed.patch
> @@ -1,36 +1,38 @@
> -From 7bcefd311cd696955376fe2c5298ec85e8f954ce Mon Sep 17 00:00:00 2001
> -From: Alexander Kanavin 
> -Date: Wed, 15 Nov 2017 12:48:27 +0200
> +From 9c964427656ef71210e2c5b48b279857806574e9 Mon Sep 17 00:00:00 2001
> +From: Francesco Giancane 
> +Date: Wed, 28 Feb 2018 21:32:24 +0100
>  Subject: [PATCH] Make it possible to disable the use of dlvsym() (needed for
>   musl)
> 
> -Upstream-Status: Pending

Don't remove the Upstream-Status.

> -Signed-off-by: Alexander Kanavin 
> +Add a patch to work around absence of dlvsym() on musl
> +(wasn't previously a problem as autotools weren't building tests by default)
> 
> +Signed-off-by: Alexander Kanavin 
> +Signed-off-by: Francesco Giancane 
>  ---
>   meson_options.txt | 3 +++
>   test/meson.build  | 6 +++---
>   2 files changed, 6 insertions(+), 3 deletions(-)
> 
>  diff --git a/meson_options.txt b/meson_options.txt
> -index 

Re: [OE-core] [meta-oe][PATCH v3] libepoxy: New recipe updated to latest release

2018-02-28 Thread Francesco Giancane
Hi,

Sorry again. The patch was based on openembedded-core rather than poky, and
this is why the patchwork failed to apply it.
This should be the last one.

Thanks for the patience,

Francesco Giancane


2018-02-28 23:08 GMT+01:00 Francesco Giancane 
:

> libepoxy 1.4.3 did not compile successfully because of
> implicit symbol definitions and link-time errors.
> A new recipe with latest libepoxy release (1.5.0) which
> successfully compiles is provided.
>
> Patch to disable 'dlvsym' has also been forward-ported
> to be applicable to version 1.5.0.
> The patch 'Add-fallback-definition-for-EGL-CAST.patch' is
> mainline now; thus it can be safely removed.
> Also, the patch
> 0001-Define-MESA_EGL_NO_X11_HEADERS-before-including-eglp.patch
> is no longer required since mainline fixed this too.
>
> Signed-off-by: Francesco Giancane 
> ---
>  ..._EGL_NO_X11_HEADERS-before-including-eglp.patch | 30
> 
>  ...sible-to-disable-the-use-of-dlvsym-needed.patch | 26 +
>  .../Add-fallback-definition-for-EGL-CAST.patch | 33
> --
>  .../{libepoxy_1.4.3.bb => libepoxy_1.5.0.bb}   | 10 +++
>  4 files changed, 18 insertions(+), 81 deletions(-)
>  delete mode 100644 meta/recipes-graphics/libepoxy/libepoxy/0001-Define-
> MESA_EGL_NO_X11_HEADERS-before-including-eglp.patch
>  delete mode 100644 meta/recipes-graphics/libepoxy/libepoxy/Add-
> fallback-definition-for-EGL-CAST.patch
>  rename meta/recipes-graphics/libepoxy/{libepoxy_1.4.3.bb =>
> libepoxy_1.5.0.bb} (61%)
>
> diff --git a/meta/recipes-graphics/libepoxy/libepoxy/0001-Define-
> MESA_EGL_NO_X11_HEADERS-before-including-eglp.patch
> b/meta/recipes-graphics/libepoxy/libepoxy/0001-Define-
> MESA_EGL_NO_X11_HEADERS-before-including-eglp.patch
> deleted file mode 100644
> index ebe5754a7a..00
> --- a/meta/recipes-graphics/libepoxy/libepoxy/0001-Define-
> MESA_EGL_NO_X11_HEADERS-before-including-eglp.patch
> +++ /dev/null
> @@ -1,30 +0,0 @@
> -From 62e178ddae24c7633d2a03b129dc52261e0a15bf Mon Sep 17 00:00:00 2001
> -From: Khem Raj 
> -Date: Wed, 7 Feb 2018 00:48:03 -0800
> -Subject: [PATCH] Define MESA_EGL_NO_X11_HEADERS before including
> eglplatform.h
> - when X11 is disabled
> -
> -This helps in compiling when GL implementations e.g. mesa use
> -this define to exclude X11 headers
> -
> -Signed-off-by: Khem Raj 
> 
> -Upstream-Status: Submitted [https://github.com/anholt/libepoxy/pull/153]
> -
> - src/dispatch_common.h | 3 +++
> - 1 file changed, 3 insertions(+)
> -
> -Index: libepoxy-1.4.3/src/dispatch_common.h
> -===
>  libepoxy-1.4.3.orig/src/dispatch_common.h
> -+++ libepoxy-1.4.3/src/dispatch_common.h
> -@@ -46,6 +46,9 @@
> - #include "epoxy/glx.h"
> - #endif
> - #if PLATFORM_HAS_EGL
> -+#if !PLATFORM_HAS_GLX
> -+#define MESA_EGL_NO_X11_HEADERS 1
> -+#endif
> - #include "epoxy/egl.h"
> - #endif
> - #if PLATFORM_HAS_WGL
> diff --git a/meta/recipes-graphics/libepoxy/libepoxy/0001-Make-
> it-possible-to-disable-the-use-of-dlvsym-needed.patch
> b/meta/recipes-graphics/libepoxy/libepoxy/0001-Make-
> it-possible-to-disable-the-use-of-dlvsym-needed.patch
> index c2a2fa3453..5bddc12033 100644
> --- a/meta/recipes-graphics/libepoxy/libepoxy/0001-Make-
> it-possible-to-disable-the-use-of-dlvsym-needed.patch
> +++ b/meta/recipes-graphics/libepoxy/libepoxy/0001-Make-
> it-possible-to-disable-the-use-of-dlvsym-needed.patch
> @@ -1,36 +1,38 @@
> -From 7bcefd311cd696955376fe2c5298ec85e8f954ce Mon Sep 17 00:00:00 2001
> -From: Alexander Kanavin 
> -Date: Wed, 15 Nov 2017 12:48:27 +0200
> +From 9c964427656ef71210e2c5b48b279857806574e9 Mon Sep 17 00:00:00 2001
> +From: Francesco Giancane 
> +Date: Wed, 28 Feb 2018 21:32:24 +0100
>  Subject: [PATCH] Make it possible to disable the use of dlvsym() (needed
> for
>   musl)
>
> -Upstream-Status: Pending
> -Signed-off-by: Alexander Kanavin 
> +Add a patch to work around absence of dlvsym() on musl
> +(wasn't previously a problem as autotools weren't building tests by
> default)
>
> +Signed-off-by: Alexander Kanavin 
> +Signed-off-by: Francesco Giancane 
>  ---
>   meson_options.txt | 3 +++
>   test/meson.build  | 6 +++---
>   2 files changed, 6 insertions(+), 3 deletions(-)
>
>  diff --git a/meson_options.txt b/meson_options.txt
> -index 244476a..071f0b6 100644
> +index b5d7c98..aa849c2 100644
>  --- a/meson_options.txt
>  +++ b/meson_options.txt
>  @@ -1,6 +1,9 @@
> - option('enable-docs',
> + option('docs',
>  type: 'boolean', value: false,
>  description: 'Enable generating the Epoxy API reference (depends
> on Doxygen)')
>  +option('has-dlvsym',
>  +   type: 'boolean', value: true,
>  +   description: 'Whether dlvsym() is available 

[OE-core] [meta-oe][PATCH v3] libepoxy: New recipe updated to latest release

2018-02-28 Thread Francesco Giancane
libepoxy 1.4.3 did not compile successfully because of
implicit symbol definitions and link-time errors.
A new recipe with latest libepoxy release (1.5.0) which
successfully compiles is provided.

Patch to disable 'dlvsym' has also been forward-ported
to be applicable to version 1.5.0.
The patch 'Add-fallback-definition-for-EGL-CAST.patch' is
mainline now; thus it can be safely removed.
Also, the patch
0001-Define-MESA_EGL_NO_X11_HEADERS-before-including-eglp.patch
is no longer required since mainline fixed this too.

Signed-off-by: Francesco Giancane 
---
 ..._EGL_NO_X11_HEADERS-before-including-eglp.patch | 30 
 ...sible-to-disable-the-use-of-dlvsym-needed.patch | 26 +
 .../Add-fallback-definition-for-EGL-CAST.patch | 33 --
 .../{libepoxy_1.4.3.bb => libepoxy_1.5.0.bb}   | 10 +++
 4 files changed, 18 insertions(+), 81 deletions(-)
 delete mode 100644 
meta/recipes-graphics/libepoxy/libepoxy/0001-Define-MESA_EGL_NO_X11_HEADERS-before-including-eglp.patch
 delete mode 100644 
meta/recipes-graphics/libepoxy/libepoxy/Add-fallback-definition-for-EGL-CAST.patch
 rename meta/recipes-graphics/libepoxy/{libepoxy_1.4.3.bb => libepoxy_1.5.0.bb} 
(61%)

diff --git 
a/meta/recipes-graphics/libepoxy/libepoxy/0001-Define-MESA_EGL_NO_X11_HEADERS-before-including-eglp.patch
 
b/meta/recipes-graphics/libepoxy/libepoxy/0001-Define-MESA_EGL_NO_X11_HEADERS-before-including-eglp.patch
deleted file mode 100644
index ebe5754a7a..00
--- 
a/meta/recipes-graphics/libepoxy/libepoxy/0001-Define-MESA_EGL_NO_X11_HEADERS-before-including-eglp.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 62e178ddae24c7633d2a03b129dc52261e0a15bf Mon Sep 17 00:00:00 2001
-From: Khem Raj 
-Date: Wed, 7 Feb 2018 00:48:03 -0800
-Subject: [PATCH] Define MESA_EGL_NO_X11_HEADERS before including eglplatform.h
- when X11 is disabled
-
-This helps in compiling when GL implementations e.g. mesa use
-this define to exclude X11 headers
-
-Signed-off-by: Khem Raj 

-Upstream-Status: Submitted [https://github.com/anholt/libepoxy/pull/153]
-
- src/dispatch_common.h | 3 +++
- 1 file changed, 3 insertions(+)
-
-Index: libepoxy-1.4.3/src/dispatch_common.h
-===
 libepoxy-1.4.3.orig/src/dispatch_common.h
-+++ libepoxy-1.4.3/src/dispatch_common.h
-@@ -46,6 +46,9 @@
- #include "epoxy/glx.h"
- #endif
- #if PLATFORM_HAS_EGL
-+#if !PLATFORM_HAS_GLX
-+#define MESA_EGL_NO_X11_HEADERS 1
-+#endif
- #include "epoxy/egl.h"
- #endif
- #if PLATFORM_HAS_WGL
diff --git 
a/meta/recipes-graphics/libepoxy/libepoxy/0001-Make-it-possible-to-disable-the-use-of-dlvsym-needed.patch
 
b/meta/recipes-graphics/libepoxy/libepoxy/0001-Make-it-possible-to-disable-the-use-of-dlvsym-needed.patch
index c2a2fa3453..5bddc12033 100644
--- 
a/meta/recipes-graphics/libepoxy/libepoxy/0001-Make-it-possible-to-disable-the-use-of-dlvsym-needed.patch
+++ 
b/meta/recipes-graphics/libepoxy/libepoxy/0001-Make-it-possible-to-disable-the-use-of-dlvsym-needed.patch
@@ -1,36 +1,38 @@
-From 7bcefd311cd696955376fe2c5298ec85e8f954ce Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin 
-Date: Wed, 15 Nov 2017 12:48:27 +0200
+From 9c964427656ef71210e2c5b48b279857806574e9 Mon Sep 17 00:00:00 2001
+From: Francesco Giancane 
+Date: Wed, 28 Feb 2018 21:32:24 +0100
 Subject: [PATCH] Make it possible to disable the use of dlvsym() (needed for
  musl)
 
-Upstream-Status: Pending
-Signed-off-by: Alexander Kanavin 
+Add a patch to work around absence of dlvsym() on musl
+(wasn't previously a problem as autotools weren't building tests by default)
 
+Signed-off-by: Alexander Kanavin 
+Signed-off-by: Francesco Giancane 
 ---
  meson_options.txt | 3 +++
  test/meson.build  | 6 +++---
  2 files changed, 6 insertions(+), 3 deletions(-)
 
 diff --git a/meson_options.txt b/meson_options.txt
-index 244476a..071f0b6 100644
+index b5d7c98..aa849c2 100644
 --- a/meson_options.txt
 +++ b/meson_options.txt
 @@ -1,6 +1,9 @@
- option('enable-docs',
+ option('docs',
 type: 'boolean', value: false,
 description: 'Enable generating the Epoxy API reference (depends on 
Doxygen)')
 +option('has-dlvsym',
 +   type: 'boolean', value: true,
 +   description: 'Whether dlvsym() is available (it is not when using musl 
C library)')
- option('enable-glx',
+ option('glx',
 type: 'combo',
 choices: [ 'auto', 'yes', 'no' ],
 diff --git a/test/meson.build b/test/meson.build
-index 2340fc6..bc4330b 100644
+index c5788b4..4c46ae6 100644
 --- a/test/meson.build
 +++ b/test/meson.build
-@@ -86,8 +86,8 @@ if build_glx
+@@ -92,8 +92,8 @@ if build_glx
  [ 'glx_has_extension_nocontext', [ 'glx_has_extension_nocontext.c' ], [], 
[], true ],
  [ 'glx_static', [ 'glx_static.c' 

[OE-core] ✗ patchtest: failure for libepoxy: New recipe updated to latest release (rev2)

2018-02-28 Thread Patchwork
== Series Details ==

Series: libepoxy: New recipe updated to latest release (rev2)
Revision: 2
URL   : https://patchwork.openembedded.org/series/11150/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Patch[meta-oe,v2] libepoxy: New recipe updated to latest release
 Issue Series sent to the wrong mailing list 
[test_target_mailing_list] 
  Suggested fixCheck the project's README (meta-oe,v2) and send the patch 
to the indicated list

* Issue Series does not apply on top of target branch 
[test_series_merge_on_head] 
  Suggested fixRebase your series on top of targeted branch
  Targeted branch  master (currently at b30153a157)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines: 
https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v2] kernel-devsrc: restructure for out of tree (and on target) module builds

2018-02-28 Thread Bruce Ashfield

On 2018-02-28 4:10 PM, Mark Hatle wrote:

One question, below inline:

On 2/28/18 1:20 PM, Bruce Ashfield wrote:

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

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

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

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

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

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

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

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

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

[YOCTO #12535]

Signed-off-by: Bruce Ashfield 
---

  v2: fix arch/arm devsrc builds

  The arch conditional code for ARM was using invalid variables for the
  current version of the recipe. Those are now fixed, and we can package
  for ARM.

  meta/recipes-kernel/linux/kernel-devsrc.bb | 178 ++---
  1 file changed, 138 insertions(+), 40 deletions(-)

diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb 
b/meta/recipes-kernel/linux/kernel-devsrc.bb
index c1b5b7786d7c..738290ac2dc3 100644
--- a/meta/recipes-kernel/linux/kernel-devsrc.bb
+++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
@@ -30,50 +30,148 @@ do_populate_sysroot[noexec] = "1"
  S = "${STAGING_KERNEL_DIR}"
  B = "${STAGING_KERNEL_BUILDDIR}"
  
-KERNEL_VERSION = "${@get_kernelversion_headers('${S}')}"

-


I see this is removed, but later items reference KERNEL_VERSION.  Is that
defined elsewhere?


Yup. It comes from the base classes. That variable in the current
form, is actually empty.

Bruce



--Mark


  PACKAGE_ARCH = "${MACHINE_ARCH}"
  
+KERNEL_BUILD_ROOT="/lib/modules/"

+
  do_install() {
-kerneldir=${D}${KERNEL_SRC_PATH}
-install -d $kerneldir
-
-#
-# Copy the staging dir source (and module build support) into the 
devsrc structure.
-# We can keep this copy simple and take everything, since a we'll 
clean up any build
-# artifacts afterwards, and the extra i/o is not significant
-#
-cd ${B}
-find . -type d -name '.git*' -prune -o -path '.debug' -prune -o -type 
f -print0 | cpio --null -pdlu $kerneldir
-cd ${S}
-   find . -type d -name '.git*' -prune -o -type d -name '.kernel-meta' 
-prune -o -type f -print0 | cpio --null -pdlu $kerneldir
-
-# Explicitly set KBUILD_OUTPUT to ensure that the image directory is 
cleaned and not
-# The main build artifacts. We clean the directory to avoid QA errors 
on mismatched
-# architecture (since scripts and helpers are native format).
-KBUILD_OUTPUT="$kerneldir"
-oe_runmake -C $kerneldir CC="${KERNEL_CC}" LD="${KERNEL_LD}" clean 
_mrproper_scripts
-# make clean generates an absolute path symlink called "source"
-# in $kerneldir points to $kerneldir, which doesn't make any
-# sense, so remove it.
-if [ -L $kerneldir/source ]; then
-bbnote "Removing $kerneldir/source symlink"
-rm -f $kerneldir/source
-fi
-
-# As of Linux kernel version 3.0.1, the clean target removes
-# arch/powerpc/lib/crtsavres.o which is present in
-# KBUILD_LDFLAGS_MODULE, making it required to build external modules.
-if [ ${ARCH} = "powerpc" ]; then
-mkdir -p $kerneldir/arch/powerpc/lib/
-cp ${B}/arch/powerpc/lib/crtsavres.o 
$kerneldir/arch/powerpc/lib/crtsavres.o
-fi
-
-chown -R root:root ${D}
+kerneldir=${D}${KERNEL_BUILD_ROOT}${KERNEL_VERSION}
+install -d $kerneldir
+
+# create the directory structure
+rm -f $kerneldir/build
+rm -f $kerneldir/source
+mkdir -p $kerneldir/build
+
+# for compatibility with some older variants of this package, we
+# create  a /usr/src/kernel symlink to /lib/modules//source

Re: [OE-core] [PATCH v2] kernel-devsrc: restructure for out of tree (and on target) module builds

2018-02-28 Thread Mark Hatle
One question, below inline:

On 2/28/18 1:20 PM, Bruce Ashfield wrote:
> The existing kernel-devsrc package starts with a full copy of the kernel
> source and then starts to strip out elements that are not required.
> 
> This results in extra time (I/O) and extra space being taken up in the
> final package. The main purpose of the kernel-devsrc package has been to
> build modules against the running kernel, not to include a full copy of
> the source code for re-building the kernel. The end result was a
> 600M kernel-devsrc package.
> 
> This restructuring of the package uses an approach similar to other
> distros, where the kernel-devsrc package is for building against the
> running kernel and uses a curated set of copied infrastructure, versus
> a mass copy of the entire kernel.
> 
> The differences in this approach versus other is largely due to the
> architecture support and the split build/source directory of the
> kernel.
> 
> The result is a kernel-devsrc package of about 10M, which is capable
> of running "make scripts" and compiling kernel modules against the
> running kernel.
> 
> Along with the changes to the copying of the infrascture, we also
> have the following changes:
> 
>  - a better/more explicit listing of dependencies for on-target
>builds of "make scripts" or "make modules_prepare"
> 
>  - The kernel source is installed into /lib/modules//build
>and a symlink created from /usr/src/kernel to the new location.
>This aligns with the standard location for module support
>code
> 
>  - There is also a symlink from /lib/modules//source -> build
>to reserve a spot for a new package that is simply the kernel
>source. That package is not part of this update.
> 
> [YOCTO #12535]
> 
> Signed-off-by: Bruce Ashfield 
> ---
> 
>  v2: fix arch/arm devsrc builds
> 
>  The arch conditional code for ARM was using invalid variables for the
>  current version of the recipe. Those are now fixed, and we can package
>  for ARM.
> 
>  meta/recipes-kernel/linux/kernel-devsrc.bb | 178 
> ++---
>  1 file changed, 138 insertions(+), 40 deletions(-)
> 
> diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb 
> b/meta/recipes-kernel/linux/kernel-devsrc.bb
> index c1b5b7786d7c..738290ac2dc3 100644
> --- a/meta/recipes-kernel/linux/kernel-devsrc.bb
> +++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
> @@ -30,50 +30,148 @@ do_populate_sysroot[noexec] = "1"
>  S = "${STAGING_KERNEL_DIR}"
>  B = "${STAGING_KERNEL_BUILDDIR}"
>  
> -KERNEL_VERSION = "${@get_kernelversion_headers('${S}')}"
> -

I see this is removed, but later items reference KERNEL_VERSION.  Is that
defined elsewhere?

--Mark

>  PACKAGE_ARCH = "${MACHINE_ARCH}"
>  
> +KERNEL_BUILD_ROOT="/lib/modules/"
> +
>  do_install() {
> -kerneldir=${D}${KERNEL_SRC_PATH}
> -install -d $kerneldir
> -
> -#
> -# Copy the staging dir source (and module build support) into the 
> devsrc structure.
> -# We can keep this copy simple and take everything, since a we'll 
> clean up any build
> -# artifacts afterwards, and the extra i/o is not significant
> -#
> -cd ${B}
> -find . -type d -name '.git*' -prune -o -path '.debug' -prune -o 
> -type f -print0 | cpio --null -pdlu $kerneldir
> -cd ${S}
> - find . -type d -name '.git*' -prune -o -type d -name '.kernel-meta' 
> -prune -o -type f -print0 | cpio --null -pdlu $kerneldir
> -
> -# Explicitly set KBUILD_OUTPUT to ensure that the image directory is 
> cleaned and not
> -# The main build artifacts. We clean the directory to avoid QA 
> errors on mismatched
> -# architecture (since scripts and helpers are native format).
> -KBUILD_OUTPUT="$kerneldir"
> -oe_runmake -C $kerneldir CC="${KERNEL_CC}" LD="${KERNEL_LD}" clean 
> _mrproper_scripts
> -# make clean generates an absolute path symlink called "source"
> -# in $kerneldir points to $kerneldir, which doesn't make any
> -# sense, so remove it.
> -if [ -L $kerneldir/source ]; then
> -bbnote "Removing $kerneldir/source symlink"
> -rm -f $kerneldir/source
> -fi
> -
> -# As of Linux kernel version 3.0.1, the clean target removes
> -# arch/powerpc/lib/crtsavres.o which is present in
> -# KBUILD_LDFLAGS_MODULE, making it required to build external 
> modules.
> -if [ ${ARCH} = "powerpc" ]; then
> -mkdir -p $kerneldir/arch/powerpc/lib/
> -cp ${B}/arch/powerpc/lib/crtsavres.o 
> $kerneldir/arch/powerpc/lib/crtsavres.o
> -fi
> -
> -chown -R root:root ${D}
> +kerneldir=${D}${KERNEL_BUILD_ROOT}${KERNEL_VERSION}
> +install -d $kerneldir
> +
> +# create the directory structure
> +rm -f $kerneldir/build
> +rm -f $kerneldir/source
> +mkdir -p $kerneldir/build
> +
> +# for compatibility with some older variants of this 

[OE-core] ✗ patchtest: failure for glibc: Enable static PIE support

2018-02-28 Thread Patchwork
== Series Details ==

Series: glibc: Enable static PIE support
Revision: 1
URL   : https://patchwork.openembedded.org/series/11152/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue Series does not apply on top of target branch 
[test_series_merge_on_head] 
  Suggested fixRebase your series on top of targeted branch
  Targeted branch  master (currently at b30153a157)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines: 
https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] ✗ patchtest: failure for opkg & opkg-utils upgrade to 0.3.6 (rev2)

2018-02-28 Thread Patchwork
== Series Details ==

Series: opkg & opkg-utils upgrade to 0.3.6 (rev2)
Revision: 2
URL   : https://patchwork.openembedded.org/series/11058/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue Added patch file is missing Upstream-Status in the header 
[test_upstream_status_presence_format] 
  Suggested fixAdd Upstream-Status:  to the header of 
meta/recipes-devtools/opkg-utils/opkg-utils/0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch
  Standard format  Upstream-Status: 
  Valid status Pending, Accepted, Backport, Denied, Inappropriate [reason], 
Submitted [where]



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines: 
https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [meta-oe][PATCH] libepoxy: New recipe updated to latest release

2018-02-28 Thread Francesco Giancane
Hi,

Thank you for the review.
I took the opportunity to re-check my patch, as requested:
- removed old version;
- updated the patches for 1.5.0 version of the library;
- fixed configure-time flags;
- tested again.

Everything seems OK now.

a PATCH v2 shall follow.

Thanks,
Francesco Giancane

2018-02-28 20:58 GMT+01:00 Burton, Ross :

> Please also delete the old release.
>
> Ross
>
> On 28 February 2018 at 18:42, Francesco Giancane <
> francescogianca...@gmail.com> wrote:
>
>> libepoxy 1.4.3 did not compile successfully because of
>> implicit symbol definitions and link-time errors.
>> A new recipe with latest libepoxy release (1.5.0) which
>> successfully compiles is provided.
>>
>> Signed-off-by: Francesco Giancane 
>> ---
>>  meta/recipes-graphics/libepoxy/libepoxy_1.5.0.bb | 24
>> 
>>  1 file changed, 24 insertions(+)
>>  create mode 100644 meta/recipes-graphics/libepoxy/libepoxy_1.5.0.bb
>>
>> diff --git a/meta/recipes-graphics/libepoxy/libepoxy_1.5.0.bb
>> b/meta/recipes-graphics/libepoxy/libepoxy_1.5.0.bb
>> new file mode 100644
>> index 00..d7702cfd64
>> --- /dev/null
>> +++ b/meta/recipes-graphics/libepoxy/libepoxy_1.5.0.bb
>> @@ -0,0 +1,24 @@
>> +SUMMARY = "OpenGL function pointer management library"
>> +HOMEPAGE = "https://github.com/anholt/libepoxy/;
>> +SECTION = "libs"
>> +
>> +LICENSE = "MIT"
>> +LIC_FILES_CHKSUM = "file://COPYING;md5=58ef4c80d401e07bd9ee8b6b58cf464b"
>> +
>> +SRC_URI = "https://github.com/anholt/${BPN}/releases/download/${PV}/${
>> BP}.tar.xz \
>> +   "
>> +SRC_URI[md5sum] = "63fe3847789258254dcd7e3fdb9e7f5e"
>> +SRC_URI[sha256sum] = "4c94995398a6ebf691600dda2e968
>> 5a0cac261414175c2adf4645cdfab42a5d5"
>> +UPSTREAM_CHECK_URI = "https://github.com/anholt/libepoxy/releases;
>> +
>> +inherit meson pkgconfig distro_features_check
>> +
>> +REQUIRED_DISTRO_FEATURES = "opengl"
>> +
>> +DEPENDS = "util-macros"
>> +
>> +PACKAGECONFIG[egl] = "-Denable-egl=yes, -Denable-egl=no, virtual/egl"
>> +PACKAGECONFIG[x11] = "-Denable-glx=yes, -Denable-glx=no, virtual/libx11
>> virtual/libgl"
>> +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} egl"
>> +
>> +EXTRA_OEMESON_append_libc-musl = " -Dhas-dlvsym=false "
>> --
>> 2.14.3
>>
>> --
>> ___
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>>
>
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [meta-oe][PATCH v2] libepoxy: New recipe updated to latest release

2018-02-28 Thread Francesco Giancane
libepoxy 1.4.3 did not compile successfully because of
implicit symbol definitions and link-time errors.
A new recipe with latest libepoxy release (1.5.0) which
successfully compiles is provided.

Patch to disable 'dlvsym' has also been forward-ported
to be applicable to version 1.5.0.
The patch 'Add-fallback-definition-for-EGL-CAST.patch' is
mainline now; thus it can be safely removed.

Signed-off-by: Francesco Giancane 
---
 ...sible-to-disable-the-use-of-dlvsym-needed.patch | 26 +
 .../Add-fallback-definition-for-EGL-CAST.patch | 33 --
 .../{libepoxy_1.4.3.bb => libepoxy_1.5.0.bb}   |  9 +++---
 3 files changed, 18 insertions(+), 50 deletions(-)
 delete mode 100644 
meta/recipes-graphics/libepoxy/libepoxy/Add-fallback-definition-for-EGL-CAST.patch
 rename meta/recipes-graphics/libepoxy/{libepoxy_1.4.3.bb => libepoxy_1.5.0.bb} 
(66%)

diff --git 
a/meta/recipes-graphics/libepoxy/libepoxy/0001-Make-it-possible-to-disable-the-use-of-dlvsym-needed.patch
 
b/meta/recipes-graphics/libepoxy/libepoxy/0001-Make-it-possible-to-disable-the-use-of-dlvsym-needed.patch
index c2a2fa3453..5bddc12033 100644
--- 
a/meta/recipes-graphics/libepoxy/libepoxy/0001-Make-it-possible-to-disable-the-use-of-dlvsym-needed.patch
+++ 
b/meta/recipes-graphics/libepoxy/libepoxy/0001-Make-it-possible-to-disable-the-use-of-dlvsym-needed.patch
@@ -1,36 +1,38 @@
-From 7bcefd311cd696955376fe2c5298ec85e8f954ce Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin 
-Date: Wed, 15 Nov 2017 12:48:27 +0200
+From 9c964427656ef71210e2c5b48b279857806574e9 Mon Sep 17 00:00:00 2001
+From: Francesco Giancane 
+Date: Wed, 28 Feb 2018 21:32:24 +0100
 Subject: [PATCH] Make it possible to disable the use of dlvsym() (needed for
  musl)
 
-Upstream-Status: Pending
-Signed-off-by: Alexander Kanavin 
+Add a patch to work around absence of dlvsym() on musl
+(wasn't previously a problem as autotools weren't building tests by default)
 
+Signed-off-by: Alexander Kanavin 
+Signed-off-by: Francesco Giancane 
 ---
  meson_options.txt | 3 +++
  test/meson.build  | 6 +++---
  2 files changed, 6 insertions(+), 3 deletions(-)
 
 diff --git a/meson_options.txt b/meson_options.txt
-index 244476a..071f0b6 100644
+index b5d7c98..aa849c2 100644
 --- a/meson_options.txt
 +++ b/meson_options.txt
 @@ -1,6 +1,9 @@
- option('enable-docs',
+ option('docs',
 type: 'boolean', value: false,
 description: 'Enable generating the Epoxy API reference (depends on 
Doxygen)')
 +option('has-dlvsym',
 +   type: 'boolean', value: true,
 +   description: 'Whether dlvsym() is available (it is not when using musl 
C library)')
- option('enable-glx',
+ option('glx',
 type: 'combo',
 choices: [ 'auto', 'yes', 'no' ],
 diff --git a/test/meson.build b/test/meson.build
-index 2340fc6..bc4330b 100644
+index c5788b4..4c46ae6 100644
 --- a/test/meson.build
 +++ b/test/meson.build
-@@ -86,8 +86,8 @@ if build_glx
+@@ -92,8 +92,8 @@ if build_glx
  [ 'glx_has_extension_nocontext', [ 'glx_has_extension_nocontext.c' ], [], 
[], true ],
  [ 'glx_static', [ 'glx_static.c' ], [ '-DNEEDS_TO_BE_STATIC'], [ 
'-static' ], libtype == 'static' ],
  [ 'glx_shared_znow', [ 'glx_static.c', ], [], [ '-Wl,-z,now' ], has_znow 
],
@@ -41,7 +43,7 @@ index 2340fc6..bc4330b 100644
]
  
foreach test: glx_tests
-@@ -108,7 +108,7 @@ if build_glx
+@@ -114,7 +114,7 @@ if build_glx
  endif
endforeach
  
@@ -51,5 +53,5 @@ index 2340fc6..bc4330b 100644
  if build_egl
glx_egl_sources = [
 -- 
-2.15.0
+2.14.3
 
diff --git 
a/meta/recipes-graphics/libepoxy/libepoxy/Add-fallback-definition-for-EGL-CAST.patch
 
b/meta/recipes-graphics/libepoxy/libepoxy/Add-fallback-definition-for-EGL-CAST.patch
deleted file mode 100644
index b9297257dc..00
--- 
a/meta/recipes-graphics/libepoxy/libepoxy/Add-fallback-definition-for-EGL-CAST.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Add fallback definition for EGL_CAST
-
-The EGL API update from d11104f introduced a dependency on the
-EGL_CAST() macro, provided by an updated eglplatform.h. Given that we
-don't provide eglplatform.h, add a fallback definition for if we're
-building against Mesa 17.0.x or similar.
-
-https://bugs.gentoo.org/show_bug.cgi?id=623926
-
-Upstream-Status: Backport 
[https://github.com/anholt/libepoxy/commit/ebe3a53db1c0bb34e1ca963b95d1f222115f93f8]
-
-Signed-off-by: Tom Hochstein 
-
-Index: libepoxy-1.4.3/src/gen_dispatch.py
-===
 libepoxy-1.4.3.orig/src/gen_dispatch.py2017-06-06 04:24:13.0 
-0500
-+++ libepoxy-1.4.3/src/gen_dispatch.py 2017-11-06 12:45:43.594966473 -0600
-@@ -491,6 +491,15 @@
- self.outln('#include "epoxy/gl.h"')
- if self.target == "egl":
-

[OE-core] [PATCH] glibc: Enable static PIE support

2018-02-28 Thread Khem Raj
go programs when compiled with PIE fails otherwise on aarch64

Signed-off-by: Khem Raj 
---
 meta/recipes-core/glibc/glibc_2.27.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-core/glibc/glibc_2.27.bb 
b/meta/recipes-core/glibc/glibc_2.27.bb
index e9d4117a47..62db3e9d02 100644
--- a/meta/recipes-core/glibc/glibc_2.27.bb
+++ b/meta/recipes-core/glibc/glibc_2.27.bb
@@ -81,6 +81,7 @@ EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
 --enable-bind-now \
 --enable-stack-protector=strong \
 --enable-stackguard-randomization \
+--enable-static-pie \
 ${GLIBC_EXTRA_OECONF}"
 
 EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}"
-- 
2.16.2

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v2 1/8] go: update go 1.9 -> go 1.10

2018-02-28 Thread Khem Raj
On Wed, Feb 28, 2018 at 12:33 PM, Matt Madison  wrote:
> On Wed, Feb 28, 2018 at 11:48 AM, Khem Raj  wrote:
>> On Tue, Feb 27, 2018 at 4:36 AM, Matt Madison  wrote:
>>> * Patches and recipes reworked for go 1.10's significant
>>>   changes to its bootstrap and build steps
>>>
>>> * Update go1.4 source tarball used for go-native
>>>   bootstrapping to the version recommended
>>>   in the current go documentation
>>>
>>> * Remove test data from installed sources to eliminate
>>>   some packaging QA warnings
>>>
>>> * Set GOCACHE to 'off' to disable 1.10's build caching
>>>   in the go recipes and bbclass
>>>
>>
>> I gave it a shot and its failing to compile some of the modues with this 
>> error
>>
>> | /tmp/go-link-766579509/go.o:go.go:runtime.main_init·f: error:
>> undefined reference to 'main.init'
>> | /tmp/go-link-766579509/go.o:go.go:runtime.main_main·f: error:
>> undefined reference to 'main.main'
>> | collect2: error: ld returned 1 exit status
>
> This, Ross's and one of the errors Richard mentioned are due to the
> security flags, which
> I missed in my unit testing.

yes i am using security flags too

>
> Thanks,
> -Matt
>
>
>>
>>
>> In order to reproduce the error you can try to add my fork meta-influx layer
>>
>> https://github.com/kraj/meta-influx -b kraj/develop
>>
>> then
>>
>> bitbake github.com-oneofone-xxhash
>>
>>> Signed-off-by: Matt Madison 
>>> ---
>>>  meta/classes/go.bbclass|   2 +
>>>  meta/recipes-devtools/go/go-1.10.inc   |  21 ++
>>>  ...1-allow-CC-and-CXX-to-have-multiple-words.patch |  49 
>>>  ...-content-based-hash-generation-less-pedan.patch | 220 
>>>  ...OLDIR-to-be-overridden-in-the-environment.patch |  64 +
>>>  .../0004-ld-add-soname-to-shareable-objects.patch  |  47 
>>>  ...verride-CC-when-building-dist-and-go_boot.patch |  40 +++
>>>  ...-cmd-dist-separate-host-and-target-builds.patch | 277 
>>> +
>>>  ...07-cmd-go-make-GOROOT-precious-by-default.patch |  97 
>>>  ...ld-replace-glibc-dynamic-linker-with-musl.patch | 130 ++
>>>  meta/recipes-devtools/go/go-1.9.inc|  26 --
>>>  .../0001-make.bash-quote-CC_FOR_TARGET.patch   |  32 ---
>>>  ...CC-and-CXX-environment-variable-construct.patch |  67 -
>>>  ...sh-better-separate-host-and-target-builds.patch |  92 ---
>>>  ...w-GOTOOLDIR-to-be-overridden-in-the-envir.patch |  68 -
>>>  ...05-cmd-go-make-GOROOT-precious-by-default.patch |  41 ---
>>>  ...dd-GOTOOLDIR_BOOTSTRAP-environment-variab.patch |  36 ---
>>>  .../0007-ld-add-soname-to-shareable-objects.patch  |  46 
>>>  ...dd-GOHOSTxx-indirection-for-cross-canadia.patch |  33 ---
>>>  ...dmode-pie-forces-external-linking-mode-on.patch |  47 
>>>  ...verride-CC-when-building-dist-and-go_boot.patch |  43 
>>>  .../go/go-1.9/set-external-linker.patch| 111 -
>>>  meta/recipes-devtools/go/go-common.inc |   2 +
>>>  meta/recipes-devtools/go/go-cross-canadian.inc |  28 +--
>>>  ...s-canadian_1.9.bb => go-cross-canadian_1.10.bb} |   0
>>>  meta/recipes-devtools/go/go-cross.inc  |  55 ++--
>>>  .../go/{go-cross_1.9.bb => go-cross_1.10.bb}   |   0
>>>  meta/recipes-devtools/go/go-crosssdk.inc   |  16 +-
>>>  .../go/{go-crosssdk_1.9.bb => go-crosssdk_1.10.bb} |   0
>>>  meta/recipes-devtools/go/go-native.inc |  25 +-
>>>  .../go/{go-native_1.9.bb => go-native_1.10.bb} |   0
>>>  meta/recipes-devtools/go/go-runtime.inc|  58 +++--
>>>  .../go/{go-runtime_1.9.bb => go-runtime_1.10.bb}   |   0
>>>  meta/recipes-devtools/go/go-target.inc |  21 +-
>>>  meta/recipes-devtools/go/{go_1.9.bb => go_1.10.bb} |   0
>>>  35 files changed, 1048 insertions(+), 746 deletions(-)
>>>  create mode 100644 meta/recipes-devtools/go/go-1.10.inc
>>>  create mode 100644 
>>> meta/recipes-devtools/go/go-1.10/0001-allow-CC-and-CXX-to-have-multiple-words.patch
>>>  create mode 100644 
>>> meta/recipes-devtools/go/go-1.10/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch
>>>  create mode 100644 
>>> meta/recipes-devtools/go/go-1.10/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch
>>>  create mode 100644 
>>> meta/recipes-devtools/go/go-1.10/0004-ld-add-soname-to-shareable-objects.patch
>>>  create mode 100644 
>>> meta/recipes-devtools/go/go-1.10/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch
>>>  create mode 100644 
>>> meta/recipes-devtools/go/go-1.10/0006-cmd-dist-separate-host-and-target-builds.patch
>>>  create mode 100644 
>>> meta/recipes-devtools/go/go-1.10/0007-cmd-go-make-GOROOT-precious-by-default.patch
>>>  create mode 100644 
>>> meta/recipes-devtools/go/go-1.10/0008-ld-replace-glibc-dynamic-linker-with-musl.patch
>>>  delete mode 100644 meta/recipes-devtools/go/go-1.9.inc
>>>  delete mode 100644 
>>> 

[OE-core] [PATCH v2] opkg-utils: upgrade to version 0.3.6

2018-02-28 Thread Alejandro del Castillo
0.3.5 -> 0.3.6

Patches:
 - Add support for tar versions that don't support --sort
 - Use local time when setting the modication time on the archives

Signed-off-by: Alejandro del Castillo 
---

Changes since V1:
 - Add patch to support versions of tar that don't support --sort
 - Add patch to correctly set the modification time on the payload

 ...rt-name-on-versions-of-tar-which-support-.patch | 52 ++
 ...Use-local-time-for-build_date-since-opkg-.patch | 45 +++
 .../opkg-utils/opkg-utils/tar_ignore_error.patch   | 13 +++---
 .../{opkg-utils_0.3.5.bb => opkg-utils_0.3.6.bb}   |  6 ++-
 4 files changed, 108 insertions(+), 8 deletions(-)
 create mode 100644 
meta/recipes-devtools/opkg-utils/opkg-utils/0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch
 create mode 100644 
meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Use-local-time-for-build_date-since-opkg-.patch
 rename meta/recipes-devtools/opkg-utils/{opkg-utils_0.3.5.bb => 
opkg-utils_0.3.6.bb} (88%)

diff --git 
a/meta/recipes-devtools/opkg-utils/opkg-utils/0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch
 
b/meta/recipes-devtools/opkg-utils/opkg-utils/0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch
new file mode 100644
index 00..7de4b7f723
--- /dev/null
+++ 
b/meta/recipes-devtools/opkg-utils/opkg-utils/0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch
@@ -0,0 +1,52 @@
+From ef5db062b7d25e6070acc6922ea48f50491313b5 Mon Sep 17 00:00:00 2001
+From: Michael Hansen 
+Date: Mon, 26 Feb 2018 09:42:56 -0800
+Subject: [PATCH 1/2] Only use --sort=name on versions of tar which support it.
+ This fixes compatibility with bsdtar and old versions of GNU tar (e.g.
+ RHEL6).
+
+Signed-off-by: Michael Hansen 
+Signed-off-by: Alejandro del Castillo 
+---
+ opkg-build | 11 ---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/opkg-build b/opkg-build
+index 265906f..094d69f 100755
+--- a/opkg-build
 b/opkg-build
+@@ -232,6 +232,11 @@ if [ $compressor = "gzip" ] ; then
+   compressorargs=$zipargs
+ fi
+ 
++tsortargs=
++if tar --help 2>&1 | grep -- "--sort=" > /dev/null; then
++  tsortargs="--sort=name"
++fi
++
+ shift $(($OPTIND - 1))
+ 
+ # continue on to process additional arguments
+@@ -280,8 +285,8 @@ mkdir $tmp_dir
+ build_date="$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" 
+%Y-%m-%d)"
+ 
+ echo $CONTROL > $tmp_dir/tarX
+-( cd $pkg_dir && tar $ogargs --sort=name --mtime=$build_date -X $tmp_dir/tarX 
-c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext )
+-( cd $pkg_dir/$CONTROL && tar $ogargs --sort=name --mtime=$build_date -c 
$tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz )
++( cd $pkg_dir && tar $ogargs $tsortargs --mtime=$build_date -X $tmp_dir/tarX 
-c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext )
++( cd $pkg_dir/$CONTROL && tar $ogargs $tsortargs --mtime=$build_date -c 
$tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz )
+ rm $tmp_dir/tarX
+ 
+ echo "2.0" > $tmp_dir/debian-binary
+@@ -296,7 +301,7 @@ rm -f $pkg_file
+ if [ "$outer" = "ar" ] ; then
+   ( cd $tmp_dir && ar -crfD $pkg_file ./debian-binary ./control.tar.gz 
./data.tar.$cext )
+ else
+-  ( cd $tmp_dir && tar -c --sort=name --mtime=$build_date $tarformat 
./debian-binary ./control.tar.gz ./data.tar.$cext | gzip $zipargs > $pkg_file )
++  ( cd $tmp_dir && tar -c $tsortargs --mtime=$build_date $tarformat 
./debian-binary ./control.tar.gz ./data.tar.$cext | gzip $zipargs > $pkg_file )
+ fi
+ 
+ rm $tmp_dir/debian-binary $tmp_dir/data.tar.$cext $tmp_dir/control.tar.gz
+-- 
+2.16.1
+
diff --git 
a/meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Use-local-time-for-build_date-since-opkg-.patch
 
b/meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Use-local-time-for-build_date-since-opkg-.patch
new file mode 100644
index 00..b42d7878c9
--- /dev/null
+++ 
b/meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Use-local-time-for-build_date-since-opkg-.patch
@@ -0,0 +1,45 @@
+From 5727826b51cf99feaff3483a9df8af2043e7efc1 Mon Sep 17 00:00:00 2001
+From: Michael Hansen 
+Date: Mon, 26 Feb 2018 10:17:01 -0800
+Subject: [PATCH 2/2] opkg-build: Use local time for build_date, since opkg
+ extracts files assuming local time rather than UTC. Also increase resolution
+ of build date down to the second, rather than clamping to midnight of the
+ current date.
+
+Signed-off-by: Michael Hansen 
+Signed-off-by: Alejandro del Castillo 
+---
+ opkg-build | 8 
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/opkg-build b/opkg-build
+index 094d69f..0050c2b 100755
+--- a/opkg-build
 b/opkg-build
+@@ -282,11 +282,11 @@ fi
+ tmp_dir=$dest_dir/IPKG_BUILD.$$
+ 

Re: [OE-core] [PATCH v2 1/8] go: update go 1.9 -> go 1.10

2018-02-28 Thread Matt Madison
On Wed, Feb 28, 2018 at 11:48 AM, Khem Raj  wrote:
> On Tue, Feb 27, 2018 at 4:36 AM, Matt Madison  wrote:
>> * Patches and recipes reworked for go 1.10's significant
>>   changes to its bootstrap and build steps
>>
>> * Update go1.4 source tarball used for go-native
>>   bootstrapping to the version recommended
>>   in the current go documentation
>>
>> * Remove test data from installed sources to eliminate
>>   some packaging QA warnings
>>
>> * Set GOCACHE to 'off' to disable 1.10's build caching
>>   in the go recipes and bbclass
>>
>
> I gave it a shot and its failing to compile some of the modues with this error
>
> | /tmp/go-link-766579509/go.o:go.go:runtime.main_init·f: error:
> undefined reference to 'main.init'
> | /tmp/go-link-766579509/go.o:go.go:runtime.main_main·f: error:
> undefined reference to 'main.main'
> | collect2: error: ld returned 1 exit status

This, Ross's and one of the errors Richard mentioned are due to the
security flags, which
I missed in my unit testing.

Thanks,
-Matt


>
>
> In order to reproduce the error you can try to add my fork meta-influx layer
>
> https://github.com/kraj/meta-influx -b kraj/develop
>
> then
>
> bitbake github.com-oneofone-xxhash
>
>> Signed-off-by: Matt Madison 
>> ---
>>  meta/classes/go.bbclass|   2 +
>>  meta/recipes-devtools/go/go-1.10.inc   |  21 ++
>>  ...1-allow-CC-and-CXX-to-have-multiple-words.patch |  49 
>>  ...-content-based-hash-generation-less-pedan.patch | 220 
>>  ...OLDIR-to-be-overridden-in-the-environment.patch |  64 +
>>  .../0004-ld-add-soname-to-shareable-objects.patch  |  47 
>>  ...verride-CC-when-building-dist-and-go_boot.patch |  40 +++
>>  ...-cmd-dist-separate-host-and-target-builds.patch | 277 
>> +
>>  ...07-cmd-go-make-GOROOT-precious-by-default.patch |  97 
>>  ...ld-replace-glibc-dynamic-linker-with-musl.patch | 130 ++
>>  meta/recipes-devtools/go/go-1.9.inc|  26 --
>>  .../0001-make.bash-quote-CC_FOR_TARGET.patch   |  32 ---
>>  ...CC-and-CXX-environment-variable-construct.patch |  67 -
>>  ...sh-better-separate-host-and-target-builds.patch |  92 ---
>>  ...w-GOTOOLDIR-to-be-overridden-in-the-envir.patch |  68 -
>>  ...05-cmd-go-make-GOROOT-precious-by-default.patch |  41 ---
>>  ...dd-GOTOOLDIR_BOOTSTRAP-environment-variab.patch |  36 ---
>>  .../0007-ld-add-soname-to-shareable-objects.patch  |  46 
>>  ...dd-GOHOSTxx-indirection-for-cross-canadia.patch |  33 ---
>>  ...dmode-pie-forces-external-linking-mode-on.patch |  47 
>>  ...verride-CC-when-building-dist-and-go_boot.patch |  43 
>>  .../go/go-1.9/set-external-linker.patch| 111 -
>>  meta/recipes-devtools/go/go-common.inc |   2 +
>>  meta/recipes-devtools/go/go-cross-canadian.inc |  28 +--
>>  ...s-canadian_1.9.bb => go-cross-canadian_1.10.bb} |   0
>>  meta/recipes-devtools/go/go-cross.inc  |  55 ++--
>>  .../go/{go-cross_1.9.bb => go-cross_1.10.bb}   |   0
>>  meta/recipes-devtools/go/go-crosssdk.inc   |  16 +-
>>  .../go/{go-crosssdk_1.9.bb => go-crosssdk_1.10.bb} |   0
>>  meta/recipes-devtools/go/go-native.inc |  25 +-
>>  .../go/{go-native_1.9.bb => go-native_1.10.bb} |   0
>>  meta/recipes-devtools/go/go-runtime.inc|  58 +++--
>>  .../go/{go-runtime_1.9.bb => go-runtime_1.10.bb}   |   0
>>  meta/recipes-devtools/go/go-target.inc |  21 +-
>>  meta/recipes-devtools/go/{go_1.9.bb => go_1.10.bb} |   0
>>  35 files changed, 1048 insertions(+), 746 deletions(-)
>>  create mode 100644 meta/recipes-devtools/go/go-1.10.inc
>>  create mode 100644 
>> meta/recipes-devtools/go/go-1.10/0001-allow-CC-and-CXX-to-have-multiple-words.patch
>>  create mode 100644 
>> meta/recipes-devtools/go/go-1.10/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch
>>  create mode 100644 
>> meta/recipes-devtools/go/go-1.10/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch
>>  create mode 100644 
>> meta/recipes-devtools/go/go-1.10/0004-ld-add-soname-to-shareable-objects.patch
>>  create mode 100644 
>> meta/recipes-devtools/go/go-1.10/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch
>>  create mode 100644 
>> meta/recipes-devtools/go/go-1.10/0006-cmd-dist-separate-host-and-target-builds.patch
>>  create mode 100644 
>> meta/recipes-devtools/go/go-1.10/0007-cmd-go-make-GOROOT-precious-by-default.patch
>>  create mode 100644 
>> meta/recipes-devtools/go/go-1.10/0008-ld-replace-glibc-dynamic-linker-with-musl.patch
>>  delete mode 100644 meta/recipes-devtools/go/go-1.9.inc
>>  delete mode 100644 
>> meta/recipes-devtools/go/go-1.9/0001-make.bash-quote-CC_FOR_TARGET.patch
>>  delete mode 100644 
>> meta/recipes-devtools/go/go-1.9/0002-cmd-go-fix-CC-and-CXX-environment-variable-construct.patch
>>  delete mode 100644 
>> 

Re: [OE-core] [meta-oe][PATCH] libepoxy: New recipe updated to latest release

2018-02-28 Thread Burton, Ross
Please also delete the old release.

Ross

On 28 February 2018 at 18:42, Francesco Giancane <
francescogianca...@gmail.com> wrote:

> libepoxy 1.4.3 did not compile successfully because of
> implicit symbol definitions and link-time errors.
> A new recipe with latest libepoxy release (1.5.0) which
> successfully compiles is provided.
>
> Signed-off-by: Francesco Giancane 
> ---
>  meta/recipes-graphics/libepoxy/libepoxy_1.5.0.bb | 24
> 
>  1 file changed, 24 insertions(+)
>  create mode 100644 meta/recipes-graphics/libepoxy/libepoxy_1.5.0.bb
>
> diff --git a/meta/recipes-graphics/libepoxy/libepoxy_1.5.0.bb
> b/meta/recipes-graphics/libepoxy/libepoxy_1.5.0.bb
> new file mode 100644
> index 00..d7702cfd64
> --- /dev/null
> +++ b/meta/recipes-graphics/libepoxy/libepoxy_1.5.0.bb
> @@ -0,0 +1,24 @@
> +SUMMARY = "OpenGL function pointer management library"
> +HOMEPAGE = "https://github.com/anholt/libepoxy/;
> +SECTION = "libs"
> +
> +LICENSE = "MIT"
> +LIC_FILES_CHKSUM = "file://COPYING;md5=58ef4c80d401e07bd9ee8b6b58cf464b"
> +
> +SRC_URI = "https://github.com/anholt/${BPN}/releases/download/${PV}/$
> {BP}.tar.xz \
> +   "
> +SRC_URI[md5sum] = "63fe3847789258254dcd7e3fdb9e7f5e"
> +SRC_URI[sha256sum] = "4c94995398a6ebf691600dda2e9685
> a0cac261414175c2adf4645cdfab42a5d5"
> +UPSTREAM_CHECK_URI = "https://github.com/anholt/libepoxy/releases;
> +
> +inherit meson pkgconfig distro_features_check
> +
> +REQUIRED_DISTRO_FEATURES = "opengl"
> +
> +DEPENDS = "util-macros"
> +
> +PACKAGECONFIG[egl] = "-Denable-egl=yes, -Denable-egl=no, virtual/egl"
> +PACKAGECONFIG[x11] = "-Denable-glx=yes, -Denable-glx=no, virtual/libx11
> virtual/libgl"
> +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} egl"
> +
> +EXTRA_OEMESON_append_libc-musl = " -Dhas-dlvsym=false "
> --
> 2.14.3
>
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v2 1/8] go: update go 1.9 -> go 1.10

2018-02-28 Thread Khem Raj
On Tue, Feb 27, 2018 at 4:36 AM, Matt Madison  wrote:
> * Patches and recipes reworked for go 1.10's significant
>   changes to its bootstrap and build steps
>
> * Update go1.4 source tarball used for go-native
>   bootstrapping to the version recommended
>   in the current go documentation
>
> * Remove test data from installed sources to eliminate
>   some packaging QA warnings
>
> * Set GOCACHE to 'off' to disable 1.10's build caching
>   in the go recipes and bbclass
>

I gave it a shot and its failing to compile some of the modues with this error

| /tmp/go-link-766579509/go.o:go.go:runtime.main_init·f: error:
undefined reference to 'main.init'
| /tmp/go-link-766579509/go.o:go.go:runtime.main_main·f: error:
undefined reference to 'main.main'
| collect2: error: ld returned 1 exit status


In order to reproduce the error you can try to add my fork meta-influx layer

https://github.com/kraj/meta-influx -b kraj/develop

then

bitbake github.com-oneofone-xxhash

> Signed-off-by: Matt Madison 
> ---
>  meta/classes/go.bbclass|   2 +
>  meta/recipes-devtools/go/go-1.10.inc   |  21 ++
>  ...1-allow-CC-and-CXX-to-have-multiple-words.patch |  49 
>  ...-content-based-hash-generation-less-pedan.patch | 220 
>  ...OLDIR-to-be-overridden-in-the-environment.patch |  64 +
>  .../0004-ld-add-soname-to-shareable-objects.patch  |  47 
>  ...verride-CC-when-building-dist-and-go_boot.patch |  40 +++
>  ...-cmd-dist-separate-host-and-target-builds.patch | 277 
> +
>  ...07-cmd-go-make-GOROOT-precious-by-default.patch |  97 
>  ...ld-replace-glibc-dynamic-linker-with-musl.patch | 130 ++
>  meta/recipes-devtools/go/go-1.9.inc|  26 --
>  .../0001-make.bash-quote-CC_FOR_TARGET.patch   |  32 ---
>  ...CC-and-CXX-environment-variable-construct.patch |  67 -
>  ...sh-better-separate-host-and-target-builds.patch |  92 ---
>  ...w-GOTOOLDIR-to-be-overridden-in-the-envir.patch |  68 -
>  ...05-cmd-go-make-GOROOT-precious-by-default.patch |  41 ---
>  ...dd-GOTOOLDIR_BOOTSTRAP-environment-variab.patch |  36 ---
>  .../0007-ld-add-soname-to-shareable-objects.patch  |  46 
>  ...dd-GOHOSTxx-indirection-for-cross-canadia.patch |  33 ---
>  ...dmode-pie-forces-external-linking-mode-on.patch |  47 
>  ...verride-CC-when-building-dist-and-go_boot.patch |  43 
>  .../go/go-1.9/set-external-linker.patch| 111 -
>  meta/recipes-devtools/go/go-common.inc |   2 +
>  meta/recipes-devtools/go/go-cross-canadian.inc |  28 +--
>  ...s-canadian_1.9.bb => go-cross-canadian_1.10.bb} |   0
>  meta/recipes-devtools/go/go-cross.inc  |  55 ++--
>  .../go/{go-cross_1.9.bb => go-cross_1.10.bb}   |   0
>  meta/recipes-devtools/go/go-crosssdk.inc   |  16 +-
>  .../go/{go-crosssdk_1.9.bb => go-crosssdk_1.10.bb} |   0
>  meta/recipes-devtools/go/go-native.inc |  25 +-
>  .../go/{go-native_1.9.bb => go-native_1.10.bb} |   0
>  meta/recipes-devtools/go/go-runtime.inc|  58 +++--
>  .../go/{go-runtime_1.9.bb => go-runtime_1.10.bb}   |   0
>  meta/recipes-devtools/go/go-target.inc |  21 +-
>  meta/recipes-devtools/go/{go_1.9.bb => go_1.10.bb} |   0
>  35 files changed, 1048 insertions(+), 746 deletions(-)
>  create mode 100644 meta/recipes-devtools/go/go-1.10.inc
>  create mode 100644 
> meta/recipes-devtools/go/go-1.10/0001-allow-CC-and-CXX-to-have-multiple-words.patch
>  create mode 100644 
> meta/recipes-devtools/go/go-1.10/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch
>  create mode 100644 
> meta/recipes-devtools/go/go-1.10/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch
>  create mode 100644 
> meta/recipes-devtools/go/go-1.10/0004-ld-add-soname-to-shareable-objects.patch
>  create mode 100644 
> meta/recipes-devtools/go/go-1.10/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch
>  create mode 100644 
> meta/recipes-devtools/go/go-1.10/0006-cmd-dist-separate-host-and-target-builds.patch
>  create mode 100644 
> meta/recipes-devtools/go/go-1.10/0007-cmd-go-make-GOROOT-precious-by-default.patch
>  create mode 100644 
> meta/recipes-devtools/go/go-1.10/0008-ld-replace-glibc-dynamic-linker-with-musl.patch
>  delete mode 100644 meta/recipes-devtools/go/go-1.9.inc
>  delete mode 100644 
> meta/recipes-devtools/go/go-1.9/0001-make.bash-quote-CC_FOR_TARGET.patch
>  delete mode 100644 
> meta/recipes-devtools/go/go-1.9/0002-cmd-go-fix-CC-and-CXX-environment-variable-construct.patch
>  delete mode 100644 
> meta/recipes-devtools/go/go-1.9/0003-make.bash-better-separate-host-and-target-builds.patch
>  delete mode 100644 
> meta/recipes-devtools/go/go-1.9/0004-cmd-go-allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch
>  delete mode 100644 
> meta/recipes-devtools/go/go-1.9/0005-cmd-go-make-GOROOT-precious-by-default.patch
>  delete mode 

[OE-core] [PATCH v2] kernel-devsrc: restructure for out of tree (and on target) module builds

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

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

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

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

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

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

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

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

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

[YOCTO #12535]

Signed-off-by: Bruce Ashfield 
---

 v2: fix arch/arm devsrc builds

 The arch conditional code for ARM was using invalid variables for the
 current version of the recipe. Those are now fixed, and we can package
 for ARM.

 meta/recipes-kernel/linux/kernel-devsrc.bb | 178 ++---
 1 file changed, 138 insertions(+), 40 deletions(-)

diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb 
b/meta/recipes-kernel/linux/kernel-devsrc.bb
index c1b5b7786d7c..738290ac2dc3 100644
--- a/meta/recipes-kernel/linux/kernel-devsrc.bb
+++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
@@ -30,50 +30,148 @@ do_populate_sysroot[noexec] = "1"
 S = "${STAGING_KERNEL_DIR}"
 B = "${STAGING_KERNEL_BUILDDIR}"
 
-KERNEL_VERSION = "${@get_kernelversion_headers('${S}')}"
-
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
+KERNEL_BUILD_ROOT="/lib/modules/"
+
 do_install() {
-kerneldir=${D}${KERNEL_SRC_PATH}
-install -d $kerneldir
-
-#
-# Copy the staging dir source (and module build support) into the 
devsrc structure.
-# We can keep this copy simple and take everything, since a we'll 
clean up any build
-# artifacts afterwards, and the extra i/o is not significant
-#
-cd ${B}
-find . -type d -name '.git*' -prune -o -path '.debug' -prune -o -type 
f -print0 | cpio --null -pdlu $kerneldir
-cd ${S}
-   find . -type d -name '.git*' -prune -o -type d -name '.kernel-meta' 
-prune -o -type f -print0 | cpio --null -pdlu $kerneldir
-
-# Explicitly set KBUILD_OUTPUT to ensure that the image directory is 
cleaned and not
-# The main build artifacts. We clean the directory to avoid QA errors 
on mismatched
-# architecture (since scripts and helpers are native format).
-KBUILD_OUTPUT="$kerneldir"
-oe_runmake -C $kerneldir CC="${KERNEL_CC}" LD="${KERNEL_LD}" clean 
_mrproper_scripts
-# make clean generates an absolute path symlink called "source"
-# in $kerneldir points to $kerneldir, which doesn't make any
-# sense, so remove it.
-if [ -L $kerneldir/source ]; then
-bbnote "Removing $kerneldir/source symlink"
-rm -f $kerneldir/source
-fi
-
-# As of Linux kernel version 3.0.1, the clean target removes
-# arch/powerpc/lib/crtsavres.o which is present in
-# KBUILD_LDFLAGS_MODULE, making it required to build external modules.
-if [ ${ARCH} = "powerpc" ]; then
-mkdir -p $kerneldir/arch/powerpc/lib/
-cp ${B}/arch/powerpc/lib/crtsavres.o 
$kerneldir/arch/powerpc/lib/crtsavres.o
-fi
-
-chown -R root:root ${D}
+kerneldir=${D}${KERNEL_BUILD_ROOT}${KERNEL_VERSION}
+install -d $kerneldir
+
+# create the directory structure
+rm -f $kerneldir/build
+rm -f $kerneldir/source
+mkdir -p $kerneldir/build
+
+# for compatibility with some older variants of this package, we
+# create  a /usr/src/kernel symlink to /lib/modules//source
+mkdir -p ${D}/usr/src
+(
+   cd ${D}/usr/src
+   ln -s ${KERNEL_BUILD_ROOT}${KERNEL_VERSION}/source kernel
+)
+
+# for on target purposes, we unify build and source
+(
+   cd $kerneldir
+   ln -s build source
+)
+
+# first copy everything
+(
+   cd ${S}
+   cp --parents $(find  -type f 

[OE-core] [meta-oe][PATCH] libepoxy: New recipe updated to latest release

2018-02-28 Thread Francesco Giancane
libepoxy 1.4.3 did not compile successfully because of
implicit symbol definitions and link-time errors.
A new recipe with latest libepoxy release (1.5.0) which
successfully compiles is provided.

Signed-off-by: Francesco Giancane 
---
 meta/recipes-graphics/libepoxy/libepoxy_1.5.0.bb | 24 
 1 file changed, 24 insertions(+)
 create mode 100644 meta/recipes-graphics/libepoxy/libepoxy_1.5.0.bb

diff --git a/meta/recipes-graphics/libepoxy/libepoxy_1.5.0.bb 
b/meta/recipes-graphics/libepoxy/libepoxy_1.5.0.bb
new file mode 100644
index 00..d7702cfd64
--- /dev/null
+++ b/meta/recipes-graphics/libepoxy/libepoxy_1.5.0.bb
@@ -0,0 +1,24 @@
+SUMMARY = "OpenGL function pointer management library"
+HOMEPAGE = "https://github.com/anholt/libepoxy/;
+SECTION = "libs"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=58ef4c80d401e07bd9ee8b6b58cf464b"
+
+SRC_URI = 
"https://github.com/anholt/${BPN}/releases/download/${PV}/${BP}.tar.xz \
+   "
+SRC_URI[md5sum] = "63fe3847789258254dcd7e3fdb9e7f5e"
+SRC_URI[sha256sum] = 
"4c94995398a6ebf691600dda2e9685a0cac261414175c2adf4645cdfab42a5d5"
+UPSTREAM_CHECK_URI = "https://github.com/anholt/libepoxy/releases;
+
+inherit meson pkgconfig distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "opengl"
+
+DEPENDS = "util-macros"
+
+PACKAGECONFIG[egl] = "-Denable-egl=yes, -Denable-egl=no, virtual/egl"
+PACKAGECONFIG[x11] = "-Denable-glx=yes, -Denable-glx=no, virtual/libx11 
virtual/libgl"
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} egl"
+
+EXTRA_OEMESON_append_libc-musl = " -Dhas-dlvsym=false "
-- 
2.14.3

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [pyro][PATCH] openssh: Atomically generate host keys

2018-02-28 Thread Joshua Watt
From: Joshua Watt 

Generating the host keys atomically prevents power interruptions during the
first boot from leaving the key files incomplete, which often prevents users
from being able to ssh into the device.

[YOCTO #11671]

Signed-off-by: Joshua Watt 
Signed-off-by: Ross Burton 
Signed-off-by: Richard Purdie 
(cherry picked from commit 43fc3d8e180c168dbe5dd5faa577e69a279bd1bd)
---
 .../openssh/openssh/sshd_check_keys| 42 +-
 1 file changed, 34 insertions(+), 8 deletions(-)

diff --git a/meta/recipes-connectivity/openssh/openssh/sshd_check_keys 
b/meta/recipes-connectivity/openssh/openssh/sshd_check_keys
index f5bba53ca31..5463b1a4cb1 100644
--- a/meta/recipes-connectivity/openssh/openssh/sshd_check_keys
+++ b/meta/recipes-connectivity/openssh/openssh/sshd_check_keys
@@ -1,5 +1,35 @@
 #! /bin/sh
 
+generate_key() {
+local FILE=$1
+local TYPE=$2
+local DIR="$(dirname "$FILE")"
+
+mkdir -p "$DIR"
+ssh-keygen -q -f "${FILE}.tmp" -N '' -t $TYPE
+
+# Atomically rename file public key
+mv -f "${FILE}.tmp.pub" "${FILE}.pub"
+
+# This sync does double duty: Ensuring that the data in the temporary
+# private key file is on disk before the rename, and ensuring that the
+# public key rename is completed before the private key rename, since we
+# switch on the existence of the private key to trigger key generation.
+# This does mean it is possible for the public key to exist, but be garbage
+# but this is OK because in that case the private key won't exist and the
+# keys will be regenerated.
+#
+# In the event that sync understands arguments that limit what it tries to
+# fsync(), we provided them. If it does not, it will simply call sync()
+# which is just as well
+sync "${FILE}.pub" "$DIR" "${FILE}.tmp"
+
+mv "${FILE}.tmp" "$FILE"
+
+# sync to ensure the atomic rename is committed
+sync "$DIR"
+}
+
 # /etc/default/ssh may set SYSCONFDIR and SSHD_OPTS
 if test -f /etc/default/ssh; then
 . /etc/default/ssh
@@ -43,22 +73,18 @@ HOST_KEY_ED25519=$(grep ^HostKey "${sshd_config}" | grep 
_ed25519_ | tail -1 | a
 # create keys if necessary
 if [ ! -f $HOST_KEY_RSA ]; then
 echo "  generating ssh RSA key..."
-mkdir -p $(dirname $HOST_KEY_RSA)
-ssh-keygen -q -f $HOST_KEY_RSA -N '' -t rsa
+generate_key $HOST_KEY_RSA rsa
 fi
 if [ ! -f $HOST_KEY_ECDSA ]; then
 echo "  generating ssh ECDSA key..."
-mkdir -p $(dirname $HOST_KEY_ECDSA)
-ssh-keygen -q -f $HOST_KEY_ECDSA -N '' -t ecdsa
+generate_key $HOST_KEY_ECDSA ecdsa
 fi
 if [ ! -f $HOST_KEY_DSA ]; then
 echo "  generating ssh DSA key..."
-mkdir -p $(dirname $HOST_KEY_DSA)
-ssh-keygen -q -f $HOST_KEY_DSA -N '' -t dsa
+generate_key $HOST_KEY_DSA dsa
 fi
 if [ ! -f $HOST_KEY_ED25519 ]; then
 echo "  generating ssh ED25519 key..."
-mkdir -p $(dirname $HOST_KEY_ED25519)
-ssh-keygen -q -f $HOST_KEY_ED25519 -N '' -t ed25519
+generate_key $HOST_KEY_ED25519 ed25519
 fi
 
-- 
2.14.3

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] dbus-test_1.12.2: various fixes

2018-02-28 Thread Bystricky, Juro
Yes, that is the root cause. I did file a bug a while ago:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=12273

It is a race, I put the libraries in a hidden file, hoping they would not be 
found.
I also considered linking the tests statically (which would eliminate the need 
for the shared libraries), 
but the size was getting too big...

Juro

From: John, Maxin
Sent: Wednesday, February 28, 2018 6:54 AM
To: Bystricky, Juro
Cc: openembedded-core@lists.openembedded.org; jurobystri...@hotmail.com
Subject: Re: [OE-core] [PATCH] dbus-test_1.12.2: various fixes

Hi,

On Tue, Feb 27, 2018 at 12:19:26PM -0800, Juro Bystricky wrote:
> The result of running dbus-test-ptest was a series of
> various segfaults, interpreted as FAILs. This was a direct consequence
> of the test suite loading the installed shared library libdbus-1.so, not the
> one built along the test suite.
>
> While we normally want to test against the installed libraries, we cannot
> do this in this case as the test suite expects a library that is 
> configured/compiled
> differently from the installed one. We could configure the installed library
> identically as the test suite expects, (and there should be no issues), 
> however
> this is not desirable for performance reasons.
>
> Hence we need to use the library built along with the test suite.
> Of course, running the test suite against its own library does not
> test the installed library, however they are both built from the same
> sources so that can give us some kind of indication.
>
> The following changes were made:
>
> 1. Configure the test library as close as possible to the installed one,
>with some additional configuration options that are needed for testing.
>(Use dbus_1.12.2.bb recipe as a template)
> 2. Include the shared libraries in the package, use LD_LIBRARY_PATH during
>testing to load them instead of the installed ones.
> 3. Add a few more tests. (There are still some additional tests built that
>are not used, but they would have to be special-cased).
> 4. When evaluating the test results, differentiate between "FAIL" and "SKIP"
>
> [YOCTO #10841]
> [YOCTO #12277]
>
> Signed-off-by: Juro Bystricky 
> ---
>  meta/recipes-core/dbus/dbus-test_1.12.2.bb | 30 
> ++
>  meta/recipes-core/dbus/dbus/run-ptest  | 20 +---
>  2 files changed, 43 insertions(+), 7 deletions(-)

Probably due to this change, dbus ptest related sanity tests fails here:

https://autobuilder.yocto.io/builders/nightly-deb-non-deb/builds/813/steps/Running%20Sanity%20Tests/logs/stdio


NOTE:  ... ok
| NOTE: ==
| NOTE: FAIL: test_ptestrunner (ptest.PtestRunnerTest)
| NOTE: --
| NOTE: Traceback (most recent call last):
|   File 
"/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-deb-non-deb/build/meta/lib/oeqa/core/decorator/__init__.py",
 line 32, in wrapped_f
| return func(*args, **kwargs)
|   File 
"/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-deb-non-deb/build/meta/lib/oeqa/core/decorator/__init__.py",
 line 32, in wrapped_f
| return func(*args, **kwargs)
|   File 
"/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-deb-non-deb/build/meta/lib/oeqa/core/decorator/__init__.py",
 line 32, in wrapped_f
| return func(*args, **kwargs)
|   File 
"/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-deb-non-deb/build/meta/lib/oeqa/runtime/cases/ptest.py",
 line 93, in test_ptestrunner
| self.assertFalse(failed_tests, msg = "Failed ptests: %s" 
%(str(failed_tests)))
| AssertionError: {'dbus-test': [' test/test-bus', ' test/test-dbus-daemon', ' 
test/test-names']} is not false : Failed ptests: {'dbus-test': [' 
test/test-bus', ' test/test-dbus-daemon', ' test/test-names']}


Best Regards,
Maxin
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

2018-02-28 Thread Bruce Ashfield

On 02/28/2018 11:51 AM, Bruce Ashfield wrote:

Unfortunately, I can't reproduce that here.

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


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

64 bit works fine. Will send a v2 shortly.

Bruce



Bruce

On 02/28/2018 11:38 AM, Burton, Ross wrote:

Sorry, but this breaks on ARM:

ERROR: kernel-devsrc-1.0-r0 do_install: Function failed: do_install 
(log file is located at 
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/log.do_install.25822) 

ERROR: Logfile of failure stored in: 
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/log.do_install.25822 


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



Ross

On 28 February 2018 at 02:06, Bruce Ashfield 
> 
wrote:


    The existing kernel-devsrc package starts with a full copy of the 
kernel

    source and then starts to strip out elements that are not required.

    This results in extra time (I/O) and extra space being taken up in 
the
    final package. The main purpose of the kernel-devsrc package has 
been to
    build modules against the running kernel, not to include a full 
copy of

    the source code for re-building the kernel. The end result was a
    600M kernel-devsrc package.

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

    a mass copy of the entire kernel.

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

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

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

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

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

  - There is also a symlink from /lib/modules//source -> 
build

    to reserve a spot for a new package that is simply the kernel
    source. That package is not part of this update.

    [YOCTO #12535]

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

    diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb
    
    b/meta/recipes-kernel/linux/kernel-devsrc.bb 


    index c1b5b7786d7c..f55b115e0936 100644
    --- a/meta/recipes-kernel/linux/kernel-devsrc.bb
    
    +++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
    
    @@ -30,50 +30,148 @@ do_populate_sysroot[noexec] = "1"
  S = "${STAGING_KERNEL_DIR}"
  B = "${STAGING_KERNEL_BUILDDIR}"

    -KERNEL_VERSION = "${@get_kernelversion_headers('${S}')}"
    -
  PACKAGE_ARCH = "${MACHINE_ARCH}"

    +KERNEL_BUILD_ROOT="/lib/modules/"
    +
  do_install() {
    -        kerneldir=${D}${KERNEL_SRC_PATH}
    -        install -d $kerneldir
    -
    -        #
    -        # Copy the staging dir source (and module build support)
    into the devsrc structure.
    -        # We can keep this copy simple and take everything, since a
    we'll clean up any build
    -        # artifacts afterwards, and the extra i/o is not significant
    -        #
    -        cd ${B}
    -        find . -type d -name '.git*' -prune -o -path '.debug'
    -prune -o -type f -print0 | cpio --null -pdlu $kerneldir
    -        cd ${S}
    -       find . -type d -name '.git*' -prune -o -type d -name
    '.kernel-meta' -prune -o -type f 

Re: [OE-core] [PATCH] dbus-test_1.12.2: various fixes

2018-02-28 Thread Burton, Ross
So the problem is that dbus-test has a libdbus-1.so.3 and if it is built
after dbus then it wins the race for "who provides libdbus.so".  Obviously
this isn't right, I'm testing a fix now using PRIVATE_LIBS and want to file
a bug to fix this behviour in 2.6.

Ross

On 28 February 2018 at 14:54, Maxin B. John  wrote:

> Hi,
>
> On Tue, Feb 27, 2018 at 12:19:26PM -0800, Juro Bystricky wrote:
> > The result of running dbus-test-ptest was a series of
> > various segfaults, interpreted as FAILs. This was a direct consequence
> > of the test suite loading the installed shared library libdbus-1.so, not
> the
> > one built along the test suite.
> >
> > While we normally want to test against the installed libraries, we cannot
> > do this in this case as the test suite expects a library that is
> configured/compiled
> > differently from the installed one. We could configure the installed
> library
> > identically as the test suite expects, (and there should be no issues),
> however
> > this is not desirable for performance reasons.
> >
> > Hence we need to use the library built along with the test suite.
> > Of course, running the test suite against its own library does not
> > test the installed library, however they are both built from the same
> > sources so that can give us some kind of indication.
> >
> > The following changes were made:
> >
> > 1. Configure the test library as close as possible to the installed one,
> >with some additional configuration options that are needed for
> testing.
> >(Use dbus_1.12.2.bb recipe as a template)
> > 2. Include the shared libraries in the package, use LD_LIBRARY_PATH
> during
> >testing to load them instead of the installed ones.
> > 3. Add a few more tests. (There are still some additional tests built
> that
> >are not used, but they would have to be special-cased).
> > 4. When evaluating the test results, differentiate between "FAIL" and
> "SKIP"
> >
> > [YOCTO #10841]
> > [YOCTO #12277]
> >
> > Signed-off-by: Juro Bystricky 
> > ---
> >  meta/recipes-core/dbus/dbus-test_1.12.2.bb | 30
> ++
> >  meta/recipes-core/dbus/dbus/run-ptest  | 20 +---
> >  2 files changed, 43 insertions(+), 7 deletions(-)
>
> Probably due to this change, dbus ptest related sanity tests fails here:
>
> https://autobuilder.yocto.io/builders/nightly-deb-non-deb/
> builds/813/steps/Running%20Sanity%20Tests/logs/stdio
>
>
> NOTE:  ... ok
> | NOTE: 
> ==
> | NOTE: FAIL: test_ptestrunner (ptest.PtestRunnerTest)
> | NOTE: 
> --
> | NOTE: Traceback (most recent call last):
> |   File "/home/pokybuild/yocto-autobuilder/yocto-worker/
> nightly-deb-non-deb/build/meta/lib/oeqa/core/decorator/__init__.py", line
> 32, in wrapped_f
> | return func(*args, **kwargs)
> |   File "/home/pokybuild/yocto-autobuilder/yocto-worker/
> nightly-deb-non-deb/build/meta/lib/oeqa/core/decorator/__init__.py", line
> 32, in wrapped_f
> | return func(*args, **kwargs)
> |   File "/home/pokybuild/yocto-autobuilder/yocto-worker/
> nightly-deb-non-deb/build/meta/lib/oeqa/core/decorator/__init__.py", line
> 32, in wrapped_f
> | return func(*args, **kwargs)
> |   File "/home/pokybuild/yocto-autobuilder/yocto-worker/
> nightly-deb-non-deb/build/meta/lib/oeqa/runtime/cases/ptest.py", line 93,
> in test_ptestrunner
> | self.assertFalse(failed_tests, msg = "Failed ptests: %s"
> %(str(failed_tests)))
> | AssertionError: {'dbus-test': [' test/test-bus', '
> test/test-dbus-daemon', ' test/test-names']} is not false : Failed ptests:
> {'dbus-test': [' test/test-bus', ' test/test-dbus-daemon', '
> test/test-names']}
>
>
> Best Regards,
> Maxin
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] package_manager.py: Explicit complementary fail

2018-02-28 Thread Alexander Kanavin

On 02/28/2018 06:20 PM, Niko Mauno wrote:

When running bitbake -c populate_sdk , it is expected that
packages matching SDKIMAGE_INSTALL_COMPLEMENTARY name mask (unless
declared in PACKAGE_EXCLUDE_COMPLEMENTARY) are installed to resulting
SDK. Underlying mechanism issues a package manager install call for set
of complementary packages. However the mechanism doesn't seem to inform
the user all too obviously in case the package manager command behind
install_complementary() method fails -- and since it is combined with
attempt_only=True option, user might end up wondering why several *-dev,
*-dbg packages are missing from resulting SDK.

Improve associated install() method behaviour in affected OpkgPM and
DpkgPM classes so that a problematic state of affairs becomes directly
obvious for bitbake user, resulting in shell output like:


Does rpm need the same fix?

Alex
--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

2018-02-28 Thread Bruce Ashfield

Unfortunately, I can't reproduce that here.

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

Bruce

On 02/28/2018 11:38 AM, Burton, Ross wrote:

Sorry, but this breaks on ARM:

ERROR: kernel-devsrc-1.0-r0 do_install: Function failed: do_install (log 
file is located at 
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/log.do_install.25822)
ERROR: Logfile of failure stored in: 
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/log.do_install.25822

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


Ross

On 28 February 2018 at 02:06, Bruce Ashfield 
> wrote:


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

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

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

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

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

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

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

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

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

[YOCTO #12535]

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

diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb

b/meta/recipes-kernel/linux/kernel-devsrc.bb 
index c1b5b7786d7c..f55b115e0936 100644
--- a/meta/recipes-kernel/linux/kernel-devsrc.bb

+++ b/meta/recipes-kernel/linux/kernel-devsrc.bb

@@ -30,50 +30,148 @@ do_populate_sysroot[noexec] = "1"
  S = "${STAGING_KERNEL_DIR}"
  B = "${STAGING_KERNEL_BUILDDIR}"

-KERNEL_VERSION = "${@get_kernelversion_headers('${S}')}"
-
  PACKAGE_ARCH = "${MACHINE_ARCH}"

+KERNEL_BUILD_ROOT="/lib/modules/"
+
  do_install() {
-        kerneldir=${D}${KERNEL_SRC_PATH}
-        install -d $kerneldir
-
-        #
-        # Copy the staging dir source (and module build support)
into the devsrc structure.
-        # We can keep this copy simple and take everything, since a
we'll clean up any build
-        # artifacts afterwards, and the extra i/o is not significant
-        #
-        cd ${B}
-        find . -type d -name '.git*' -prune -o -path '.debug'
-prune -o -type f -print0 | cpio --null -pdlu $kerneldir
-        cd ${S}
-       find . -type d -name '.git*' -prune -o -type d -name
'.kernel-meta' -prune -o -type f -print0 | cpio --null -pdlu $kerneldir
-
-        # Explicitly set KBUILD_OUTPUT to ensure that the image
directory is cleaned and not
-        # The main build artifacts. We clean the directory 

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

2018-02-28 Thread Burton, Ross
Sorry, but this breaks on ARM:

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

Ross

On 28 February 2018 at 02:06, Bruce Ashfield 
wrote:

> The existing kernel-devsrc package starts with a full copy of the kernel
> source and then starts to strip out elements that are not required.
>
> This results in extra time (I/O) and extra space being taken up in the
> final package. The main purpose of the kernel-devsrc package has been to
> build modules against the running kernel, not to include a full copy of
> the source code for re-building the kernel. The end result was a
> 600M kernel-devsrc package.
>
> This restructuring of the package uses an approach similar to other
> distros, where the kernel-devsrc package is for building against the
> running kernel and uses a curated set of copied infrastructure, versus
> a mass copy of the entire kernel.
>
> The differences in this approach versus other is largely due to the
> architecture support and the split build/source directory of the
> kernel.
>
> The result is a kernel-devsrc package of about 10M, which is capable
> of running "make scripts" and compiling kernel modules against the
> running kernel.
>
> Along with the changes to the copying of the infrascture, we also
> have the following changes:
>
>  - a better/more explicit listing of dependencies for on-target
>builds of "make scripts" or "make modules_prepare"
>
>  - The kernel source is installed into /lib/modules//build
>and a symlink created from /usr/src/kernel to the new location.
>This aligns with the standard location for module support
>code
>
>  - There is also a symlink from /lib/modules//source -> build
>to reserve a spot for a new package that is simply the kernel
>source. That package is not part of this update.
>
> [YOCTO #12535]
>
> Signed-off-by: Bruce Ashfield 
> ---
>  meta/recipes-kernel/linux/kernel-devsrc.bb | 178
> ++---
>  1 file changed, 138 insertions(+), 40 deletions(-)
>
> diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb
> b/meta/recipes-kernel/linux/kernel-devsrc.bb
> index c1b5b7786d7c..f55b115e0936 100644
> --- a/meta/recipes-kernel/linux/kernel-devsrc.bb
> +++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
> @@ -30,50 +30,148 @@ do_populate_sysroot[noexec] = "1"
>  S = "${STAGING_KERNEL_DIR}"
>  B = "${STAGING_KERNEL_BUILDDIR}"
>
> -KERNEL_VERSION = "${@get_kernelversion_headers('${S}')}"
> -
>  PACKAGE_ARCH = "${MACHINE_ARCH}"
>
> +KERNEL_BUILD_ROOT="/lib/modules/"
> +
>  do_install() {
> -kerneldir=${D}${KERNEL_SRC_PATH}
> -install -d $kerneldir
> -
> -#
> -# Copy the staging dir source (and module build support) into the
> devsrc structure.
> -# We can keep this copy simple and take everything, since a we'll
> clean up any build
> -# artifacts afterwards, and the extra i/o is not significant
> -#
> -cd ${B}
> -find . -type d -name '.git*' -prune -o -path '.debug' -prune -o
> -type f -print0 | cpio --null -pdlu $kerneldir
> -cd ${S}
> -   find . -type d -name '.git*' -prune -o -type d -name
> '.kernel-meta' -prune -o -type f -print0 | cpio --null -pdlu $kerneldir
> -
> -# Explicitly set KBUILD_OUTPUT to ensure that the image directory
> is cleaned and not
> -# The main build artifacts. We clean the directory to avoid QA
> errors on mismatched
> -# architecture (since scripts and helpers are native format).
> -KBUILD_OUTPUT="$kerneldir"
> -oe_runmake -C $kerneldir CC="${KERNEL_CC}" LD="${KERNEL_LD}"
> clean _mrproper_scripts
> -# make clean generates an absolute path symlink called "source"
> -# in $kerneldir points to $kerneldir, which doesn't make any
> -# sense, so remove it.
> -if [ -L $kerneldir/source ]; then
> -bbnote "Removing $kerneldir/source symlink"
> -rm -f $kerneldir/source
> -fi
> -
> -# As 

[OE-core] [PATCH] package_manager.py: Explicit complementary fail

2018-02-28 Thread Niko Mauno
When running bitbake -c populate_sdk , it is expected that
packages matching SDKIMAGE_INSTALL_COMPLEMENTARY name mask (unless
declared in PACKAGE_EXCLUDE_COMPLEMENTARY) are installed to resulting
SDK. Underlying mechanism issues a package manager install call for set
of complementary packages. However the mechanism doesn't seem to inform
the user all too obviously in case the package manager command behind
install_complementary() method fails -- and since it is combined with
attempt_only=True option, user might end up wondering why several *-dev,
*-dbg packages are missing from resulting SDK.

Improve associated install() method behaviour in affected OpkgPM and
DpkgPM classes so that a problematic state of affairs becomes directly
obvious for bitbake user, resulting in shell output like:

  WARNING: someimage-1.0-r0 do_populate_sdk: Unable to install packages.
  Command '...' returned 1:
  Collected errors:
   * Solver encountered 1 problem(s):
   * Problem 1/1:
   *   - package somepkg-dev-1.0-r0.x86 requires somepkg = 1.0-r0, but
 none of the providers can be installed
   *
   * Solution 1:
   *   - allow deinstallation of someotherpkg-1.1-r1.x86

   *   - do not ask to install a package providing somepkg-dev

   * Solution 2:
   *   - do not ask to install a package providing somepkg-dev

Signed-off-by: Niko Mauno 
---
 meta/lib/oe/package_manager.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index f7e013437c..4d15d71736 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -1069,7 +1069,7 @@ class OpkgPM(OpkgDpkgPM):
 output = subprocess.check_output(cmd.split(), 
stderr=subprocess.STDOUT).decode("utf-8")
 bb.note(output)
 except subprocess.CalledProcessError as e:
-(bb.fatal, bb.note)[attempt_only]("Unable to install packages. "
+(bb.fatal, bb.warn)[attempt_only]("Unable to install packages. "
   "Command '%s' returned %d:\n%s" %
   (cmd, e.returncode, 
e.output.decode("utf-8")))
 
@@ -1368,7 +1368,7 @@ class DpkgPM(OpkgDpkgPM):
 bb.note("Installing the following packages: %s" % ' '.join(pkgs))
 subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT)
 except subprocess.CalledProcessError as e:
-(bb.fatal, bb.note)[attempt_only]("Unable to install packages. "
+(bb.fatal, bb.warn)[attempt_only]("Unable to install packages. "
   "Command '%s' returned %d:\n%s" %
   (cmd, e.returncode, 
e.output.decode("utf-8")))
 
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 3/4] systemd: fix build failure for qemux86 and qemuppc with musl

2018-02-28 Thread Khem Raj
On Wed, Feb 28, 2018 at 12:46 AM, ChenQi  wrote:
> On 02/28/2018 04:29 PM, Khem Raj wrote:
>>
>> On Tue, Feb 27, 2018 at 9:56 PM, Chen Qi  wrote:
>>>
>>> Remove the 'fstack-protector' and 'fstack-protector-strong' flags
>>> as a workaround to fix the following error when building for qemux86
>>> and qemuppc with musl.
>>>
>>>undefined reference to `__stack_chk_fail_local'
>>>
>>> Signed-off-by: Chen Qi 
>>> ---
>>>   ...ck-protector-flags-to-workaround-musl-bui.patch | 33
>>> ++
>>>   meta/recipes-core/systemd/systemd_236.bb   |  4 +++
>>>   2 files changed, 37 insertions(+)
>>>   create mode 100644
>>> meta/recipes-core/systemd/systemd/0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch
>>>
>>> diff --git
>>> a/meta/recipes-core/systemd/systemd/0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch
>>> b/meta/recipes-core/systemd/systemd/0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch
>>> new file mode 100644
>>> index 000..783e579
>>> --- /dev/null
>>> +++
>>> b/meta/recipes-core/systemd/systemd/0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch
>>> @@ -0,0 +1,33 @@
>>> +From a3e71209957e627be7e47969a61d2c69de4f2659 Mon Sep 17 00:00:00 2001
>>> +From: Chen Qi 
>>> +Date: Tue, 27 Feb 2018 18:06:51 -0800
>>> +Subject: [PATCH] Remove fstack-protector flags to workaround musl build
>>> +
>>> +Remove fstack-protector and fstack-protector-strong flags to fix
>>> +the following build failure for qemux86 and qemuppc with musl.
>>> +
>>> +  undefined reference to `__stack_chk_fail_local'
>>> +
>>> +Upstream-Status: Inappropriate [OE Specific]
>>> +
>>> +Signed-off-by: Chen Qi 
>>> +---
>>> + meson.build | 2 --
>>> + 1 file changed, 2 deletions(-)
>>> +
>>> +diff --git a/meson.build b/meson.build
>>> +index ddc061c12..631e76886 100644
>>> +--- a/meson.build
>>>  b/meson.build
>>> +@@ -298,8 +298,6 @@ foreach arg : ['-Wextra',
>>> +'-fdiagnostics-show-option',
>>> +'-fno-strict-aliasing',
>>> +'-fvisibility=hidden',
>>> +-   '-fstack-protector',
>>> +-   '-fstack-protector-strong',
>>> +'-fPIE',
>>> +'--param=ssp-buffer-size=4',
>>> +   ]
>>> +--
>>> +2.13.0
>>> +
>>> diff --git a/meta/recipes-core/systemd/systemd_236.bb
>>> b/meta/recipes-core/systemd/systemd_236.bb
>>> index a208f62..7798abb 100644
>>> --- a/meta/recipes-core/systemd/systemd_236.bb
>>> +++ b/meta/recipes-core/systemd/systemd_236.bb
>>> @@ -53,6 +53,10 @@ SRC_URI =
>>> "git://github.com/systemd/systemd.git;protocol=git \
>>>  "
>>>   SRC_URI_append_qemuall = "
>>> file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch"
>>>
>>> +# Workaround undefined reference to `__stack_chk_fail_local' on qemux86
>>> and qemuppc for musl
>>> +SRC_URI_append_libc-musl_qemux86 = "
>>> file://0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch"
>>> +SRC_URI_append_libc-musl_qemuppc = "
>>> file://0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch"
>>> +
>>
>> we have security_flags.inc to build with these flags. So it might be fine
>> to just remove these flags including -fPIE
>>
>
> Hi Khem,
>
> Just to confirm, do you mean that we remove these flags unconditionally?
> Something like:
> SRC_URI_append = " file://0001-Remove-security-flags"

yes
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] openssh: remove unused patch

2018-02-28 Thread Maxin B. John
Remove unused patch:
0001-openssh-Fix-syntax-error-on-x32.patch

Signed-off-by: Maxin B. John 
---
 .../0001-openssh-Fix-syntax-error-on-x32.patch | 33 --
 1 file changed, 33 deletions(-)
 delete mode 100644 
meta/recipes-connectivity/openssh/openssh/0001-openssh-Fix-syntax-error-on-x32.patch

diff --git 
a/meta/recipes-connectivity/openssh/openssh/0001-openssh-Fix-syntax-error-on-x32.patch
 
b/meta/recipes-connectivity/openssh/openssh/0001-openssh-Fix-syntax-error-on-x32.patch
deleted file mode 100644
index ce9e200..000
--- 
a/meta/recipes-connectivity/openssh/openssh/0001-openssh-Fix-syntax-error-on-x32.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From a7e359d4ba345aa2a13c07f1057184e9b4e598a2 Mon Sep 17 00:00:00 2001
-From: sweeaun 
-Date: Tue, 22 Aug 2017 11:19:48 -0700
-Subject: [PATCH] openssh: Fix syntax error on x32
-
-Upstream-Status: Backport
-This bug has been fixed in v_7.5 branch https://github.com/openssh/
-openssh-portable/tree/V_7_5 and master branch https://github.com/
-openssh/openssh-portable/tree/master.
-
-Fix compilation error during openssh x32 build due to syntax error.
-
-Signed-off-by: sweeaun 

- sandbox-seccomp-filter.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/sandbox-seccomp-filter.c b/sandbox-seccomp-filter.c
-index 3a1aedc..a8d472a 100644
 a/sandbox-seccomp-filter.c
-+++ b/sandbox-seccomp-filter.c
-@@ -235,7 +235,7 @@ static const struct sock_filter preauth_insns[] = {
-* x86-64 syscall under some circumstances, e.g.
-* https://bugs.debian.org/849923
-*/
--  SC_ALLOW(__NR_clock_gettime & ~__X32_SYSCALL_BIT);
-+  SC_ALLOW(__NR_clock_gettime & ~__X32_SYSCALL_BIT),
- #endif
- 
-   /* Default deny */
--- 
-2.7.4
-
-- 
2.4.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] dbus-test_1.12.2: various fixes

2018-02-28 Thread Maxin B. John
Hi,

On Tue, Feb 27, 2018 at 12:19:26PM -0800, Juro Bystricky wrote:
> The result of running dbus-test-ptest was a series of
> various segfaults, interpreted as FAILs. This was a direct consequence
> of the test suite loading the installed shared library libdbus-1.so, not the
> one built along the test suite.
> 
> While we normally want to test against the installed libraries, we cannot
> do this in this case as the test suite expects a library that is 
> configured/compiled
> differently from the installed one. We could configure the installed library
> identically as the test suite expects, (and there should be no issues), 
> however
> this is not desirable for performance reasons.
> 
> Hence we need to use the library built along with the test suite.
> Of course, running the test suite against its own library does not
> test the installed library, however they are both built from the same
> sources so that can give us some kind of indication.
> 
> The following changes were made:
> 
> 1. Configure the test library as close as possible to the installed one,
>with some additional configuration options that are needed for testing.
>(Use dbus_1.12.2.bb recipe as a template)
> 2. Include the shared libraries in the package, use LD_LIBRARY_PATH during
>testing to load them instead of the installed ones.
> 3. Add a few more tests. (There are still some additional tests built that
>are not used, but they would have to be special-cased).
> 4. When evaluating the test results, differentiate between "FAIL" and "SKIP"
> 
> [YOCTO #10841]
> [YOCTO #12277]
> 
> Signed-off-by: Juro Bystricky 
> ---
>  meta/recipes-core/dbus/dbus-test_1.12.2.bb | 30 
> ++
>  meta/recipes-core/dbus/dbus/run-ptest  | 20 +---
>  2 files changed, 43 insertions(+), 7 deletions(-)

Probably due to this change, dbus ptest related sanity tests fails here:

https://autobuilder.yocto.io/builders/nightly-deb-non-deb/builds/813/steps/Running%20Sanity%20Tests/logs/stdio


NOTE:  ... ok
| NOTE: ==
| NOTE: FAIL: test_ptestrunner (ptest.PtestRunnerTest)
| NOTE: --
| NOTE: Traceback (most recent call last):
|   File 
"/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-deb-non-deb/build/meta/lib/oeqa/core/decorator/__init__.py",
 line 32, in wrapped_f
| return func(*args, **kwargs)
|   File 
"/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-deb-non-deb/build/meta/lib/oeqa/core/decorator/__init__.py",
 line 32, in wrapped_f
| return func(*args, **kwargs)
|   File 
"/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-deb-non-deb/build/meta/lib/oeqa/core/decorator/__init__.py",
 line 32, in wrapped_f
| return func(*args, **kwargs)
|   File 
"/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-deb-non-deb/build/meta/lib/oeqa/runtime/cases/ptest.py",
 line 93, in test_ptestrunner
| self.assertFalse(failed_tests, msg = "Failed ptests: %s" 
%(str(failed_tests)))
| AssertionError: {'dbus-test': [' test/test-bus', ' test/test-dbus-daemon', ' 
test/test-names']} is not false : Failed ptests: {'dbus-test': [' 
test/test-bus', ' test/test-dbus-daemon', ' test/test-names']}


Best Regards,
Maxin
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [RFC 0/3] Add wildcards to SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS

2018-02-28 Thread Joshua Watt
On Wed, 2018-02-28 at 14:14 +, Richard Purdie wrote:
> On Tue, 2018-02-27 at 16:47 -0600, Joshua Watt wrote:
> > Wildcard support in SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS allows the
> > native
> > tools that were in a hardcoded list to be specified in layer.conf
> > with
> > the other exclusions.
> 
> I was always reluctant to add wildcard support to this but it does
> make
> sense. It worked out ok in the testing I gave it. As we're at feature
> freeze, this would have to go in ASAP.

I was more worried about http://lists.openembedded.org/pipermail/openem
bedded-core/2018-February/147901.html, which looked like it already
landed in master-next (886ffabca). I have no problem waiting for the
next development cycle on this, unless someone *really* wants it.

> 
> Cheers,
> 
> Richard
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [RFC 0/3] Add wildcards to SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS

2018-02-28 Thread Richard Purdie
On Tue, 2018-02-27 at 16:47 -0600, Joshua Watt wrote:
> Wildcard support in SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS allows the native
> tools that were in a hardcoded list to be specified in layer.conf
> with
> the other exclusions.

I was always reluctant to add wildcard support to this but it does make
sense. It worked out ok in the testing I gave it. As we're at feature
freeze, this would have to go in ASAP.

Cheers,

Richard
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 4/4] systemd-boot: upgrade to 236

2018-02-28 Thread Burton, Ross
No, still broken:

ERROR: systemd-boot-236-r0 do_compile: oe_runmake failed
ERROR: systemd-boot-236-r0 do_compile: Function failed: do_compile (log
file is located at
/data/poky-tmp/master/work/corei7-64-intel-common-poky-linux/systemd-boot/236-r0/temp/log.do_compile.31074)
ERROR: Logfile of failure stored in:
/data/poky-tmp/master/work/corei7-64-intel-common-poky-linux/systemd-boot/236-r0/temp/log.do_compile.31074
Log data follows:
| DEBUG: Executing shell function do_compile
| [1/10] Generating console.c.o with a custom command.
| [2/10] Generating graphics.c.o with a custom command.
| [3/10] Generating pe.c.o with a custom command.
| [4/10] Generating measure.c.o with a custom command.
| [5/10] Generating disk.c.o with a custom command.
| [6/10] Generating util.c.o with a custom command.
| [7/10] Generating shim.c.o with a custom command.
| [8/10] Generating boot.c.o with a custom command.
| [9/10] Generating systemd_boot.so with a custom command.
| [10/10] Generating systemd-bootx64.efi with a custom command.
| NOTE: make -j 20 linuxx64.efi.stub
| make: *** No rule to make target 'linuxx64.efi.stub'.  Stop.
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at
/data/poky-tmp/master/work/corei7-64-intel-common-poky-linux/systemd-boot/236-r0/temp/log.do_compile.31074)
ERROR: Task
(/home/ross/Yocto/poky/meta/recipes-core/systemd/systemd-boot_236.bb:do_compile)
failed with exit code '1'

Ross

On 28 February 2018 at 13:30, Burton, Ross  wrote:

> ERROR: systemd-boot-236-r0 do_compile: Function failed: do_compile (log
> file is located at /data/poky-tmp/master/work/corei7-64-intel-common-poky-
> linux/systemd-boot/236-r0/temp/log.do_compile.10165)
> ERROR: Logfile of failure stored in: /data/poky-tmp/master/work/
> corei7-64-intel-common-poky-linux/systemd-boot/236-r0/
> temp/log.do_compile.10165
> Log data follows:
> | DEBUG: Executing shell function do_compile
> | /data/poky-tmp/master/work/corei7-64-intel-common-poky-
> linux/systemd-boot/236-r0/temp/run.do_compile.10165: 109: [: x86_64:
> unexpected operator
> | ninja: error: unknown target 'src/boot/efi/systemd-bootia32.efi'
>
> +   if [ "${TARGET_ARCH}" == "x86_64" ]; then
>
> Remember that == is a bashism and the correct operator for [ is =.
>
> (fix squashed here)
>
> Ross
>
> On 28 February 2018 at 05:56, Chen Qi  wrote:
>
>> Upgrade systemd-boot to 236.
>>
>> As systemd has dropped autotools support, fix configure and compile
>> failures related to meson.
>>
>> Signed-off-by: Chen Qi 
>> ---
>>  meta/recipes-core/systemd/systemd-boot_234.bb  | 43 ---
>>  meta/recipes-core/systemd/systemd-boot_236.bb  | 49
>> +
>>  .../systemd/0001-Also-check-i586-for-ia32.patch| 28 ++
>>  ...efi_cc-and-efi_ld-correctly-when-cross-co.patch | 62
>> ++
>>  4 files changed, 139 insertions(+), 43 deletions(-)
>>  delete mode 100644 meta/recipes-core/systemd/systemd-boot_234.bb
>>  create mode 100644 meta/recipes-core/systemd/systemd-boot_236.bb
>>  create mode 100644 meta/recipes-core/systemd/syst
>> emd/0001-Also-check-i586-for-ia32.patch
>>  create mode 100644 meta/recipes-core/systemd/syst
>> emd/0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch
>>
>> diff --git a/meta/recipes-core/systemd/systemd-boot_234.bb
>> b/meta/recipes-core/systemd/systemd-boot_234.bb
>> deleted file mode 100644
>> index 88a14ac..000
>> --- a/meta/recipes-core/systemd/systemd-boot_234.bb
>> +++ /dev/null
>> @@ -1,43 +0,0 @@
>> -require systemd.inc
>> -FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemd:"
>> -
>> -DEPENDS = "intltool-native libcap util-linux gnu-efi gperf-native"
>> -
>> -SRC_URI += "file://0007-use-lnr-wrapper-instead-of-looking-for-relative
>> -opti.patch"
>> -
>> -inherit autotools pkgconfig gettext
>> -inherit deploy
>> -
>> -EFI_CC ?= "${CC}"
>> -# Man pages are packaged through the main systemd recipe
>> -EXTRA_OECONF = " --enable-gnuefi \
>> - --with-efi-includedir=${STAGING_INCDIR} \
>> - --with-efi-ldsdir=${STAGING_LIBDIR} \
>> - --with-efi-libdir=${STAGING_LIBDIR} \
>> - --disable-manpages \
>> - EFI_CC='${EFI_CC}' \
>> -   "
>> -
>> -# Imported from the old gummiboot recipe
>> -TUNE_CCARGS_remove = "-mfpmath=sse"
>> -COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"
>> -COMPATIBLE_HOST_x86-x32 = "null"
>> -
>> -do_compile() {
>> -   SYSTEMD_BOOT_EFI_ARCH="ia32"
>> -   if [ "${TARGET_ARCH}" = "x86_64" ]; then
>> -   SYSTEMD_BOOT_EFI_ARCH="x64"
>> -   fi
>> -
>> -   oe_runmake systemd-boot${SYSTEMD_BOOT_EFI_ARCH}.efi
>> -}
>> -
>> -do_install() {
>> -   # Bypass systemd installation with a NOP
>> -   :
>> -}
>> -
>> -do_deploy () {
>> -   install ${B}/systemd-boot*.efi ${DEPLOYDIR}
>> -}
>> -addtask deploy before 

Re: [OE-core] [PATCH 4/4] systemd-boot: upgrade to 236

2018-02-28 Thread Burton, Ross
ERROR: systemd-boot-236-r0 do_compile: Function failed: do_compile (log
file is located at
/data/poky-tmp/master/work/corei7-64-intel-common-poky-linux/systemd-boot/236-r0/temp/log.do_compile.10165)
ERROR: Logfile of failure stored in:
/data/poky-tmp/master/work/corei7-64-intel-common-poky-linux/systemd-boot/236-r0/temp/log.do_compile.10165
Log data follows:
| DEBUG: Executing shell function do_compile
|
/data/poky-tmp/master/work/corei7-64-intel-common-poky-linux/systemd-boot/236-r0/temp/run.do_compile.10165:
109: [: x86_64: unexpected operator
| ninja: error: unknown target 'src/boot/efi/systemd-bootia32.efi'

+   if [ "${TARGET_ARCH}" == "x86_64" ]; then

Remember that == is a bashism and the correct operator for [ is =.

(fix squashed here)

Ross

On 28 February 2018 at 05:56, Chen Qi  wrote:

> Upgrade systemd-boot to 236.
>
> As systemd has dropped autotools support, fix configure and compile
> failures related to meson.
>
> Signed-off-by: Chen Qi 
> ---
>  meta/recipes-core/systemd/systemd-boot_234.bb  | 43 ---
>  meta/recipes-core/systemd/systemd-boot_236.bb  | 49 +
>  .../systemd/0001-Also-check-i586-for-ia32.patch| 28 ++
>  ...efi_cc-and-efi_ld-correctly-when-cross-co.patch | 62
> ++
>  4 files changed, 139 insertions(+), 43 deletions(-)
>  delete mode 100644 meta/recipes-core/systemd/systemd-boot_234.bb
>  create mode 100644 meta/recipes-core/systemd/systemd-boot_236.bb
>  create mode 100644 meta/recipes-core/systemd/
> systemd/0001-Also-check-i586-for-ia32.patch
>  create mode 100644 meta/recipes-core/systemd/systemd/0001-Fix-to-run-efi_
> cc-and-efi_ld-correctly-when-cross-co.patch
>
> diff --git a/meta/recipes-core/systemd/systemd-boot_234.bb
> b/meta/recipes-core/systemd/systemd-boot_234.bb
> deleted file mode 100644
> index 88a14ac..000
> --- a/meta/recipes-core/systemd/systemd-boot_234.bb
> +++ /dev/null
> @@ -1,43 +0,0 @@
> -require systemd.inc
> -FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemd:"
> -
> -DEPENDS = "intltool-native libcap util-linux gnu-efi gperf-native"
> -
> -SRC_URI += "file://0007-use-lnr-wrapper-instead-of-looking-for-
> relative-opti.patch"
> -
> -inherit autotools pkgconfig gettext
> -inherit deploy
> -
> -EFI_CC ?= "${CC}"
> -# Man pages are packaged through the main systemd recipe
> -EXTRA_OECONF = " --enable-gnuefi \
> - --with-efi-includedir=${STAGING_INCDIR} \
> - --with-efi-ldsdir=${STAGING_LIBDIR} \
> - --with-efi-libdir=${STAGING_LIBDIR} \
> - --disable-manpages \
> - EFI_CC='${EFI_CC}' \
> -   "
> -
> -# Imported from the old gummiboot recipe
> -TUNE_CCARGS_remove = "-mfpmath=sse"
> -COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"
> -COMPATIBLE_HOST_x86-x32 = "null"
> -
> -do_compile() {
> -   SYSTEMD_BOOT_EFI_ARCH="ia32"
> -   if [ "${TARGET_ARCH}" = "x86_64" ]; then
> -   SYSTEMD_BOOT_EFI_ARCH="x64"
> -   fi
> -
> -   oe_runmake systemd-boot${SYSTEMD_BOOT_EFI_ARCH}.efi
> -}
> -
> -do_install() {
> -   # Bypass systemd installation with a NOP
> -   :
> -}
> -
> -do_deploy () {
> -   install ${B}/systemd-boot*.efi ${DEPLOYDIR}
> -}
> -addtask deploy before do_build after do_compile
> diff --git a/meta/recipes-core/systemd/systemd-boot_236.bb
> b/meta/recipes-core/systemd/systemd-boot_236.bb
> new file mode 100644
> index 000..1a0135a
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd-boot_236.bb
> @@ -0,0 +1,49 @@
> +require systemd.inc
> +FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemd:"
> +
> +DEPENDS = "intltool-native libcap util-linux gnu-efi gperf-native"
> +
> +SRC_URI += 
> "file://0003-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
> \
> +file://0027-remove-nobody-user-group-checking.patch \
> +file://0001-Also-check-i586-for-ia32.patch \
> +
> file://0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch
> \
> +"
> +
> +inherit meson pkgconfig gettext
> +inherit deploy
> +
> +EFI_CC ?= "${CC}"
> +
> +EXTRA_OEMESON += "-Defi=true \
> +  -Dgnu-efi=true \
> +  -Defi-includedir=${STAGING_INCDIR}/efi \
> +  -Defi-ldsdir=${STAGING_LIBDIR} \
> +  -Defi-libdir=${STAGING_LIBDIR} \
> +  -Dman=false \
> +  -Defi-cc='${EFI_CC}' \
> +  -Defi-ld='${LD}' \
> +  "
> +
> +
> +# Imported from the old gummiboot recipe
> +TUNE_CCARGS_remove = "-mfpmath=sse"
> +COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"
> +COMPATIBLE_HOST_x86-x32 = "null"
> +
> +do_compile() {
> +   SYSTEMD_BOOT_EFI_ARCH="ia32"
> +   if [ "${TARGET_ARCH}" == "x86_64" ]; then
> +   SYSTEMD_BOOT_EFI_ARCH="x64"
> +   fi
> +   ninja src/boot/efi/systemd-boot${SYSTEMD_BOOT_EFI_ARCH}.efi
> +}
> +
> +do_install() {
> +   # Bypass 

Re: [OE-core] [PATCH v2 0/8] go1.10 update and misc improvements

2018-02-28 Thread Matt Madison
Looks like a multilib issue.  I'll fix it up and send out a v3.

Thanks,
-Matt

On Wed, Feb 28, 2018 at 3:44 AM, Richard Purdie
 wrote:
> On Wed, 2018-02-28 at 08:42 -0300, Otavio Salvador wrote:
>> On Wed, Feb 28, 2018 at 8:37 AM, Richard Purdie
>>  wrote:
>> >
>> > On Wed, 2018-02-28 at 10:47 +, Richard Purdie wrote:
>> > >
>> > > On Tue, 2018-02-27 at 14:16 -0300, Otavio Salvador wrote:
>> > > > tested it in -next, one issue:
>> > >
>> > > FAIL: test_go_dep_build (gotoolchain.oeGoToolchainSelfTest)
>> > >
>> > > from https://autobuilder.yocto.io/builders/nightly-oe-selftest/bu
>> > > ilds
>> > > /8
>> > > 57/steps/Running%20oe-selftest/logs/stdio
>> > >
>> > > (can reproduce with oe-selftest -r
>> > > gotoolchain.oeGoToolchainSelfTest.test_go_dep_build)
>> > Also: https://autobuilder.yocto.io/builders/nightly-world-lsb/build
>> > s/791/steps/BuildImages/logs/stdio
>> >
>> >
>> > Summary: 6 tasks failed:
>> >   virtual:multilib:lib32:/home/pokybuild/yocto-autobuilder/yocto-
>> > worker/nightly-world-lsb/build/meta/recipes-extended/go-
>> > examples/go-helloworld_0.1.bb:do_compile
>> >   virtual:multilib:lib32:/home/pokybuild/yocto-autobuilder/yocto-
>> > worker/nightly-world-lsb/build/meta/recipes-
>> > devtools/glide/glide_0.13.1.bb:do_compile
>> >   virtual:multilib:lib32:/home/pokybuild/yocto-autobuilder/yocto-
>> > worker/nightly-world-lsb/build/meta/recipes-devtools/go/go-
>> > dep_0.4.1.bb:do_compile
>> >   /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-
>> > lsb/build/meta/recipes-extended/go-examples/go-
>> > helloworld_0.1.bb:do_compile
>> >   /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-
>> > lsb/build/meta/recipes-devtools/glide/glide_0.13.1.bb:do_compile
>> >   /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-
>> > lsb/build/meta/recipes-devtools/go/go-dep_0.4.1.bb:do_compile
>> Just to confirm, was it using v2? I had problems with v1.
>
> Yes. Not sure it was just world-lsb and not world that failed...
>
> Cheers,
>
> Richard
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 2/4] systemd: upgrade to 236

2018-02-28 Thread Alexander Kanavin

On 02/28/2018 07:56 AM, Chen Qi wrote:

Upgrade systemd to 236.


Latest upstream release is 237, should we use that?

Alex
--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v2 0/8] go1.10 update and misc improvements

2018-02-28 Thread Richard Purdie
On Wed, 2018-02-28 at 08:42 -0300, Otavio Salvador wrote:
> On Wed, Feb 28, 2018 at 8:37 AM, Richard Purdie
>  wrote:
> > 
> > On Wed, 2018-02-28 at 10:47 +, Richard Purdie wrote:
> > > 
> > > On Tue, 2018-02-27 at 14:16 -0300, Otavio Salvador wrote:
> > > > tested it in -next, one issue:
> > > 
> > > FAIL: test_go_dep_build (gotoolchain.oeGoToolchainSelfTest)
> > > 
> > > from https://autobuilder.yocto.io/builders/nightly-oe-selftest/bu
> > > ilds
> > > /8
> > > 57/steps/Running%20oe-selftest/logs/stdio
> > > 
> > > (can reproduce with oe-selftest -r
> > > gotoolchain.oeGoToolchainSelfTest.test_go_dep_build)
> > Also: https://autobuilder.yocto.io/builders/nightly-world-lsb/build
> > s/791/steps/BuildImages/logs/stdio
> > 
> > 
> > Summary: 6 tasks failed:
> >   virtual:multilib:lib32:/home/pokybuild/yocto-autobuilder/yocto-
> > worker/nightly-world-lsb/build/meta/recipes-extended/go-
> > examples/go-helloworld_0.1.bb:do_compile
> >   virtual:multilib:lib32:/home/pokybuild/yocto-autobuilder/yocto-
> > worker/nightly-world-lsb/build/meta/recipes-
> > devtools/glide/glide_0.13.1.bb:do_compile
> >   virtual:multilib:lib32:/home/pokybuild/yocto-autobuilder/yocto-
> > worker/nightly-world-lsb/build/meta/recipes-devtools/go/go-
> > dep_0.4.1.bb:do_compile
> >   /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-
> > lsb/build/meta/recipes-extended/go-examples/go-
> > helloworld_0.1.bb:do_compile
> >   /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-
> > lsb/build/meta/recipes-devtools/glide/glide_0.13.1.bb:do_compile
> >   /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-
> > lsb/build/meta/recipes-devtools/go/go-dep_0.4.1.bb:do_compile
> Just to confirm, was it using v2? I had problems with v1.

Yes. Not sure it was just world-lsb and not world that failed...

Cheers,

Richard

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v2 0/8] go1.10 update and misc improvements

2018-02-28 Thread Otavio Salvador
On Wed, Feb 28, 2018 at 8:37 AM, Richard Purdie
 wrote:
> On Wed, 2018-02-28 at 10:47 +, Richard Purdie wrote:
>> On Tue, 2018-02-27 at 14:16 -0300, Otavio Salvador wrote:
>> >
>> > On Tue, Feb 27, 2018 at 9:36 AM, Matt Madison > > >
>> > wrote:
>> > >
>> > >
>> > > New in v2:
>> > > * Fixed Upstream-Status line in go patches
>> > > * Added GOTMPDIR to do_configure[dirs]
>> > >
>> > > Updates to the go recipes and bbclasses for go1.10, which
>> > > moves the bulk of the toolchain bootstrap and build out
>> > > of the 'make.bash' script and to the 'dist' tool.  This
>> > > required a rework of the patches.
>> > >
>> > > go1.10 introduces significant changes to the go build
>> > > tool as well, requiring some further patches to make
>> > > it work for OE builds.
>> > >
>> > > See https://golang.org/doc/go1.10 for a complete list
>> > > of new features and changes.
>> > >
>> > > Following the update are some cleanup/improvement
>> > > patches.
>> > I tested those patches and they are working fine. I pinged Matt
>> > specifically about one patch that seems that could be simplified.
>> > So
>> > please wait until we get back on this before merging it.
>> >
>> > If possible to put this on MUT so we see if any issue is raised up,
>> > it'd be good as well :-)
>> I tested it in -next, one issue:
>>
>> FAIL: test_go_dep_build (gotoolchain.oeGoToolchainSelfTest)
>>
>> from https://autobuilder.yocto.io/builders/nightly-oe-selftest/builds
>> /8
>> 57/steps/Running%20oe-selftest/logs/stdio
>>
>> (can reproduce with oe-selftest -r
>> gotoolchain.oeGoToolchainSelfTest.test_go_dep_build)
>
> Also: 
> https://autobuilder.yocto.io/builders/nightly-world-lsb/builds/791/steps/BuildImages/logs/stdio
>
>
> Summary: 6 tasks failed:
>   
> virtual:multilib:lib32:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/meta/recipes-extended/go-examples/go-helloworld_0.1.bb:do_compile
>   
> virtual:multilib:lib32:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/meta/recipes-devtools/glide/glide_0.13.1.bb:do_compile
>   
> virtual:multilib:lib32:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/meta/recipes-devtools/go/go-dep_0.4.1.bb:do_compile
>   
> /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/meta/recipes-extended/go-examples/go-helloworld_0.1.bb:do_compile
>   
> /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/meta/recipes-devtools/glide/glide_0.13.1.bb:do_compile
>   
> /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/meta/recipes-devtools/go/go-dep_0.4.1.bb:do_compile

Just to confirm, was it using v2? I had problems with v1.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] meta-world-pkgdata: This recipe is machine specific, mark as such

2018-02-28 Thread Richard Purdie
The recipe depends on many machine specific tasks and should be marked
as machine specific itself. This fixes signature tests after some dependency
issues were fixed at the bitbake level which exposed that issue.

Signed-off-by: Richard Purdie 
---
 meta/recipes-core/meta/meta-world-pkgdata.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-core/meta/meta-world-pkgdata.bb 
b/meta/recipes-core/meta/meta-world-pkgdata.bb
index 02abd8a..b299861 100644
--- a/meta/recipes-core/meta/meta-world-pkgdata.bb
+++ b/meta/recipes-core/meta/meta-world-pkgdata.bb
@@ -3,6 +3,8 @@ LICENSE = "MIT"
 
 INHIBIT_DEFAULT_DEPS = "1"
 
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
 addtask do_allpackagedata before do_build
 do_allpackagedata() {
:
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v2 0/8] go1.10 update and misc improvements

2018-02-28 Thread Richard Purdie
On Wed, 2018-02-28 at 10:47 +, Richard Purdie wrote:
> On Tue, 2018-02-27 at 14:16 -0300, Otavio Salvador wrote:
> > 
> > On Tue, Feb 27, 2018 at 9:36 AM, Matt Madison  > >
> > wrote:
> > > 
> > > 
> > > New in v2:
> > > * Fixed Upstream-Status line in go patches
> > > * Added GOTMPDIR to do_configure[dirs]
> > > 
> > > Updates to the go recipes and bbclasses for go1.10, which
> > > moves the bulk of the toolchain bootstrap and build out
> > > of the 'make.bash' script and to the 'dist' tool.  This
> > > required a rework of the patches.
> > > 
> > > go1.10 introduces significant changes to the go build
> > > tool as well, requiring some further patches to make
> > > it work for OE builds.
> > > 
> > > See https://golang.org/doc/go1.10 for a complete list
> > > of new features and changes.
> > > 
> > > Following the update are some cleanup/improvement
> > > patches.
> > I tested those patches and they are working fine. I pinged Matt
> > specifically about one patch that seems that could be simplified.
> > So
> > please wait until we get back on this before merging it.
> > 
> > If possible to put this on MUT so we see if any issue is raised up,
> > it'd be good as well :-)
> I tested it in -next, one issue:
> 
> FAIL: test_go_dep_build (gotoolchain.oeGoToolchainSelfTest)
> 
> from https://autobuilder.yocto.io/builders/nightly-oe-selftest/builds
> /8
> 57/steps/Running%20oe-selftest/logs/stdio
> 
> (can reproduce with oe-selftest -r
> gotoolchain.oeGoToolchainSelfTest.test_go_dep_build)

Also: 
https://autobuilder.yocto.io/builders/nightly-world-lsb/builds/791/steps/BuildImages/logs/stdio


Summary: 6 tasks failed:
  
virtual:multilib:lib32:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/meta/recipes-extended/go-examples/go-helloworld_0.1.bb:do_compile
  
virtual:multilib:lib32:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/meta/recipes-devtools/glide/glide_0.13.1.bb:do_compile
  
virtual:multilib:lib32:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/meta/recipes-devtools/go/go-dep_0.4.1.bb:do_compile
  
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/meta/recipes-extended/go-examples/go-helloworld_0.1.bb:do_compile
  
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/meta/recipes-devtools/glide/glide_0.13.1.bb:do_compile
  
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/meta/recipes-devtools/go/go-dep_0.4.1.bb:do_compile

Cheers,

Richard

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [pyro][PATCH] staging: remove files from multilib workdir

2018-02-28 Thread Raphael Freudiger
Packages with a different architecture will be installed in a different 
multilib workdir.
When those packages are updated, it will remove the files from the default 
workdir,
but not from the multilib workdir.
This will throw a file exists error later on.
Remove the files from the multilib workdir for packages that are installed into 
the multilib workdir.

Signed-off-by: Raphael Freudiger 
---
 meta/classes/staging.bbclass | 47 
 1 file changed, 34 insertions(+), 13 deletions(-)

diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass
index 984051d6aa..2e836adce4 100644
--- a/meta/classes/staging.bbclass
+++ b/meta/classes/staging.bbclass
@@ -470,6 +470,10 @@ python extend_recipe_sysroot() {
 multilibs = {}
 manifests = {}
 
+multilib_variants = (d.getVar("MULTILIBS") or "").split()
+if multilib_variants:
+multilib_variants = [variant.split(":")[1] for variant in 
multilib_variants]
+
 for f in os.listdir(depdir):
 if not f.endswith(".complete"):
 continue
@@ -477,7 +481,15 @@ python extend_recipe_sysroot() {
 if os.path.islink(f) and not os.path.exists(f):
 bb.note("%s no longer exists, removing from sysroot" % f)
 lnk = os.readlink(f.replace(".complete", ""))
-sstate_clean_manifest(depdir + "/" + lnk, d, workdir)
+dep = os.path.basename(f).replace(".complete", "")
+d2 = d
+for variant in multilib_variants:
+if dep.startswith(variant+"-"):
+if variant not in multilibs:
+multilibs[variant] = get_multilib_datastore(variant, d)
+d2 = multilibs[variant]
+break
+sstate_clean_manifest(depdir + "/" + lnk, d2, d2.getVar("WORKDIR"))
 os.unlink(f)
 os.unlink(f.replace(".complete", ""))
 
@@ -517,7 +529,14 @@ python extend_recipe_sysroot() {
 fl = depdir + "/" + l
 bb.note("Task %s no longer depends on %s, removing from sysroot" % 
(mytaskname, l))
 lnk = os.readlink(fl)
-sstate_clean_manifest(depdir + "/" + lnk, d, workdir)
+d2 = d
+for variant in multilib_variants:
+if l.startswith(variant+"-"):
+if variant not in multilibs:
+multilibs[variant] = get_multilib_datastore(variant, d)
+d2 = multilibs[variant]
+break
+sstate_clean_manifest(depdir + "/" + lnk, d2, d2.getVar("WORKDIR"))
 os.unlink(fl)
 os.unlink(fl + ".complete")
 
@@ -528,6 +547,18 @@ python extend_recipe_sysroot() {
 taskhash = setscenedeps[dep][5]
 taskmanifest = depdir + "/" + c + "." + taskhash
 
+d2 = d
+destsysroot = recipesysroot
+variant = ''
+# get multilib datastore if needed
+if setscenedeps[dep][2].startswith("virtual:multilib"):
+variant = setscenedeps[dep][2].split(":")[2]
+if variant != current_variant:
+if variant not in multilibs:
+multilibs[variant] = get_multilib_datastore(variant, d)
+d2 = multilibs[variant]
+destsysroot = d2.getVar("RECIPE_SYSROOT")
+
 if os.path.exists(depdir + "/" + c):
 lnk = os.readlink(depdir + "/" + c)
 if lnk == c + "." + taskhash and os.path.exists(depdir + "/" + c + 
".complete"):
@@ -535,7 +566,7 @@ python extend_recipe_sysroot() {
 continue
 else:
 bb.note("%s exists in sysroot, but is stale (%s vs. %s), 
removing." % (c, lnk, c + "." + taskhash))
-sstate_clean_manifest(depdir + "/" + lnk, d, workdir)
+sstate_clean_manifest(depdir + "/" + lnk, d2, 
d2.getVar("WORKDIR"))
 os.unlink(depdir + "/" + c)
 if os.path.lexists(depdir + "/" + c + ".complete"):
 os.unlink(depdir + "/" + c + ".complete")
@@ -544,16 +575,6 @@ python extend_recipe_sysroot() {
 
 os.symlink(c + "." + taskhash, depdir + "/" + c)
 
-d2 = d
-destsysroot = recipesysroot
-variant = ''
-if setscenedeps[dep][2].startswith("virtual:multilib"):
-variant = setscenedeps[dep][2].split(":")[2]
-if variant != current_variant:
-if variant not in multilibs:
-multilibs[variant] = get_multilib_datastore(variant, d)
-d2 = multilibs[variant]
-destsysroot = d2.getVar("RECIPE_SYSROOT")
 
 native = False
 if c.endswith("-native"):
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v2 0/8] go1.10 update and misc improvements

2018-02-28 Thread Richard Purdie
On Tue, 2018-02-27 at 14:16 -0300, Otavio Salvador wrote:
> On Tue, Feb 27, 2018 at 9:36 AM, Matt Madison 
> wrote:
> > 
> > New in v2:
> > * Fixed Upstream-Status line in go patches
> > * Added GOTMPDIR to do_configure[dirs]
> > 
> > Updates to the go recipes and bbclasses for go1.10, which
> > moves the bulk of the toolchain bootstrap and build out
> > of the 'make.bash' script and to the 'dist' tool.  This
> > required a rework of the patches.
> > 
> > go1.10 introduces significant changes to the go build
> > tool as well, requiring some further patches to make
> > it work for OE builds.
> > 
> > See https://golang.org/doc/go1.10 for a complete list
> > of new features and changes.
> > 
> > Following the update are some cleanup/improvement
> > patches.
> I tested those patches and they are working fine. I pinged Matt
> specifically about one patch that seems that could be simplified. So
> please wait until we get back on this before merging it.
> 
> If possible to put this on MUT so we see if any issue is raised up,
> it'd be good as well :-)

I tested it in -next, one issue:

FAIL: test_go_dep_build (gotoolchain.oeGoToolchainSelfTest)

from https://autobuilder.yocto.io/builders/nightly-oe-selftest/builds/8
57/steps/Running%20oe-selftest/logs/stdio

(can reproduce with oe-selftest -r
gotoolchain.oeGoToolchainSelfTest.test_go_dep_build)

Cheers,

Richard
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] ✗ patchtest: failure for staging: remove files from multilib workdir

2018-02-28 Thread Patchwork
== Series Details ==

Series: staging: remove files from multilib workdir
Revision: 1
URL   : https://patchwork.openembedded.org/series/11134/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue Series does not apply on top of target branch 
[test_series_merge_on_head] 
  Suggested fixRebase your series on top of targeted branch
  Targeted branch  master (currently at b30153a157)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines: 
https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] staging: remove files from multilib workdir

2018-02-28 Thread Raphael Freudiger
Packages with a different architecture will be installed in a different 
multilib workdir.
When those packages are updated, it will remove the files from the default 
workdir,
but not from the multilib workdir.
This will throw a file exists error later on.
Remove the files from the multilib workdir for packages that are installed into 
the multilib workdir.

Signed-off-by: Raphael Freudiger 
---
 meta/classes/staging.bbclass | 47 
 1 file changed, 34 insertions(+), 13 deletions(-)

diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass
index 984051d6aa..2e836adce4 100644
--- a/meta/classes/staging.bbclass
+++ b/meta/classes/staging.bbclass
@@ -470,6 +470,10 @@ python extend_recipe_sysroot() {
 multilibs = {}
 manifests = {}
 
+multilib_variants = (d.getVar("MULTILIBS") or "").split()
+if multilib_variants:
+multilib_variants = [variant.split(":")[1] for variant in 
multilib_variants]
+
 for f in os.listdir(depdir):
 if not f.endswith(".complete"):
 continue
@@ -477,7 +481,15 @@ python extend_recipe_sysroot() {
 if os.path.islink(f) and not os.path.exists(f):
 bb.note("%s no longer exists, removing from sysroot" % f)
 lnk = os.readlink(f.replace(".complete", ""))
-sstate_clean_manifest(depdir + "/" + lnk, d, workdir)
+dep = os.path.basename(f).replace(".complete", "")
+d2 = d
+for variant in multilib_variants:
+if dep.startswith(variant+"-"):
+if variant not in multilibs:
+multilibs[variant] = get_multilib_datastore(variant, d)
+d2 = multilibs[variant]
+break
+sstate_clean_manifest(depdir + "/" + lnk, d2, d2.getVar("WORKDIR"))
 os.unlink(f)
 os.unlink(f.replace(".complete", ""))
 
@@ -517,7 +529,14 @@ python extend_recipe_sysroot() {
 fl = depdir + "/" + l
 bb.note("Task %s no longer depends on %s, removing from sysroot" % 
(mytaskname, l))
 lnk = os.readlink(fl)
-sstate_clean_manifest(depdir + "/" + lnk, d, workdir)
+d2 = d
+for variant in multilib_variants:
+if l.startswith(variant+"-"):
+if variant not in multilibs:
+multilibs[variant] = get_multilib_datastore(variant, d)
+d2 = multilibs[variant]
+break
+sstate_clean_manifest(depdir + "/" + lnk, d2, d2.getVar("WORKDIR"))
 os.unlink(fl)
 os.unlink(fl + ".complete")
 
@@ -528,6 +547,18 @@ python extend_recipe_sysroot() {
 taskhash = setscenedeps[dep][5]
 taskmanifest = depdir + "/" + c + "." + taskhash
 
+d2 = d
+destsysroot = recipesysroot
+variant = ''
+# get multilib datastore if needed
+if setscenedeps[dep][2].startswith("virtual:multilib"):
+variant = setscenedeps[dep][2].split(":")[2]
+if variant != current_variant:
+if variant not in multilibs:
+multilibs[variant] = get_multilib_datastore(variant, d)
+d2 = multilibs[variant]
+destsysroot = d2.getVar("RECIPE_SYSROOT")
+
 if os.path.exists(depdir + "/" + c):
 lnk = os.readlink(depdir + "/" + c)
 if lnk == c + "." + taskhash and os.path.exists(depdir + "/" + c + 
".complete"):
@@ -535,7 +566,7 @@ python extend_recipe_sysroot() {
 continue
 else:
 bb.note("%s exists in sysroot, but is stale (%s vs. %s), 
removing." % (c, lnk, c + "." + taskhash))
-sstate_clean_manifest(depdir + "/" + lnk, d, workdir)
+sstate_clean_manifest(depdir + "/" + lnk, d2, 
d2.getVar("WORKDIR"))
 os.unlink(depdir + "/" + c)
 if os.path.lexists(depdir + "/" + c + ".complete"):
 os.unlink(depdir + "/" + c + ".complete")
@@ -544,16 +575,6 @@ python extend_recipe_sysroot() {
 
 os.symlink(c + "." + taskhash, depdir + "/" + c)
 
-d2 = d
-destsysroot = recipesysroot
-variant = ''
-if setscenedeps[dep][2].startswith("virtual:multilib"):
-variant = setscenedeps[dep][2].split(":")[2]
-if variant != current_variant:
-if variant not in multilibs:
-multilibs[variant] = get_multilib_datastore(variant, d)
-d2 = multilibs[variant]
-destsysroot = d2.getVar("RECIPE_SYSROOT")
 
 native = False
 if c.endswith("-native"):
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/4] meson.bbclass: fix to build for more projects

2018-02-28 Thread ChenQi

On 02/28/2018 04:25 PM, Khem Raj wrote:

On Tue, Feb 27, 2018 at 9:56 PM, Chen Qi  wrote:

We should use the value of CC for the c compiler setting in cross
compilation configuration file for meson. For example, if we only
use ${HOST_PREFIX}gcc instead of ${CC}, we would meet the following
do_compile failure for systemd.

   cc1: fatal error: linux/capability.h: No such file or directory

Signed-off-by: Chen Qi 
---
  meta/classes/meson.bbclass | 13 -
  1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass
index 31d32a5..97dcf81 100644
--- a/meta/classes/meson.bbclass
+++ b/meta/classes/meson.bbclass
@@ -41,24 +41,19 @@ MESON_CROSS_FILE = ""
  MESON_CROSS_FILE_class-target = "--cross-file ${WORKDIR}/meson.cross"
  MESON_CROSS_FILE_class-nativesdk = "--cross-file ${WORKDIR}/meson.cross"

-CCOMPILER ?= "gcc"
-CXXCOMPILER ?= "g++"
-CCOMPILER_toolchain-clang = "clang"
-CXXCOMPILER_toolchain-clang = "clang++"
-
  def meson_array(var, d):
  return "', '".join(d.getVar(var).split()).join(("'", "'"))

  addtask write_config before do_configure
-do_write_config[vardeps] += "MESON_C_ARGS MESON_CPP_ARGS MESON_LINK_ARGS"
+do_write_config[vardeps] += "MESON_C_ARGS MESON_CPP_ARGS MESON_LINK_ARGS CC CXX 
LD"
  do_write_config() {
  # This needs to be Py to split the args into single-element lists
  cat >${WORKDIR}/meson.cross <

we should do same for ar and nm atleast.



Hi Khem,

As AR is set to be "${HOST_PREFIX}ar" and NM is set to be 
"${HOST_PREFIX}nm" in bitbake.conf, I chose not to change it.


Given it a second thinking, considering the meta-clang layer, I think 
you are right.


I'll fix it in V2.

Best Regards,
Chen Qi


  strip = '${HOST_PREFIX}strip'
  readelf = '${HOST_PREFIX}readelf'
  pkgconfig = 'pkg-config'
--
1.9.1

--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core



--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 3/4] systemd: fix build failure for qemux86 and qemuppc with musl

2018-02-28 Thread ChenQi

On 02/28/2018 04:29 PM, Khem Raj wrote:

On Tue, Feb 27, 2018 at 9:56 PM, Chen Qi  wrote:

Remove the 'fstack-protector' and 'fstack-protector-strong' flags
as a workaround to fix the following error when building for qemux86
and qemuppc with musl.

   undefined reference to `__stack_chk_fail_local'

Signed-off-by: Chen Qi 
---
  ...ck-protector-flags-to-workaround-musl-bui.patch | 33 ++
  meta/recipes-core/systemd/systemd_236.bb   |  4 +++
  2 files changed, 37 insertions(+)
  create mode 100644 
meta/recipes-core/systemd/systemd/0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch

diff --git 
a/meta/recipes-core/systemd/systemd/0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch
 
b/meta/recipes-core/systemd/systemd/0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch
new file mode 100644
index 000..783e579
--- /dev/null
+++ 
b/meta/recipes-core/systemd/systemd/0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch
@@ -0,0 +1,33 @@
+From a3e71209957e627be7e47969a61d2c69de4f2659 Mon Sep 17 00:00:00 2001
+From: Chen Qi 
+Date: Tue, 27 Feb 2018 18:06:51 -0800
+Subject: [PATCH] Remove fstack-protector flags to workaround musl build
+
+Remove fstack-protector and fstack-protector-strong flags to fix
+the following build failure for qemux86 and qemuppc with musl.
+
+  undefined reference to `__stack_chk_fail_local'
+
+Upstream-Status: Inappropriate [OE Specific]
+
+Signed-off-by: Chen Qi 
+---
+ meson.build | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index ddc061c12..631e76886 100644
+--- a/meson.build
 b/meson.build
+@@ -298,8 +298,6 @@ foreach arg : ['-Wextra',
+'-fdiagnostics-show-option',
+'-fno-strict-aliasing',
+'-fvisibility=hidden',
+-   '-fstack-protector',
+-   '-fstack-protector-strong',
+'-fPIE',
+'--param=ssp-buffer-size=4',
+   ]
+--
+2.13.0
+
diff --git a/meta/recipes-core/systemd/systemd_236.bb 
b/meta/recipes-core/systemd/systemd_236.bb
index a208f62..7798abb 100644
--- a/meta/recipes-core/systemd/systemd_236.bb
+++ b/meta/recipes-core/systemd/systemd_236.bb
@@ -53,6 +53,10 @@ SRC_URI = "git://github.com/systemd/systemd.git;protocol=git 
\
 "
  SRC_URI_append_qemuall = " 
file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch"

+# Workaround undefined reference to `__stack_chk_fail_local' on qemux86 and 
qemuppc for musl
+SRC_URI_append_libc-musl_qemux86 = " 
file://0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch"
+SRC_URI_append_libc-musl_qemuppc = " 
file://0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch"
+

we have security_flags.inc to build with these flags. So it might be fine
to just remove these flags including -fPIE



Hi Khem,

Just to confirm, do you mean that we remove these flags unconditionally?
Something like:
SRC_URI_append = " file://0001-Remove-security-flags"

Best Regards,
Chen Qi


  PAM_PLUGINS = " \
  pam-plugin-unix \
  pam-plugin-loginuid \
--
1.9.1

--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core



--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 3/4] systemd: fix build failure for qemux86 and qemuppc with musl

2018-02-28 Thread Khem Raj
On Tue, Feb 27, 2018 at 9:56 PM, Chen Qi  wrote:
> Remove the 'fstack-protector' and 'fstack-protector-strong' flags
> as a workaround to fix the following error when building for qemux86
> and qemuppc with musl.
>
>   undefined reference to `__stack_chk_fail_local'
>
> Signed-off-by: Chen Qi 
> ---
>  ...ck-protector-flags-to-workaround-musl-bui.patch | 33 
> ++
>  meta/recipes-core/systemd/systemd_236.bb   |  4 +++
>  2 files changed, 37 insertions(+)
>  create mode 100644 
> meta/recipes-core/systemd/systemd/0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch
>
> diff --git 
> a/meta/recipes-core/systemd/systemd/0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch
>  
> b/meta/recipes-core/systemd/systemd/0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch
> new file mode 100644
> index 000..783e579
> --- /dev/null
> +++ 
> b/meta/recipes-core/systemd/systemd/0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch
> @@ -0,0 +1,33 @@
> +From a3e71209957e627be7e47969a61d2c69de4f2659 Mon Sep 17 00:00:00 2001
> +From: Chen Qi 
> +Date: Tue, 27 Feb 2018 18:06:51 -0800
> +Subject: [PATCH] Remove fstack-protector flags to workaround musl build
> +
> +Remove fstack-protector and fstack-protector-strong flags to fix
> +the following build failure for qemux86 and qemuppc with musl.
> +
> +  undefined reference to `__stack_chk_fail_local'
> +
> +Upstream-Status: Inappropriate [OE Specific]
> +
> +Signed-off-by: Chen Qi 
> +---
> + meson.build | 2 --
> + 1 file changed, 2 deletions(-)
> +
> +diff --git a/meson.build b/meson.build
> +index ddc061c12..631e76886 100644
> +--- a/meson.build
>  b/meson.build
> +@@ -298,8 +298,6 @@ foreach arg : ['-Wextra',
> +'-fdiagnostics-show-option',
> +'-fno-strict-aliasing',
> +'-fvisibility=hidden',
> +-   '-fstack-protector',
> +-   '-fstack-protector-strong',
> +'-fPIE',
> +'--param=ssp-buffer-size=4',
> +   ]
> +--
> +2.13.0
> +
> diff --git a/meta/recipes-core/systemd/systemd_236.bb 
> b/meta/recipes-core/systemd/systemd_236.bb
> index a208f62..7798abb 100644
> --- a/meta/recipes-core/systemd/systemd_236.bb
> +++ b/meta/recipes-core/systemd/systemd_236.bb
> @@ -53,6 +53,10 @@ SRC_URI = 
> "git://github.com/systemd/systemd.git;protocol=git \
> "
>  SRC_URI_append_qemuall = " 
> file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch"
>
> +# Workaround undefined reference to `__stack_chk_fail_local' on qemux86 and 
> qemuppc for musl
> +SRC_URI_append_libc-musl_qemux86 = " 
> file://0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch"
> +SRC_URI_append_libc-musl_qemuppc = " 
> file://0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch"
> +

we have security_flags.inc to build with these flags. So it might be fine
to just remove these flags including -fPIE

>  PAM_PLUGINS = " \
>  pam-plugin-unix \
>  pam-plugin-loginuid \
> --
> 1.9.1
>
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/4] meson.bbclass: fix to build for more projects

2018-02-28 Thread Khem Raj
On Tue, Feb 27, 2018 at 9:56 PM, Chen Qi  wrote:
> We should use the value of CC for the c compiler setting in cross
> compilation configuration file for meson. For example, if we only
> use ${HOST_PREFIX}gcc instead of ${CC}, we would meet the following
> do_compile failure for systemd.
>
>   cc1: fatal error: linux/capability.h: No such file or directory
>
> Signed-off-by: Chen Qi 
> ---
>  meta/classes/meson.bbclass | 13 -
>  1 file changed, 4 insertions(+), 9 deletions(-)
>
> diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass
> index 31d32a5..97dcf81 100644
> --- a/meta/classes/meson.bbclass
> +++ b/meta/classes/meson.bbclass
> @@ -41,24 +41,19 @@ MESON_CROSS_FILE = ""
>  MESON_CROSS_FILE_class-target = "--cross-file ${WORKDIR}/meson.cross"
>  MESON_CROSS_FILE_class-nativesdk = "--cross-file ${WORKDIR}/meson.cross"
>
> -CCOMPILER ?= "gcc"
> -CXXCOMPILER ?= "g++"
> -CCOMPILER_toolchain-clang = "clang"
> -CXXCOMPILER_toolchain-clang = "clang++"
> -
>  def meson_array(var, d):
>  return "', '".join(d.getVar(var).split()).join(("'", "'"))
>
>  addtask write_config before do_configure
> -do_write_config[vardeps] += "MESON_C_ARGS MESON_CPP_ARGS MESON_LINK_ARGS"
> +do_write_config[vardeps] += "MESON_C_ARGS MESON_CPP_ARGS MESON_LINK_ARGS CC 
> CXX LD"
>  do_write_config() {
>  # This needs to be Py to split the args into single-element lists
>  cat >${WORKDIR}/meson.cross <  [binaries]
> -c = '${HOST_PREFIX}${CCOMPILER}'
> -cpp = '${HOST_PREFIX}${CXXCOMPILER}'
> +c = [${@meson_array('CC', d)}]
> +cpp = [${@meson_array('CXX', d)}]
>  ar = '${HOST_PREFIX}ar'
> -ld = '${HOST_PREFIX}ld'
> +ld = [${@meson_array('LD', d)}]


we should do same for ar and nm atleast.


>  strip = '${HOST_PREFIX}strip'
>  readelf = '${HOST_PREFIX}readelf'
>  pkgconfig = 'pkg-config'
> --
> 1.9.1
>
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core