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

rockusb: Ability to download u-boot TPL/SPL binary instead of packed image #20

Open
obbardc opened this issue Mar 29, 2023 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@obbardc
Copy link
Contributor

obbardc commented Mar 29, 2023

Right now the download-boot command accepts images packed by rkbin's boot_merger a la:

$ tools/boot_merger RKBOOT/RK3399MINIALL.ini
$ rockusb download-boot rk3399_loader_v1.27.126.bin

It'd be great to be able to pass in a u-boot TPL/SPL and load that over USB instead, removing the need for the extra pack step.

@sjoerdsimons sjoerdsimons added enhancement New feature or request good first issue Good for newcomers labels Mar 30, 2023
@sjoerdsimons
Copy link
Collaborator

Adding seperate commands to directly write to the 471/472 (or any other code, but i've not seem those used) would be rather straight-forward and i'm entirely fine with that. useful for experimentation ..

Keep in mind that it's not very user-friendly though; e.g. for some RK35xx boards you need to upload 2 blobs to 471 ("usbhead", TPL/ddr training) and then the SPL to 472 -- So it would be nicer if upstream u-boot could also generate a rockchip compatible boot file similar to how it these days generates a single rockchip image to flash to spi/emmc as well with the lot bundled

@dsx724
Copy link

dsx724 commented Aug 15, 2024

I'm going to try to rework u-boot to generate the proper files. Just to check to make sure my understanding is correct.

  1. u-boot's TPL brings up DRAM and then goes back to BootROM so we should transfer TPL to DRAM via 471.
  2. transfer SPL and atf/u-boot ITB to DRAM via 472 and execute the SPL: copy the SPL and ITB to somewhere in DRAM, have SPL detect that it was loaded over USB or just try DRAM before SPI/MMC

If there's something I didn't think of or if there's a less intrusive way, please let me know.

@dsx724
Copy link

dsx724 commented Aug 17, 2024

For those interested in booting to RAM, you need modifications like this: libre-computer-project/libretech-u-boot@508b23f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Development

No branches or pull requests

3 participants