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

sg2042: trm: document spi flash layout (eg for bypassing SCP bootrom) #128

Open
zamaudio opened this issue Jun 18, 2024 · 3 comments
Open

Comments

@zamaudio
Copy link

I noticed there is an option to reset the sg2042 and make it bypass the SCP bootrom but boot directly from SPI flash (64MiB).
Can we get the spi flash layout documented in system.rst TODO item so we can write a custom bios? Thanks

@zamaudio
Copy link
Author

In absence of documentation, I found this C program that appears to create a bootable spi flash image, but I haven't tested it.

https://github.com/sophgo/bootloader-arm64/blob/master/scripts/gen_spi_flash.c

@orlitzky
Copy link

I somewhat reverse engineered the format here: https://wiki.gentoo.org/wiki/Milk-V_Pioneer_Box#The_long_version

I think this should be part of the ZSBL documentation, because gen_spi_flash.c is basically putting things where ZSBL expects them to be. In fact, gen_spi_flash.cshould be part of the ZSBL repo.

@zamaudio
Copy link
Author

Well done!

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