Re: [OE-core] [PATCH] libpng 1.6.13: fix build for aarch64
Op 22 sep. 2014, om 14:12 heeft Koen Kooi koen.k...@linaro.org het volgende geschreven: The configure override was too restrictive, it needed both 'arm' and 'neon' to trigger, which breaks on aarch64. Since TUNE_FEATURES is the only qualifier that matters, drop the 'arm' override. Buildtested for 'genericarmv8' and 'qemux86' machines. Ping, libpng is still broken and I'm still not clear why this bugfix hasn't been applied for the past 3 months. I'd like to get this in so it can be backported to dizzy ASAP. -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] [oe-core] Rootfs over 4GB
Hi All, I've created a patch to fix this issue. It can be enabled by setting SEPARATE_ROOTFS = 1 in local.conf. Rootfs.img is then put into a separate ext3 partition. In hope it will be useful. --- Petr On Thu, Dec 4, 2014 at 11:25 PM, Gary Robertson gary.robert...@linaro.org wrote: AFAIK, the reasons for using FAT are: (1) it is the most universally accepted filesystem format for devices and OS environments, (2) it is usable with almost all boot loaders produced anywhere by anyone, and (3) it is the de facto standard format for flash-based devices of all types Your solution of creating a small FAT partition for booting and ext3 for the root filesystem is probably the cleanest way of implementing large filesystem images for a Linux environment. On Thu, Dec 4, 2014 at 2:10 PM, Petr Nechaev petr.nech...@cogentembedded.com wrote: Hi All, I'm using oe-core for building images and have a problem. Rootfs.img is over 5GB and cannot be copied to FAT32 partition because of file size limit. This happens during do_bootimg task for core-image-sato-sdk. No warning is given by bitbake. The problem occurs in build_fat_img() function in bootimg.bbclass. I have temporarily fixed the problem in my build by extending bootimg.bbclass. I added new function which first splits *.hddimg into two partitions: FAT + ext3 and then puts rootfs.img to ext3 partition. But, what is the right way of building core-image-sato-sdk with large rootfs? And what is the technical reason behind putting rootfs.img into a FAT partition? --- Petr -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core From 388389b353dcfe4315a14ce58a72e30abf961a00 Mon Sep 17 00:00:00 2001 From: Petr Nechaev petr.nech...@cogentembedded.com Date: Fri, 12 Dec 2014 14:03:25 +0300 Subject: [PATCH] Modified bootimg.bbclass to support rootfs over 4GB Fixed a problem when rootfs.img is over 4GB and cannot be copied to a FAT32 partition. Added build_two_partitions() which first splits *.hddimg into two partitions: FAT + ext3 and then puts rootfs.img to ext3 partition. --- meta/classes/bootimg.bbclass | 102 --- 1 file changed, 97 insertions(+), 5 deletions(-) diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass index 859d517..2ced8c3 100644 --- a/meta/classes/bootimg.bbclass +++ b/meta/classes/bootimg.bbclass @@ -36,6 +36,7 @@ EXCLUDE_FROM_WORLD = 1 HDDDIR = ${S}/hddimg ISODIR = ${S}/iso EFIIMGDIR = ${S}/efi_img +ROOTFSDIR = ${S}/rootfs_img COMPACT_ISODIR = ${S}/iso.z COMPRESSISO ?= 0 @@ -57,12 +58,16 @@ def pcbios(d): PCBIOS = ${@pcbios(d)} +# set this enable creation of large images with separate rootfs partition +SEPARATE_ROOTFS ?= 0 + # The syslinux is required for the isohybrid command and boot catalog inherit syslinux inherit ${EFI_CLASS} populate() { DEST=$1 + DO_NOT_MAKE_ROOTFS=$2 install -d ${DEST} # Install bzImage, initrd, and rootfs.img in DEST for all loaders to use. @@ -82,7 +87,7 @@ populate() { chmod 0644 ${DEST}/initrd fi - if [ -n ${ROOTFS} ] [ -s ${ROOTFS} ]; then + if [ -n ${ROOTFS} ] [ -s ${ROOTFS} ] [ ! ${DO_NOT_MAKE_ROOTFS} = 1 ]; then install -m 0644 ${ROOTFS} ${DEST}/rootfs.img fi @@ -104,7 +109,7 @@ build_iso() { done - populate ${ISODIR} + populate ${ISODIR} 1 if [ ${PCBIOS} = 1 ]; then syslinux_iso_populate ${ISODIR} @@ -225,10 +230,83 @@ build_fat_img() { mcopy -i ${FATIMG} -s ${FATSOURCEDIR}/* ::/ } + +build_two_partitions() { + FAT_IMG=$1 + ROOT_FS=$2 + HDDIMG=$3 + # combine two partitions into single image file + + # calculate partition sizes + ROOTFS_SIZE=$(stat -Lc%s ${ROOT_FS}) + FATIMG_SIZE=$(stat -Lc%s ${FAT_IMG}) + ROOTFS_SIZE_M=$(expr $ROOTFS_SIZE / 1024 / 1024 + 1 + 100) + FATIMG_SIZE_M=$(expr $FATIMG_SIZE / 1024 / 1024 + 1) + DISK_SIZE_M=$(expr $ROOTFS_SIZE_M + $FATIMG_SIZE_M + 50 ) + # overhead isn't so important because we'll use this approach only for large images + + # create sparse image + dd if=/dev/zero of=${HDDIMG} seek=${DISK_SIZE_M}M bs=1 count=0 + + # create two partitions + # TODO: setup proper geometry first + cmd=p\no\n + # create first partition for FAT + cmd=${cmd}n\np\n1\n\n+${FATIMG_SIZE_M}M\n + # change type to FAT + cmd=${cmd}t\nb\n + # create second partition for rootfs + cmd=${cmd}n\np\n2\n\n+${ROOTFS_SIZE_M}M\n + # make the first partition bootable + cmd=${cmd}a\n1\n + # print and write changes to disk + cmd=${cmd}p\nw\n + echo -e ${cmd} | fdisk ${HDDIMG} + + # mount these partitions + devices=$(sudo kpartx -asv ${HDDIMG}) + fat_loop=$(echo ${devices} | sed -n '1 s/.*\(loop[0-9]*p[0-9]*\).*/\1/p') + rootfs_loop=$(echo ${devices} | sed -n '2 s/.*\(loop[0-9]*p[0-9]*\).*/\1/p') + + #echo -e echo=$fat_loop \n echo=$rootfs_loop \n + + # check that we have two partitions + if [ -z ${fat_loop} ] || [ -z
Re: [OE-core] [RFC PATCH 0/7] Developer workflow improvements
On Thu, Dec 11, 2014 at 7:35 PM, Paul Eggleton paul.eggle...@linux.intel.com wrote: On Thursday 11 December 2014 14:43:40 Trevor Woerner wrote: On 12/11/14 14:16, Trevor Woerner wrote: Oops! (this worked before the git pull) $ devtool add xannounce ~/devel/yocto/build/workflow/xannounce/ NOTE: Creating workspace layer in /home/trevor/devel/yocto/build/workflow/build/workspace NOTE: Recipe /home/trevor/devel/yocto/build/workflow/build/workspace/recipes/xannou nce/xannounce.bb has been automatically created; further editing may be required to make it fully functional Traceback (most recent call last): File /home/trevor/devel/yocto/build/workflow/meta-poky/scripts/devtool, line 274, in module ret = main() File /home/trevor/devel/yocto/build/workflow/meta-poky/scripts/devtool, line 267, in main ret = args.func(args, config, basepath, workspace) File /home/trevor/devel/yocto/build/workflow/meta-poky/scripts/lib/devtool /standard.py, line 68, in add _add_md5(config, args.recipename, recipefile) File /home/trevor/devel/yocto/build/workflow/meta-poky/scripts/lib/devtool /standard.py, line 218, in _add_md5 md5 = bb.utils.md5_file(filename) File /home/trevor/devel/yocto/build/workflow/meta-poky/bitbake/lib/bb/util s.py, line 463, in md5_file with open(filename, rb) as f: IOError: [Errno 2] No such file or directory: '/home/trevor/devel/yocto/build/workflow/build/workspace/recipes/xanno unce/xannounce.bb' Sure enough... $ devtool-workflow tree workspace/ workspace/ |-- appends |-- conf | | `-- layer.conf `-- recipes `-- xannounce 4 directories, 1 file whereas before it was: $ tree workspace/ workspace/ |-- appends | | `-- xannounce.bbappend | |-- conf | | `-- layer.conf `-- recipes `-- xannounce `-- xannounce.bb 4 directories, 3 files For some reason my recipe and bbappends are not getting created :-( bisecting (manually) leads to this commit being safe: ea50ec527483eb3a094588858baebd5fb23f71c6 devtool: rename deploy/undeploy to deploy-target/undeploy-target and this one introducing the problem: 770f203f73f358ce3c6c5ac12fe2775b812bdc6b devtool: fool bitbake into thinking it's outputting to a terminal Thanks for the quick bisect - I've fixed it so that wrapper is only used when running bitbake through devtool build, and now devtool add works properly again. This is why I should probably write some proper tests before trying to do anything further... Agreed. I think a good unittest needs to be include sooner than later as the more it grows, the harder will be to cover all usecases with tests. -- 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] systemd: backport patch to fix reading journal backwards
Signed-off-by: Jonathan Liu net...@gmail.com --- ...-Fix-navigating-backwards-missing-entries.patch | 34 ++ meta/recipes-core/systemd/systemd_216.bb | 1 + 2 files changed, 35 insertions(+) create mode 100644 meta/recipes-core/systemd/systemd/0001-journal-Fix-navigating-backwards-missing-entries.patch diff --git a/meta/recipes-core/systemd/systemd/0001-journal-Fix-navigating-backwards-missing-entries.patch b/meta/recipes-core/systemd/systemd/0001-journal-Fix-navigating-backwards-missing-entries.patch new file mode 100644 index 000..621a0da --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0001-journal-Fix-navigating-backwards-missing-entries.patch @@ -0,0 +1,34 @@ +From 2173cbf847fc53ca24950e77958c902edecfc207 Mon Sep 17 00:00:00 2001 +From: Olivier Brunel j...@jjacky.com +Date: Fri, 5 Dec 2014 16:06:45 +0100 +Subject: [PATCH] journal: Fix navigating backwards missing entries + +With DIRECTION_UP (i.e. navigating backwards) in generic_array_bisect() when the +needle was found as the last item in the array, it wasn't actually processed as +match, resulting in entries being missed. + +https://bugs.freedesktop.org/show_bug.cgi?id=86855 + +Upstream-Status: Backport + +Signed-off-by: Jonathan Liu net...@gmail.com +--- + src/journal/journal-file.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c +index 7858435..c5d2d19 100644 +--- a/src/journal/journal-file.c b/src/journal/journal-file.c +@@ -1657,7 +1657,7 @@ static int generic_array_bisect( + } + } + +-if (k n) { ++if (k = n) { + if (direction == DIRECTION_UP) { + i = n; + subtract_one = true; +-- +2.1.3 + diff --git a/meta/recipes-core/systemd/systemd_216.bb b/meta/recipes-core/systemd/systemd_216.bb index 536b7be..eceead9 100644 --- a/meta/recipes-core/systemd/systemd_216.bb +++ b/meta/recipes-core/systemd/systemd_216.bb @@ -34,6 +34,7 @@ SRC_URI = git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol= file://0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch \ file://0001-Make-root-s-home-directory-configurable.patch \ file://0001-systemd-user-avoid-using-system-auth.patch \ + file://0001-journal-Fix-navigating-backwards-missing-entries.patch \ file://touchscreen.rules \ file://00-create-volatile.conf \ file://init \ -- 2.1.3 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] systemd-systemctl: add handling of template unit files
Template unit files (those with '@' in their names) are not handled with native version of systemctl. This is usually not a problem, as the native systemctl fails and systemctl command is executed during first boot. But some early boot template units may fail during first boot because opkg configure for first boot is pulled too late for them (although I encouter it only with some of my services, not with oe-core ones). Handling of template unit files is same as in original systemctl. Also DefaultInstance directive in template is respected. As with original systemctl, enabling of template without instance and DefaultInstance does nothing. Signed-off-by: Tomas Novotny to...@novotny.cz --- .../systemd/systemd-systemctl/systemctl| 45 ++ 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/meta/recipes-core/systemd/systemd-systemctl/systemctl b/meta/recipes-core/systemd/systemd-systemctl/systemctl index b37f27a..2e632b0 100755 --- a/meta/recipes-core/systemd/systemd-systemctl/systemctl +++ b/meta/recipes-core/systemd/systemd-systemctl/systemctl @@ -77,18 +77,31 @@ for service in $services; do exit 0 fi - echo Try to find location of $service... + service_base_file=`echo $service | sed 's/\(@\).*\(\.[^.]\+\)/\1\2/'` + if [ -z `echo $service | sed '/@/p;d'` ]; then + echo Try to find location of $service... + service_template=false + else + echo Try to find location of template $service_base_file of instance $service... + service_template=true + if [ -z `echo $service | sed 's/^.\+@\(.*\)\.[^.]\+/\1/'` ]; then + instance_specified=false + else + instance_specified=true + fi + fi + # find service file for p in $ROOT/etc/systemd/system \ $ROOT/lib/systemd/system \ $ROOT/usr/lib/systemd/system; do - if [ -e $p/$service ]; then - service_file=$p/$service + if [ -e $p/$service_base_file ]; then + service_file=$p/$service_base_file service_file=${service_file##$ROOT} fi done if [ -z $service_file ]; then - echo '$service' couldn't be found; exiting with error + echo '$service_base_file' couldn't be found; exiting with error exit 1 fi echo Found $service in $service_file @@ -115,13 +128,29 @@ for service in $services; do for r in $wanted_by; do echo WantedBy=$r found in $service if [ $action = enable ]; then + enable_service=$service + if [ $service_template = true -a $instance_specified = false ]; then + default_instance=$(sed '/^DefaultInstance[[:space:]]*=/s,[^=]*=,,p;d' $ROOT/$service_file) + if [ -z $default_instance ]; then + echo Template unit without instance or DefaultInstance directive, nothing to enable + continue + else + echo Found DefaultInstance $default_instance, enabling it + enable_service=$(echo $service | sed s/@/@$default_instance/) + fi + fi mkdir -p $ROOT/etc/systemd/system/$r.wants - ln -s $service_file $ROOT/etc/systemd/system/$r.wants - echo Enabled $service for $wanted_by. + ln -s $service_file $ROOT/etc/systemd/system/$r.wants/$enable_service + echo Enabled $enable_service for $wanted_by. else - rm -f $ROOT/etc/systemd/system/$r.wants/$service + if [ $service_template = true -a $instance_specified = false ]; then + disable_service=$ROOT/etc/systemd/system/$r.wants/`echo $service | sed 's/@/@*/'` + else + disable_service=$ROOT/etc/systemd/system/$r.wants/$service + fi + rm -f $disable_service rmdir --ignore-fail-on-non-empty -p $ROOT/etc/systemd/system/$r.wants - echo Disabled $service for $wanted_by. + echo Disabled ${disable_service##$ROOT/etc/systemd/system/$r.wants/} for $wanted_by. fi done -- 1.8.3.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] shadow: disable nscd feature when glibc is not built with spawn posix functions
shadow package configure step fails with this log output : | checking location of faillog/lastlog/wtmp... (cached) /var/log | checking location of the passwd program... (cached) /usr/bin | checking for posix_spawn... no | configure: error: posix_spawn is needed for nscd support | Configure failed. The contents of all config.log files follows to aid debugging | ERROR: oe_runconf failed Signed-off-by: Baptiste DURAND baptiste.dur...@gmail.com --- meta/recipes-extended/shadow/shadow.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc index 14c7281..bb3a927 100644 --- a/meta/recipes-extended/shadow/shadow.inc +++ b/meta/recipes-extended/shadow/shadow.inc @@ -60,6 +60,7 @@ NSCDOPT = NSCDOPT_class-native = --without-nscd NSCDOPT_class-nativesdk = --without-nscd NSCDOPT_libc-uclibc = --without-nscd +NSCDOPT_libc-glibc = ${@bb.utils.contains('DISTRO_FEATURES', 'libc-spawn', '--with-nscd', '--without-nscd', d)} PAM_PLUGINS = libpam-runtime \ pam-plugin-faildelay \ -- 1.8.1.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] font-util: Fix incorrect PKG_CONFIG_PATH
PKG_CONFIG_PATH always defaults to /usr/lib/pkgconfig, and the host /usr/lib/pkgconfig is always checked as a fallback; however, PKG_CONFIG_PATH is currently (incorrectly) set to /usr/lib/pkg-config in the sysroot, which doesn't exist. On host distros where the font encoding maps are stored under a different path than OE, this will break font builds, because ucs2any will attempt to read the sysroot's encoding maps with the host paths. Signed-off-by: Richard Tollerton rich.toller...@ni.com --- meta/recipes-graphics/xorg-font/font-util_1.3.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-graphics/xorg-font/font-util_1.3.0.bb b/meta/recipes-graphics/xorg-font/font-util_1.3.0.bb index 8b42991..cc4258a 100644 --- a/meta/recipes-graphics/xorg-font/font-util_1.3.0.bb +++ b/meta/recipes-graphics/xorg-font/font-util_1.3.0.bb @@ -17,7 +17,7 @@ RDEPENDS_${PN}_class-native = mkfontdir-native mkfontscale-native PR = ${INC_PR}.0 do_configure_prepend() { -sed -i s#MAPFILES_PATH=\`pkg-config#MAPFILES_PATH=\`PKG_CONFIG_PATH=\${STAGING_LIBDIR_NATIVE}/pkg-config\ pkg-config#g ${S}/fontutil.m4.in +sed -i s#MAPFILES_PATH=\`pkg-config#MAPFILES_PATH=\`PKG_CONFIG_PATH=\${STAGING_LIBDIR_NATIVE}/pkgconfig\ pkg-config#g ${S}/fontutil.m4.in } BBCLASSEXTEND = native -- 2.1.3 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] kernel.bbclass: Remove bashism
Fixes build on systems using dash for default shell e.g. errors like run.do_strip.25842: [[: not found | readelf: Error: Unable to read in 0x37 bytes of section headers | readelf: Error: Not an ELF file - it has the wrong magic bytes at the start Change-Id: I29cac15be44a02d75a3d6889b6ae9b2e19bf46af Signed-off-by: Khem Raj raj.k...@gmail.com --- meta/classes/kernel.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index f300fa3..4af9d15 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass @@ -390,7 +390,7 @@ python split_kernel_packages () { do_strip() { if [ -n ${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS} ]; then - if [[ ${KERNEL_IMAGETYPE} != vmlinux ]]; then + if [ ${KERNEL_IMAGETYPE} != vmlinux ]; then bbwarn image type will not be stripped (not supported): ${KERNEL_IMAGETYPE} return fi -- 2.1.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] kernel.bbclass: Remove bashism
this needs back porting to dizzy as well On Dec 12, 2014, at 12:47 PM, Khem Raj raj.k...@gmail.com wrote: Fixes build on systems using dash for default shell e.g. errors like run.do_strip.25842: [[: not found | readelf: Error: Unable to read in 0x37 bytes of section headers | readelf: Error: Not an ELF file - it has the wrong magic bytes at the start Change-Id: I29cac15be44a02d75a3d6889b6ae9b2e19bf46af Signed-off-by: Khem Raj raj.k...@gmail.com --- meta/classes/kernel.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index f300fa3..4af9d15 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass @@ -390,7 +390,7 @@ python split_kernel_packages () { do_strip() { if [ -n ${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS} ]; then - if [[ ${KERNEL_IMAGETYPE} != vmlinux ]]; then + if [ ${KERNEL_IMAGETYPE} != vmlinux ]; then bbwarn image type will not be stripped (not supported): ${KERNEL_IMAGETYPE} return fi -- 2.1.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core