OP-TEE OS problem on IMX6UL

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

OP-TEE OS problem on IMX6UL

Jump to solution
4,290 Views
kr90911
Contributor III

Hi all,

I'm trying to deploy op-tee os which build with YOCTO on custom I.MX6UL (BSP version 4.14.98).

The OP-TEE driver seems init fail somehow.

What I have worked before:

1. edited yocto/build/conf/local.conf:

+DISTRO_FEATURES_append=" optee"
+IMAGE_INSTALL_append = " optee-client-imx optee-os-imx optee-test-imx"
2. edited imx6ul-14x14-evk.dts:
+firmware {
+        optee {
+            compatible = "linaro, optee-tz";
+            method = "smc";
+        };
+   };
    regulators {
        compatible = "simple-bus";
        #address-cells = <1>;
        #size-cells = <0>;

3. build op-tee os with yocto:

bitbake core-image-base

bitbake optee-os-imx

4. burn u-boot, linux kernel, device tree, op-tee os, and file system into custom board with UUU tool.

Boot log are as follow:

U-Boot 2018.03-4.14.98-2.3.1+gb1840a04d7 (Nov 11 2021 - 05:56:40 +0000)

CPU: Freescale i.MX6UL rev1.2 528 MHz (running at 396 MHz)
CPU: Industrial temperature grade (-40C to 105C) at 39C
Reset cause: POR
Model: Freescale i.MX6 UltraLite 14x14 EVK Board
Board: MX6UL 14x14 EVK
DRAM: 256 MiB
NAND: 128 MiB
MMC: FSL_SDHC: 0
Loading Environment from NAND... *** Warning - bad CRC, using default environment

Failed (-5)
Display: TFT43AB (320x240)
Video: 320x240x24
Fail to set rate to 153khzIn: serial
Out: serial
Err: serial
Net:
Error: ethernet@020b4000 address not set.
No ethernet found.
Fastboot: Normal
Normal Boot
Hit any key to stop autoboot: 0

NAND read: device 0 offset 0x300000, size 0x800000
Skipping bad block 0x00500000
8388608 bytes read: OK

NAND read: device 0 offset 0xb00000, size 0x100000
1048576 bytes read: OK

NAND read: device 0 offset 0xc00000, size 0x100000
1048576 bytes read: OK
## Booting kernel from Legacy Image at 84000000 ...
Image Name:
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 279800 Bytes = 273.2 KiB
Load Address: 84000000
Entry Point: 84000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 83000000
Booting using the fdt blob at 0x83000000
Loading Kernel Image ... OK
Using Device Tree in place at 83000000, end 8300cef6
ft_system_setup for mx6

Starting kernel ...

E/TC:0 plat_rng_init:354 Warning: seeding RNG with zeroes
E/TC:0 call_initcalls:33 Initial call 0x840001dc failed
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.14.98-2.3.1+g860ec89b125a (oe-user@oe-host) (gcc version 7.3.0 (GCC)) #1 SMP PREEMPT Wed May 6 06:06:08 UTC 2020
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c53c7d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: Freescale i.MX6 UltraLite 14x14 EVK Board
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] Reserved memory: created CMA memory pool at 0x8c000000, size 64 MiB
[ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv0.2 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: MIGRATE_INFO_TYPE not supported.
[ 0.000000] percpu: Embedded 16 pages/cpu @8bd6c000 s35340 r8192 d22004 u65536
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 56768
[ 0.000000] Kernel command line: console=ttymxc0,115200 ubi.mtd=4 root=ubi0:nandrootfs rootfstype=ubifs psplash = false mtdparts=gpmi-nand:3m(nandboot),8m(nandkernel),1m(nanddtb),1m(nandtee),-(nandrootfs)
[ 0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Memory: 144664K/229376K available (11264K kernel code, 722K rwdata, 2208K rodata, 1024K init, 480K bss, 19176K reserved, 65536K cma-reserved, 0K highmem)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0x90800000 - 0xff800000 (1776 MB)
[ 0.000000] lowmem : 0x80000000 - 0x90000000 ( 256 MB)
[ 0.000000] pkmap : 0x7fe00000 - 0x80000000 ( 2 MB)
[ 0.000000] modules : 0x7f000000 - 0x7fe00000 ( 14 MB)
[ 0.000000] .text : 0x80008000 - 0x80c00000 (12256 kB)
[ 0.000000] .init : 0x80f00000 - 0x81000000 (1024 kB)
[ 0.000000] .data : 0x81000000 - 0x810b4920 ( 723 kB)
[ 0.000000] .bss : 0x810b6000 - 0x8112e3f0 ( 481 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
[ 0.000000] Tasks RCU enabled.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] Switching to timer-based delay loop, resolution 333ns
[ 0.000018] sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 715827882841ns
[ 0.000063] clocksource: mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 637086815595 ns
[ 0.003648] Console: colour dummy device 80x30
[ 0.003708] Calibrating delay loop (skipped), value calculated using timer frequency.. 6.00 BogoMIPS (lpj=30000)
[ 0.003746] pid_max: default: 32768 minimum: 301
[ 0.004097] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.004134] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.005477] CPU: Testing write buffer coherency: ok
[ 0.006133] /cpus/cpu@0 missing clock-frequency property
[ 0.006177] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.040546] Setting up static identity map for 0x80100000 - 0x80100060
[ 0.060548] Hierarchical SRCU implementation.
[ 0.100765] smp: Bringing up secondary CPUs ...
[ 0.100800] smp: Brought up 1 node, 1 CPU
[ 0.100826] SMP: Total of 1 processors activated (6.00 BogoMIPS).
[ 0.100844] CPU: All CPU(s) started in SVC mode.
[ 0.102399] devtmpfs: initialized
[ 0.116793] OF: Duplicate name in lcdif@021c8000, renamed to "display#1"
[ 0.120039] random: get_random_u32 called from 0x8040a174 with crng_init=0
[ 0.121484] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.122068] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.122123] futex hash table entries: 256 (order: 2, 16384 bytes)
[ 0.127220] pinctrl core: initialized pinctrl subsystem
[ 0.129193] NET: Registered protocol family 16
[ 0.149240] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.151458] cpuidle: using governor menu
[ 0.169818] vdd3p0: supplied by regulator-dummy
[ 0.171056] cpu: supplied by regulator-dummy
[ 0.172405] vddsoc: supplied by regulator-dummy
[ 0.194999] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.195035] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.199365] imx6ul-pinctrl 20e0000.iomuxc: Invalid fsl,pins or pins property in node /soc/aips-bus@02000000/iomuxc@020e0000/wdoggrp

