Jump to content

Enabling direct system startup from USB to rk33xx


balbes150

Recommended Posts

I suggest adding a small patch for all u-boot for rk33xx. It allows to enable direct booting from USB media and significantly facilitates the use of RK33xx models for users. Allows you to easily launch any system from USB without the need for complex settings and manipulations with existing (main) systems on devices on SD or eMMC.

 

The entire path fits in two lines.

 

https://github.com/150balbes/Build-Armbian/blob/master/patch/u-boot/u-boot-arm-64/u-boot-0010-rk-usb-start.patch#L18

Link to comment
Share on other sites

I took an image from NanoPC T4 (can take any for rk3399), recorded it on USB, configured DTB for RockPi-4b and voila, the system normally starts and works. That is, can have one universal image and run it on any model (do not have to build and place many different images on the site, which differ only in u-boot). If desired, can easily add the desired u-boot for a specific model and use the launch from SD\eMMC.  :)

Link to comment
Share on other sites

05.01.2021 в 17:35, Rocket69 сказал:

You will have the SPI loader .bin and the img to put usb first on rockpi 4C? or 4B?

On rockpi 4B, I built and installed this version in SPI a long time ago (installation according to the instructions for the official version, only you need to replace the official files with the version from the link) and run all test builds from USB\SD. eMMC has the main working system installed, which I use on rockpi 4B. Previously, I used NVMe without eMMC, but then I disabled the NVMe module and switched to eMMC (as a mini PC).

 

https://yadi.sk/d/OPIkX9eh48BCWQ?w=1

 

PS the patch to run from USB I include in all my builds for RK3399. If you install my build on eMMC (or you can replace just the u-boot), then without using SPI you can to run from USB (i.e. the system is on eMMC and you can run any systems from USB \ SD).

Link to comment
Share on other sites

I've try your files in the SPI, and it boot well but I don't understand why, it didn't see my usb storage (trying with severals differents USB drives)

 

=> usb reset
resetting USB...
USB0:   USB EHCI 1.00
USB1:   USB OHCI 1.0
USB2:   USB EHCI 1.00
USB3:   USB OHCI 1.0
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 1 for devices... 1 USB Device(s) found
scanning bus 2 for devices... 1 USB Device(s) found
scanning bus 3 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
=> usb dev
no usb devices available
=> usb tree
USB device tree:
  1  Hub (480 Mb/s, 0mA)
     u-boot EHCI Host Controller
  1  Hub (12 Mb/s, 0mA)
      U-Boot Root Hub
  1  Hub (480 Mb/s, 0mA)
     u-boot EHCI Host Controller
  1  Hub (12 Mb/s, 0mA)
      U-Boot Root Hub

 

did you have any idea ?

 

tks for your help.

Link to comment
Share on other sites

On rockpi 4B, I use only USB 2.0 ports to run from USB. Note that u-boot is a mini-system and, unlike the usual kernel, all the algorithms for polling USB devices may not work here, as in the usual kernel. Just as important is the order of connected devices, as far as I remember, u-boot uses USB0 to search for the system. On the RK3399, it doesn't make sense to use USB to host the entire system for permanent use. There are much faster NVMe devices for this.

Link to comment
Share on other sites

my goal is not to host my OS permanently on USB. this is userFriendly for my end users. Basically : the system is hosted on an EMMC, if there is a problem with this system I would like to be able via a liveOS on usb to rewrite the emmc to start again on a good basis. (Home Automation Box) therefore the usb will be very very very occasional.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines