From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6597806297219858432 X-Received: by 2002:ac2:5082:: with SMTP id f2-v6mr1061097lfm.6.1536171586237; Wed, 05 Sep 2018 11:19:46 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a19:9647:: with SMTP id y68-v6ls196031lfd.20.gmail; Wed, 05 Sep 2018 11:19:45 -0700 (PDT) X-Google-Smtp-Source: ANB0VdahhqAD523OhQfuCUYF7e8y5tM7oATb6J3xSxI2i3+v4oB9wRQVSODXkv/y1KvXg/EEx7oD X-Received: by 2002:ac2:5082:: with SMTP id f2-v6mr1061095lfm.6.1536171585615; Wed, 05 Sep 2018 11:19:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536171585; cv=none; d=google.com; s=arc-20160816; b=qnM/xKoPQdqwP98EvSt8aWJh1myjWFgl/wRC2jD43AUwQ+LJxxwJusrYbuczBnQDQw gIhBoA02BA52aU5U3usX9xVxNKF3MDR7oIAhtT0mS/o03ECZSZBIIg+YBGj9a5YZty1Q jy00MuL3MSuz/IkW/O7GJCIWS2WjpSvPlx1zEKzX/BSWq4A4Ik3aZv6s33SqFsHuz3km IgU4jg6SzEUQ8j37iRHTlRqvlCUl+k2kf3UloBYzrm/AZQqVrrMYZJN4oI3RqxR5xt3O h2gioL5fQV1O1fnhH1xAV11H6wNS3g9yQb+GU71obaclbu06Iu9o/JKb7hCJV6XQFIYh WDPw== 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:references:to:from:subject; bh=RS0AKhl52PFp/+3Q7QIjLVow+oMdCmVviZF2TKJ5u6M=; b=iN9n0IxC4mnjrjXjauQEZl/pMsUuBs1Ktg2iHqOJc/v9UH8uvsJyYBLpfzMbSoTfk0 LOSj+8u2J+3iICBcq6p6ZVwoZ7tgUsNs3t7kgyw+dyEM3I9jkgZL7vN0oXsDg88POn5U 5t8xKAILtlVdJp/6h28g+9T8SizTSj/ClxYpDLBF/ZLlfPa0KXwNNCGsGykwcT5vRFAj VIB1VTUZ3XT40Xe30AMwI+8aX4J/ohNwBoUr7DFziFDJ40PV7iatJB2FwG36vEoGpGbh JaDFqzgGgByKImlZMg+/8ZdiXNO2/Z/E7RxwQfHaLU5yPBwF7Dab5og77+Y/lJ5cOA58 tZfg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com Return-Path: Received: from gecko.sbs.de (gecko.sbs.de. [194.138.37.40]) by gmr-mx.google.com with ESMTPS id v16-v6si61447ljg.3.2018.09.05.11.19.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 11:19:45 -0700 (PDT) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.40 as permitted sender) client-ip=194.138.37.40; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by gecko.sbs.de (8.15.2/8.15.2) with ESMTPS id w85IJiNr007349 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 5 Sep 2018 20:19:44 +0200 Received: from [139.25.68.37] (md1q0hnc.ad001.siemens.net [139.25.68.37] (may be forged)) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id w85IJiPm018869 for ; Wed, 5 Sep 2018 20:19:44 +0200 Subject: Re: [PATCH 0/5] Refactor bootloader installation, add custom U-Boot include From: Jan Kiszka To: isar-users References: Message-ID: <0474cbd4-020f-0283-1a5a-2fed1ca0b9ad@siemens.com> Date: Wed, 5 Sep 2018 20:19:44 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: prMIWZZ8RYTd On 2018-09-05 20:17, [ext] Jan Kiszka wrote: > This allows to select the bootloader installation for the imager, e.g. > wic, via configuration files rather than hardcoding that into the > buildchroot recipe. > > This mechanism can then also be used to select u-boot as bootloader, > including custom builds of it. To simplify the latter, the last patch > provides a u-boot-custom.inc analogously to the kernel build. > > This lacks a bit documentation at this stage, so let me sketch the > process to build and deploy the last U-Boot release for, say, the > Orange Pi Zero (MACHINE = "orangepi-zero"): > > [u-boot_2017.07.bb] > require recipes-bsp/u-boot/u-boot-custom.inc > > SRC_URI += " ftp://ftp.denx.de/pub/u-boot/u-boot-.tar.bz2 " Great, mangled by local patch series script that I'm too lazy to fix. Should be: SRC_URI += " \ ftp://ftp.denx.de/pub/u-boot/u-boot-${PV}.tar.bz2 \ " > SRC_URI[sha256sum] = "9f10df88bc91b35642e461217f73256bbaeeca9ae2db8db56197ba5e89e1f6d4" > > U_BOOT_CONFIG = "orangepi_zero_defconfig" > U_BOOT_BIN = "u-boot-sunxi-with-spl.bin" > > [conf/machine/orangepi-zero.conf] > IMAGE_TYPE = "wic-img" > WKS_FILE ?= "orangepi-zero" > IMAGER_INSTALL += "u-boot-orangepi-zero" > IMAGER_BUILD_DEPS += "u-boot-orangepi-zero" > > IMAGE_INSTALL_append = " u-boot-tools u-boot-script" > ... > > [scripts/lib/wic/canned-wks/orangepi-zero.wks] > part u-boot --source rawcopy --sourceparams="file=/usr/lib/u-boot/orangepi_zero/u-boot-sunxi-with-spl.bin" --ondisk mmcblk --no-table --align 8 > ... > > Hope that explains the required tunings. > > The series may depend on some of my pending (but all posted) patches, > didn't check that. It's primarily sent now to request feedback if the > interfaces are useful for further customizations of U-Boot that we have > to do here (to SWUpdate, sign binaries etc.). > > Jan > > Jan Kiszka (5): > meta: Factor out buildchroot class > image: Add imager dependency installation task > wic-img: Require explicit setting of WKS_FILE > Install wic and bootloader dependencies via imager_install_deps > meta: Add custom U-Boot recipe include > > meta-isar/conf/distro/debian-buster.conf | 4 +++ > meta-isar/conf/distro/debian-common.conf | 19 ++++++++++ > meta-isar/conf/distro/debian-jessie.conf | 2 ++ > meta-isar/conf/distro/debian-stretch.conf | 2 ++ > meta-isar/conf/distro/debian-wheezy.conf | 2 ++ > meta-isar/conf/multiconfig/bananapi-stretch.conf | 2 +- > meta-isar/conf/multiconfig/qemuamd64-buster.conf | 2 ++ > meta-isar/conf/multiconfig/qemuamd64-stretch.conf | 2 ++ > meta-isar/conf/multiconfig/qemui386-buster.conf | 1 + > meta-isar/conf/multiconfig/qemui386-stretch.conf | 1 + > meta/classes/buildchroot.bbclass | 33 ++++++++++++++++++ > meta/classes/dpkg-base.bbclass | 33 ++++-------------- > meta/classes/image.bbclass | 40 ++++++++++++++++++++++ > meta/classes/wic-img.bbclass | 8 +++-- > meta/recipes-bsp/u-boot/files/debian/changelog | 5 +++ > meta/recipes-bsp/u-boot/files/debian/compat | 1 + > meta/recipes-bsp/u-boot/files/debian/control | 19 ++++++++++ > meta/recipes-bsp/u-boot/files/debian/rules | 28 +++++++++++++++ > .../u-boot/files/debian/u-boot-tools.conffiles | 1 + > .../u-boot/files/debian/u-boot-tools.install | 5 +++ > .../u-boot/files/debian/u-boot-tools.links | 1 + > meta/recipes-bsp/u-boot/u-boot-custom.inc | 36 +++++++++++++++++++ > .../buildchroot/buildchroot-target.bb | 33 ------------------ > 23 files changed, 217 insertions(+), 63 deletions(-) > create mode 100644 meta-isar/conf/distro/debian-common.conf > create mode 100644 meta/classes/buildchroot.bbclass > create mode 100644 meta/recipes-bsp/u-boot/files/debian/changelog > create mode 100644 meta/recipes-bsp/u-boot/files/debian/compat > create mode 100644 meta/recipes-bsp/u-boot/files/debian/control > create mode 100755 meta/recipes-bsp/u-boot/files/debian/rules > create mode 100644 meta/recipes-bsp/u-boot/files/debian/u-boot-tools.conffiles > create mode 100644 meta/recipes-bsp/u-boot/files/debian/u-boot-tools.install > create mode 100644 meta/recipes-bsp/u-boot/files/debian/u-boot-tools.links > create mode 100644 meta/recipes-bsp/u-boot/u-boot-custom.inc > Jan -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux