]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
qemux86: use 32bit multilib config for everything except kernel jansa/multilib
authorMartin Jansa <Martin.Jansa@gmail.com>
Sun, 4 Mar 2018 13:16:13 +0000 (13:16 +0000)
committerMartin Jansa <Martin.Jansa@gmail.com>
Thu, 3 Sep 2020 14:43:24 +0000 (16:43 +0200)
* this is goog enough (still ugly) to build core-image-base with all components except
  the kernel (and kernel dependencies) with 32bit multilib config (i586 DEFAULTTUNE) and
  kernel with new 64bit DEFAULTTUNE core2-64 as shown in WORKDIR distribution:

all-oe-linux:
autoconf-archive  run-postinsts  update-rc.d

core2-64-oe-linux:
defaultpkgname  glibc  glibc-initial  glibc-locale  libgcc-initial  linux-libc-headers  qemuwrapper-cross

i586-oemllib32-linux:
lib32-alsa-lib         lib32-gcc-runtime            lib32-libgpg-error      lib32-libxml2                         lib32-renderproto
lib32-alsa-state       lib32-gdbm                   lib32-libical           lib32-libxrender                      lib32-rpcbind
lib32-alsa-utils       lib32-glib-2.0               lib32-libice            lib32-linux-libc-headers              lib32-shadow
lib32-attr             lib32-glibc                  lib32-libidn            lib32-mobile-broadband-provider-info  lib32-shadow-sysroot
lib32-avahi            lib32-glibc-initial          lib32-libnl             lib32-modutils-initscripts            lib32-shared-mime-info
lib32-base-passwd      lib32-glibc-locale           lib32-libnss-mdns       lib32-ncurses                         lib32-sqlite3
lib32-bash             lib32-gmp                    lib32-libogg            lib32-neard                           lib32-sysvinit
lib32-bash-completion  lib32-gnutls                 lib32-libpcre           lib32-netbase                         lib32-tcp-wrappers
lib32-bluez5           lib32-gobject-introspection  lib32-libpng            lib32-nettle                          lib32-util-linux
lib32-busybox          lib32-icu                    lib32-libpthread-stubs  lib32-ofono                           lib32-util-macros
lib32-bzip2            lib32-initscripts            lib32-libsamplerate0    lib32-openssl                         lib32-wireless-tools
lib32-cairo            lib32-inputproto             lib32-libsm             lib32-opkg-utils                      lib32-wpa-supplicant
lib32-cryptodev-linux  lib32-iw                     lib32-libsndfile1       lib32-pciutils                        lib32-xcb-proto
lib32-dbus             lib32-kbproto                lib32-libtirpc          lib32-pixman                          lib32-xextproto
lib32-dbus-glib        lib32-kmod                   lib32-libtool-cross     lib32-psplash                         lib32-xproto
lib32-e2fsprogs        lib32-libcap                 lib32-libunistring      lib32-python3                         lib32-xtrans
lib32-eudev            lib32-libcheck               lib32-libvorbis         lib32-python3-dbus                    lib32-xz
lib32-expat            lib32-libdaemon              lib32-libx11            lib32-python3-pycairo                 lib32-zlib
lib32-flac             lib32-libffi                 lib32-libxau            lib32-python3-pygobject
lib32-fontconfig       lib32-libgcc                 lib32-libxcb            lib32-python3-setuptools
lib32-freetype         lib32-libgcc-initial         lib32-libxdmcp          lib32-quota
lib32-gawk             lib32-libgcrypt              lib32-libxext           lib32-readline

qemux86-oe-linux:
core-image-base  depmodwrapper-cross  linux-yocto

qemux86-oemllib32-linux:
lib32-base-files     lib32-packagegroup-base       lib32-shadow-securetty  lib32-v86d
lib32-init-ifupdown  lib32-packagegroup-core-boot  lib32-sysvinit-inittab

x86_64-linux:
alsa-lib-native          e2fsprogs-native              kmod-native                   makedevs-native    python3-setuptools-native
attr-native              elfutils-native               ldconfig-native               mklibs-native      qemu-helper-native
autoconf-archive-native  expat-native                  lib32-binutils-cross-i686     mpfr-native        qemu-native
autoconf-native          file-native                   lib32-gcc-cross-i686          ncurses-native     quilt-native
automake-native          flex-native                   lib32-gcc-cross-initial-i686  ninja-native       re2c-native
bc-native                gcc-cross-initial-x86_64      libarchive-native             nspr-native        readline-native
binutils-cross-x86_64    gcc-cross-x86_64              libffi-native                 nss-native         rpm-native
binutils-native          gdbm-native                   libmpc-native                 openssl-native     shadow-native
bison-native             gettext-minimal-native        libpcre-native                opkg-native        shared-mime-info-native
bzip2-native             gettext-native                libpng-native                 opkg-utils-native  sqlite3-native
cmake-native             glib-2.0-native               libsolv-native                pbzip2-native      texinfo-dummy-native
cross-localedef-native   gmp-native                    libtool-native                perl-native        unifdef-native
cryptodev-linux-native   gnu-config-native             libxml2-native                pigz-native        unzip-native
curl-native              gobject-introspection-native  libxml-parser-perl-native     pixman-native      update-rc.d-native
db-native                gperf-native                  libxslt-native                pkgconfig-native   util-linux-native
dbus-glib-native         gtk-doc-native                lzo-native                    popt-native        util-macros-native
dbus-native              icu-native                    lzop-native                   prelink-native     xproto-native
dtc-native               intltool-native               m4-native                     pseudo-native      xz-native
dwarfsrcfiles-native     kern-tools-native             makedepend-native             python3-native     zlib-native

