Mainline u-boot spl nvme support


Recommended Posts

I want to use the mainline u-boot spl to load the u-boot proper(u-boot.itb) from nvme, so that the only part off the nvme is the tpl/spl in the emmc/sd/spi flash.

But now the mainline u-boot has no pcie driver and no nvme support in spl.

 

I have found the radxa guys using their u-boot in spi flash to boot kernel from nvme. But their pcie driver(https://github.com/radxa/u-boot/commit/096f2c16bbfa24c93a4c87e31334d5b5064dfd0a) has a limitation: It can not be used in u-boot spl, or it would not function properly in u-boot proper and fail the boot. 

After some frustrating tryings and compare with the linux driver, I found that the port initialization process was short cutted and causing the reinitialization malfunctioned. After this correction the pcie driver can be used in spl: it can be reinitialized correctly in u-boot proper.

 

Bring nvme support into spl is just a mimic from the spl_mmc and spl_usb driver.

 

Another patch for fixing spl_ext as I want the u-boot.itb and kernel in a ext4 partition on nvme but the existing spl_ext can not load the u-boot.itb properly.

 

With these patches I can boot nanopc-t4 with u-boot.itb and linux kernel in nvme boot partition and only the u-boot tpl/spl in emmc.

 

Btw, now the vidconsole of the mainline u-boot is working on rk3399, but usb phys are still missing.

 

 

pcie.patch rk3399_boot_nvme.patch spl_ext_fix.patch spl_nvme.patch

Link to post
Share on other sites
Donate and support the project!

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...