Due to an ugly mess of policy, permissions, air-gapped networks, VMs and corporate security software, it is currently very difficult for me to flash images onto the Apalis card in the usual manner with EasyInsaller (and in particular the recovery tool usually BSOD’s my PC). But I have now at least gotten to the point where the latest nightly reference image for Torizon5 (20201009) is loaded into the flash and boots.
I am hoping I can make my life a lot easier if I use a USB stick to be bootable from u-boot with the latest EasyInstaller image, and then I can use that to update the flash either from local http server or from same/another USB stick. Or if I can put my Torizon build onto a USB and boot that.
But I can’t find instructions for how to create a bootable EasyInstaller stick for the latest Torizon/EasyInstall versions. The best I have found is here, but that refers to old hardware and old legacy Torizon versions, and the files mentioned there do not exist in the latest builds (either in the artifact server or from my own build, which is of course the end goal, as I need to write and test custom drivers). In particular, the use of ostree and itf files in Torizon 5 is confounding me.
Is there a better resource for me to look at?
Bonus points: is there a way to make this work for uSD card in the Ixora carrier? I’ve not worked out how to make that card visible to u-boot.
In order to create an SD/USB boot media for the easy installer tool please take a look at this sub-section of the article here: Distro Boot | Toradex Developer Center
As for SD card on Ixora carrier board, how are you trying to make it visible in U-Boot? Can you “see” the SD card from the Linux kernel itself?
Also in U-Boot try running mmc list this should list all connected storage media (including the internal eMMC).
I’ve downloaded the latest TEZI image Apalis-iMX8_ToradexEasyInstaller_2.0b6-nightly-20201011.tar and put it on a USB stick. Booting this is failing in 2 different ways:
Apalis iMX8 # usb start
starting USB...
Bus usb@5b0d0000: usb dr_mode not found
Port not available.
Bus usbh3: XHCI-imx8 init hccr 0x000000005b130000 and hcor 0x000000005b130080 hc_length 128
Register 2000820 NbrPorts 2
Starting the controller
USB XHCI 1.00
scanning bus usbh3 for devices... cannot reset port 1!?
2 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
Apalis iMX8 # run bootcmd_usb0
Device 0: Vendor: SanDisk Rev: 1.00 Prod: Ultra Fit
Type: Removable Hard Disk
Capacity: 14664.0 MB = 14.3 GB (30031872 x 512)
... is now current device
Scanning usb 0:1...
Found U-Boot script /boot.scr
2246 bytes read in 7 ms (312.5 KiB/s)
## Executing script at 83100000
106496 bytes read in 9 ms (11.3 MiB/s)
Loading hdp firmware from 0x000000009c000000 offset 0x0000000000002000
Loading hdp firmware Complete
** Reading file would overwrite reserved memory **
SCRIPT FAILED: continuing...
Found U-Boot script /boot.scr
2246 bytes read in 7 ms (312.5 KiB/s)
## Executing script at 83100000
106496 bytes read in 9 ms (11.3 MiB/s)
Loading hdp firmware from 0x000000009c000000 offset 0x0000000000002000
Loading hdp firmware Complete
** Reading file would overwrite reserved memory **
SCRIPT FAILED: continuing...
Apalis iMX8 #
Digging deeper into the command script, the bit that’s failing is
Apalis iMX8 # run bootcmd_tezi
** Reading file would overwrite reserved memory **
Apalis iMX8 #
which is load ${devtype} ${devnum}:${distro_bootpart} ${ramdisk_addr_r} ${tezi_image}
where ramdisk_addr_r=0x83000000
Looking at the default env, it seems ramdisk_addr_r might need to be 0x8a000000.
If I re-run the load/bootm sequence by hand with that value, I then get to
Apalis iMX8 # load usb 0 0x8a000000 /tezi.itb
37481284 bytes read in 330 ms (108.3 MiB/s)
Apalis iMX8 # bootm 0x8a000000#config@freescale_${fdtfile}
## Loading kernel from FIT Image at 8a000000 ...
Could not find configuration node
ERROR: can't get kernel image!
Apalis iMX8 # print fdtfile
fdtfile=imx8qm-apalis-eval.dtb
Apalis iMX8 #
Leaving out the config parameter allows it to boot, kinda, but doesn’t properly identify the card in EasyInstall. I don’t know how to search for the correct DTB name.
I’ll create a new post for the uSD card issue, that looks more complicated than a one-liner.
Further investigation and experiment suggests this is a compatibility issue between the u-boot written to flash and the boot.scr in the USB boot image.
If I flash the EasyInstall image and it’s accompanying u-boot version, then the uSD card or USB stick EasyInstall image boots fine. If I then flash the latest Torizon Reference image, the u-boot will no longer boot the uSD or USB EasyInstaller image, due to the above address clash.
I’m not sure how to untangle all this, other than waiting for EasyInstall image to catch up with the u-boot in the reference images (or the u-boot in my own images compiled from the dunfell-5.x.y reference layers.)
For Toridex versions, I’ve used various versions, mostly the nightly build from the artifact server torizon-core-docker-apalis-imx8-Tezi_5.0.0-devel-202010+build.3.zip and a custom image I’ve built myself based on the head of dunfell-5.x.y branch as of Monday.
and this u-boot will boot the EasyInstall from USB:
U-Boot 2018.03-toradex_imx_v2018.03_4.14.98_2.3.0_bringup+g548a7dcc24 (Jun 18 2020 - 23:54:01 +0000)
CPU: Freescale i.MX8QM revB A53 at 1200 MHz at 35C
DRAM: 4 GiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
Apalis iMX8 # usb reset
resetting USB...
USB0: Port not available.
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 1 for devices... 2 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
Apalis iMX8 # usb tree
USB device tree:
1 Hub (5 Gb/s, 0mA)
| U-Boot XHCI Host Controller
|
+-2 Mass Storage (480 Mb/s, 100mA)
USB DISK D8E4BA900154B8C9
Apalis iMX8 # run bootcmd_usb0
Device 0: Vendor: USB Rev: 1.00 Prod: DISK
Type: Removable Hard Disk
Capacity: 2000.5 MB = 1.9 GB (4097099 x 512)
... is now current device
Scanning usb 0:1...
Found U-Boot script /boot.scr
2246 bytes read in 26 ms (84 KiB/s)
## Executing script at 86000000
106496 bytes read in 27 ms (3.8 MiB/s)
Loading hdp firmware from 0x0000000084000000 offset 0x0000000000002000
Loading hdp firmware Complete
37481280 bytes read in 2623 ms (13.6 MiB/s)
## Loading kernel from FIT Image at 83000000 ...
Using 'config@freescale_fsl-imx8qm-apalis-eval.dtb' configuration
Alright I was able to duplicate this issue on my side. I’ll go ahead and forward this to the team for further investigation and eventual fixing. For the meantime you’ll have to just workaround this strange bug.
I’ll try and update with any additional info that gets uncovered on our side. Thank you again for reporting this issue.
Was there any resolution on this? I am stuck in this same situation (with the same error messages) after using the Easy Installer the first time.
I have investigated this further and have confirmed gregb’s findings about ramdisk_addr_r and the missing configuration file. Digging around a little more, I could get a little further into the startup before getting errors and a message on the HDMI screen saying “Reading config block failed”:
U-Boot 2020.04-5.1.0-devel+git.8ca87245fde7 (Nov 23 2020 - 23:45:52 +0000)
CPU: NXP i.MX8QM RevB A53 at 1200 MHz
DRAM: 4 GiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... OK
In: serial
Out: serial
Err: serial
Model: Toradex Apalis iMX8 QuadMax 4GB Wi-Fi / BT IT V1.1B, Serial# 06738551
BuildInfo:
- SCFW 732e719a, SECO-FW 376e3c15, IMX-MKIMAGE 6745ccdc, ATF
- U-Boot 2020.04-5.1.0-devel+git.8ca87245fde7
switch to partitions #0, OK
mmc0(part 0) is current device
flash target is MMC:0
Net: eth0: ethernet@5b040000
Fastboot: Normal
Normal Boot
Hit any key to stop autoboot: 0
Apalis iMX8 # run bootcmd_usb0
starting USB...
Bus usb@5b0d0000: usb dr_mode not found
Port not available.
Bus usbh3: XHCI-imx8 init hccr 0x000000005b130000 and hcor 0x000000005b130080 hc_length 128
Register 2000820 NbrPorts 2
Starting the controller
USB XHCI 1.00
scanning bus usbh3 for devices... cannot reset port 1!?
2 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
Device 0: Vendor: Lexar Rev: 1.00 Prod: JumpDrive
Type: Removable Hard Disk
Capacity: 30544.0 MB = 29.8 GB (62554112 x 512)
... is now current device
Scanning usb 0:1...
Found U-Boot script /boot.scr
2246 bytes read in 3 ms (730.5 KiB/s)
## Executing script at 83100000
106496 bytes read in 4 ms (25.4 MiB/s)
Loading hdp firmware from 0x000000009c000000 offset 0x0000000000002000
Loading hdp firmware Complete
** Reading file would overwrite reserved memory **
SCRIPT FAILED: continuing...
Found U-Boot script /boot.scr
2246 bytes read in 4 ms (547.9 KiB/s)
## Executing script at 83100000
106496 bytes read in 4 ms (25.4 MiB/s)
Loading hdp firmware from 0x000000009c000000 offset 0x0000000000002000
Loading hdp firmware Complete
** Reading file would overwrite reserved memory **
SCRIPT FAILED: continuing...
Apalis iMX8 # setenv ramdisk_addr_r 0x8a000000
Apalis iMX8 # printenv bootcmd_run
bootcmd_run=bootm ${ramdisk_addr_r}#config@freescale_${fdtfile}
Apalis iMX8 # setenv bootcmd_run "bootm ${ramdisk_addr_r}#config@freescale_fsl-${fdtfile}"
Apalis iMX8 # run bootcmd
106496 bytes read in 4 ms (25.4 MiB/s)
Loading hdp firmware from 0x000000009c000000 offset 0x0000000000002000
Loading hdp firmware Complete
37481764 bytes read in 212 ms (168.6 MiB/s)
## Loading kernel from FIT Image at 8a000000 ...
Using 'config@freescale_fsl-imx8qm-apalis-v1.1-eval.dtb' configuration
Trying 'kernel@1' kernel subimage
Description: Linux kernel
Type: Kernel Image
Compression: gzip compressed
Data Start: 0x8a000108
Data Size: 6689782 Bytes = 6.4 MiB
Architecture: AArch64
OS: Linux
Load Address: 0x80280000
Entry Point: 0x80280000
Hash algo: sha1
Hash value: cb0cf197924e01466a3d824cccbabbb9ff0f5bd3
Verifying Hash Integrity ... sha1+ OK
## Loading ramdisk from FIT Image at 8a000000 ...
Using 'config@freescale_fsl-imx8qm-apalis-v1.1-eval.dtb' configuration
Trying 'ramdisk@1' ramdisk subimage
Description: tezi-initramfs
Type: RAMDisk Image
Compression: uncompressed
Data Start: 0x8a6b0584
Data Size: 30466048 Bytes = 29.1 MiB
Architecture: AArch64
OS: Linux
Load Address: 0xa0000000
Entry Point: unavailable
Hash algo: sha1
Hash value: 8e46cd4ad885859c0515a85a45195e7cfb8978bb
Verifying Hash Integrity ... sha1+ OK
Loading ramdisk from 0x8a6b0584 to 0xa0000000
## Loading fdt from FIT Image at 8a000000 ...
Using 'config@freescale_fsl-imx8qm-apalis-v1.1-eval.dtb' configuration
Trying 'fdt@freescale_fsl-imx8qm-apalis-v1.1-eval.dtb' fdt subimage
Description: Flattened Device Tree blob
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x8a696428
Data Size: 106654 Bytes = 104.2 KiB
Architecture: AArch64
Hash algo: sha1
Hash value: 06939500808b0da13aa00c394079c147db2fb063
Verifying Hash Integrity ... sha1+ OK
Booting using the fdt blob at 0x8a696428
Uncompressing Kernel Image
Loading Ramdisk to fb942000, end fd650000 ... OK
Loading Device Tree to 00000000fb924000, end 00000000fb94109d ... OK
/dma-controller@5a1f0000, 73844
/dma-controller@591F0000, 74800
/dma-controller@591F0000, 74800
/dma-controller@599F0000, 75956
sc_rm_set_master_sid: resource:4624 sid:17: res:3
config_smmu_resource_sid rsrc[-43707888] not owned
sc_rm_set_master_sid: resource:4624 sid:17: res:3
config_smmu_resource_sid rsrc[-43707888] not owned
sc_rm_set_master_sid: resource:4624 sid:17: res:3
config_smmu_resource_sid rsrc[-43707888] not owned
sc_rm_set_master_sid: resource:4624 sid:18: res:3
config_smmu_resource_sid rsrc[-43707888] not owned
sc_rm_set_master_sid: resource:4624 sid:18: res:3
config_smmu_resource_sid rsrc[-43707888] not owned
sc_rm_set_master_sid: resource:4624 sid:19: res:3
config_smmu_resource_sid rsrc[-43707888] not owned
Starting kernel ...
[ 0.327803] clk: couldn't set hdmi_lis_ipg_clk clk rate to 100000000 (-22), current rate: 0
[ 0.444863] dmi: Firmware registration failed.
[ 0.538505] imx6q-pcie 5f000000.pcie: pcie_ext clock source missing or invalid
[ 0.540819] imx6q-pcie 5f010000.pcie: pcie_ext clock source missing or invalid
[ 0.589724] Can't support > 32 bit dma.
[ 0.674364] i.mx8-hdp 56268000.hdmi: invalid resource
[ 2.371488] ahci-imx 5f020000.sata: can't get per_clk0 clock.
[ 2.403585] Can't support > 32 bit dma.
[ 2.626364] atmel_mxt_ts 4-004a: __mxt_read_reg: i2c transfer failed (-5)
[ 2.633402] atmel_mxt_ts 4-004a: mxt_bootloader_read: i2c recv failed (-5)
[ 2.640512] atmel_mxt_ts 4-004a: mxt_bootloader_read: i2c recv failed (-5)
[ 3.290054] imx6q-pcie 5f000000.pcie: phy link never came up
[ 3.295889] imx6q-pcie 5f000000.pcie: failed to initialize host
[ 3.301950] imx6q-pcie 5f000000.pcie: unable to add pcie port.
[ 3.469381] rtc-ds1307 4-0068: hctosys: unable to read the hardware clock
Running /etc/rc.local...
TDX_VER_ID="Apalis-iMX8_ToradexEasyInstaller_2.0b6-20201102"
Starting udev
[ 4.049748] hid-generic 0003:046D:C52B.0003: device has no listeners, quitting
System time was Thu Jan 1 00:00:04 UTC 1970.
Setting the System Clock using the Hardware Clock as reference...
hwclock: RTC_RD_TIME: Invalid argument
System Clock set. System local time is now Thu Jan 1 00:00:04 UTC
1970.
Mon Nov 2 10:50:48 UTC 2020
Saving the System Clock time to the Hardware Clock...
Hardware Clock updated to Mon Nov 2 10:50:48 UTC 2020.
Welcome to the Toradex Easy Installer
This is a Linux based installer for Toradex modules. Currently, the installer
does not have a serial console interface. You can use the Toradex Easy Installer
via any of the available display interfaces using USB mouse/keyboard or via a
network connection using VNC. Use:
# ip addr show eth0
to display the Ethernet IP address or use USB RNDIS at IP 192.168.11.1.
Check our documentation at:
https://developer.toradex.com/software/toradex-easy-installer
/ # [ 12.766228] mmc0: Timeout waiting for hardware interrupt. retries left=0 opcode=0
[ 12.773730] mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
[ 12.780176] mmc0: sdhci: Sys addr: 0x00000000 | Version: 0x00000002
[ 12.786620] mmc0: sdhci: Blk size: 0x00000200 | Blk cnt: 0x00000001
[ 12.793067] mmc0: sdhci: Argument: 0x00000000 | Trn mode: 0x00000013
[ 12.799515] mmc0: sdhci: Present: 0x01fd8a0a | Host ctl: 0x00000011
[ 12.805958] mmc0: sdhci: Power: 0x00000002 | Blk gap: 0x00000080
[ 12.812404] mmc0: sdhci: Wake-up: 0x00000008 | Clock: 0x000020ff
[ 12.818851] mmc0: sdhci: Timeout: 0x0000008f | Int stat: 0x00000000
[ 12.825297] mmc0: sdhci: Int enab: 0x117f100b | Sig enab: 0x117f100b
[ 12.831742] mmc0: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000502
[ 12.838192] mmc0: sdhci: Caps: 0x07eb0000 | Caps_1: 0x8000b407
[ 12.844635] mmc0: sdhci: Cmd: 0x0000083a | Max curr: 0x00ffffff
[ 12.851085] mmc0: sdhci: Resp[0]: 0x00000900 | Resp[1]: 0xffc003ff
[ 12.857530] mmc0: sdhci: Resp[2]: 0x328f5903 | Resp[3]: 0x00d07f01
[ 12.863972] mmc0: sdhci: Host ctl2: 0x00000000
[ 12.868426] mmc0: sdhci: ADMA Err: 0x00000009 | ADMA Ptr: 0xfffff200
[ 12.874865] mmc0: sdhci: ============================================
[ 12.881446] mmc0: error -110 whilst initialising MMC card
[ 23.006218] mmc0: Timeout waiting for hardware interrupt. retries left=0 opcode=0
[ 23.013721] mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
[ 23.020167] mmc0: sdhci: Sys addr: 0x00000000 | Version: 0x00000002
[ 23.026613] mmc0: sdhci: Blk size: 0x00000200 | Blk cnt: 0x00000001
[ 23.033057] mmc0: sdhci: Argument: 0x00000000 | Trn mode: 0x00000013
[ 23.039503] mmc0: sdhci: Present: 0x01fd8a0a | Host ctl: 0x00000011
[ 23.045951] mmc0: sdhci: Power: 0x00000002 | Blk gap: 0x00000080
[ 23.052395] mmc0: sdhci: Wake-up: 0x00000008 | Clock: 0x000040af
[ 23.058841] mmc0: sdhci: Timeout: 0x0000008f | Int stat: 0x00000000
[ 23.065289] mmc0: sdhci: Int enab: 0x117f100b | Sig enab: 0x117f100b
[ 23.071734] mmc0: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000502
[ 23.078181] mmc0: sdhci: Caps: 0x07eb0000 | Caps_1: 0x8000b407
[ 23.084628] mmc0: sdhci: Cmd: 0x0000083a | Max curr: 0x00ffffff
[ 23.091072] mmc0: sdhci: Resp[0]: 0x00000900 | Resp[1]: 0xffc003ff
[ 23.097518] mmc0: sdhci: Resp[2]: 0x328f5903 | Resp[3]: 0x00d07f01
[ 23.103966] mmc0: sdhci: Host ctl2: 0x00000000
[ 23.108418] mmc0: sdhci: ADMA Err: 0x00000009 | ADMA Ptr: 0xfffff200
[ 23.114856] mmc0: sdhci: ============================================
[ 23.121452] mmc0: error -110 whilst initialising MMC card
[ 33.246211] mmc0: Timeout waiting for hardware interrupt. retries left=0 opcode=0
[ 33.253700] mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
[ 33.260147] mmc0: sdhci: Sys addr: 0x00000000 | Version: 0x00000002
[ 33.266593] mmc0: sdhci: Blk size: 0x00000200 | Blk cnt: 0x00000001
[ 33.273042] mmc0: sdhci: Argument: 0x00000000 | Trn mode: 0x00000013
[ 33.279485] mmc0: sdhci: Present: 0x01fd8a0a | Host ctl: 0x00000011
[ 33.285933] mmc0: sdhci: Power: 0x00000002 | Blk gap: 0x00000080
[ 33.292377] mmc0: sdhci: Wake-up: 0x00000008 | Clock: 0x000040ff
[ 33.298823] mmc0: sdhci: Timeout: 0x0000008f | Int stat: 0x00000000
[ 33.305270] mmc0: sdhci: Int enab: 0x117f100b | Sig enab: 0x117f100b
[ 33.311716] mmc0: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000502
[ 33.318165] mmc0: sdhci: Caps: 0x07eb0000 | Caps_1: 0x8000b407
[ 33.324608] mmc0: sdhci: Cmd: 0x0000083a | Max curr: 0x00ffffff
[ 33.331054] mmc0: sdhci: Resp[0]: 0x00000900 | Resp[1]: 0xffc003ff
[ 33.337500] mmc0: sdhci: Resp[2]: 0x328f5903 | Resp[3]: 0x00d07f01
[ 33.343945] mmc0: sdhci: Host ctl2: 0x00000000
[ 33.348395] mmc0: sdhci: ADMA Err: 0x00000009 | ADMA Ptr: 0xfffff200
[ 33.354839] mmc0: sdhci: ============================================
[ 33.361404] mmc0: error -110 whilst initialising MMC card
“not support” specifically by the easy-installer? Because this article implies that the module itself can keep Uboot on the eMMC but boot the OS from an external media Boot From an SD Card / USB Stick / SATA drive