Unable to boot Linux on imx8m plus evk Source: IMX_YOCTO_PROJECT_USERS_GUIDE.pdf we are referring the above guide to build Linux bsp. The below is the default boot flow layout, # The disk layout used is: # - ---------- -------------- -------------- # | | imx-boot | boot | rootfs | # - ---------- -------------- -------------- # ^ ^ ^ ^ ^ # | | | | | # 0 | 8MiB 72MiB 72MiB + rootfs + IMAGE_EXTRA_SPACE (default 10MiB) # ${IMX_BOOT_SEEK} 32 or 33kiB, see reference manual imx-boot = SPL + ATF + TEE + U-BOOT --> boots to linux Modified boot flow layout, # The disk layout used is: # - ---------- -------------- -------------- # | | Bios.bin | boot | rootfs | # - ---------- -------------- -------------- # ^ ^ ^ ^ ^ # | | | | | # 0 | 8MiB 72MiB 72MiB + rootfs + IMAGE_EXTRA_SPACE (default 10MiB) # ${IMX_BOOT_SEEK} 32 or 33kiB, see reference manual Bios.bin = SPL + ATF + TEE + U-BOOT + UEFI Loader --> boot upto before linux login terminal Attached the original and modified debug logs. any suggestions ? Re: Unable to boot Linux on imx8m plus evk Hi @pengyong_zhang Thanks for all your response !!! Thanks, JP Re: Unable to boot Linux on imx8m plus evk hi @sjp
I do not think you can use another bootloader replace the uboot for the Embedded CPU.
B.R Re: Unable to boot Linux on imx8m plus evk Hi @pengyong_zhang What do you mean similar U-boot? Why are you not use U-boot? We are just analyzing to replace u-boot with another bootloader. Thanks, JP Re: Unable to boot Linux on imx8m plus evk HI @sjp
1. Can we use a non-UEFI bootloader, similar to U-boot, to boot Linux with Linux BSP ?
>>> What do you mean similar U-boot? Why are you not use U-boot?
2. What types of bootloaders are supported for booting Linux ?
>>>It is the default linux bootloader, SPL->ATF->UBOOT->KERNAL->ROOTFS
B.R Re: Unable to boot Linux on imx8m plus evk Hi @pengyong_zhang Sorry i missed it. Thank you !!! I have another query, 1. Can we use a non-UEFI bootloader, similar to U-boot, to boot Linux with Linux BSP ? 2. What types of bootloaders are supported for booting Linux ? Thanks, JP Re: Unable to boot Linux on imx8m plus evk hi @sjp
Have you seen my previous reply? Linux BSP do not support UEFI boot. Only PC have this. The embedded test CPU does not use BIOS.
B.R
B.R Re: Unable to boot Linux on imx8m plus evk Hi @pengyong_zhang, Is there any update from your internal team ? Thanks, JP Re: Unable to boot Linux on imx8m plus evk HI @sjp
I have talk about your request with our internal team, our Linux BSP do not support UEFI boot. Only PC have this. The embedded test CPU does not use BIOS.
B.R Re: Unable to boot Linux on imx8m plus evk Hi @pengyong_zhang 1. How did you "modified boot flow" you mentioned? Step 1: We used the source code from WIN10_1.5.0_SOURCE built it with the following command: ./buildme64.sh -b MX8M_PLUS_EVK -t uefi -bc DEBUG The resulting binary we used is located at imx-windows-iot/BSP/firmware/MX8M_PLUS_EVK/firmware_uuu.bin. Note: Additionally, we added a driver to this source. The purpose of this driver is to load the device tree and Kernel into memory. Step 2: 1. Host machine setup: i) Essential Yocto Project host packages are: $ sudo apt install gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 python3-subunit zstd liblz4-tool file locales libacl1 ii) Setting up the Repo utility: $ mkdir ~/bin (this step may not be needed if the bin folder already exists) $ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo $ chmod a+x ~/bin/repo $ export PATH=~/bin:$PATH 2. Yocto Project Setup: i) Git set up: $ git config --global user.name "Your Name" $ git config --global user.email "Your Email" $ git config --list ii) Repo sync: $ mkdir imx-yocto-bsp $ cd imx-yocto-bsp $ repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-scarthgap -m imx-6.6.36-2.1.0.xml $ repo sync 3. Changes: Replaced the imx-boot with firmware_uuu.bin. 4. Build: $ DISTRO=fsl-imx-wayland MACHINE=imx8mp-lpddr4-evk source imx-setup-release.sh -b $ bitbake core-image-minimal Refer: IMX_YOCTO_PROJECT_USERS_GUIDE.pdf Built image will be avilable in imx-yocto-bsp/Build/tmp/deploy/images/imx8mp-lpddr4-evk/core-image-minimal-imx8mp-lpddr4-evk.rootfs-20241106063508.wic.zst # The disk layout of "wic" image # - ---------- -------------- -------------- # | | firmware_uuu.bin | boot | rootfs | # - ---------- -------------- -------------- # ^ ^ ^ ^ ^ # | | | | | # 0 | 8MiB 72MiB 72MiB + rootfs + IMAGE_EXTRA_SPACE (default 10MiB) # ${IMX_BOOT_SEEK} 32 or 33kiB, see reference manual Flash: $ zstdcat /home/bpcg/imx-yocto-bsp/Build/tmp/deploy/images/imx8mp-lpddr4-evk/core-image-minimal-imx8mp-lpddr4-evk.rootfs-20241106063508.wic.zst | sudo dd of=/dev/sda bs=1M conv=fsync Kernel arguments used: console=ttymxc1,921600 root=/dev/mmcblk1p2 rootwait rw 2. why are you need to change the boot flow? We modified the boot flow because our objective is to boot Linux using EDK2 (UEFI). Thanks, JP Re: Unable to boot Linux on imx8m plus evk HI @sjp
However, in our modified boot flow, U-Boot hands control over to the UEFI loader instead. The UEFI loader then takes on the responsibility of loading the device tree and kernel into memory before launching the system.
>>> How did you "modified boot flow" you mentioned? And why are you need to change the boot flow?
B.R Re: Unable to boot Linux on imx8m plus evk Hi @pengyong, Any updates on this ? Re: Unable to boot Linux on imx8m plus evk Hi @pengyong_zhang Ques: 1. What is your change about the code? We haven’t modified the existing code directly. In the default boot flow, U-Boot loads the device tree and kernel into memory and then launches the system. However, in our modified boot flow, U-Boot hands control over to the UEFI loader instead. The UEFI loader then takes on the responsibility of loading the device tree and kernel into memory before launching the system. 2. how did you compile the flash.bin file? The UEFI loader is built using the EDK2 framework. We used the mkimage tool for binary stitching, similar to how firmware is stitched in a Windows BSP. We provided the UEFI loader as a FIT image to U-Boot. Thanks, JP Re: Unable to boot Linux on imx8m plus evk hi @sjp
What is your change about the code? and how did you compile the falsh.bin file?
B.R
查看全文