From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6669654310420217856 X-Received: by 2002:adf:e551:: with SMTP id z17mr1051182wrm.11.1552980139888; Tue, 19 Mar 2019 00:22:19 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:55c5:: with SMTP id j188ls275904wmb.13.canary-gmail; Tue, 19 Mar 2019 00:22:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqwW+QvOW9dpnpr1sYLh/6C9mjuPi3FjiVO2gUMm8/5oSs/5AFZxCI9G3butWieWSOR6V1b9 X-Received: by 2002:a1c:ef02:: with SMTP id n2mr170036wmh.15.1552980139464; Tue, 19 Mar 2019 00:22:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552980139; cv=none; d=google.com; s=arc-20160816; b=ptnNvct3AnrUQGtcPBPokSZcYW0ktI+FTrCAEMN5t4MvvssNAxP64AvZ3knzg7B2YD +PN3yT7mXOrLzJEYCguSlJYaDIL1ypwn/sGjsTrwNhGhrv1UI0j+T7VNU5amHr8jj/Xc LMR/fOGN7JweOc+mvbbhDm0n6RRS/6GjZZbDnNMvtWPoSQpkrrn5/wLBJU0nr/P2iyqz E/e9Bihrlf7BA2QqPtEGHYwLkgzxh1I7zVYJLUbVzeo6CZCs/oxb2ZeuueU+sjLHMWH3 tHOI+QzqYl5yLD+h5d5SsHLmTGol79s4WpQeoe4rx9ORRY2FnXAfaoubgAXhXR9GlnzJ /GVg== 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:references:cc:to:subject; bh=ii4U1nerI/Si4Z0ANvquSPRHExvX3btCdcA9Zpun9vQ=; b=XIXu3e6AxpMgkiGxgBTOG8r4qPzd5hiBkr35jhiXSR0zlS74JXvJcL25I2ISGvMuX3 y7UIKGe493Rz8RRey6Lns6djO1mzXKPKgIFkERsU9leZeIYu2eIVgghDuEz3BGQoZdzs 9ePTqyXHv2NF7zTobw9mESfKDg+8Fg5Z/siBFvBk2uieyhGVHOPDXxbdHNpqAM4Gwtyk iEvNlzRthbELpauTbv9MMUxXlnjTFurS1Rcc48aQLmgHACC3/2kXXQFKTVTMpOHYvJSq uC/e2yZbqnZPg8QFPNXcJpS2wiykTA6X6t9z+o+54VeJ5b2ihX7KO+v3AY17W2P8lxXj 2hOw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of claudius.heine.ext@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=claudius.heine.ext@siemens.com Return-Path: Received: from thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id a9si96911wrp.5.2019.03.19.00.22.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Mar 2019 00:22:19 -0700 (PDT) Received-SPF: pass (google.com: domain of claudius.heine.ext@siemens.com designates 192.35.17.2 as permitted sender) client-ip=192.35.17.2; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of claudius.heine.ext@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=claudius.heine.ext@siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id x2J7MHOF019884 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Mar 2019 08:22:17 +0100 Received: from [139.25.69.232] (linux-ses-ext02.ppmd.siemens.net [139.25.69.232]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id x2J7MHo5002503; Tue, 19 Mar 2019 08:22:17 +0100 Subject: Re: debootrap error To: akihiro27.suzuki@toshiba.co.jp, jan.kiszka@siemens.com, isar-users@googlegroups.com, ch@denx.de Cc: daniel.sangorrin@toshiba.co.jp, cip-dev@lists.cip-project.org References: <375b3b16-8688-6fb2-4d4b-fc130c501c7e@siemens.com> <02844bd9-fe8d-199f-27e3-42f59bb64163@siemens.com> <41b9fdc25373948d08ad360dc1db13340648cc93.camel@siemens.com> <1d4da986-92e6-87e3-11a4-30e15b48359d@siemens.com> <24beb970-86d2-c672-08e7-12732f9dd467@siemens.com> <204e9223-ed2b-9697-38a9-847fe2ee8704@siemens.com> From: Claudius Heine Message-ID: <48868c49-3ab2-57f3-2a1e-2a7cf4ff839c@siemens.com> Date: Tue, 19 Mar 2019 08:22:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-TUID: RJ6dMic6MHEw Hi Suzuki-san, On 19/03/2019 06.18, akihiro27.suzuki@toshiba.co.jp wrote: > Hi, > >>> That is how my qemu-arm setting looks like. Do you have a differentqemu path? >>> >>> $ cat /proc/sys/fs/binfmt_misc/qemu-arm >>> enabled >>> interpreter /usr/bin/qemu-arm-static >>> flags: OCF >>> offset 0 >>> magic 7f454c4601010100000000000000000002002800 >>> mask ffffffffffffff00fffffffffffffffffeffffff > My qemu-arm setting is as follows: > > $ cat /proc/sys/fs/binfmt_misc/qemu-arm > enabled > interpreter /usr/bin/qemu-arm > flags: OC > offset 0 > magic 7f454c4601010100000000000000000002002800 > mask ffffffffffffff00fffffffffffffffffeffffff > > According to this, the interpreter path was not same. > My machine used /usr/bin/qemu-arm but Claudius's machine used /usr/bin/qemu-arm-static. > > If the first place, my machine didn't have /usr/bin/qemu-arm-static. > So, I installed qemu-user-static as follows: > > $ sudo aptitude install qemu-user-static > [sudo] password for akihiro: > The following NEW packages will be installed: > qemu-user-static{b} > 0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded. > Need to get 10.0 MB of archives. After unpacking 101 MB will be used. > The following packages have unmet dependencies: > qemu-user-static : Conflicts: qemu-user-binfmt but 1:2.11+dfsg-1ubuntu7.10 is installed > qemu-user-binfmt : Conflicts: qemu-user-static but 1:2.11+dfsg-1ubuntu7.10 is to be installed > The following actions will resolve these dependencies: > > Remove the following packages: > 1) qemu-user-binfmt [1:2.11+dfsg-1ubuntu7.10 (bionic-updates, now)] > > Accept this solution? [Y/n/q/?] Y > The following NEW packages will be installed: > qemu-user-static > The following packages will be REMOVED: > qemu-user-binfmt{a} > 0 packages upgraded, 1 newly installed, 1 to remove and 0 not upgraded. > Need to get 10.0 MB of archives. After unpacking 101 MB will be used. > Do you want to continue? [Y/n/?] Y > Get: 1 http://ftp.jaist.ac.jp/pub/Linux/ubuntu bionic-updates/universe amd64 qemu-user-static amd64 1:2.11+dfsg-1ubuntu7.10 [10.0 MB] > Fetched 10.0 MB in 1min 5s (155 kB/s) > (Reading database ... 299683 files and directories currently installed.) > Removing qemu-user-binfmt (1:2.11+dfsg-1ubuntu7.10) ... > Selecting previously unselected package qemu-user-static. > (Reading database ... 299683 files and directories currently installed.) > Preparing to unpack .../qemu-user-static_1%3a2.11+dfsg-1ubuntu7.10_amd64.deb ... > Unpacking qemu-user-static (1:2.11+dfsg-1ubuntu7.10) ... > Setting up qemu-user-static (1:2.11+dfsg-1ubuntu7.10) ... > Processing triggers for man-db (2.8.3-2ubuntu0.1) ... > > After that, I checked my qemu-arm setting. > The interpreter path has been changed to /usr/bin/qemu-arm-static as below: > > $ cat /proc/sys/fs/binfmt_misc/qemu-arm > enabled > interpreter /usr/bin/qemu-arm-static > flags: OC > offset 0 > magic 7f454c4601010100000000000000000002002800 > mask ffffffffffffff00fffffffffffffffffeffffff > > After that, I built board-bbb.yml as below, and it succeeded! > > $ ./kas-docker --isar build kas.yml:board-bbb.yml > > The root cause of this error is that my machine was not using > statically linked user mode qemu binaries? Well the docker container has the 'qemu-user-static' files installed as a dependency of qemu-debootstrap. The dynamic linking version would not work here, because qemu-deboostrap will copy just the one binary to the bootstrapped rootfs before chrooting into it. The binfmt_misc settings needs to point to the qemu static binary that was copied to the rootfs for this to work. The error of course is pretty misleading and stumbled over that very often myself. And what your problem shows as well is that the call of 'update-binfmts --enable' (which happens in the docker entry point script) does not seem to fix the path. kind regards, Claudius > > Best regards, > Suzuki > >> -----Original Message----- >> From: Jan Kiszka [mailto:jan.kiszka@siemens.com] >> Sent: Monday, March 18, 2019 7:19 PM >> To: Claudius Heine ; suzuki akihiro(鈴 >> 木 章浩 ○SWC□OST) ; >> isar-users@googlegroups.com; ch@denx.de >> Cc: sangorrin daniel(サンゴリン ダニエル ○SWC□OST) >> ; cip-dev@lists.cip-project.org >> Subject: Re: debootrap error >> >> On 18.03.19 11:17, Claudius Heine wrote: >>> Hi,, >>> >>> On 18/03/2019 11.14, akihiro27.suzuki@toshiba.co.jp wrote: >>>> Hi, >>>> >>>>> That's a good hint: Suzuki-san, could you check if binfmt_misc is >>>>> available as >>>>> kernel feature/module on that machine? There may also be some warning >>>>> during the >>>>> container startup. >>>> I checked it and maybe it is available. >>>> >>>>      $ mount | grep binfmt >>>>      systemd-1 on /proc/sys/fs/binfmt_misc type autofs >>>> >> (rw,relatime,fd=31,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pip >> e_ino=18804) >>>>      binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc >> (rw,relatime) >>>>      $ lsmod | grep binfmt >>>>      binfmt_misc            20480  1 >>>>      $ cat /boot/config-4.15.0-46-generic  | grep BINFMT >>>>      CONFIG_BINFMT_ELF=y >>>>      CONFIG_COMPAT_BINFMT_ELF=y >>>>      CONFIG_BINFMT_SCRIPT=y >>>>      CONFIG_BINFMT_MISC=m >>>>      $ ls /proc/sys/fs/binfmt_misc/ >>>>      python2.7     qemu-armeb       qemu-mips64      qemu-ppc64 >> le >>>> qemu-sparc        status >>>>      python3.5     qemu-cris        qemu-mips64el    qemu-riscv >> 32 >>>> qemu-sparc32plus >>>>      python3.6     qemu-hppa        qemu-mipsel      qemu-riscv >> 64  qemu-sparc64 >>>>      qemu-aarch64  qemu-m68k        qemu-ppc         qemu-s390x >>     qemu-xtensa >>>>      qemu-alpha    qemu-microblaze  qemu-ppc64       qemu-sh4 >>     qemu-xtensaeb >>>>      qemu-arm      qemu-mips        qemu-ppc64abi32  qemu-sh4eb >>     register >>>>      $ cat /proc/sys/fs/binfmt_misc/status >>>>      enabled >>> >>> That is how my qemu-arm setting looks like. Do you have a different >> qemu path? >> >> Even if, it shouldn't be after starting the container: We allow it to >> adjust the >> system-wide binfmt configuration (one reason for --privileged). >> >> Jan >> >>> >>> $ cat /proc/sys/fs/binfmt_misc/qemu-arm >>> enabled >>> interpreter /usr/bin/qemu-arm-static >>> flags: OCF >>> offset 0 >>> magic 7f454c4601010100000000000000000002002800 >>> mask ffffffffffffff00fffffffffffffffffeffffff >>> >>> regards, >>> Claudius >> >> -- >> Siemens AG, Corporate Technology, CT RDA IOT SES-DE >> Corporate Competence Center Embedded Linux > -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx.de