From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6597806297219858432 X-Received: by 2002:a1c:180f:: with SMTP id 15-v6mr1709398wmy.8.1536171486188; Wed, 05 Sep 2018 11:18:06 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:adf:aa82:: with SMTP id h2-v6ls929157wrc.5.gmail; Wed, 05 Sep 2018 11:18:05 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbrThM5g8ODAQM0xuqxOFx0OT1baiOlJjfrroStZShsbgq7Ky4k1/DiwU0f73t1P2xq5vzp X-Received: by 2002:adf:ead0:: with SMTP id o16-v6mr3529476wrn.23.1536171485610; Wed, 05 Sep 2018 11:18:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536171485; cv=none; d=google.com; s=arc-20160816; b=eJ2mA6qYHTAQPyjHUzqEiC6uRzftZY/sFoS5iitcI8Go9UX3zwiCNiUacUdCvu5ZAw Xiv7f1/833+KDp0djbUWo86qJ8heKGXD6hyjmXiL8odKehGP7Zg0X8X4aKO1zhqsBAMK DdnDK6jrTqcvRYufR4kZmfIgPTxqoTPexBaJ4wgV+diXZiu3NJJLv90ETSt4KVTnNC3L Yd23uzf98lFyNAsollbDJDNDBChBZi0Yy+FlYnuw7Wr0ZhIxJxwMvLE/H+SiJEOLasL4 tclTiQlJ4f0eFD7jbRo6s5wvFbhBdLKQ+e2Hslms7ID9YGegfQ8I8XLqbWiB6dxNFEEp A2qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:to:from; bh=HLjdPcaAYR+DOCbUbNpjCbRjyZBKsAmLDQvbMsNvxQ4=; b=GcQ4zEkjdsxvkzn9SMve6LSpPDCEkkXVJbo8HrA9ak6HSsv6BvlrFSSkgBPD34XW/C ZqPVgJC3A4vxqiQxtlgwsE+hTtPxrBwbvKHF7NCQLrZXYFMTlfV4d0nGZXaf3xwv/HVI zfgfUn7y+j1H1MvAdI7Fk4kUBbbrbWs+H2BQGpdJX7l5XAY69VnrCcYncDPtREzw49RE +2IMUJNmW7jdtgW2Wu6WttvDQkcysVrSltPU7a1+NS9mxpxh6wyDsedhOGtbEkEvWkMP /iuBgiBXn+NZUBC0nfZmnGopju8tDrdq4u5eXrCVIMFNPrr4S0QsU9L6e/mOJAcL6kiO /Vqw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com Return-Path: Received: from goliath.siemens.de (goliath.siemens.de. [192.35.17.28]) by gmr-mx.google.com with ESMTPS id a8-v6si102494wro.0.2018.09.05.11.18.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 11:18:05 -0700 (PDT) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.28 as permitted sender) client-ip=192.35.17.28; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id w85II5eo013618 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 5 Sep 2018 20:18:05 +0200 Received: from md1f2u6c.ad001.siemens.net (md1q0hnc.ad001.siemens.net [139.25.68.37] (may be forged)) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id w85II4co028591 for ; Wed, 5 Sep 2018 20:18:04 +0200 From: Jan Kiszka To: isar-users Subject: [PATCH 0/5] Refactor bootloader installation, add custom U-Boot include Date: Wed, 5 Sep 2018 20:17:59 +0200 Message-Id: X-Mailer: git-send-email 2.16.4 X-TUID: fjPXX0rJ1S5W 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.). 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 -- 2.16.4