記号 | タイトル | 公開日 |
0003 | 「JetsonにYoctoでRAUCを実装してみたが上手くいかなかった。」 | 2024/01/08 |
JetsonにYoctoでRAUCを実装してみた。結果は、現状上手くいっていない状況。。。
忘れない為に、作業を記録しておく。
①下記のコマンドを実行して、RAUCをダウンロードする。
$ git clone -b ${BRANCH} https://github.com/rauc/meta-rauc.git
②poky/build/conf/*.confを編集する。
┗bblayers.confの編集
# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
POKY_BBLAYERS_CONF_VERSION = "2"
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS ?= " \
/home/user33/yocto-tegra/meta-rauc \
/home/user33/yocto-tegra/meta-tegra \
/home/user33/yocto-tegra/poky/meta \
/home/user33/yocto-tegra/poky/meta-poky \
/home/user33/yocto-tegra/poky/meta-yocto-bsp \
"
┗local.confの編集(※下記を追記した。)
#######################################<<RAUC>>
DISTRO_FEATURES:append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_initscripts = ""
INIT_MANAGER = "systemd"
IMAGE_INSTALL:append = " rauc"
IMAGE_FSTYPES:append = " ext4"
DISTRO_FEATURES:append = " rauc"
③RAUCのsystem.confを編集する。
[system]
compatible=jetson-nano
bootloader=uboot
[keyring]
path=/etc/rauc/ca.cert.pem
[slot.rootfs.0]
device=/dev/mmcblk0p1
type=ext4
bootname=system0
[slot.rootfs.1]
device=/dev/mmcblk0p2
type=ext4
bootname=system1
④SDブートしてログを取得した。
$ rauc status
=== System Info ===
Compatible: jetson-nano
Variant:
Booted from: rootfs.0 (/dev/mmcblk0p1)
=== Bootloader ===
Activated: (null) ((null))
=== Slot States ===
o [1m[rootfs.1][0m (/dev/mmcblk0p2, ext4, inactive[0m)
bootname: [34msystem1[0m
boot status: [31mbad[0m
o [32m[32m[1m[rootfs.0][0m (/dev/mmcblk0p1, ext4, [1mbooted[0m)
bootname: [34msystem0[0m
mounted: /
boot status: [31mbad[0m
$ systemctl status rauc
● rauc.service - RAUC Update Service
Loaded: loaded (/lib/systemd/system/rauc.service; static; vendor preset: enabled)
Active: active (running) since Mon 2024-01-08 08:30:47 UTC; 7min ago
Docs: https://rauc.readthedocs.io
Main PID: 3346 (rauc)
Tasks: 3 (limit: 4174)
Memory: 2.6M
CGroup: /system.slice/rauc.service
└─3346 /usr/bin/rauc --mount=/run/rauc service
Jan 08 08:30:47 jetson-nano-devkit rauc[3346]: Using per-slot statusfile
Jan 08 08:30:47 jetson-nano-devkit rauc[3346]: Config option 'statusfile=<path>/per-slot' unset, falling back to per-slot status
Jan 08 08:30:47 jetson-nano-devkit rauc[3346]: Using per-slot statusfile
Jan 08 08:30:47 jetson-nano-devkit systemd[1]: Started RAUC Update Service.
Jan 08 08:30:47 jetson-nano-devkit rauc[3346]: Failed getting primary slot: uboot backend: Unable to find primary boot slot
Jan 08 08:30:47 jetson-nano-devkit rauc[3346]: mounting slot /dev/mmcblk0p2
Jan 08 08:30:47 jetson-nano-devkit rauc[3346]: Failed to mount slot /dev/mmcblk0p2: Slot device '/dev/mmcblk0p2' not found
Jan 08 08:30:47 jetson-nano-devkit rauc[3346]: Failed to load status file /slot.raucs: No such file or directory
Jan 08 08:36:05 jetson-nano-devkit rauc[3346]: Failed getting primary slot: uboot backend: Unable to find primary boot slot
Jan 08 08:37:08 jetson-nano-devkit rauc[3346]: Failed getting primary slot: uboot backend: Unable to find primary boot slot
⓹パーティーションはsystem0/system1の両面で来ているが、boot statusがbadの状態。。。
⓺追記として、下記も利用してみたがうまくいかなかった状況。。。
git clone -b ${BRANCH} https://github.com/rauc/meta-rauc-community.git
⑦気が向いたときに再度、RAUCの実装作業をしてみる。