-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jetson: Update next active slots on HUP #245
Conversation
4a2c3cb
to
ad1726d
Compare
ad1726d
to
0517c3c
Compare
Needs one 32.6.1 cboot fix for OE4T/meta-tegra#879 |
703bd42
to
a8b0f8a
Compare
Current meta-tegra cboot fix did not work, will check with updated iteration of patches |
37c0021
to
a13932b
Compare
@resin-jenkins test this please |
23ae60d
to
1b4930c
Compare
This package is provided by upstream OE4T meta-tegra and allows for marking boot slots (tegra partitions) as succesfully booting. Signed-off-by: Alexandru Costache <[email protected]>
boots on Xavier AGX and Xavier NX The Xavier line of boards don't have u-boot support and we use the command line in the dtb to switch between the two root filesystems. Let's use A/B slot switch to enable altbooting on these devices. Once redundancy is enabled, each successful boot needs to be marked and we do this in a service file, otherwise the lowlevel tegra bootloaders will fallback to loading the previous slot (old dtb and old cmdline) after 3 boot sequences that have not been marked. Signed-off-by: Alexandru Costache <[email protected]>
We'll use tegra-boot-tools to mark the next active slot on the Xavier and write the new signed bootblobs, which include the dtb that contains the cmdline with the new rootfs label. A slot designates any tegra partition, like for instance kernel-dtb and kernel-dtb_b. This is possible currently only for the Xavier line of devices, which do not have u-boot support. On Jetson Nanos there are no extra partitions on the emmc or sd-card, only a boot bundle in the qspi flash. On the TX2 the 32.5.1 L4T boot firmware cannot boot the newer 32.6.1 bootloaders, because the boot firmware needs to be in sync with bootloaders and rest of the firmwares (we'll have to try with the next L4T releases when they become available see meta-tegra issue 879). This however is not a problem because rollback-altboot is already accomplished in u-boot on the TX2 and Nano devices running L4T 32.X. Signed-off-by: Alexandru Costache <[email protected]>
Signed-off-by: Alexandru Costache <[email protected]>
1b4930c
to
fa0e5fa
Compare
… for NX SD 32.6.1 Starting with 32.6.1, when the device is provisioned, the flashing tools perform bpmp trimming by default, based on a value read from the device, which is 0. If however the files are signed without being written, the bpmp dtb is not trimmed and the boot blob is generated incorrectly (wrong offsets). Therefore we now tell the flashing tools to trim the bpmp dtb using the default ramcode, which is also 0, as the one that's being read from our device. Changelog-entry: tegra-binaries/tegra194-nxde-sdcard-flash: Adapt boot blob generation for NX SD 32.6.1 Signed-off-by: Alexandru Costache <[email protected]>
As well as latest tegra-boot-tools adapted to L4T 32.6.1 Signed-off-by: Alexandru Costache <[email protected]>
Signed-off-by: Alexandru Costache <[email protected]>
Signed-off-by: Alexandru Costache <[email protected]>
Patch boot blob to avoid these potential errors: tegra-hsp-mailbox ivc-bc00000.rtcpu: IOVM setup error: 110 tegra186-cam-rtcpu bc00000.rtcpu: command: 0x00000000: empty mailbox timeout Also switch to using the new meta-balena development flag. Signed-off-by: Alexandru Costache <[email protected]>
fa0e5fa
to
6598fad
Compare
@resin-jenkins test this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job on this, the detailed commit descriptions and organized commits are much appreciated. I'll hold off on approving this until some of the other reviewers can take a look, but you have my:
Reviewed-by: Joseph Kogut [email protected]
|
||
# Upon rollback to a release that does not have | ||
# this feature implemented, the _a slots will | ||
# be used by default, without chaning behavior. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor type here chaning -> changing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @jakogut , I'll get that fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Superficial review, I didn't attempt to understand the complexities of the Xabier, I suspect that one of us suffering that pain is probably enough :)
ExecStart=/bin/sh -c /usr/bin/mark_active_tegra_boot_slot.sh | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@acostach is this service running every single boot, even if no HUP happened?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @alexgg , indeed, it needs to run every boot, otherwise the tegra bootloaders will consider that the current one failed and decrease the current slot's priority, causing the alternate to be loaded once the retries number is achieved.
Disabling redundant boot after marking a boot sequence as successful unfortunately triggers the default slot _a to be loaded, so the only option for now is to mark every boot if we want to have the kernel and dtb loaded from the selected raw partitions, _a or _b.
We use tegra-boot-tools to mark the future
active slot on the Xavier and write the new signed
bootblobs, which include the dtb that contains the cmdline
with the new rootfs label. A slot designates any
nvidia partition, like for instance kernel-dtb
and kernel-dtb_b. Tegra bootloaders fallback to
the previous active slot after 3 unsuccessful
boot attempts.
Upstream related discussions:
OE4T/meta-tegra#879
OE4T/meta-tegra#891
Related improvement for the TX2 on L4T 28.x to 32.x transition : #259