* there are still some issues though:
  * update-rc.d.bbclass adds dependency on 64bit update-rc.d and initscripts
    to allarch recipes (where multilib class_extend doesn't apply)
  * glibc-locale is 64bit, because virtual/ providers aren't correctly expanded
    to have MLPREFIX, changed bash to do that
    and still there is
    RDEPENDS="     lib32-packagegroup-core-boot     lib32-packagegroup-base-extended               run-postinsts lib32-psplash locale-base-en-us locale-base-en-gb"
    in bitbake -e core-image-base, bitbake -e lib32-core-image-base was failing, because
    nothing provides locale-base-* packages, fixed by adding MLPREFIX to PACKAGES_DYNAMIC
  * kernel and kernel modules are built as 32bit: causing package_qa failure:
    ERROR: linux-yocto-4.15.3+gitAUTOINC+030f397472_a6a3a6a73d-r0 do_package_qa: QA Issue: Architecture did not match (x86, expected x86-64) on /work/qemux86-oe-linux/linux-yocto/4.15.3+gitAUTOINC+030f397472_a6a3a6a73d-r0/packages-split/kernel-module-ip6-tunnel-4.15.3-yocto-standard/lib/modules/4.15.3-yocto-standard/kernel/net/ipv6/ip6_tunnel.ko [arch]
    ....
    ERROR: QA Issue: Architecture did not match (x86, expected x86-64) on /work/qemux86-oe-linux/linux-yocto/4.15.3+gitAUTOINC+030f397472_a6a3a6a73d-r0/packages-split/kernel-vmlinux/boot/vmlinux-4.15.3-yocto-standard [arch]
    the parameters look OK:
    KERNEL_CC="x86_64-oe-linux-gcc  -fuse-ld=bfd -fdebug-prefix-map=/jenkins/mjansa/build-nodistro-master/BUILD/work/qemux86-oe-linux/linux-yocto/4.15.3+gitAUTOINC+030f397472_a6a3a6a73d-r0=/usr/src/debug/linux-yocto/4.15.3+gitAUTOINC+030f397472_a6a3a6a73d-r0 -fdebug-prefix-map=/jenkins/mjansa/build-nodistro-master/BUILD/work/qemux86-oe-linux/linux-yocto/4.15.3+gitAUTOINC+030f397472_a6a3a6a73d-r0/recipe-sysroot-native= -fdebug-prefix-map=/jenkins/mjansa/build-nodistro-master/BUILD/work/qemux86-oe-linux/linux-yocto/4.15.3+gitAUTOINC+030f397472_a6a3a6a73d-r0/recipe-sysroot=  -fdebug-prefix-map=/jenkins/mjansa/build-nodistro-master/BUILD/work-shared/qemux86/kernel-source=/usr/src/kernel"
    KERNEL_LD="x86_64-oe-linux-ld.bfd "
    KERNEL_EXTRA_ARGS=""
    but I need to set KMACHINE in order to actually generate .config from qemux86-64
    to select 64bit config options

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
meta/classes/core-image.bbclass
meta/classes/update-rc.d.bbclass
meta/conf/machine/qemux86.conf
meta/recipes-core/glibc/glibc-locale.inc

index 88ca272145f9c897f9b6aaaa36e76faa35f2a368..acb2e82a111cc23277f3e8ea11a1e07c3b2790c7 100644 (file)
 # - stateless-rootfs    - systemctl-native not run, image populated by systemd at runtime
 # - splash              - bootup splash screen
 #
-FEATURE_PACKAGES_x11 = "packagegroup-core-x11"
-FEATURE_PACKAGES_x11-base = "packagegroup-core-x11-base"
-FEATURE_PACKAGES_x11-sato = "packagegroup-core-x11-sato"
-FEATURE_PACKAGES_tools-debug = "packagegroup-core-tools-debug"
-FEATURE_PACKAGES_eclipse-debug = "packagegroup-core-eclipse-debug"
-FEATURE_PACKAGES_tools-profile = "packagegroup-core-tools-profile"
-FEATURE_PACKAGES_tools-testapps = "packagegroup-core-tools-testapps"
-FEATURE_PACKAGES_tools-sdk = "packagegroup-core-sdk packagegroup-core-standalone-sdk-target"
-FEATURE_PACKAGES_nfs-server = "packagegroup-core-nfs-server"
-FEATURE_PACKAGES_nfs-client = "packagegroup-core-nfs-client"
-FEATURE_PACKAGES_ssh-server-dropbear = "packagegroup-core-ssh-dropbear"
-FEATURE_PACKAGES_ssh-server-openssh = "packagegroup-core-ssh-openssh"
+FEATURE_PACKAGES_x11 = "${LIB32_PREFIX}packagegroup-core-x11"
+FEATURE_PACKAGES_x11-base = "${LIB32_PREFIX}packagegroup-core-x11-base"
+FEATURE_PACKAGES_x11-sato = "${LIB32_PREFIX}packagegroup-core-x11-sato"
+FEATURE_PACKAGES_tools-debug = "${LIB32_PREFIX}packagegroup-core-tools-debug"
+FEATURE_PACKAGES_eclipse-debug = "${LIB32_PREFIX}packagegroup-core-eclipse-debug"
+FEATURE_PACKAGES_tools-profile = "${LIB32_PREFIX}packagegroup-core-tools-profile"
+FEATURE_PACKAGES_tools-testapps = "${LIB32_PREFIX}packagegroup-core-tools-testapps"
+FEATURE_PACKAGES_tools-sdk = "${LIB32_PREFIX}packagegroup-core-sdk ${LIB32_PREFIX}packagegroup-core-standalone-sdk-target"
+FEATURE_PACKAGES_nfs-server = "${LIB32_PREFIX}packagegroup-core-nfs-server"
+FEATURE_PACKAGES_nfs-client = "${LIB32_PREFIX}packagegroup-core-nfs-client"
+FEATURE_PACKAGES_ssh-server-dropbear = "${LIB32_PREFIX}packagegroup-core-ssh-dropbear"
+FEATURE_PACKAGES_ssh-server-openssh = "${LIB32_PREFIX}packagegroup-core-ssh-openssh"
 FEATURE_PACKAGES_hwcodecs = "${MACHINE_HWCODECS}"
 
 
@@ -62,8 +62,8 @@ IMAGE_FEATURES_REPLACES_ssh-server-openssh = "ssh-server-dropbear"
 MACHINE_HWCODECS ??= ""
 
 CORE_IMAGE_BASE_INSTALL = '\
-    packagegroup-core-boot \
-    packagegroup-base-extended \
+    ${LIB32_PREFIX}packagegroup-core-boot \
+    ${LIB32_PREFIX}packagegroup-base-extended \
     \
     ${CORE_IMAGE_EXTRA_INSTALL} \
     '
index 1366fee65376c865b7ef0e9f627ba857369b37ce..ea46634f37281072be1ef381de6764246057750a 100644 (file)
@@ -1,6 +1,8 @@
 UPDATERCPN ?= "${PN}"
 
-DEPENDS_append_class-target = "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', ' update-rc.d initscripts', '', d)}"
+# This is needed otherwise e.g. allarch run-postinst will
+# depend on initscripts instead of lib32-initscripts
+DEPENDS_append_class-target = "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', ' ${LIB32_PREFIX}update-rc.d ${LIB32_PREFIX}initscripts', '', d)}"
 
 UPDATERCD = "update-rc.d"
 UPDATERCD_class-cross = ""
index 7e6723b880a265bf8422037c8af038aa984f8bfe..f1411220dfcd58db45b164e2e1f76da8ff5daf42 100644 (file)
@@ -39,3 +39,13 @@ do_image_wic[depends] += "syslinux:do_populate_sysroot syslinux-native:do_popula
 
 #For runqemu
 QB_SYSTEM_NAME = "qemu-system-i386"
+
+DEFAULTTUNE = "core2-64"
+require conf/multilib.conf
+MULTILIBS = "multilib:lib32"
+DEFAULTTUNE_virtclass-multilib-lib32 = "core2-32"
+#MACHINEOVERRIDES_virtclass-multilib-lib32 =. "x86:qemuall:qemux86:${WEBOS_EXTRA_MACHINEOVERRIDES}"
+LIB32_PREFIX = "lib32-"
+ROOTFS_PKGMANAGE = "${LIB32_PREFIX}opkg"
+SPLASH = "${LIB32_PREFIX}psplash"
+KMACHINE = "qemux86-64"
index ef06389ff941024e211be8714dce409c8c48c346..a7d94d31d39f231be036683410a7e88b74814ed7 100644 (file)
@@ -35,7 +35,7 @@ PROVIDES = "virtual/libc-locale"
 
 PACKAGES = "localedef ${PN}-dbg"
 
-PACKAGES_DYNAMIC = "^locale-base-.* \
+PACKAGES_DYNAMIC = "^${MLPREFIX}locale-base-.* \
                     ^glibc-gconv-.* ^glibc-charmap-.* ^glibc-localedata-.* ^glibc-binary-localedata-.* \
                     ^${MLPREFIX}glibc-gconv$"