SolidRun / lx2160a_uefi

Parent build repository for generating UEFI firmware for the LX2160a
24 stars 16 forks source link

Support building for BOOT_MODE == "emmc" #22

Closed ndoo closed 1 year ago

ndoo commented 1 year ago

Build-tested and run-tested on LX2160A COM rev 1.3 and early ClearFog CX LX2 carrier board.

Flashed from microSD u-boot with:

usb start
load usb 0:1 0xa4000000 lx2160acex7_2200_800_3200_8_5_2_emmc_ee5c233.img
mmc dev 1
mmc write 0xa4000000 0 0xd2000
jnettlet commented 1 year ago

The image would need to be altered from its current layout to support an eMMC with an existing filesystem. These changes only work if the entire eMMC is only being used for a 4MB firmware. With the edk2 firmware it makes more sense to just use the SPI-NOR as a boot device.

ndoo commented 1 year ago

This is working for me with eMMC used only for UEFI booting as I have an NVMe drive installed, I think that's a good use case for anyone who may wish to use the eMMC for UEFI and a higher-speed SATA/NVMe/PCIe device for boot, thus worth supporting.

jnettlet commented 1 year ago

Why would you not want to use spi-nor which is the expected boot medium for UEFI?

On Wed, Dec 28, 2022, 16:40 Andrew Yong @.***> wrote:

This is working for me with eMMC used only for UEFI booting as I have an NVMe drive installed, I think that's a good use case for anyone who may wish to use the eMMC for UEFI and a higher-speed SATA/NVMe/PCIe device for boot, thus worth supporting.

— Reply to this email directly, view it on GitHub https://github.com/SolidRun/lx2160a_uefi/pull/22#issuecomment-1366742190, or unsubscribe https://github.com/notifications/unsubscribe-auth/AINUS3BOVFMYRPUIW3LHXKDWPRNOFANCNFSM6AAAAAATKS5NNI . You are receiving this because you commented.Message ID: @.***>

ndoo commented 1 year ago

I have a Rev1.3 COM which cannot boot RCW from SPI NOR due to known errata.

Rather than splitting RCW between eMMC/SD and UEFI on SPI-NOR, it is easier for me (and I suppose, other rev1.3 owners) to just install the UEFI image to eMMC.

jnettlet commented 1 year ago

This may be fine for you, however we can not push out a firmware that may destroy users data on the emmc. To do this safely we would need to rework the image and loading such that the firmware could coexist with a filesystem on the eMMC device. Because of this we will not take the patch into the repo until the additional associated work is done. Thanks for the submission.

ndoo commented 1 year ago

Doesn't the same logic apply to users who use microSD as the storage medium for the UEFI?