Skip to content
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

Write .wic file to the SPI flash #209

Open
bartiszosti opened this issue Aug 8, 2024 · 1 comment
Open

Write .wic file to the SPI flash #209

bartiszosti opened this issue Aug 8, 2024 · 1 comment

Comments

@bartiszosti
Copy link

I have an image generated by the Yocto, which is in .wic format.
I want to write this image to the SPI flash via the sunxi-fel tool.
Does it possible to do so?

@apritzel
Copy link
Contributor

apritzel commented Aug 9, 2024

Hi, I am afraid this is not how it works. The SPI NOR flash on most devices is max. 16 MB in size, that's typically not enough for a kernel and root file system. That SPI flash is really only meant for holding the platform firmware (think: "BIOS"), so Trusted Firmware and U-Boot. That takes up about 1 MB, so there is some space left, typically, but there is no real standardised way to store payloads like a kernel in there.
The kernel and rootfilesystem are supposed to live on some proper storage device, typically an SD card or eMMC storage. Alternatively you can boot from a USB mass storage device, or via the network. U-Boot supports all these methods, and it should detect them automatically.

Definitely sunxi-fel does not support any particular image formats to write into the SPI flash, it just takes whatever binary file you give it, and burns that into the flash memory as is. The first few bytes of that file need to be in a special format, to be recognised by the BootROM, which is taken care of by the mkimage tool of the U-Boot build system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants