From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6597806297219858432 X-Received: by 2002:a19:98c7:: with SMTP id a190-v6mr542440lfe.21.1536654838139; Tue, 11 Sep 2018 01:33:58 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a19:c390:: with SMTP id t138-v6ls1181620lff.3.gmail; Tue, 11 Sep 2018 01:33:57 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda6KD3d4+BtaRIcikVAlddFS6DyRQJLVANCOCaEwu+0ULj47o/+K7KJ4FArZAmge6Wyb0hU X-Received: by 2002:a19:ca46:: with SMTP id h6-v6mr570775lfj.17.1536654837136; Tue, 11 Sep 2018 01:33:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536654837; cv=none; d=google.com; s=arc-20160816; b=xxZDQEWQMH7XvW1gCCsQzVkOOUyRQqVIRvsVZwdB/V7GPgCkM6olVcJ9QVZMVzKY5N ZDUrT+2ZLyWjKnF6ZL1VqQ/W1zpl17R4EpYbaDv4a/Mf/aZf818UQMPRCcq4PJRWs/P/ uCJKIwkBXg3kVEogMQQqvojB+lmf9kXQC7TT/FNTQyG2qrX0WL2925TqlDkiIqempEs4 T1x++ow0sin/VV1cel4P7mnEFJGbzUTiTX+0CT2tC3PCkC23dD8peBc4AwVMmcNCapAx h6jHXyZcCr64pu5Ut7SqCEvxPSs6WU3cSjFws1x0W59EfFkZuag30NUt/Cz5WhD6i/jz BgGQ== 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:organization:from:references:to:subject; bh=j42ItHFMQGwk7bd36j2DfNxw/plUC3Ly1xNTYl8XqTM=; b=OLUm8UOKIhXno44A/g1qioqW2931If41ouwP0cjaI7I08Fqoi/6nJa4q3cQ4vsOEOm jkbPF3Mr8k61UedXNVI2XzlrCeOMHzfEp0LragyK7CJtkD0IQU2LMIiMvN5XNztB3clG fmJvWd1Jgo6G9t8xwv+SHv4pCrQweAUmYVtwWCJkfmWoSY8dMKnVp4gwP1cfVaElAQ8b 2NPRG64lc8vv1E93Kz54gPlU5GTfyet6d6UuwEN+naH8iSonDXaFy73MNT2gqnRUG1sb D+9DV9uzkpaJDFZVWYsITi10w9Qjq0A7neKiym0V4kYLy8wvLhO5LkB6Lo1v9Jg2bxiG YzxQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: best guess record for domain of mosipov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=mosipov@ilbers.de Return-Path: Received: from aqmola.ilbers.de (aqmola.ilbers.de. [85.214.62.211]) by gmr-mx.google.com with ESMTPS id i67-v6si603957lfb.3.2018.09.11.01.33.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Sep 2018 01:33:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of mosipov@ilbers.de designates 85.214.62.211 as permitted sender) client-ip=85.214.62.211; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of mosipov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=mosipov@ilbers.de Received: from [192.168.50.180] (nat-ppp-217.71.235.199-satnet-spb.ru [217.71.235.199] (may be forged)) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id w8B8XrcM030474 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Tue, 11 Sep 2018 10:33:55 +0200 Subject: Re: [PATCH 0/5] Refactor bootloader installation, add custom U-Boot include To: Jan Kiszka , isar-users References: From: "Maxim Yu. Osipov" Organization: ilbers GmbH Message-ID: <44c1829f-87ae-ffad-6629-f7ff5f6b8a4e@ilbers.de> Date: Tue, 11 Sep 2018 11:33:48 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 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: tbx4zDtp2hj9 On 09/05/2018 09:17 PM, 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 " > 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.). Applied to the 'next' (v2 of patch #5 was applied) Thanks, Maxim. > 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 > -- Maxim Osipov ilbers GmbH Maria-Merian-Str. 8 85521 Ottobrunn Germany +49 (151) 6517 6917 mosipov@ilbers.de http://ilbers.de/ Commercial register Munich, HRB 214197 General Manager: Baurzhan Ismagulov