public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH 0/5] Refactor bootloader installation, add custom U-Boot include
@ 2018-09-05 18:17 Jan Kiszka
  2018-09-05 18:18 ` [PATCH 1/5] meta: Factor out buildchroot class Jan Kiszka
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Jan Kiszka @ 2018-09-05 18:17 UTC (permalink / raw)
  To: isar-users

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-09-11  8:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-05 18:17 [PATCH 0/5] Refactor bootloader installation, add custom U-Boot include Jan Kiszka
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox