public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: isar-users <isar-users@googlegroups.com>
Subject: [PATCH 0/5] Refactor bootloader installation, add custom U-Boot include
Date: Wed,  5 Sep 2018 20:17:59 +0200	[thread overview]
Message-ID: <cover.1536171484.git.jan.kiszka@siemens.com> (raw)

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


             reply	other threads:[~2018-09-05 18:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-05 18:17 Jan Kiszka [this message]
2018-09-05 18:18 ` [PATCH 1/5] meta: Factor out buildchroot class Jan Kiszka
2018-09-05 18:18 ` [PATCH 2/5] image: Add imager dependency installation task Jan Kiszka
2018-09-05 18:18 ` [PATCH 3/5] wic-img: Require explicit setting of WKS_FILE Jan Kiszka
2018-09-05 18:18 ` [PATCH 4/5] Install wic and bootloader dependencies via imager_install_deps Jan Kiszka
2018-09-05 18:18 ` [PATCH 5/5] meta: Add custom U-Boot recipe include Jan Kiszka
2018-09-07 18:27   ` [PATCH v2 " Jan Kiszka
2018-09-05 18:19 ` [PATCH 0/5] Refactor bootloader installation, add custom U-Boot include Jan Kiszka
2018-09-11  8:33 ` Maxim Yu. Osipov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1536171484.git.jan.kiszka@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox