Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions conf/machine/include/common-mtk.inc
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,12 @@ DEPENDS:append:pn-bl2 = " openssl-native"
# of that name and leaves the reference untouched, so it reaches U-Boot as a
# literal and is expanded there.
UBOOT_BOOT_PARTITION_NUMBER = "${distro_bootpart}"
# fitImage conf node is conf-<KERNEL_DEVICETREE, '/'->'_'>; point fdtfile/fdt_file at it.
FITIMAGE_CONF_NODE = "${@d.getVar('KERNEL_DEVICETREE').split()[0].replace('/', '_')}"
UENV_EXTRA_CONFIGS = "env set otaroot ${distro_bootpart} ; env set fdtfile ${FITIMAGE_CONF_NODE} ; env set fdt_file ${FITIMAGE_CONF_NODE}"
# fitImage conf nodes are conf-<KERNEL_DEVICETREE, '/'->'_'>. With the prefix the
# boot script selects conf-mediatek_${fdtfile}, so both U-Boot's default fdtfile
# and one set in uEnv.txt (TorizonCore Builder's 'dt apply') name a conf node.
# OSTree writes no fdt_file for FIT; a rollback to a deployment without dtb/ boots by it.
KERNEL_DTB_PREFIX = "mediatek/"
UENV_EXTRA_CONFIGS = "env set otaroot ${distro_bootpart} ; env set fdt_file ${fdtfile}"

# Device tree deployed into the OSTree boot directory.
OSTREE_DEVICETREE ?= "mediatek/lec-mtk-i1200-ufs.dtb"
Expand Down
7 changes: 5 additions & 2 deletions docs/README-genio.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,11 @@ which TorizonCore Builder's (TCB's) raw-image path can't read directly:
`torizoncore-builder` can run against the system image directly, and
`img2genio` re-sparses and repacks the result — only the rootfs changed,
partition layout preserved. Rootfs-level customizations (filesystem overlays,
preloaded containers) are supported; device-tree, kernel-argument, U-Boot-env,
and splash edits are not (TCB rejects them on raw/WIC images). The Genio
preloaded containers) and kernel arguments are supported. Device trees and
device-tree overlays need a TCB release that writes FIT hash values for the
images it adds (torizon/torizoncore-builder#181); U-Boot skips an added image
without one. U-Boot-env and splash
edits are not supported. The Genio
system image is 4Kn, so it needs a `torizoncore-builder` release that can open
4096-byte-sector raw images, and `android-sdk-libsparse-utils` on the host.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# virtual/dtb on MediaTek is this recipe, not toradex-devicetree: deploy
# overlays.txt here, with toradex-devicetree.bbclass's boot-overlay contract.
TEZI_EXTERNAL_KERNEL_DEVICETREE_BOOT ??= ""

do_deploy:append () {
overlays=
for dtbo in ${TEZI_EXTERNAL_KERNEL_DEVICETREE_BOOT}; do
if [ ! -e ${DEPLOYDIR}/devicetree/$dtbo ]; then
bbfatal "$dtbo is not provided by ${PN}, please make sure it's in its SRC_URI."
fi
overlays="$overlays $dtbo"
done

echo "fdt_overlays=$(echo $overlays)" > ${DEPLOYDIR}/overlays.txt
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
#
# genio2img stages this file into its working directory; run
# `torizoncore-builder build --file tcbuild-genio.yaml` from there.
# Only rootfs-level classes work on the raw-image path: filesystem overlays,
# Yocto packages delivered as installed files, preloaded containers, and
# prebuilt kernel modules dropped into the filesystem. Device-tree,
# kernel-module-build, kernel-argument, and secboot customisations are
# rejected by tcb on raw/WIC images and are out of scope.
# The raw-image path supports filesystem overlays, Yocto packages delivered as
# installed files, preloaded containers, prebuilt kernel modules dropped into
# the filesystem, and kernel arguments. Device trees and device-tree overlays
# need a tcb release that writes FIT hash values for the images it adds
# (torizon/torizoncore-builder#181).
# Kernel-module builds and secboot are out of scope.
input:
raw-image:
local: input.wic
Expand Down
Loading