iMX8QXP Ubuntu Installation From Bootable USB

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iMX8QXP Ubuntu Installation From Bootable USB

38 Views
mlfnd
Fresh Out Contributor

I am trying to install Ubuntu from a bootable USB drive on my imx8qxp 2G. I downloaded the ISO from here, created a bootable USB drive using rufus (once with GPT and once with MBR), plugged the USB drive into my 3900 dev board, powered on the board and got into uboot console.

 

In uboot console I did the following:

usb start

But for some reason the USB storage was not found. I tried both USB2 and USB3:

=> usb start
starting USB...
USB0: USB EHCI 1.00
USB1: XHCI-imx8 init hccr 0x000000005b130000 and hcor 0x000000005b130080 hc_length 128
Register 2000820 NbrPorts 2
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 1 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found

 

So I created a bootable SD card instead, plugged it into the dev board, flipped the boot selector switch to boot from SD card and powered on. But nothing happened. Nothing appeared on serial or on HDMI.

 

So I booted into uboot again and ran mmc list and I saw the SD card in the list. The bootable SD card contains a vmlinuz, and an initrd. The problem though is that this version of uboot does not support booting a vmlinuz image. So I uncompressed the vmlinuz manually using this script and I got a vmlinux. Then I did this:

 

=> fatload mmc 1:1 ${loadaddr} casper/vmlinux
55259528 bytes read in 2349 ms (22.4 MiB/s)
=> fatload mmc 1:1 ${initrd_addr} casper/initrd
136064029 bytes read in 5737 ms (22.6 MiB/s)

=> bootm ${loadaddr} ${initrd_addr}
Wrong Image Format for bootm command
ERROR: can't get kernel image!
=> booti ${loadaddr} ${initrd_addr}
Wrong Ramdisk Image Format
Ramdisk image is corrupt or invalid

so it seems that uboot does not support booting these formats. So I thought I could boot into GRUB and then boot from there. GRUB exists on the SD card as an efi image, but the problem is that this version of uboot does not support the bootefi command. Which means I'd have to build grub from source and so I did.

 

On the host I did the following:

wget https://ftp.gnu.org/gnu/grub/grub-2.06.tar.gz

tar -xzvf grub-2.06.tar.gz

cd grub-2.06

./configure --target=arm-none-eabi --with-platform=efi

Note: I used arm-none-eabi instead of aarch64 because if I use aarch64 I can't make an arm-uboot image in ../grub-mkstandalone because it would tell me invalid ELF header. So I assumed using arm would still work because it is backwards compatible.

make

cd grub-core

../grub-mkstandalone -d . -o grub.img -O arm-uboot "boot/grub/grub.cfg=grub.cfg"

And then

file grub.img

grub.img: u-boot legacy uImage, , Linux/ARM, (Not compressed), 6320904 bytes, Thu Jan 1 00:00:00 2015, Load Address: 00000000, Entry Point: 00000000, Header CRC: 0X69EF4514, Data CRC: 0X33412843

so I did:

mkimage -A arm -C none -a 0X80280000 -e 0X80280000 -d grub.img uImage

and I got:

file uImage: u-boot legacy uImage, , Linux/ARM, Standalone Program (Not compressed), 6320968 bytes, Tue Jul 16 20:19:39 2024, Load Address: 0X80280000, Entry Point: 0X80280000, Header CRC: 0X9F48D575, Data CRC: 0XE0B031A

 

so I loaded that on the SD card, and then

fatload mmc 1:1 ${loadaddr} casper/uImage

=> bootm ${loadaddr}
## Booting kernel from Legacy Image at 80280000 ...
Image Name:
Image Type: ARM Linux Standalone Program (uncompressed)
Data Size: 6320968 Bytes = 6 MiB
Load Address: 80280000
Entry Point: 80280000
Verifying Checksum ... OK
Loading Standalone Program ... OK
"Synchronous Abort" handler, esr 0x96000047
elr: 0000000080021a4c lr : 0000000080021a0c (reloc)
elr: 00000000ffe79a4c lr : 00000000ffe79a0c
x0 : 0000000054410001 x1 : 0000000000000003
x2 : 0000000000000062 x3 : 00000000ffefb8f0
x4 : 0000000000000000 x5 : 00000000fd6be4a0
x6 : 0000000000000021 x7 : 00000000ffeeddc0
x8 : 00000000fd6c0bc0 x9 : 0000000000000008
x10: 00000000fd6be490 x11: 00000000fd684a60
x12: 0000000000000000 x13: 0000000000000200
x14: 000000000000000e x15: 00000000ffffffff
x16: 0000000000002080 x17: 0000000000000000
x18: 00000000fd675d60 x19: 0000000000000000
x20: 00000000fff09000 x21: 0000000000000014
x22: 00000000fff096c0 x23: 0000000000000000
x24: 00000000ffefbc48 x25: 0000000080280040
x26: 00000000ffe79b78 x27: 0000000000000000
x28: 0000000080280000 x29: 00000000fd669be0

Resetting CPU ...

resetting ...

 

 

note: I found this and followed it at the beginning but the resulting system was unstable so it did not work for me:

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Build-Ubuntu-For-i-MX8-Series-Platform/t...

 

Any ideas how can I proceed?

0 Kudos
Reply
1 Reply

14 Views
Chavira
NXP TechSupport
NXP TechSupport

Hi @mlfnd!

Thank you for contacting NXP Support!

 

We have Ubuntu for our boards, but you have to compile it under Yocto!

 

Please follow the instructions of our Yocto User Guide.

 

https://github.com/nxp-imx/meta-nxp-desktop/tree/rel_lf_6.1.55_2.2.0_ldp

 

https://www.nxp.com/docs/en/user-guide/IMX_YOCTO_PROJECT_USERS_GUIDE.pdf

 

Best Regards!

Chavira

0 Kudos
Reply