......

After boot up, I found op-tee driver not show the under /dev.

find / -name "*tee*"
/etc/systemd/system/basic.target.wants/tee-supplicant.service
/lib/systemd/system/tee-supplicant.service
/lib/optee_armtz
/lib/firmware/tee-pager_v2.bin
/lib/firmware/tee-pager.bin
/lib/firmware/tee.bin
/lib/firmware/tee-header_v2.bin
/lib/firmware/tee-pageable_v2.bin
/lib/firmware/tee-pageable.bin
/sys/class/tee
/sys/firmware/devicetree/base/reserved-memory/optee_core@0x84000000
/sys/firmware/devicetree/base/reserved-memory/optee@0x85c00000
/sys/firmware/devicetree/base/firmware/optee
/sys/module/optee
/sys/module/tee
/usr/bin/tee
/usr/bin/tee-supplicant
/usr/lib/opkg/alternatives/tee
/usr/lib/xtables/libxt_rateest.so
/usr/lib/libteec.so.1.0
/usr/lib/libteec.so.1

I think it is relate to error message with red color in log.

Have anyone know about this issue?

Labels (3)
0 Kudos
Reply
1 Solution
4,249 Views
kr90911
Contributor III

The tee drivers show up in /dev directory after following modification:

imx6ul-14x14-evk.dts:

-firmware {
-        optee {
-            compatible = "linaro, optee-tz";
-            method = "smc";
-        };
-   };
    regulators {
        compatible = "simple-bus";
        #address-cells = <1>;
        #size-cells = <0>;

View solution in original post

0 Kudos
Reply
1 Reply
4,250 Views
kr90911
Contributor III

The tee drivers show up in /dev directory after following modification:

imx6ul-14x14-evk.dts:

-firmware {
-        optee {
-            compatible = "linaro, optee-tz";
-            method = "smc";
-        };
-   };
    regulators {
        compatible = "simple-bus";
        #address-cells = <1>;
        #size-cells = <0>;
0 Kudos
Reply