NFS/TFTP-booting linux from default EMMC u-boot

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

NFS/TFTP-booting linux from default EMMC u-boot

跳至解决方案
4,749 次查看
chetanks
Contributor III

Hello,

It's my first post here.

HW: MCIMX8M-EVKB Rev A.

SW:
Kernel version:  4.14.98
DISTRO: fsl-imx-wayland 
Bitbake Target: core-image-minimal-dev

Tested Boot scenario (SOK): PASSED
1. Internal Default EMMC Boot - Board's existing emmc images  
2. All in External SD boot - U-boot, Kernel, DTB, RootFS all in SD card 
3. Only u-boot from External SD - u-boot loads from External SD card and boots Linux via TFTP/NFS.  

Required Boot scenario (SNOK): FAILED
Need to remove External SD based boot-up as SD slot is used for my SDIO slave card, i.e., -
1. Default U-boot from emmc
2. RootFS & Kernel/DTB from NFS & TFTP respectively

In SNOK setup, kernel/RootFS get loaded from network but then linux boot halts. Refer attachment.

Hope above info is enough. If not, let me know and I'll share required info.

I might have missed something somewhere on the failed setup, being not much experienced with Embedded Linux bring-up.

Kindly help.

0 项奖励
回复
1 解答
4,667 次查看
chetanks
Contributor III

Hi Igor,

Now I tried the uuu approach instead.

Switched SW802 DIP to 10 and tried:
$ sudo uuu -b emmc /media/chetan/works/imx8/WE866Cx_imx8mq_yocto_4.14.98/build/tmp/deploy/images/imx8mqevk/imx-boot-imx8mqevk-sd.bin-flash_evk

This seems to replace the default bootloader images in eMMC.

Will update on TFTP/NFS booting shortly.

在原帖中查看解决方案

0 项奖励
回复
10 回复数
4,743 次查看
igorpadykov
NXP Employee
NXP Employee

Hi chetanc10

 

for NFS/TFTP usage one can look at sect.4.4.1.1 Using eMMC

i.MX Linux User’s Guide​

all linux documentation

https://www.nxp.com/design/software/embedded-software/i-mx-software/embedded-linux-for-i-mx-applicat...

 

Best regards
igor

0 项奖励
回复
4,736 次查看
chetanks
Contributor III

Hi Igor,

I have already looked into IMXLUG section 4.4.1.1.

IMXLUG-Approach: It instructs to download kernel and DTB via TFTP into RAM, write in internal emmc locations and then to boot linux, read the images from emmc to RAM and start booting from RAM.

My-approach: Avoid eMMC write and readback images, but just download images into RAM via TFTP and then boot from RAM.

I see no difference between above two approaches. And I also need to modify contents of RootFS regularly - my tests require multiple tests with different binaries/configuration files of my SDIO based WiFi NIC card. So I must use NFS.

0 项奖励
回复
4,726 次查看
igorpadykov
NXP Employee
NXP Employee

also for NFS may be useful to look at below link

https://developer.ridgerun.com/wiki/index.php?title=IMX8/Nitrogen8M/Yocto/Advanced_image_loading

 

Best regards
igor

0 项奖励
回复
4,716 次查看
chetanks
Contributor III

Hi Igor,

I'll try any method that helps me boot my custom linux/rootfs while avoiding External SD card completely.

Q1. Can I replace original emmc0 u-boot image on imx8 with my u-boot without disturbing the SPL? Given it is possible, please share the process details for the same.

Q2. Do I need to backup original emmc0 u-boot image first if Q1 might fail? In case Q1 is success, I'll not bother of Q2.

Please help to resolve this soon.

Thanks.

0 项奖励
回复
4,704 次查看
igorpadykov
NXP Employee
NXP Employee

for emmc programming options may be useful to look at

https://boundarydevices.com/zeus-yocto-release-for-i-mx8mq/

 

Best regards
igor

 

0 项奖励
回复
4,681 次查看
chetanks
Contributor III

Hi Igor,

The Yocto build created an .sdcard image only, not .wic type.

Please share an instructions document/link to flash this .sdcard image to internal eMMC.

0 项奖励
回复
4,678 次查看
igorpadykov
NXP Employee
NXP Employee

please look at sect.4.3.2 Copying the full SD card image

i.MX Linux User’s Guide​

 

Best regards
igor

0 项奖励
回复
4,670 次查看
chetanks
Contributor III

Hi Igor,

Let me explain.

There is an eMMC internally available inside the IMX8MQ EVK which I cannot access from my linux build host. I have a .sdcard image generated by the Yocto framework instead of .wic type of image.

From Section 4.3.2 of the Linux user guide, it says we can program sdcard image to /dev/sd<x>.

This is from linux.

I need this:

Booting from SD, stop at uboot, select eMMC device to be programmed with core-image-minimal-dev-imx8mqevk.sdcard complete image (or) just bootloader image imx-boot-imx8mqevk-sd.bin-flash_evk.

When I tried the following to overwrite eMMC contents with above images, I see no difference as eMMC boot still uses factory images only.

--------

u-boot=> ext4load mmc 1:3 ${loadaddr} imx-boot-imx8mqevk-sd.bin-flash_evk
1451736 bytes read in 67 ms (20.7 MiB/s)
u-boot=> mmc dev 0
switch to partitions #0, OK
mmc0(part 0) is current device
u-boot=> mmc write ${loadaddr} 0x2 0x45F

MMC write: dev # 0, block # 2, count 1119 ... 1119 blocks written: OK

--------

Same applies for sdcard image written to mmc dev 0 offset 0x0.

If this is fixed, my issue would be resolved.

0 项奖励
回复
4,668 次查看
chetanks
Contributor III

Hi Igor,

Now I tried the uuu approach instead.

Switched SW802 DIP to 10 and tried:
$ sudo uuu -b emmc /media/chetan/works/imx8/WE866Cx_imx8mq_yocto_4.14.98/build/tmp/deploy/images/imx8mqevk/imx-boot-imx8mqevk-sd.bin-flash_evk

This seems to replace the default bootloader images in eMMC.

Will update on TFTP/NFS booting shortly.

0 项奖励
回复
4,664 次查看
chetanks
Contributor III

NFS/TFTP is also working as expected with updated Bootloader.

0 项奖励
回复