Skip to content

Commit

Permalink
imx95: add support for NXP's iMX95 on Common Torizon
Browse files Browse the repository at this point in the history
Related-to: TOR-3661

Signed-off-by: Eduardo Ferreira <[email protected]>
  • Loading branch information
EdTheBearded committed Jan 9, 2025
1 parent 74fedc3 commit 9cbe33a
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
10 changes: 10 additions & 0 deletions conf/machine/include/imx95-19x19-verdin.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
WKS_FILE:sota = "torizon-imx95-sota.wks"

OSTREE_KERNEL_ARGS:sota:imx:append = "console=ttyLP0,115200 earlycon root=LABEL=otaroot rootfstype=ext4"

BBMASK += "\
/meta-imx/meta-imx-bsp/recipes-bsp/u-boot \
"

PREFERRED_PROVIDER_virtual/dtb = ""
OSTREE_DEPLOY_DEVICETREE:forcevariable = "0"
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# SPDX-License-Identifier: GPL-2.0+ OR MIT
#
# Copyright 2020 Toradex
#
# Torizon boot script.

# set ramdisk load address for iMX95 bootloader, since this variable is not set in U-Boot's imx95 initial env.
env set ramdisk_addr_r "${initrd_addr}"

if test -z "${altbootcmd}"
then
env set altbootcmd 'env set rollback 1; run bootcmd'
env save
fi

if test "${rollback}" = "1" && test "${upgrade_available}" = "1"
then
# Make sure to reset upgrade_available to avoid unnecessary wear
# Note this also makes rollback permanent. aktualizr will reset rollback
# when a new (hopefully better) update comes in.
env set upgrade_available 0
env save
fi

# save default U-Boot devicetree file to use in a rollback situation
env set fdtfile2 "${fdtfile}"

if test -n "${loadaddr}"
then
ext4load ${devtype} ${devnum}:1 ${loadaddr} /boot/loader/uEnv.txt; env import -t ${loadaddr} ${filesize}
else
ext4load ${devtype} ${devnum}:1 ${scriptaddr} /boot/loader/uEnv.txt; env import -t ${scriptaddr} ${filesize}
fi

run bootcmd_run
6 changes: 6 additions & 0 deletions scripts/lib/wic/canned-wks/torizon-imx95-sota.wks
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# short-description: Create OTA-enabled SD card image
# long-description: Creates a partitioned SD card image with OSTree
# physical sysroot as a payload. Boot files are located in the
# first vfat partition.
part u-boot --source rawcopy --sourceparams="file=imx-boot.tagged" --ondisk mmcblk --no-table --align 32
part / --source otaimage --ondisk mmcblk --fstype=ext4 --align 8192

0 comments on commit 9cbe33a

Please sign in to comment.