Skip to contentSkip to conversation

kernel.bbclass: compile kernel and modules in a single task

PATCH Applied Dmitry Eremin-Solenikov 9 participants 42 messages Dec 13, 2011 – Dec 16, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/9 kernel.bbclass: compile kernel and modules in a single task

There is no point in compiling kernel modules in a separate task, run right after do_compile. On the other hand merging those tasks will e.g. make icecc used also for modules compilation, etc.

---
 meta/classes/kernel.bbclass |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
meta/classes/kernel.bbclass +1 -5
index 3f2f75a..a75c199 100644
@@ -89,17 +89,13 @@ kernel_do_compile() {
 	if test "${KERNEL_IMAGETYPE_FOR_MAKE}.gz" = "${KERNEL_IMAGETYPE}"; then
 		gzip -9c < "${KERNEL_IMAGETYPE_FOR_MAKE}" > "${KERNEL_OUTPUT}"
 	fi
-}
 
-do_compile_kernelmodules() {
-	unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
 	if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
-		oe_runmake ${PARALLEL_MAKE} modules  CC="${KERNEL_CC}" LD="${KERNEL_LD}"
+		oe_runmake modules  CC="${KERNEL_CC}" LD="${KERNEL_LD}"
 	else
 		bbnote "no modules to compile"
 	fi
 }
