Hover
-
Posts
13 -
Joined
-
Last visited
Reputation Activity
-
Hover got a reaction from yongwn in mainline u-boot (March 2024) rk3399 nvme boot
Now the mainline u-boot has decent pcie and pcie phy driver for rk3399. The only deficiency is the clock of pcie phy not included. The first attached patch add this clock so that u-boot proper can load linux kernel residing in an ext4 partition of nvme ssd.pcie_phy_clk.patch
The second patch enables loading the environment from a file in an ext4 partition of nvme ssd.env_nvme.patch
More conveniently the u-boot proper(u-boot.itb) could be an ordinary file residing in an ext4 partition of nvme ssd. The idbloader(tpl/spl in spi/emmc/sdcard) could load it if pcie nvme support is enabled in spl. That's the third attachment.spl_nvme.patch
The usb and usb phy is working so the usbkbd can be used to choose a boot option without a serial port debug console. The last attachment set the default env to enable usbkbd and vidconsole.env_vidconsole_usbkbd.patch
And for your convenience my u-boot config for nanopc-t4 also attached here.u-boot.config
-
Hover got a reaction from aaditya in Mainline u-boot spl nvme support
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
-
Hover got a reaction from mar0ni in Mainline u-boot spl nvme support
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