From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6703379430489718784 X-Received: by 2002:a2e:80c2:: with SMTP id r2mr17174580ljg.44.1567446038623; Mon, 02 Sep 2019 10:40:38 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:b4ef:: with SMTP id s15ls1613252ljm.14.gmail; Mon, 02 Sep 2019 10:40:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqzTgG6uTwPPVfmrgFiivqHAt+4Bd2tcNGFXqeHAXMwtZwPM9zaWvNgvldTacj0QSWFrzsDf X-Received: by 2002:a2e:a40e:: with SMTP id p14mr3628701ljn.29.1567446037730; Mon, 02 Sep 2019 10:40:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567446037; cv=none; d=google.com; s=arc-20160816; b=HACwcsJf6rTuBD7e8/7zz8qGtzWp3EsCj3Ux0vCRQOM6Vbc4A7XSb99vzIpspTQ5dM v+xxlJMSt1FIXtBvgJW32ycVFIzlsaMAMCBszbO2PG2NQ8W7VUL1yzr6D41F/7x3Jkmf JForzkAEWcvq4nTg6FSH3up283ohcZ3X19IZ2p6HjQU76YwtW08xsILV/PaX52QRkLUa 2d6xvqEt6qd9MCCTNNckapNOyvwH/KxuOMzRbz6qhGeGsXijIGm9E5JHSRehbD2zuTMa 7F6Ddqg9caXAqtgfgiiMrAfW0rgikuVHKempqQTpu450WmQ/brQiCVEQeT7eMKqg5EJU 7CgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:cc:references:to:subject; bh=RyRAoBSK3RVXin6g1dejRZlVNfyTv4Eo77fjQU4fh28=; b=noplBeQBPL9YwZcQ6bKM/0+ywPioUlXWN3j8l4iQr1Rf6i4PYzNK4+4YIEY17ddXcr Rn5K/YiLOCSd5S8HEGcMCkDwUV/B6pRaS19PwuWw1uXRsgG2mAZmPq+6yFxbgSSBI4/L krQiPCEWcrmkODd0APtPXXQSdqWt5il7nyh9f6W3fkfVLt5qhgWMU8A4N/I6xvGkFyI7 g7J+c7pR+NOGnT0OIGkEveaefIaQWhHUKOs25g4Jqj+UdYyuLQFjLflTXNSsiLOVRAOH B0yM++NXv/KZrE/b+Q48O19hGFW7Qv+3Hu0bKo13JD3iv6SFZ6Xp96rZTYOmjntymHi1 +oQA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from david.siemens.de (david.siemens.de. [192.35.17.14]) by gmr-mx.google.com with ESMTPS id h6si761031lfc.3.2019.09.02.10.40.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Sep 2019 10:40:37 -0700 (PDT) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.14 as permitted sender) client-ip=192.35.17.14; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id x82HeZ23000447 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 2 Sep 2019 19:40:35 +0200 Received: from [139.25.68.37] (md1q0hnc.ad001.siemens.net [139.25.68.37] (may be forged)) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id x82HeZaq020871; Mon, 2 Sep 2019 19:40:35 +0200 Subject: Re: [PATCH v4] builddeb: generate multi-arch friendly linux-libc-dev package To: chombourger@gmail.com, isar-users References: <1562658215-186-1-git-send-email-Cedric_Hombourger@mentor.com> <1562658215-186-2-git-send-email-Cedric_Hombourger@mentor.com> <20190717074742.18a3be36@md1za8fc.ad001.siemens.net> <85a97482-8f0d-4b34-a9d6-c74a494da350@googlegroups.com> Cc: Henning Schild , Claudius Heine From: Jan Kiszka Message-ID: Date: Mon, 2 Sep 2019 19:40:35 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <85a97482-8f0d-4b34-a9d6-c74a494da350@googlegroups.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-TUID: Jq98yqPs90Na On 20.07.19 22:16, chombourger@gmail.com wrote: > > > On Wednesday, July 17, 2019 at 7:47:45 AM UTC+2, Henning Schild wrote: > > Am Thu, 11 Jul 2019 23:46:53 +0900 > schrieb Masahiro Yamada >: > > > On Tue, Jul 9, 2019 at 4:44 PM Cedric Hombourger > > > wrote: > > > > > > Debian-based distributions place libc header files in a machine > > > specific directory (/usr/include/) instead of > > > /usr/include/asm to support installation of the linux-libc-dev > > > package from multiple architectures. Move headers installed by > > > "make headers_install" accordingly using Debian's tuple from > > > dpkg-architecture (stored in debian/arch). > > > > > > Signed-off-by: Cedric Hombourger > > > > --- > > >  scripts/package/builddeb | 5 +++++ > > >  scripts/package/mkdebian | 1 + > > >  2 files changed, 6 insertions(+) > > > > > > diff --git a/scripts/package/builddeb b/scripts/package/builddeb > > > index b03dd56a4782..d5d33bcba1fb 100755 > > > --- a/scripts/package/builddeb > > > +++ b/scripts/package/builddeb > > > @@ -132,6 +132,11 @@ fi > > >  if [ "$ARCH" != "um" ]; then > > >         $MAKE -f $srctree/Makefile headers_check > > >         $MAKE -f $srctree/Makefile headers_install > > > INSTALL_HDR_PATH="$libc_headers_dir/usr" > > > +       # move asm headers to /usr/include//asm to > > > match the structure > > > +       # used by Debian-based distros (to support multi-arch) > > > +       host_arch=$(dpkg-architecture -a$(cat debian/arch) > > > -qDEB_HOST_MULTIARCH) > > > +       mkdir $libc_headers_dir/usr/include/$host_arch > > > +       mv $libc_headers_dir/usr/include/asm > > > $libc_headers_dir/usr/include/$host_arch/ fi > > > > > > I just wondered whether there is something better than $(cat > > debian/arch), but maybe not. > > > > OK, I am ready to pick it up for 5.3-rc1. > > > > With Ben's Ack, I would be able to proceed with more confident. > > going Isar-only > > That looks like it will go in. Now would be the time to prepare putting > it into Isar-core. I think the patch should be in filesdir of the custom > kernel code and should be applied if PV < 5.2. > The actual patch should of cause be the one that goes mainline, and the > actual PV will depend on when it does. And we might have to carry > backports of the patch, should it not apply all the way back to say 4.4 > > I assume the Isar-patch could hold a surprise or two, so starting it > early could speed things up. Just keeping the magic in a layer and > leaving Isar-core without the fix would not be ideal. > > > Here's what the patch may look like (started some test builds) > I had to adjust the upstream patch twice to support kernels >= 4.0 (and < 5.3) > > The upstream patch should land in 5.3 (it was part of the kbuild pull request #2 > that was sent to Linus) > > Before submitting this as a formal Patch Review, please let me know if the > proposed approach makes sense? > > diff --git a/meta/recipes-kernel/linux/linux-custom.inc > b/meta/recipes-kernel/linux/linux-custom.inc > index ee5f20c..06b4b93 100644 > --- a/meta/recipes-kernel/linux/linux-custom.inc > +++ b/meta/recipes-kernel/linux/linux-custom.inc > @@ -16,6 +16,16 @@ python() { >      kernel_name = d.getVar("KERNEL_NAME_PROVIDED", True) >      d.setVar('PROVIDES', 'linux-image-' + kernel_name + ' ' + \ >                           'linux-headers-' + kernel_name) > +    cmp_4_0  = bb.utils.vercmp_string(d.getVar('PV', True), '4.0') > +    cmp_4_17 = bb.utils.vercmp_string(d.getVar('PV', True), '4.17') > +    cmp_5_1  = bb.utils.vercmp_string(d.getVar('PV', True), '5.1') > +    cmp_5_3  = bb.utils.vercmp_string(d.getVar('PV', True), '5.3') > +    if cmp_5_1 >= 0 and cmp_5_3 < 0: > +        d.appendVar('SRC_URI', " file://builddeb-libc-multi-arch-5.1-5.2.patch") > +    elif cmp_4_17 >= 0 and cmp_5_1 < 0: > +        d.appendVar('SRC_URI', " file://builddeb-libc-multi-arch-4.17-5.0.patch") > +    elif cmp_4_0 >= 0 and cmp_4_17 < 0: > +        d.appendVar('SRC_URI', " file://builddeb-libc-multi-arch-4.0-4.16.patch") >  } >  inherit dpkg-base > I'm more in favor of informing the users about the problem when building a custom kernel and letting them do the integration. I've a patch for that now, BUT... Even with the patch applied (on 4.19 in my case), I'm still not able to install linux-libc-dev: into a buildchroot-host. I suppose you didn't target cross-scenarios, did you? Our problems seems to be that we cannot provide a linux-libc-dev: of the same version. So the files that both linux-libc-dev packages have in common do not match. Not sure if that is checked or if Multi-Arch implies that all packages must have the same version. However, this does not work yet. Jan -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux