Repository navigation
axera-spi-nor: env-from-flash, for firmware that keeps its own U-Boot env - #342
Merged
Merged
Conversation
… env The AX620E SPI-NOR model answers reads of the U-Boot env window with a synthetic env (what the stock Xiongmai firmware needs to boot). OpenIPC firmware, with its own U-Boot and 'fw_setenv', needs the env it wrote to the flash file back. -global axera-spi-nor.env-from-flash=on serves the flash contents there; off by default, so the stock dumps boot as before. Used to boot OpenIPC's AX620E image (OpenIPC/firmware#2670).
PR Summary by QodoAllow AX620E SPI-NOR to serve its U-Boot environment from flash
AI Description
Merge Risk
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can type 'qodo, fix this' on a finding and the fix lands right on your PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The AX620E SPI-NOR model serves a synthetic U-Boot environment in place of the env window, which the stock Xiongmai dumps need to boot. OpenIPC's own firmware for the AX620E (OpenIPC/firmware#2670, OpenIPC U-Boot) writes its env with
saveenv/fw_setenvand needs it back.env-from-flash(off by default, so stock dumps boot exactly as before):-global axera-spi-nor.env-from-flash=onserves the flash file's own bytes in the env window.docs/axera.mdmentions it.Used to boot OpenIPC's AX620E image end to end in QEMU (OpenIPC U-Boot → 5.15 kernel → rootfs from NOR, all vendor modules loaded); an env set with
fw_setenvreaches the next boot's command line.Known, not in this PR: the AX620U SPI-NAND model ends a page program on a write of the controller's chip-select register, while Linux and OpenIPC's U-Boot drive chip select through a GPIO; OpenIPC's AX620U U-Boot writes the register once per message, which works, but the model should follow the CS GPIO.