-addtask compile_kernelmodules after do_compile before do_install
 
 kernel_do_install() {
 	#
Signature · 1 line
1.7.7.3
#1 lore raw

PATCH 2/9 kernel.bbclass: move uImage handling to separate task

As per org.oe.dev and meta-oe's kernel.bbclass move uImage creation to separate task from do_deploy. This way the do_install task can also benefit from generated uImage.

The only major feature of oe-core's version (not to recreate uImage if it exists) is retained in this patch. On the contra, as this version was merged from meta-oe/org.oe.dev, new function has another feature:
it permits overriding the u-boot entrypoint via u-boot symbol.

---
 meta/classes/kernel.bbclass |   40 ++++++++++++++++++++++++----------------
 1 files changed, 24 insertions(+), 16 deletions(-)
meta/classes/kernel.bbclass +24 -16
index a75c199..db00d2d 100644
@@ -485,6 +485,30 @@ do_sizecheck() {
 
 addtask sizecheck before do_install after do_compile
 
+do_uboot_mkimage() {
+    if test "x${KERNEL_IMAGETYPE}" = "xuImage" -a \
+            ! -e arch/${ARCH}/boot/uImage ; then
+        ENTRYPOINT=${UBOOT_ENTRYPOINT}
+        if test -n "${UBOOT_ENTRYSYMBOL}"; then
+            ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \
+                   awk '$3=="${UBOOT_ENTRYSYMBOL}" {print $1}'`
+        fi
+        if test -e arch/${ARCH}/boot/compressed/vmlinux ; then
+            ${OBJCOPY} -O binary -R .note -R .comment -S arch/${ARCH}/boot/compressed/vmlinux linux.bin
+            uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C none -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin arch/${ARCH}/boot/uImage
+            rm -f linux.bin
+        else
+            ${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin
+            rm -f linux.bin.gz
+            gzip -9 linux.bin
+            uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C gzip -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin.gz arch/${ARCH}/boot/uImage
+            rm -f linux.bin.gz
+        fi
+    fi
+}
+
+addtask uboot_mkimage before do_install after do_compile
+
 KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
 # Don't include the DATETIME variable in the sstate package signatures
 KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME"
@@ -496,22 +520,6 @@ kernel_do_deploy() {
 		tar -cvzf ${DEPLOYDIR}/modules-${KERNEL_VERSION}-${PR}-${MACHINE}.tgz -C ${D} lib
 	fi
 
-	if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then 
-		if test -e arch/${ARCH}/boot/uImage ; then
-			cp arch/${ARCH}/boot/uImage ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
-		elif test -e arch/${ARCH}/boot/compressed/vmlinux ; then
-			${OBJCOPY} -O binary -R .note -R .comment -S arch/${ARCH}/boot/compressed/vmlinux linux.bin
-			uboot-mkimage -A ${ARCH} -O linux -T kernel -C none -a ${UBOOT_ENTRYPOINT} -e ${UBOOT_ENTRYPOINT} -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
-			rm -f linux.bin
-		else
-			${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin
-			rm -f linux.bin.gz
-			gzip -9 linux.bin
-			uboot-mkimage -A ${ARCH} -O linux -T kernel -C gzip -a ${UBOOT_ENTRYPOINT} -e ${UBOOT_ENTRYPOINT} -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin.gz ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
-			rm -f linux.bin.gz
-		fi
-	fi
-
 	cd ${DEPLOYDIR}
 	rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.bin
 	ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${KERNEL_IMAGE_SYMLINK_NAME}.bin
Signature · 1 line
1.7.7.3
#7 lore raw

PATCH 3/9 bitbake.conf, core-image-minimal-initramfs: add INITRAMFS_FSTYPES

In reply to Dmitry Eremin-Solenikov

Initramfs images don't benefit from usual IMAGE_FSTYPES overrides. The only sane values for them are "cpio.XXX". If IMAGE_FSTYPES is set to include 'live', building core-image-minimal-initramfs can result in build error, if the image is built before the kernel. To stop initramfs images from responding on IMAGE_FSTYPES settings, but still allow users/developers to override defaults (e.g. to generate "cpio.lzma" initramfs), introduce INITRAMFS_FSTYPES variable, by default set to "cpio.gz".

---
 meta/conf/bitbake.conf                             |    1 +
 .../images/core-image-minimal-initramfs.bb         |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
meta/conf/bitbake.conf +1 -0
index f79e3f7..1c21616 100644
@@ -673,6 +673,7 @@ require conf/abi_version.conf
 DL_DIR ?= "${TOPDIR}/downloads"
 SSTATE_DIR ?= "${TOPDIR}/sstate-cache"
 IMAGE_FSTYPES ?= "tar.gz"
+INITRAMFS_FSTYPES ?= "cpio.gz"
 PCMCIA_MANAGER ?= "pcmcia-cs"
 DEFAULT_TASK_PROVIDER ?= "task-base"
 MACHINE_TASK_PROVIDER ?= "${DEFAULT_TASK_PROVIDER}"
meta/recipes-core/images/core-image-minimal-initramfs.bb +1 -1
index d078c10..5149f31 100644
@@ -10,7 +10,7 @@ IMAGE_LINGUAS = ""
 
 LICENSE = "MIT"
 
+IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
 inherit core-image
 
 IMAGE_ROOTFS_SIZE = "8192"
-IMAGE_FSTYPES =+ "cpio.gz"
Signature · 1 line
1.7.7.3
#20 lore raw

PATCH 5/9 Move check that all installed files are shipped into insane.bbclass

In reply to Dmitry Eremin-Solenikov

Checking that all installed files are shipped is in reality a QA check. It would benefit from mechanisms like ERROR_QA/WARNING_QA. So move it into insane.bbclass. If some of the files are installed but should not be shipped for some reasons, one can add them to the variable IGNORE_UNSHIPPED_FILES.

---
 meta/classes/insane.bbclass  |   49 ++++++++++++++++++++++++++++++++++++++++-
 meta/classes/package.bbclass |   15 ------------
 2 files changed, 47 insertions(+), 17 deletions(-)
meta/classes/insane.bbclass +47 -2
index 5726e69..7a8643a 100644
@@ -100,7 +100,7 @@ def package_qa_get_machine_dict():
 
 
 # Currently not being used by default "desktop"
-WARN_QA ?= "ldflags useless-rpaths rpaths"
+WARN_QA ?= "ldflags useless-rpaths rpaths unshipped"
 ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch la2 pkgconfig la perms"
 
 def package_qa_clean_path(path,d):
@@ -485,6 +485,48 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, d):
 
     return sane
 
+IGNORE_UNSHIPPED_FILES ??= ""
+
+def packages_qa_unshipped_files(d):
+    skip = (d.getVar('INSANE_SKIP_${PN}', True) or "").split()
+    if "unshipped" in skip:
+        return False
+
+    seen = d.getVar('IGNORE_UNSHIPPED_FILES', True).split()
+    unshipped = []
+    dvar = d.getVar('PKGD', True)
+    destvar = d.getVar('PKGDEST', True)
+    packages = d.getVar('PACKAGES', True).split()
+    for p in packages:
+        pdir = os.path.join(destvar, p)
+        for root, dirs, files in os.walk(pdir):
+            dir = root[len(pdir):]
+            if not dir:
+                dir = os.sep
+            for f in (files + dirs):
+                path = os.path.join(dir, f)
+                if path not in seen:
+                    seen.append(path)
+
+    for root, dirs, files in os.walk(dvar):
+        dir = root[len(dvar):]
+        if not dir:
+            dir = os.sep
+        for f in (files + dirs):
+            path = os.path.join(dir, f)
+            if path not in seen:
+                unshipped.append(path)
+
+    pn = d.getVar('PN', True)
+
+    if unshipped == []:
+        return True
+
+    ret = package_qa_handle_error("unshipped", "For recipe %s, the following files/directories were installed but not shipped in any package:" % pn, d)
+    for f in unshipped:
+        package_qa_handle_error("unshipped", f, d)
+    return ret
+
 # The PACKAGE FUNC to scan each package
 python do_package_qa () {
     bb.note("DO PACKAGE QA")
@@ -522,6 +564,7 @@ python do_package_qa () {
     g = globals()
     walk_sane = True
     rdepends_sane = True
+    shipped_sane = True
     for package in packages.split():
         skip = (d.getVar('INSANE_SKIP_' + package, True) or "").split()
         if skip:
@@ -546,8 +589,10 @@ python do_package_qa () {
         if not package_qa_check_rdepends(package, pkgdest, skip, d):
             rdepends_sane = False
 
+    if not packages_qa_unshipped_files(d):
+        shipped_sane = False
 
-    if not walk_sane or not rdepends_sane:
+    if not walk_sane or not rdepends_sane or not shipped_sane:
         bb.fatal("QA run found fatal errors. Please consider fixing them.")
     bb.note("DONE with PACKAGE QA")
 }
meta/classes/package.bbclass +0 -15
index 39c1d4b..fbea9c6 100644
@@ -957,21 +957,6 @@ python populate_packages () {
 		del localdata
 	os.chdir(workdir)
 
-	unshipped = []
-	for root, dirs, files in os.walk(dvar):
-		dir = root[len(dvar):]
-		if not dir:
-			dir = os.sep
-		for f in (files + dirs):
-			path = os.path.join(dir, f)
-			if ('.' + path) not in seen:
-				unshipped.append(path)
-
-	if unshipped != []:
-		bb.warn("For recipe %s, the following files/directories were installed but not shipped in any package:" % pn)
-		for f in unshipped:
-			bb.warn("  " + f)
-
 	bb.build.exec_func("package_name_hook", d)
 
 	for pkg in package_list:
Signature · 1 line
1.7.7.3
#24 lore raw

PATCH 6/9 libgcc: reintroduce debug package, containing symbols

In reply to Dmitry Eremin-Solenikov
---
 meta/recipes-devtools/gcc/libgcc_4.6.bb |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
meta/recipes-devtools/gcc/libgcc_4.6.bb +3 -0
index 6ba0339..dd0a7be 100644
@@ -6,6 +6,7 @@ DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
 PACKAGES = "\
   ${PN} \
   ${PN}-dev \
+  ${PN}-dbg \
   "
 
 FILES_${PN} = "${base_libdir}/libgcc*.so.*"
@@ -15,6 +16,8 @@ FILES_${PN}-dev = " \
   ${libdir}/${TARGET_SYS}/${BINV}/libgcov.a \
   ${libdir}/${TARGET_SYS}/${BINV}/libgcc*"
 
+FILES_${PN}-dbg += "${base_libdir}/.debug/"
+
 do_configure[noexec] = "1"
 do_compile[noexec] = "1"
 
Signature · 1 line
1.7.7.3
#9 lore raw

PATCH 4/9 consolekit: fix sdk generation issues

In reply to Dmitry Eremin-Solenikov

Currently sdk generation might fail with the following error:
| Collected errors:
| * extract_archive: Cannot create symlink from ./var/log to 'volatile/log': File exists.
ERROR: Function 'do_populate_sdk' failed

This happens as consolekit package will include both /var/log/ConsoleKit and /var/volatile/log/ConsoleKit files:

lumag@fangorn:~/OE-scripts$ dpkg-deb -c build/tmp--eglibc/deploy/ipk/core2/consolekit_0.4.5-r7_core2.ipk  | grep var
drwxr-xr-x root/root         0 2011-12-07 22:12 ./var/
drwxr-xr-x root/root         0 2011-12-07 22:12 ./var/log/
drwxr-xr-x root/root         0 2011-12-07 22:12 ./var/log/ConsoleKit/
lrwxrwxrwx root/root         0 2011-12-07 22:12 ./var/run -> volatile/run
drwxr-xr-x root/root         0 2011-12-07 22:12 ./var/volatile/
drwxr-xr-x root/root         0 2011-12-07 22:12 ./var/volatile/log/
drwxr-xr-x root/root         0 2011-12-07 22:12 ./var/volatile/log/ConsoleKit/
drwxr-xr-x root/root         0 2011-12-07 22:12 ./var/volatile/run/
drwxr-xr-x root/root         0 2011-12-07 22:12 ./var/volatile/run/ConsoleKit/

Inclusion of both log directories causes this error. Drop the /var/log/ConsoleKit
in favour of /var/volatile/log

---
 .../recipes-support/consolekit/consolekit_0.4.5.bb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-support/consolekit/consolekit_0.4.5.bb +2 -2
index 45f6ad3..9406d88 100644
@@ -2,7 +2,7 @@ DESCRIPTION = "ConsoleKit is a framework for defining and tracking users, login
 HOMEPAGE="http://www.freedesktop.org/wiki/Software/ConsoleKit"
 BUGTRACKER="https://bugs.freedesktop.org/buglist.cgi?query_format=specific&product=ConsoleKit"
 
-PR = "r7"
+PR = "r8"
 
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
@@ -24,7 +24,7 @@ EXTRA_OECONF = "--with-systemdsystemunitdir=${base_libdir}/systemd/system/ \
                 ${@base_contains('DISTRO_FEATURES', 'pam', '--enable-pam-module --with-pam-module-dir=${base_libdir}/security', '--disable-pam-module', d)} \
                "
 
-FILES_${PN} += "${localstatedir}/log/ConsoleKit ${libdir}/ConsoleKit ${base_libdir} ${datadir}/dbus-1 ${datadir}/PolicyKit ${datadir}/polkit*"
+FILES_${PN} += "${libdir}/ConsoleKit ${base_libdir} ${datadir}/dbus-1 ${datadir}/PolicyKit ${datadir}/polkit*"
 FILES_${PN}-dbg += "${base_libdir}/security/.debug"
 
 PACKAGES =+ "pam-plugin-ck-connector"
Signature · 1 line
1.7.7.3
#26 lore raw

PATCH 7/9 ncurses: drop empty dir to remove QA warning

In reply to Dmitry Eremin-Solenikov

ncurses doesn't install any files in ${libdir}/terminfo, drop that directory.

---
 meta/recipes-core/ncurses/ncurses.inc |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
meta/recipes-core/ncurses/ncurses.inc +2 -0
index 98f45a4..1449f34 100644
@@ -171,6 +171,8 @@ do_install() {
         echo 'INPUT(AS_NEEDED(-ltinfo))' >>$f
 
 	oe_multilib_header curses.h
+
+	rm ${D}${libdir}/terminfo
 }
 
 python populate_packages_prepend () {
Signature · 1 line
1.7.7.3
#30 lore raw

PATCH 9/9 libatomic-ops: drop directory with documentation to remove QA warning

In reply to Dmitry Eremin-Solenikov
---
 .../pulseaudio/libatomics-ops_1.2.bb               |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
meta/recipes-multimedia/pulseaudio/libatomics-ops_1.2.bb +2 -1
index 184c167..f81aeb6 100644
@@ -26,5 +26,6 @@ ARM_INSTRUCTION_SET = "arm"
 inherit autotools pkgconfig
 
 do_install_append() {
-	mv ${D}${datadir}/libatomic_ops ${D}${datadir}/libatomic-ops || true
+	# those contain only docs, not necessary for now.
+	rm -rf ${D}${datadir}/libatomic_ops || true
 }
Signature · 1 line
1.7.7.3
#28 lore raw

PATCH 8/9 readline: drop empty dir to shut up QA warning

In reply to Dmitry Eremin-Solenikov
---
 meta/recipes-core/readline/readline.inc |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
meta/recipes-core/readline/readline.inc +2 -0
index 8fe7e8a..743d8b3 100644
@@ -28,6 +28,8 @@ do_install_append () {
 	# Make install doesn't properly install these
 	oe_libinstall -so -C shlib libhistory ${D}${libdir}
 	oe_libinstall -so -C shlib libreadline ${D}${libdir}
+
+	rmdir ${D}${bindir}
 }
 
 BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
1.7.7.3
#34 lore raw
In reply to Dmitry Eremin-Solenikov

meta/classes/kernel.bbclass kernel_do_compile() { · line 94

Quoted 2 lines · Dmitry Eremin-Solenikov
meta/classes/kernel.bbclass +1 -1
-		oe_runmake ${PARALLEL_MAKE} modules  CC="${KERNEL_CC}" LD="${KERNEL_LD}"
+		oe_runmake modules  CC="${KERNEL_CC}" LD="${KERNEL_LD}"

Why did you remove PARALLEL_MAKE?

p.

#21 lore raw

Re: [PATCH 5/9] Move check that all installed files are shipped into insane.bbclass

In reply to Dmitry Eremin-Solenikov

meta/classes/insane.bbclass def package_qa_check_rdepends(pkg, pkgdest, skip, d): · line 493

Quoted 4 lines · Dmitry Eremin-Solenikov
meta/classes/insane.bbclass +4 -0
+def packages_qa_unshipped_files(d):
+    skip = (d.getVar('INSANE_SKIP_${PN}', True) or "").split()
+    if "unshipped" in skip:
+        return False
	[...]

meta/classes/insane.bbclass python do_package_qa () { · line 596

Quoted 6 lines
meta/classes/insane.bbclass +3 -1
+    if not packages_qa_unshipped_files(d):
+        shipped_sane = False
 
-    if not walk_sane or not rdepends_sane:
+    if not walk_sane or not rdepends_sane or not shipped_sane:
         bb.fatal("QA run found fatal errors. Please consider fixing them.")

Is that really what you want?

p.

#35 lore raw
In reply to Phil Blundell
Quoted 5 lines · Phil Blundell

meta/classes/kernel.bbclass kernel_do_compile() { · line 94

Quoted 2 lines · Dmitry Eremin-Solenikov
meta/classes/kernel.bbclass +1 -1
-		oe_runmake ${PARALLEL_MAKE} modules  CC="${KERNEL_CC}" LD="${KERNEL_LD}"
+		oe_runmake modules  CC="${KERNEL_CC}" LD="${KERNEL_LD}"

Why did you remove PARALLEL_MAKE?

Because PARALLEL_MAKE is already defined for do_compile() task

Signature · 2 lines
With best wishes
Dmitry
#22 lore raw

Re: [PATCH 5/9] Move check that all installed files are shipped into insane.bbclass

In reply to Phil Blundell
Quoted 5 lines · Phil Blundell

meta/classes/insane.bbclass def package_qa_check_rdepends(pkg, pkgdest, skip, d): · line 493

Quoted 4 lines · Dmitry Eremin-Solenikov
meta/classes/insane.bbclass +4 -0
+def packages_qa_unshipped_files(d):
+    skip = (d.getVar('INSANE_SKIP_${PN}', True) or "").split()
+    if "unshipped" in skip:
+        return False

Hmm. This really should be "return True". Should I send the fixed version of this patch or this change will be picked by appliers?

Quoted 13 lines
	[...]

meta/classes/insane.bbclass python do_package_qa () { · line 596

Quoted 6 lines
meta/classes/insane.bbclass +3 -1
+    if not packages_qa_unshipped_files(d):
+        shipped_sane = False
 
-    if not walk_sane or not rdepends_sane:
+    if not walk_sane or not rdepends_sane or not shipped_sane:
          bb.fatal("QA run found fatal errors. Please consider fixing them.")

Is that really what you want?

p.

Signature · 2 lines
With best wishes
Dmitry
#27 lore raw

Re: [PATCH 7/9] ncurses: drop empty dir to remove QA warning

In reply to Dmitry Eremin-Solenikov
Quoted 2 lines · Dmitry Eremin-Solenikov

ncurses doesn't install any files in ${libdir}/terminfo, drop that directory.

its a symlink terminfo -> ../share/terminfo
and in my case

$ ls ../share/terminfo/
.  ..  1  2  3  4  5  6  7  8  9  a  A  b  c  d  e  E  f  g  h  i  j
k  l  L  m  M  n  N  o  p  P  q  Q  r  s  t  u  v  w  x  X  z
Quoted 26 lines

---
 meta/recipes-core/ncurses/ncurses.inc |    2 ++

 1 files changed, 2 insertions(+), 0 deletions(-)
meta/recipes-core/ncurses/ncurses.inc +0 -0
index 98f45a4..1449f34 100644
@@ -171,6 +171,8 @@ do_install() {

        echo 'INPUT(AS_NEEDED(-ltinfo))' >>$f

       oe_multilib_header curses.h
+
+       rm ${D}${libdir}/terminfo
 }

 python populate_packages_prepend () {
--
1.7.7.3

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

#31 lore raw

Re: [PATCH 9/9] libatomic-ops: drop directory with documentation to remove QA warning

In reply to Dmitry Eremin-Solenikov
Quoted 10 lines · Dmitry Eremin-Solenikov
---
 .../pulseaudio/libatomics-ops_1.2.bb               |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
meta/recipes-multimedia/pulseaudio/libatomics-ops_1.2.bb +0 -0
index 184c167..f81aeb6 100644

meta/recipes-multimedia/pulseaudio/libatomics-ops_1.2.bb ARM_INSTRUCTION_SET = "arm" · line 31

Quoted 7 lines
meta/recipes-multimedia/pulseaudio/libatomics-ops_1.2.bb +2 -1
@@ -26,5 +26,6 @@ ARM_INSTRUCTION_SET = "arm"
 inherit autotools pkgconfig
 
 do_install_append() {
-	mv ${D}${datadir}/libatomic_ops ${D}${datadir}/libatomic-ops || true
+	# those contain only docs, not necessary for now.
+	rm -rf ${D}${datadir}/libatomic_ops || true
 }

Shouldn't we move that to docdir/${PN}?

Cheers,

Richard

#32 lore raw

Re: [PATCH 9/9] libatomic-ops: drop directory with documentation to remove QA warning

Quoted 13 lines · Richard Purdie
Quoted 12 lines · Dmitry Eremin-Solenikov
---
  .../pulseaudio/libatomics-ops_1.2.bb               |    3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)
meta/recipes-multimedia/pulseaudio/libatomics-ops_1.2.bb +0 -0
index 184c167..f81aeb6 100644
@@ -26,5 +26,6 @@ ARM_INSTRUCTION_SET = "arm"
  inherit autotools pkgconfig
 
Quoted 7 lines

meta/recipes-multimedia/pulseaudio/libatomics-ops_1.2.bb ARM_INSTRUCTION_SET = "arm" · line 31

Quoted 5 lines
meta/recipes-multimedia/pulseaudio/libatomics-ops_1.2.bb +2 -1
  do_install_append() {
-	mv ${D}${datadir}/libatomic_ops ${D}${datadir}/libatomic-ops || true
+	# those contain only docs, not necessary for now.
+	rm -rf ${D}${datadir}/libatomic_ops || true
  }

Shouldn't we move that to docdir/${PN}?

I'm thinking another way: why is the recipe called libatomicS-ops (note the S) if the upstream source is named as libatomc_ops (so it should become libatomic-ops). Then documentation will land in the proper place after the mv command which is currently in place.

Signature · 2 lines
With best wishes
Dmitry
Acked-by Graeme Gregory on v1 1/9
#36 lore raw
In reply to Dmitry Eremin-Solenikov
Quoted 3 lines · Dmitry Eremin-Solenikov

There is no point in compiling kernel modules in a separate task, run right after do_compile. On the other hand merging those tasks will e.g. make icecc used also for modules compilation, etc.

This split was done intentionally to allow tasks to be inserted between compile and compile_kernelmodules. See:

commit 509364eb634cf148b6ac1fb5f51924f4eb6a8991

Author: Koen Kooi <[email protected]>
Date:   Tue Mar 15 11:25:01 2011 +0100

kernel bbclass: split do_compile into do_compile and do_compile_modules

This allows recipes to insert a custom task in between building
*Image and modules

Quoted 1 line

From OE .dev revision 615876fe218dc3feb4a3df9e6546a7b1a6376800

(From OE-Core rev: a2cc999d663407d17f41e1b0344361944993fa86)

If you want to be able to use icecc, can you pull the necessary logic into compile_kernelmodules rather than reverting Koen's patch?

Thanks,

Darren

Quoted 29 lines
---
 meta/classes/kernel.bbclass |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
meta/classes/kernel.bbclass +1 -5
index 3f2f75a..a75c199 100644
@@ -89,17 +89,13 @@ kernel_do_compile() {
 	if test "${KERNEL_IMAGETYPE_FOR_MAKE}.gz" = "${KERNEL_IMAGETYPE}"; then
 		gzip -9c < "${KERNEL_IMAGETYPE_FOR_MAKE}" > "${KERNEL_OUTPUT}"
 	fi
-}
 
-do_compile_kernelmodules() {
-	unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
 	if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
-		oe_runmake ${PARALLEL_MAKE} modules  CC="${KERNEL_CC}" LD="${KERNEL_LD}"
+		oe_runmake modules  CC="${KERNEL_CC}" LD="${KERNEL_LD}"
 	else
 		bbnote "no modules to compile"
 	fi
 }
-addtask compile_kernelmodules after do_compile before do_install
 
 kernel_do_install() {
 	#
Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
#37 lore raw
Quoted 9 lines · Darren Hart
Quoted 3 lines · Dmitry Eremin-Solenikov

There is no point in compiling kernel modules in a separate task, run right after do_compile. On the other hand merging those tasks will e.g. make icecc used also for modules compilation, etc.

This split was done intentionally to allow tasks to be inserted between compile and compile_kernelmodules. See:

Could you (or Koen) name any tasks that have to be inserted between kernel and modules compilation please?

Quoted 59 lines

commit 509364eb634cf148b6ac1fb5f51924f4eb6a8991
Author: Koen Kooi <[email protected]>
Date:   Tue Mar 15 11:25:01 2011 +0100

   kernel bbclass: split do_compile into do_compile and do_compile_modules

   This allows recipes to insert a custom task in between building *Image and modules

   >From OE .dev revision 615876fe218dc3feb4a3df9e6546a7b1a6376800

   (From OE-Core rev: a2cc999d663407d17f41e1b0344361944993fa86)

If you want to be able to use icecc, can you pull the necessary logic into compile_kernelmodules rather than reverting Koen's patch?

Thanks,

Darren

Quoted 27 lines

---
 meta/classes/kernel.bbclass |    6 +-----

 1 files changed, 1 insertions(+), 5 deletions(-)
meta/classes/kernel.bbclass +0 -0
index 3f2f75a..a75c199 100644
@@ -89,17 +89,13 @@ kernel_do_compile() {

      if test "${KERNEL_IMAGETYPE_FOR_MAKE}.gz" = "${KERNEL_IMAGETYPE}"; then gzip -9c < "${KERNEL_IMAGETYPE_FOR_MAKE}" > "${KERNEL_OUTPUT}" fi

meta/classes/kernel.bbclass +0 -3
-}
 
-do_compile_kernelmodules() {
-     unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE

      if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
-             oe_runmake ${PARALLEL_MAKE} modules  CC="${KERNEL_CC}" LD="${KERNEL_LD}"
+             oe_runmake modules  CC="${KERNEL_CC}" LD="${KERNEL_LD}" else
              bbnote "no modules to compile"
      fi
 }
-addtask compile_kernelmodules after do_compile before do_install

Quoted 2 lines

 kernel_do_install() {
      #

--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel

Signature · 2 lines
With best wishes
Dmitry
#38 lore raw
Quoted 8 lines · Dmitry Eremin-Solenikov
Quoted 7 lines · Darren Hart
Quoted 3 lines · Dmitry Eremin-Solenikov

There is no point in compiling kernel modules in a separate task, run right after do_compile. On the other hand merging those tasks will e.g. make icecc used also for modules compilation, etc.

Quoted 5 lines
Quoted 2 lines

This split was done intentionally to allow tasks to be inserted between compile and compile_kernelmodules. See:

Could you (or Koen) name any tasks that have to be inserted between kernel and modules compilation please?

I'll leave that to Koen as I'm confident he had a reason for doing the split. I don't make use of the split myself.

--
Darren

Quoted 63 lines
Quoted 60 lines

commit 509364eb634cf148b6ac1fb5f51924f4eb6a8991

Author: Koen Kooi <[email protected]>
Date:   Tue Mar 15 11:25:01 2011 +0100

kernel bbclass: split do_compile into do_compile and do_compile_modules

This allows recipes to insert a custom task in between building
*Image and modules

Quoted 1 line

From OE .dev revision 615876fe218dc3feb4a3df9e6546a7b1a6376800

(From OE-Core rev: a2cc999d663407d17f41e1b0344361944993fa86)

If you want to be able to use icecc, can you pull the necessary logic into compile_kernelmodules rather than reverting Koen's patch?

Thanks,

Darren

Quoted 19 lines
---
 meta/classes/kernel.bbclass |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
meta/classes/kernel.bbclass +0 -3
index 3f2f75a..a75c199 100644
@@ -89,17 +89,13 @@ kernel_do_compile() {
      if test "${KERNEL_IMAGETYPE_FOR_MAKE}.gz" = "${KERNEL_IMAGETYPE}"; then
              gzip -9c < "${KERNEL_IMAGETYPE_FOR_MAKE}" > "${KERNEL_OUTPUT}"
      fi
-}
 
-do_compile_kernelmodules() {
-     unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
      if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then

meta/classes/kernel.bbclass kernel_do_compile() { · line 101

Quoted 10 lines
meta/classes/kernel.bbclass +1 -2
-             oe_runmake ${PARALLEL_MAKE} modules  CC="${KERNEL_CC}" LD="${KERNEL_LD}"
+             oe_runmake modules  CC="${KERNEL_CC}" LD="${KERNEL_LD}"
      else
              bbnote "no modules to compile"
      fi
 }
-addtask compile_kernelmodules after do_compile before do_install
 
 kernel_do_install() {
      #

--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel

Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
#2 lore raw

Re: [PATCH 2/9] kernel.bbclass: move uImage handling to separate task

In reply to Dmitry Eremin-Solenikov

Op 13 dec. 2011, om 16:19 heeft Dmitry Eremin-Solenikov het volgende geschreven:

Quoted 6 lines

As per org.oe.dev and meta-oe's kernel.bbclass move uImage creation to separate task from do_deploy. This way the do_install task can also benefit from generated uImage.

The only major feature of oe-core's version (not to recreate uImage if it exists) is retained in this patch

The whole point of the OE uImage handling is that in general we know better than the kernel and can apply fixups if needed (turning on/off compression, etc)

Quoted 3 lines

. On the contra, as this version
was merged from meta-oe/org.oe.dev, new function has another feature:
it permits overriding the u-boot entrypoint via u-boot symbol.

Not if uimage exists, see above

Quoted 72 lines

---
meta/classes/kernel.bbclass | 40 ++++++++++++++++++++++++----------------

1 files changed, 24 insertions(+), 16 deletions(-)
meta/classes/kernel.bbclass +0 -0
index a75c199..db00d2d 100644
@@ -485,6 +485,30 @@ do_sizecheck() {
 

addtask sizecheck before do_install after do_compile

meta/classes/kernel.bbclass +24 -0
+do_uboot_mkimage() {
+    if test "x${KERNEL_IMAGETYPE}" = "xuImage" -a \
+            ! -e arch/${ARCH}/boot/uImage ; then
+        ENTRYPOINT=${UBOOT_ENTRYPOINT}
+        if test -n "${UBOOT_ENTRYSYMBOL}"; then
+            ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \
+                   awk '$3=="${UBOOT_ENTRYSYMBOL}" {print $1}'`
+        fi
+        if test -e arch/${ARCH}/boot/compressed/vmlinux ; then
+            ${OBJCOPY} -O binary -R .note -R .comment -S arch/${ARCH}/boot/compressed/vmlinux linux.bin
+            uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C none -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin arch/${ARCH}/boot/uImage
+            rm -f linux.bin
+        else
+            ${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin
+            rm -f linux.bin.gz
+            gzip -9 linux.bin
+            uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C gzip -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin.gz arch/${ARCH}/boot/uImage
+            rm -f linux.bin.gz
+        fi
+    fi
+}
+
+addtask uboot_mkimage before do_install after do_compile
+

KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}-${DATETIME}" # Don't include the DATETIME variable in the sstate package signatures KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME"

meta/classes/kernel.bbclass +0 -16
@@ -496,22 +520,6 @@ kernel_do_deploy() {
 		tar -cvzf ${DEPLOYDIR}/modules-${KERNEL_VERSION}-${PR}-${MACHINE}.tgz -C ${D} lib
 	fi
 
-	if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then 
-		if test -e arch/${ARCH}/boot/uImage ; then
-			cp arch/${ARCH}/boot/uImage ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
-		elif test -e arch/${ARCH}/boot/compressed/vmlinux ; then
-			${OBJCOPY} -O binary -R .note -R .comment -S arch/${ARCH}/boot/compressed/vmlinux linux.bin
-			uboot-mkimage -A ${ARCH} -O linux -T kernel -C none -a ${UBOOT_ENTRYPOINT} -e ${UBOOT_ENTRYPOINT} -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
-			rm -f linux.bin
-		else
-			${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin
-			rm -f linux.bin.gz
-			gzip -9 linux.bin
-			uboot-mkimage -A ${ARCH} -O linux -T kernel -C gzip -a ${UBOOT_ENTRYPOINT} -e ${UBOOT_ENTRYPOINT} -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin.gz ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
-			rm -f linux.bin.gz
-		fi
-	fi
-
 	cd ${DEPLOYDIR}
 	rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.bin
 	ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${KERNEL_IMAGE_SYMLINK_NAME}.bin
Signature · 7 lines
1.7.7.3


_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
#3 lore raw

Re: [PATCH 2/9] kernel.bbclass: move uImage handling to separate task

Quoted 11 lines · Koen Kooi

Op 13 dec. 2011, om 16:19 heeft Dmitry Eremin-Solenikov het volgende geschreven:

Quoted 6 lines

As per org.oe.dev and meta-oe's kernel.bbclass move uImage creation to separate task from do_deploy. This way the do_install task can also benefit from generated uImage.

The only major feature of oe-core's version (not to recreate uImage if it exists) is retained in this patch

The whole point of the OE uImage handling is that in general we know better than the kernel and can apply fixups if needed (turning on/off compression, etc)

Please check the history of OE-core uImage handling. Initially uImage was always recreated (as it's currently done in meta-oe). Then (422a017e6 on Oct 29, 2010) OE-core kernel.bbclass was changed to default to not to recreate uImage if it was created by kbuild (IIRC it was done so, because recreated uImages weren't always booting as they required more setup). I don't know which way is correct. Maybe we should add a hook that will tell if kernel.bbclass should prefer to recreate uImage or to use kernel one. Would you like such variable?

Another point (that I probably failed to emphasize): currently do_install and do_deploy will use different uImages. The image in /boot on rootfs might be different from uImage really in deploy dir. I would assume that this is not the expected way to do things.

Quoted 6 lines
Quoted 4 lines

. On the contra, as this version
was merged from meta-oe/org.oe.dev, new function has another feature:
it permits overriding the u-boot entrypoint via u-boot symbol.

Not if uimage exists, see above

Of course.

Quoted 80 lines
Quoted 69 lines

---
meta/classes/kernel.bbclass | 40 ++++++++++++++++++++++++----------------

1 files changed, 24 insertions(+), 16 deletions(-)
meta/classes/kernel.bbclass +0 -0
index a75c199..db00d2d 100644
@@ -485,6 +485,30 @@ do_sizecheck() {
 

addtask sizecheck before do_install after do_compile

meta/classes/kernel.bbclass +24 -0
+do_uboot_mkimage() {
+    if test "x${KERNEL_IMAGETYPE}" = "xuImage" -a \
+            ! -e arch/${ARCH}/boot/uImage ; then
+        ENTRYPOINT=${UBOOT_ENTRYPOINT}
+        if test -n "${UBOOT_ENTRYSYMBOL}"; then
+            ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \
+                   awk '$3=="${UBOOT_ENTRYSYMBOL}" {print $1}'`
+        fi
+        if test -e arch/${ARCH}/boot/compressed/vmlinux ; then
+            ${OBJCOPY} -O binary -R .note -R .comment -S arch/${ARCH}/boot/compressed/vmlinux linux.bin
+            uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C none -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin arch/${ARCH}/boot/uImage
+            rm -f linux.bin
+        else
+            ${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin
+            rm -f linux.bin.gz
+            gzip -9 linux.bin
+            uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C gzip -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin.gz arch/${ARCH}/boot/uImage
+            rm -f linux.bin.gz
+        fi
+    fi
+}
+
+addtask uboot_mkimage before do_install after do_compile
+

KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}-${DATETIME}" # Don't include the DATETIME variable in the sstate package signatures KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME"

meta/classes/kernel.bbclass +0 -17
@@ -496,22 +520,6 @@ kernel_do_deploy() {
 		tar -cvzf ${DEPLOYDIR}/modules-${KERNEL_VERSION}-${PR}-${MACHINE}.tgz -C ${D} lib
 	fi
 
-	if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then
-		if test -e arch/${ARCH}/boot/uImage ; then
-			cp arch/${ARCH}/boot/uImage ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
-		elif test -e arch/${ARCH}/boot/compressed/vmlinux ; then
-			${OBJCOPY} -O binary -R .note -R .comment -S arch/${ARCH}/boot/compressed/vmlinux linux.bin
-			uboot-mkimage -A ${ARCH} -O linux -T kernel -C none -a ${UBOOT_ENTRYPOINT} -e ${UBOOT_ENTRYPOINT} -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
-			rm -f linux.bin
-		else
-			${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin
-			rm -f linux.bin.gz
-			gzip -9 linux.bin
-			uboot-mkimage -A ${ARCH} -O linux -T kernel -C gzip -a ${UBOOT_ENTRYPOINT} -e ${UBOOT_ENTRYPOINT} -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin.gz ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
-			rm -f linux.bin.gz
-		fi
-	fi
-
 	cd ${DEPLOYDIR}
 	rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.bin
 	ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${KERNEL_IMAGE_SYMLINK_NAME}.bin
--

1.7.7.3

Quoted 4 lines

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Signature · 2 lines
With best wishes
Dmitry
#39 lore raw
In reply to Dmitry Eremin-Solenikov

Op 14 dec. 2011, om 01:17 heeft Dmitry Eremin-Solenikov het volgende geschreven:

Quoted 8 lines · Darren Hart
Quoted 7 lines · Dmitry Eremin-Solenikov
Quoted 3 lines

There is no point in compiling kernel modules in a separate task, run right after do_compile. On the other hand merging those tasks will e.g. make icecc used also for modules compilation, etc.

Quoted 5 lines
Quoted 2 lines

This split was done intentionally to allow tasks to be inserted between compile and compile_kernelmodules. See:

Could you (or Koen) name any tasks that have to be inserted between kernel and modules compilation please?

Building external modules that are referenced by internal ones for example. But besides that, this also allows me to build just *Image quickly and not having to wait for the modules to build.

#33 lore raw

Re: [PATCH 9/9] libatomic-ops: drop directory with documentation to remove QA warning

In reply to Dmitry Eremin-Solenikov
Quoted 22 lines · Dmitry Eremin-Solenikov
Quoted 13 lines · Richard Purdie
Quoted 12 lines · Dmitry Eremin-Solenikov
---
  .../pulseaudio/libatomics-ops_1.2.bb               |    3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)
meta/recipes-multimedia/pulseaudio/libatomics-ops_1.2.bb +0 -0
index 184c167..f81aeb6 100644
@@ -26,5 +26,6 @@ ARM_INSTRUCTION_SET = "arm"
  inherit autotools pkgconfig
 
Quoted 7 lines

meta/recipes-multimedia/pulseaudio/libatomics-ops_1.2.bb ARM_INSTRUCTION_SET = "arm" · line 31

Quoted 5 lines
meta/recipes-multimedia/pulseaudio/libatomics-ops_1.2.bb +2 -1
  do_install_append() {
-	mv ${D}${datadir}/libatomic_ops ${D}${datadir}/libatomic-ops || true
+	# those contain only docs, not necessary for now.
+	rm -rf ${D}${datadir}/libatomic_ops || true
  }

Shouldn't we move that to docdir/${PN}?

Quoted 4 lines

I'm thinking another way: why is the recipe called libatomicS-ops (note the S) if the upstream source is named as libatomc_ops (so it should become libatomic-ops). Then documentation will land in the proper place after the mv command which is currently in place.

I agree it should probably get renamed, I can't see a good reason for that name. That will potentially cause some friction with other things depending on it though :(

Cheers,

Richard

#4 lore raw

Re: [PATCH 2/9] kernel.bbclass: move uImage handling to separate task

In reply to Dmitry Eremin-Solenikov
Quoted 19 lines · Dmitry Eremin-Solenikov
Quoted 9 lines · Koen Kooi

Op 13 dec. 2011, om 16:19 heeft Dmitry Eremin-Solenikov het volgende geschreven:

Quoted 4 lines

As per org.oe.dev and meta-oe's kernel.bbclass move uImage creation to separate task from do_deploy. This way the do_install task can also benefit from generated uImage.

Quoted 7 lines
Quoted 2 lines

The only major feature of oe-core's version (not to recreate uImage if it exists) is retained in this patch

The whole point of the OE uImage handling is that in general we know better than the kernel and can apply fixups if needed (turning on/off compression, etc)

Quoted 8 lines

Please check the history of OE-core uImage handling. Initially uImage was always recreated (as it's currently done in meta-oe). Then (422a017e6 on Oct 29, 2010) OE-core kernel.bbclass was changed to default to not to recreate uImage if it was created by kbuild (IIRC it was done so, because recreated uImages weren't always booting as they required more setup). I don't know which way is correct. Maybe we should add a hook that will tell if kernel.bbclass should prefer to recreate uImage or to use kernel one. Would you like such variable?

If no one minds the tiny bit of extra complexity, this was the approach that I was thinking about when reading this thread.

I can report for fact, that the uImages that were being generated by the existing
rules were binary blobs of silent boot death on the powerpc boards that I was using during initial development. The in tree images worked perfectly.

For everything I've done in the past, I've always used in tree uImages or patched the
kernel tree itself to generated images that worked for the board in question.

The difference in approach could likely be chalked up to a guy just trying to get a
kernel to boot, and someone working more closely with the bootloader -> kernel handoff.

I think a variable, or some other switch, to support the two workflows is a reasonable
compromise.

Cheers,

Bruce

Quoted 132 lines

Another point (that I probably failed to emphasize): currently do_install and do_deploy will use different uImages. The image in /boot on rootfs might be different from uImage really in deploy dir. I would assume that this is not the expected way to do things.

Quoted 7 lines
Quoted 4 lines

. On the contra, as this version
was merged from meta-oe/org.oe.dev, new function has another feature:
it permits overriding the u-boot entrypoint via u-boot symbol.

Not if uimage exists, see above

Of course.

Quoted 88 lines
Quoted 88 lines

---
meta/classes/kernel.bbclass |   40
++++++++++++++++++++++++----------------

1 files changed, 24 insertions(+), 16 deletions(-)
meta/classes/kernel.bbclass +0 -0
index a75c199..db00d2d 100644
@@ -485,6 +485,30 @@ do_sizecheck() {
 

addtask sizecheck before do_install after do_compile

+do_uboot_mkimage() {
+    if test "x${KERNEL_IMAGETYPE}" = "xuImage" -a \
+            ! -e arch/${ARCH}/boot/uImage ; then
+        ENTRYPOINT=${UBOOT_ENTRYPOINT}
+        if test -n "${UBOOT_ENTRYSYMBOL}"; then
+            ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \
+                   awk '$3=="${UBOOT_ENTRYSYMBOL}" {print $1}'`
+        fi
+        if test -e arch/${ARCH}/boot/compressed/vmlinux ; then
+            ${OBJCOPY} -O binary -R .note -R .comment -S arch/${ARCH}/boot/compressed/vmlinux linux.bin
+            uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C none -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin arch/${ARCH}/boot/uImage
+            rm -f linux.bin
+        else
+            ${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin
+            rm -f linux.bin.gz
+            gzip -9 linux.bin
+            uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C gzip -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin.gz arch/${ARCH}/boot/uImage
+            rm -f linux.bin.gz
+        fi
+    fi

meta/classes/kernel.bbclass +4 -0
+}
+
+addtask uboot_mkimage before do_install after do_compile
+

KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
# Don't include the DATETIME variable in the sstate package signatures KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME"

meta/classes/kernel.bbclass +0 -0
@@ -496,22 +520,6 @@ kernel_do_deploy() {

               tar -cvzf ${DEPLOYDIR}/modules-${KERNEL_VERSION}-${PR}-${MACHINE}.tgz -C ${D} lib fi

-       if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then
-               if test -e arch/${ARCH}/boot/uImage ; then
-                       cp arch/${ARCH}/boot/uImage ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
-               elif test -e arch/${ARCH}/boot/compressed/vmlinux ; then
-                       ${OBJCOPY} -O binary -R .note -R .comment -S arch/${ARCH}/boot/compressed/vmlinux linux.bin
-                       uboot-mkimage -A ${ARCH} -O linux -T kernel -C none -a ${UBOOT_ENTRYPOINT} -e ${UBOOT_ENTRYPOINT} -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
-                       rm -f linux.bin
-               else
-                       ${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin
-                       rm -f linux.bin.gz
-                       gzip -9 linux.bin
-                       uboot-mkimage -A ${ARCH} -O linux -T kernel -C gzip -a ${UBOOT_ENTRYPOINT} -e ${UBOOT_ENTRYPOINT} -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin.gz ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
-                       rm -f linux.bin.gz
-               fi
-       fi
-
       cd ${DEPLOYDIR}
       rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.bin
       ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${KERNEL_IMAGE_SYMLINK_NAME}.bin
--
1.7.7.3

Quoted 12 lines
Quoted 4 lines

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

--
With best wishes
Dmitry

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
#40 lore raw
In reply to Koen Kooi
Quoted 11 lines · Koen Kooi

Op 14 dec. 2011, om 01:17 heeft Dmitry Eremin-Solenikov het volgende geschreven:

Quoted 8 lines · Darren Hart
Quoted 7 lines · Dmitry Eremin-Solenikov
Quoted 3 lines

There is no point in compiling kernel modules in a separate task, run right after do_compile. On the other hand merging those tasks will e.g. make icecc used also for modules compilation, etc.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

This split was done intentionally to allow tasks to be inserted between compile and compile_kernelmodules. See:

Could you (or Koen) name any tasks that have to be inserted between kernel and modules compilation please?

Building external modules that are referenced by internal ones for example. But besides that, this also allows me to build just *Image quickly and not having to wait for the modules to build.

I've had the same thing here, just building the main image and not wanting to wait for
kernel modules to compile. More of an incremental ad-hoc, scp and reboot sort of workflow, but only building what you need in that situation is just what a person wants.

Cheers,

Bruce

Quoted 12 lines

-----BEGIN PGP SIGNATURE-----

iEYEARECAAYFAk7pvXkACgkQMkyGM64RGpE2pwCdFjZuuNW4ler8ES4OsKddTaB2 JnIAn0ME2FOwLyXeCS2DDBsTwKBFUKDt
=l9hr
-----END PGP SIGNATURE-----

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
#23 lore raw

Re: [PATCH 5/9] Move check that all installed files are shipped into insane.bbclass

In reply to Dmitry Eremin-Solenikov
Quoted 11 lines · Dmitry Eremin-Solenikov

Checking that all installed files are shipped is in reality a QA check. It would benefit from mechanisms like ERROR_QA/WARNING_QA. So move it into insane.bbclass. If some of the files are installed but should not be shipped for some reasons, one can add them to the variable IGNORE_UNSHIPPED_FILES.

---
 meta/classes/insane.bbclass  |   49 ++++++++++++++++++++++++++++++++++++++++-
 meta/classes/package.bbclass |   15 ------------
 2 files changed, 47 insertions(+), 17 deletions(-)

I like the patch and have been thinking we should do something like this. One minor comment below.

Quoted 14 lines
meta/classes/insane.bbclass +1 -1
index 5726e69..7a8643a 100644
@@ -100,7 +100,7 @@ def package_qa_get_machine_dict():
 
 
 # Currently not being used by default "desktop"
-WARN_QA ?= "ldflags useless-rpaths rpaths"
+WARN_QA ?= "ldflags useless-rpaths rpaths unshipped"
 ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch la2 pkgconfig la perms"
 
 def package_qa_clean_path(path,d):

meta/classes/insane.bbclass def package_qa_check_rdepends(pkg, pkgdest, skip, d): · line 493

Quoted 9 lines
meta/classes/insane.bbclass +6 -0
@@ -485,6 +485,48 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, d):
 
     return sane
 
+IGNORE_UNSHIPPED_FILES ??= ""
+
+def packages_qa_unshipped_files(d):
+    skip = (d.getVar('INSANE_SKIP_${PN}', True) or "").split()
+    if "unshipped" in skip:
+        return False

How about just check for unshipped in QA_WARN and QA_ERROR here and if not in either, just return? You cover handling ignoring files just below.

meta/classes/insane.bbclass def package_qa_check_rdepends(pkg, pkgdest, skip, d): · line 500

Quoted 6 lines
meta/classes/insane.bbclass +6 -0
+    seen = d.getVar('IGNORE_UNSHIPPED_FILES', True).split()
+    unshipped = []
+    dvar = d.getVar('PKGD', True)
+    destvar = d.getVar('PKGDEST', True)
+    packages = d.getVar('PACKAGES', True).split()
+    for p in packages:

Cheers,

Richard

#41 lore raw
In reply to Dmitry Eremin-Solenikov
Quoted 8 lines · Dmitry Eremin-Solenikov

There is no point in compiling kernel modules in a separate task, run right after do_compile. On the other hand merging those tasks will e.g. make icecc used also for modules compilation, etc.

---
 meta/classes/kernel.bbclass |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

Just to summarise the feedback, I think there valid reasons to have these tasks separately so icecc is going to need to learn to deal with this...

Cheers,

Richard

#10 lore raw

Re: [PATCH 4/9] consolekit: fix sdk generation issues

In reply to Dmitry Eremin-Solenikov
Quoted 19 lines · Dmitry Eremin-Solenikov

Currently sdk generation might fail with the following error:
| Collected errors:
| * extract_archive: Cannot create symlink from ./var/log to 'volatile/log': File exists.
ERROR: Function 'do_populate_sdk' failed

This happens as consolekit package will include both /var/log/ConsoleKit and /var/volatile/log/ConsoleKit files:

lumag@fangorn:~/OE-scripts$ dpkg-deb -c build/tmp--eglibc/deploy/ipk/core2/consolekit_0.4.5-r7_core2.ipk  | grep var
drwxr-xr-x root/root         0 2011-12-07 22:12 ./var/
drwxr-xr-x root/root         0 2011-12-07 22:12 ./var/log/
drwxr-xr-x root/root         0 2011-12-07 22:12 ./var/log/ConsoleKit/
lrwxrwxrwx root/root         0 2011-12-07 22:12 ./var/run -> volatile/run
drwxr-xr-x root/root         0 2011-12-07 22:12 ./var/volatile/
drwxr-xr-x root/root         0 2011-12-07 22:12 ./var/volatile/log/
drwxr-xr-x root/root         0 2011-12-07 22:12 ./var/volatile/log/ConsoleKit/
drwxr-xr-x root/root         0 2011-12-07 22:12 ./var/volatile/run/
drwxr-xr-x root/root         0 2011-12-07 22:12 ./var/volatile/run/ConsoleKit/
Quoted 5 lines

Inclusion of both log directories causes this error. Drop the /var/log/ConsoleKit
in favour of /var/volatile/log

This effectively reverts:
http://git.openembedded.org/openembedded-core/commit/?id=5608a748af2c754f60137ab7c3010ccce6bf9e40
so I think this fixes one problem at the expense of causing another.
Koen: Any comments?

Quoted 25 lines
 .../recipes-support/consolekit/consolekit_0.4.5.bb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-support/consolekit/consolekit_0.4.5.bb +2 -2
index 45f6ad3..9406d88 100644
@@ -2,7 +2,7 @@ DESCRIPTION = "ConsoleKit is a framework for defining and tracking users, login
 HOMEPAGE="http://www.freedesktop.org/wiki/Software/ConsoleKit"
 BUGTRACKER="https://bugs.freedesktop.org/buglist.cgi?query_format=specific&product=ConsoleKit"
 
-PR = "r7"
+PR = "r8"
 
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
@@ -24,7 +24,7 @@ EXTRA_OECONF = "--with-systemdsystemunitdir=${base_libdir}/systemd/system/ \
                 ${@base_contains('DISTRO_FEATURES', 'pam', '--enable-pam-module --with-pam-module-dir=${base_libdir}/security', '--disable-pam-module', d)} \
                "
 
-FILES_${PN} += "${localstatedir}/log/ConsoleKit ${libdir}/ConsoleKit ${base_libdir} ${datadir}/dbus-1 ${datadir}/PolicyKit ${datadir}/polkit*"
+FILES_${PN} += "${libdir}/ConsoleKit ${base_libdir} ${datadir}/dbus-1 ${datadir}/PolicyKit ${datadir}/polkit*"
 FILES_${PN}-dbg += "${base_libdir}/security/.debug"
 
 PACKAGES =+ "pam-plugin-ck-connector"
#11 lore raw

Re: [PATCH 4/9] consolekit: fix sdk generation issues

Op 15 dec. 2011, om 15:58 heeft Richard Purdie het volgende geschreven:

Quoted 24 lines · Dmitry Eremin-Solenikov
Quoted 23 lines

Currently sdk generation might fail with the following error:
| Collected errors:
| * extract_archive: Cannot create symlink from ./var/log to 'volatile/log': File exists.
ERROR: Function 'do_populate_sdk' failed

This happens as consolekit package will include both /var/log/ConsoleKit and /var/volatile/log/ConsoleKit files:

lumag@fangorn:~/OE-scripts$ dpkg-deb -c build/tmp--eglibc/deploy/ipk/core2/consolekit_0.4.5-r7_core2.ipk  | grep var
drwxr-xr-x root/root         0 2011-12-07 22:12 ./var/
drwxr-xr-x root/root         0 2011-12-07 22:12 ./var/log/
drwxr-xr-x root/root         0 2011-12-07 22:12 ./var/log/ConsoleKit/
lrwxrwxrwx root/root         0 2011-12-07 22:12 ./var/run -> volatile/run
drwxr-xr-x root/root         0 2011-12-07 22:12 ./var/volatile/
drwxr-xr-x root/root         0 2011-12-07 22:12 ./var/volatile/log/
drwxr-xr-x root/root         0 2011-12-07 22:12 ./var/volatile/log/ConsoleKit/
drwxr-xr-x root/root         0 2011-12-07 22:12 ./var/volatile/run/
drwxr-xr-x root/root         0 2011-12-07 22:12 ./var/volatile/run/ConsoleKit/

Inclusion of both log directories causes this error. Drop the /var/log/ConsoleKit
in favour of /var/volatile/log

Quoted 6 lines
Quoted 1 line

This effectively reverts:
http://git.openembedded.org/openembedded-core/commit/?id=5608a748af2c754f60137ab7c3010ccce6bf9e40
so I think this fixes one problem at the expense of causing another.
Koen: Any comments?

If you revert it consolekit won't work at runtime because it fails to start.

#14 lore raw

Re: [PATCH 4/9] consolekit: fix sdk generation issues

In reply to Richard Purdie

Richard Purdie wrote on 2011-12-15:

Quoted 7 lines · Dmitry Eremin-Solenikov
Quoted 6 lines

Currently sdk generation might fail with the following error:
| Collected errors:
| * extract_archive: Cannot create symlink from ./var/log to 'volatile/log': File exists.
ERROR: Function 'do_populate_sdk' failed

Quoted 17 lines
Quoted 3 lines

This happens as consolekit package will include both /var/log/ConsoleKit and /var/volatile/log/ConsoleKit files:

lumag@fangorn:~/OE-scripts$ dpkg-deb -c

build/tmp--eglibc/deploy/ipk/core2/consolekit_0.4.5-r7_core2.ipk | grep var

Quoted 12 lines

drwxr-xr-x root/root 0 2011-12-07 22:12 ./var/ drwxr-xr-x
root/root 0 2011-12-07 22:12 ./var/log/ drwxr-xr-x root/root

     0 2011-12-07 22:12 ./var/log/ConsoleKit/ lrwxrwxrwx root/root     
   0 2011-12-07 22:12 ./var/run -> volatile/run drwxr-xr-x root/root   
     0 2011-12-07 22:12 ./var/volatile/ drwxr-xr-x root/root         0
2011-12-07 22:12 ./var/volatile/log/ drwxr-xr-x root/root         0
2011-12-07 22:12 ./var/volatile/log/ConsoleKit/ drwxr-xr-x root/root   
     0 2011-12-07 22:12 ./var/volatile/run/ drwxr-xr-x root/root       

0 2011-12-07 22:12 ./var/volatile/run/ConsoleKit/

Inclusion of both log directories causes this error. Drop the /var/log/ConsoleKit in favour of /var/volatile/log

Hi Dmitry,
Could you please explain how and where the extract_archive error is caused? Where is /var/log linked to /var/volatile/log?

Do you mean RP's patch "consolekit: Fix ${localstatedir} race" didn't fix the issue? (I suspect so)

Quoted 4 lines

This effectively reverts:
http://git.openembedded.org/openembedded-core/commit/?id=5608a748
af2c754f60137ab7c3010ccce6bf9e40 so I think this fixes one problem at the expense of causing another. Koen: Any comments?

Thanks,
-- Dexuan

#5 lore raw

Re: [PATCH 2/9] kernel.bbclass: move uImage handling to separate task

In reply to Bruce Ashfield

On Thu, Dec 15, 2011 at 6:55 AM, Bruce Ashfield
<[email protected]> wrote:
[snip]

Quoted 12 lines

If no one minds the tiny bit of extra complexity, this was the approach that I was thinking about when reading this thread.

I can report for fact, that the uImages that were being generated by the existing
rules were binary blobs of silent boot death on the powerpc boards that I was using during initial development. The in tree images worked perfectly.

For everything I've done in the past, I've always used in tree uImages or patched the
kernel tree itself to generated images that worked for the board in question.

Quoted 8 lines

The difference in approach could likely be chalked up to a guy just trying to get a
kernel to boot, and someone working more closely with the bootloader -> kernel handoff.

I think a variable, or some other switch, to support the two workflows is a reasonable
compromise.

Part of the history[1], and I was surprised at the time too, was that for ARM at least, rmk had said that you should not use the uImages generated by the kernel. So the question is, has this changed? Is this an ARM-only thing?

[1]: http://lists.linuxtogo.org/pipermail/openembedded-devel/2008-November/007096.html

Signature · 1 line
Tom
#6 lore raw

Re: [PATCH 2/9] kernel.bbclass: move uImage handling to separate task

Quoted 20 lines · Tom Rini

On Thu, Dec 15, 2011 at 6:55 AM, Bruce Ashfield
<[email protected]> wrote:
[snip]

Quoted 17 lines

If no one minds the tiny bit of extra complexity, this was the approach that I was thinking about when reading this thread.

I can report for fact, that the uImages that were being generated by the existing
rules were binary blobs of silent boot death on the powerpc boards that I was using during initial development. The in tree images worked perfectly.

For everything I've done in the past, I've always used in tree uImages or patched the
kernel tree itself to generated images that worked for the board in question.

The difference in approach could likely be chalked up to a guy just trying to get a
kernel to boot, and someone working more closely with the bootloader -> kernel handoff.

Quoted 8 lines
Quoted 3 lines

I think a variable, or some other switch, to support the two workflows is a reasonable
compromise.

Part of the history[1], and I was surprised at the time too, was that for ARM at least, rmk had said that you should not use the uImages generated by the kernel.  So the question is, has this changed?  Is this an ARM-only thing?'

I've been booting uImages generated by the kernel on ARM boards since nearly 2008. So it may be more of a per-board thing now .. or something else entirely.

Cheers,

Bruce

Quoted 10 lines

[1]: http://lists.linuxtogo.org/pipermail/openembedded-devel/2008-November/007096.html

--
Tom

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
#12 lore raw

Re: [PATCH 4/9] consolekit: fix sdk generation issues

In reply to Koen Kooi

Koen Kooi wrote on 2011-12-15:

Quoted 32 lines

Op 15 dec. 2011, om 15:58 heeft Richard Purdie het volgende geschreven:

Quoted 10 lines · Dmitry Eremin-Solenikov
Quoted 9 lines

Currently sdk generation might fail with the following error:
| Collected errors:
| * extract_archive: Cannot create symlink from ./var/log to 'volatile/log': File exists.
ERROR: Function 'do_populate_sdk' failed

This happens as consolekit package will include both /var/log/ConsoleKit and /var/volatile/log/ConsoleKit files:

lumag@fangorn:~/OE-scripts$ dpkg-deb -c

build/tmp--eglibc/deploy/ipk/core2/consolekit_0.4.5-r7_core2.ipk | grep var

Quoted 10 lines
Quoted 10 lines

drwxr-xr-x root/root 0 2011-12-07 22:12 ./var/ drwxr-xr-x
root/root 0 2011-12-07 22:12 ./var/log/ drwxr-xr-x root/root

      0 2011-12-07 22:12 ./var/log/ConsoleKit/ lrwxrwxrwx root/root   
     0 2011-12-07 22:12 ./var/run -> volatile/run drwxr-xr-x root/root
        0 2011-12-07 22:12 ./var/volatile/ drwxr-xr-x root/root       
 0 2011-12-07 22:12 ./var/volatile/log/ drwxr-xr-x root/root         0
2011-12-07 22:12 ./var/volatile/log/ConsoleKit/ drwxr-xr-x root/root  
      0 2011-12-07 22:12 ./var/volatile/run/ drwxr-xr-x root/root     

0 2011-12-07 22:12 ./var/volatile/run/ConsoleKit/

Quoted 7 lines
Quoted 4 lines

Inclusion of both log directories causes this error. Drop the /var/log/ConsoleKit in favour of /var/volatile/log

This effectively reverts:

Quoted 7 lines

http://git.openembedded.org/openembedded-core/commit/?id=5608a748
af2c7

Quoted 3 lines

54f60137ab7c3010ccce6bf9e40 so I think this fixes one problem at the expense of causing another.
Koen: Any comments?

If you revert it consolekit won't work at runtime because it fails to start.

We need to find the proper fix.
meta-toolchain-gmae building (at least with ipk packaging) has been broken by this for half a month...

Thanks,
-- Dexuan

#13 lore raw

Re: [PATCH 4/9] consolekit: fix sdk generation issues

In reply to Koen Kooi

Koen,

Quoted 27 lines · Koen Kooi

Op 15 dec. 2011, om 15:58 heeft Richard Purdie het volgende geschreven:

Quoted 24 lines · Dmitry Eremin-Solenikov
Quoted 23 lines

Currently sdk generation might fail with the following error:
| Collected errors:
| * extract_archive: Cannot create symlink from ./var/log to 'volatile/log': File exists.
ERROR: Function 'do_populate_sdk' failed

This happens as consolekit package will include both /var/log/ConsoleKit and /var/volatile/log/ConsoleKit files:

lumag@fangorn:~/OE-scripts$ dpkg-deb -c build/tmp--eglibc/deploy/ipk/core2/consolekit_0.4.5-r7_core2.ipk  | grep var
drwxr-xr-x root/root         0 2011-12-07 22:12 ./var/
drwxr-xr-x root/root         0 2011-12-07 22:12 ./var/log/
drwxr-xr-x root/root         0 2011-12-07 22:12 ./var/log/ConsoleKit/
lrwxrwxrwx root/root         0 2011-12-07 22:12 ./var/run ->  volatile/run
drwxr-xr-x root/root         0 2011-12-07 22:12 ./var/volatile/
drwxr-xr-x root/root         0 2011-12-07 22:12 ./var/volatile/log/
drwxr-xr-x root/root         0 2011-12-07 22:12 ./var/volatile/log/ConsoleKit/
drwxr-xr-x root/root         0 2011-12-07 22:12 ./var/volatile/run/
drwxr-xr-x root/root         0 2011-12-07 22:12 ./var/volatile/run/ConsoleKit/

Inclusion of both log directories causes this error. Drop the /var/log/ConsoleKit
in favour of /var/volatile/log

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

This effectively reverts:
http://git.openembedded.org/openembedded-core/commit/?id=5608a748af2c754f60137ab7c3010ccce6bf9e40
so I think this fixes one problem at the expense of causing another.
Koen: Any comments?

If you revert it consolekit won't work at runtime because it fails to start.

In your usecase, do you have a /var/volatile? /var/volatile/log/ConsoleKit? Could you please be more specific in the layout of your /var and in the error/trace of consolekit on your side?

I'd really like to solve this somehow as for now I have a broken SDK generation (at it seems it's not my fault as other people on ML suggested that they experienced errors with meta-toolchain-gmae).

Signature · 2 lines
With best wishes
Dmitry
#15 lore raw

Re: [PATCH 4/9] consolekit: fix sdk generation issues

In reply to Cui, Dexuan
Quoted 23 lines · Dexuan

Richard Purdie wrote on 2011-12-15:

Quoted 22 lines · Dmitry Eremin-Solenikov
Quoted 9 lines

Currently sdk generation might fail with the following error:
| Collected errors:
| * extract_archive: Cannot create symlink from ./var/log to 'volatile/log': File exists.
ERROR: Function 'do_populate_sdk' failed

This happens as consolekit package will include both /var/log/ConsoleKit and /var/volatile/log/ConsoleKit files:

lumag@fangorn:~/OE-scripts$ dpkg-deb -c

build/tmp--eglibc/deploy/ipk/core2/consolekit_0.4.5-r7_core2.ipk | grep var

Quoted 10 lines

drwxr-xr-x root/root 0 2011-12-07 22:12 ./var/ drwxr-xr-x
root/root 0 2011-12-07 22:12 ./var/log/ drwxr-xr-x root/root

      0 2011-12-07 22:12 ./var/log/ConsoleKit/ lrwxrwxrwx root/root
    0 2011-12-07 22:12 ./var/run ->  volatile/run drwxr-xr-x root/root
      0 2011-12-07 22:12 ./var/volatile/ drwxr-xr-x root/root         0
2011-12-07 22:12 ./var/volatile/log/ drwxr-xr-x root/root         0
2011-12-07 22:12 ./var/volatile/log/ConsoleKit/ drwxr-xr-x root/root
      0 2011-12-07 22:12 ./var/volatile/run/ drwxr-xr-x root/root

0 2011-12-07 22:12 ./var/volatile/run/ConsoleKit/

Quoted 5 lines
Quoted 2 lines
Quoted 2 lines

Inclusion of both log directories causes this error. Drop the /var/log/ConsoleKit in favour of /var/volatile/log

Hi Dmitry,
Could you please explain how and where the extract_archive error is caused? Where is /var/log linked to /var/volatile/log?

I have tried building meta-toolchain-qte... and I got exactly the error from my original message.

Quoted 3 lines

Do you mean RP's patch "consolekit: Fix ${localstatedir} race" didn't fix the issue? (I suspect so)

Yes, I still had the issues even after PR's patch.

Quoted 8 lines
Quoted 5 lines

This effectively reverts:
http://git.openembedded.org/openembedded-core/commit/?id=5608a748
af2c754f60137ab7c3010ccce6bf9e40 so I think this fixes one problem at the expense of causing another. Koen: Any comments?

Thanks,
-- Dexuan

Signature · 2 lines
With best wishes
Dmitry
#16 lore raw

Re: [PATCH 4/9] consolekit: fix sdk generation issues

Quoted 30 lines · Dmitry Eremin-Solenikov
Quoted 23 lines · Dexuan

Richard Purdie wrote on 2011-12-15:

Quoted 22 lines · Dmitry Eremin-Solenikov
Quoted 9 lines

Currently sdk generation might fail with the following error:
| Collected errors:
| * extract_archive: Cannot create symlink from ./var/log to 'volatile/log': File exists.
ERROR: Function 'do_populate_sdk' failed

This happens as consolekit package will include both /var/log/ConsoleKit and /var/volatile/log/ConsoleKit files:

lumag@fangorn:~/OE-scripts$ dpkg-deb -c

build/tmp--eglibc/deploy/ipk/core2/consolekit_0.4.5-r7_core2.ipk | grep var

Quoted 10 lines

drwxr-xr-x root/root 0 2011-12-07 22:12 ./var/ drwxr-xr-x
root/root 0 2011-12-07 22:12 ./var/log/ drwxr-xr-x root/root

      0 2011-12-07 22:12 ./var/log/ConsoleKit/ lrwxrwxrwx root/root
    0 2011-12-07 22:12 ./var/run ->  volatile/run drwxr-xr-x root/root
      0 2011-12-07 22:12 ./var/volatile/ drwxr-xr-x root/root         0
2011-12-07 22:12 ./var/volatile/log/ drwxr-xr-x root/root         0
2011-12-07 22:12 ./var/volatile/log/ConsoleKit/ drwxr-xr-x root/root
      0 2011-12-07 22:12 ./var/volatile/run/ drwxr-xr-x root/root

0 2011-12-07 22:12 ./var/volatile/run/ConsoleKit/

Quoted 5 lines
Quoted 2 lines
Quoted 2 lines

Inclusion of both log directories causes this error. Drop the /var/log/ConsoleKit in favour of /var/volatile/log

Hi Dmitry,
Could you please explain how and where the extract_archive error is caused? Where is /var/log linked to /var/volatile/log?

Quoted 17 lines

I have tried building meta-toolchain-qte... and I got exactly the error from my original message.

Quoted 3 lines

Do you mean RP's patch "consolekit: Fix ${localstatedir} race" didn't fix the issue? (I suspect so)

Yes, I still had the issues even after PR's patch.

Quoted 8 lines
Quoted 5 lines

This effectively reverts:
http://git.openembedded.org/openembedded-core/commit/?id=5608a748
af2c754f60137ab7c3010ccce6bf9e40 so I think this fixes one problem at the expense of causing another. Koen: Any comments?

Thanks,
-- Dexuan

I believe this is an installation ordering problem in opkg. If you apply my opkg patch (and the nativesdk one I just posted), I don't see this problem with meta-toolchain-gmae.

Cheers,

Richard

#17 lore raw

Re: [PATCH 4/9] consolekit: fix sdk generation issues

Quoted 46 lines · Richard Purdie
Quoted 45 lines · Dmitry Eremin-Solenikov
Quoted 23 lines · Dexuan

Richard Purdie wrote on 2011-12-15:

Quoted 22 lines · Dmitry Eremin-Solenikov
Quoted 9 lines

Currently sdk generation might fail with the following error:
| Collected errors:
| * extract_archive: Cannot create symlink from ./var/log to 'volatile/log': File exists.
ERROR: Function 'do_populate_sdk' failed

This happens as consolekit package will include both /var/log/ConsoleKit and /var/volatile/log/ConsoleKit files:

lumag@fangorn:~/OE-scripts$ dpkg-deb -c

build/tmp--eglibc/deploy/ipk/core2/consolekit_0.4.5-r7_core2.ipk | grep var

Quoted 10 lines

drwxr-xr-x root/root 0 2011-12-07 22:12 ./var/ drwxr-xr-x
root/root 0 2011-12-07 22:12 ./var/log/ drwxr-xr-x root/root

       0 2011-12-07 22:12 ./var/log/ConsoleKit/ lrwxrwxrwx root/root
     0 2011-12-07 22:12 ./var/run ->   volatile/run drwxr-xr-x root/root
       0 2011-12-07 22:12 ./var/volatile/ drwxr-xr-x root/root         0
2011-12-07 22:12 ./var/volatile/log/ drwxr-xr-x root/root         0
2011-12-07 22:12 ./var/volatile/log/ConsoleKit/ drwxr-xr-x root/root
       0 2011-12-07 22:12 ./var/volatile/run/ drwxr-xr-x root/root

0 2011-12-07 22:12 ./var/volatile/run/ConsoleKit/

Quoted 5 lines
Quoted 2 lines
Quoted 2 lines

Inclusion of both log directories causes this error. Drop the /var/log/ConsoleKit in favour of /var/volatile/log

Hi Dmitry,
Could you please explain how and where the extract_archive error is caused? Where is /var/log linked to /var/volatile/log?

I have tried building meta-toolchain-qte... and I got exactly the error from my original message.

Quoted 3 lines

Do you mean RP's patch "consolekit: Fix ${localstatedir} race" didn't fix the issue? (I suspect so)

Yes, I still had the issues even after PR's patch.

Quoted 6 lines
Quoted 5 lines

This effectively reverts:
http://git.openembedded.org/openembedded-core/commit/?id=5608a748
af2c754f60137ab7c3010ccce6bf9e40 so I think this fixes one problem at the expense of causing another. Koen: Any comments?

Quoted 6 lines
Quoted 2 lines
Quoted 2 lines

Thanks,
-- Dexuan

I believe this is an installation ordering problem in opkg. If you apply my opkg patch (and the nativesdk one I just posted), I don't see this problem with meta-toolchain-gmae.

I still see one problem. Without my patch I have both /var/volatile/log/ConsoleKit and /var/log/ConsoleKit in consolekit package. Won't that cause troubles?

Signature · 2 lines
With best wishes
Dmitry
#8 lore raw

Re: [PATCH 3/9] bitbake.conf, core-image-minimal-initramfs: add INITRAMFS_FSTYPES

In reply to Dmitry Eremin-Solenikov
Quoted 9 lines · Dmitry Eremin-Solenikov

Initramfs images don't benefit from usual IMAGE_FSTYPES overrides. The only sane values for them are "cpio.XXX". If IMAGE_FSTYPES is set to include 'live', building core-image-minimal-initramfs can result in build error, if the image is built before the kernel. To stop initramfs images from responding on IMAGE_FSTYPES settings, but still allow users/developers to override defaults (e.g. to generate "cpio.lzma" initramfs), introduce INITRAMFS_FSTYPES variable, by default set to "cpio.gz".

Quoted 5 lines
---
 meta/conf/bitbake.conf                             |    1 +
 .../images/core-image-minimal-initramfs.bb         |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

Merged to master, thanks.

Richard

#18 lore raw

Re: [PATCH 4/9] consolekit: fix sdk generation issues

In reply to Dmitry Eremin-Solenikov
Quoted 50 lines · Dmitry Eremin-Solenikov
Quoted 49 lines · Richard Purdie
Quoted 47 lines · Dmitry Eremin-Solenikov
Quoted 23 lines · Dexuan

Richard Purdie wrote on 2011-12-15:

Quoted 22 lines · Dmitry Eremin-Solenikov
Quoted 9 lines

Currently sdk generation might fail with the following error:
| Collected errors:
| * extract_archive: Cannot create symlink from ./var/log to 'volatile/log': File exists.
ERROR: Function 'do_populate_sdk' failed

This happens as consolekit package will include both /var/log/ConsoleKit and /var/volatile/log/ConsoleKit files:

lumag@fangorn:~/OE-scripts$ dpkg-deb -c

build/tmp--eglibc/deploy/ipk/core2/consolekit_0.4.5-r7_core2.ipk | grep var

Quoted 10 lines

drwxr-xr-x root/root 0 2011-12-07 22:12 ./var/ drwxr-xr-x
root/root 0 2011-12-07 22:12 ./var/log/ drwxr-xr-x root/root

       0 2011-12-07 22:12 ./var/log/ConsoleKit/ lrwxrwxrwx root/root
     0 2011-12-07 22:12 ./var/run ->   volatile/run drwxr-xr-x root/root
       0 2011-12-07 22:12 ./var/volatile/ drwxr-xr-x root/root         0
2011-12-07 22:12 ./var/volatile/log/ drwxr-xr-x root/root         0
2011-12-07 22:12 ./var/volatile/log/ConsoleKit/ drwxr-xr-x root/root
       0 2011-12-07 22:12 ./var/volatile/run/ drwxr-xr-x root/root

0 2011-12-07 22:12 ./var/volatile/run/ConsoleKit/

Quoted 5 lines
Quoted 2 lines
Quoted 2 lines

Inclusion of both log directories causes this error. Drop the /var/log/ConsoleKit in favour of /var/volatile/log

Hi Dmitry,
Could you please explain how and where the extract_archive error is caused? Where is /var/log linked to /var/volatile/log?

I have tried building meta-toolchain-qte... and I got exactly the error from my original message.

Quoted 3 lines

Do you mean RP's patch "consolekit: Fix ${localstatedir} race" didn't fix the issue? (I suspect so)

Yes, I still had the issues even after PR's patch.

Quoted 8 lines
Quoted 5 lines

This effectively reverts:
http://git.openembedded.org/openembedded-core/commit/?id=5608a748
af2c754f60137ab7c3010ccce6bf9e40 so I think this fixes one problem at the expense of causing another. Koen: Any comments?

Thanks,
-- Dexuan

Quoted 7 lines
Quoted 3 lines

I believe this is an installation ordering problem in opkg. If you apply my opkg patch (and the nativesdk one I just posted), I don't see this problem with meta-toolchain-gmae.

I still see one problem. Without my patch I have both /var/volatile/log/ConsoleKit and /var/log/ConsoleKit in consolekit package. Won't that cause troubles?

No, that wasn't the problem opkg was reporting. The problem opkg was reporting was that base-files hadn't installed first and its responsible for setting up the var symlinks.

Cheers,

Richard

#19 lore raw

Re: [PATCH 4/9] consolekit: fix sdk generation issues

Quoted 55 lines · Richard Purdie
Quoted 54 lines · Dmitry Eremin-Solenikov
Quoted 52 lines · Richard Purdie
Quoted 30 lines · Dmitry Eremin-Solenikov
Quoted 23 lines · Dexuan

Richard Purdie wrote on 2011-12-15:

Quoted 22 lines · Dmitry Eremin-Solenikov
Quoted 9 lines

Currently sdk generation might fail with the following error:
| Collected errors:
| * extract_archive: Cannot create symlink from ./var/log to 'volatile/log': File exists.
ERROR: Function 'do_populate_sdk' failed

This happens as consolekit package will include both /var/log/ConsoleKit and /var/volatile/log/ConsoleKit files:

lumag@fangorn:~/OE-scripts$ dpkg-deb -c

build/tmp--eglibc/deploy/ipk/core2/consolekit_0.4.5-r7_core2.ipk | grep var

Quoted 10 lines

drwxr-xr-x root/root 0 2011-12-07 22:12 ./var/ drwxr-xr-x
root/root 0 2011-12-07 22:12 ./var/log/ drwxr-xr-x root/root

        0 2011-12-07 22:12 ./var/log/ConsoleKit/ lrwxrwxrwx root/root
      0 2011-12-07 22:12 ./var/run ->    volatile/run drwxr-xr-x root/root
        0 2011-12-07 22:12 ./var/volatile/ drwxr-xr-x root/root         0
2011-12-07 22:12 ./var/volatile/log/ drwxr-xr-x root/root         0
2011-12-07 22:12 ./var/volatile/log/ConsoleKit/ drwxr-xr-x root/root
        0 2011-12-07 22:12 ./var/volatile/run/ drwxr-xr-x root/root
    0 2011-12-07 22:12 ./var/volatile/run/ConsoleKit/
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines

Inclusion of both log directories causes this error. Drop the /var/log/ConsoleKit in favour of /var/volatile/log

Hi Dmitry,
Could you please explain how and where the extract_archive error is caused? Where is /var/log linked to /var/volatile/log?

Quoted 17 lines

I have tried building meta-toolchain-qte... and I got exactly the error from my original message.

Quoted 3 lines

Do you mean RP's patch "consolekit: Fix ${localstatedir} race" didn't fix the issue? (I suspect so)

Yes, I still had the issues even after PR's patch.

Quoted 8 lines
Quoted 5 lines

This effectively reverts:
http://git.openembedded.org/openembedded-core/commit/?id=5608a748
af2c754f60137ab7c3010ccce6bf9e40 so I think this fixes one problem at the expense of causing another. Koen: Any comments?

Thanks,
-- Dexuan

I believe this is an installation ordering problem in opkg. If you apply my opkg patch (and the nativesdk one I just posted), I don't see this problem with meta-toolchain-gmae.

Quoted 7 lines
Quoted 3 lines

I still see one problem. Without my patch I have both /var/volatile/log/ConsoleKit and /var/log/ConsoleKit in consolekit package. Won't that cause troubles?

No, that wasn't the problem opkg was reporting. The problem opkg was reporting was that base-files hadn't installed first and its responsible for setting up the var symlinks.

That is not the problem that was reported by opkg. That is what I saw in the built package - /var/volatile/log/ConsoleKit and /var/log/ConsoleKit.

BTW, Koen. I've just built a consolekit package in Angstrom environment with my patch applied and here is the interesting part:

lumag@fangorn:~/OE-scripts$ dpkg-deb -c build/tmp-angstrom-eglibc/deploy/ipk/armv5te/consolekit_0.4.5-r8_armv5te.ipk 
 | grep var
drwxr-xr-x root/root         0 2011-12-16 21:32 ./var/
drwxr-xr-x root/root         0 2011-12-16 21:32 ./var/run/
drwxr-xr-x root/root         0 2011-12-16 21:32 ./var/run/ConsoleKit/
drwxr-xr-x root/root         0 2011-12-16 21:32 ./var/log/
drwxr-xr-x root/root         0 2011-12-16 21:32 ./var/log/ConsoleKit/

So the package does include the /var/log/ConsoleKit even without explicit note on it. Could you please recheck your environment and try building/checking consolekit package with my patch applied?

Signature · 2 lines
With best wishes
Dmitry