This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SK-AM62: UBIFS error after creating a first file

Part Number: SK-AM62

Hello,

I'm using the default image of PROCESSOR-SDK-LINUX-RT-AM62X 09.00.00.03 (tisdk-default-image-am62xx-evm) on the SK-AM62.

I tried to access the OSPI flash using UBIFS following this URL.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
root@am62xx-evm:~# modprobe ubi
root@am62xx-evm:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00080000 00040000 "ospi.tiboot3"
mtd1: 00200000 00040000 "ospi.tispl"
mtd2: 00400000 00040000 "ospi.u-boot"
mtd3: 00040000 00040000 "ospi.env"
mtd4: 00040000 00040000 "ospi.env.backup"
mtd5: 037c0000 00040000 "ospi.rootfs"
mtd6: 00040000 00040000 "ospi.phypattern"
root@am62xx-evm:~# ubiformat /dev/mtd5
ubiformat: mtd5 (nor), size 58458112 bytes (55.7 MiB), 223 eraseblocks of 262144 bytes (256.0 KiB), min. I/O size 16 bytes
libscan: scanning eraseblock 222 -- 100 % complete
ubiformat: 223 eraseblocks have valid erase counter, mean value is 3
ubiformat: formatting eraseblock 222 -- 100 % complete
root@am62xx-evm:~# ubiattach -p /dev/mtd5
[ 418.477433] ubi0: attaching mtd5
[ 418.499562] ubi0: scanning is finished
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Then, the below error occurs when I executed the ls command right after the first file is created.

There seems to be no problem with subsequent accesses.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
root@am62xx-evm:~# cd /mnt/flash/
root@am62xx-evm:/mnt/flash# ls -al
total 4
drwxr-xr-x 2 root root 160 Jan 1 00:07 .
drwxr-xr-x 3 root root 4096 Jan 1 00:05 ..
root@am62xx-evm:/mnt/flash# echo hello > hello.txt
root@am62xx-evm:/mnt/flash# ls -al
total 4
[ 488.459521] UBIFS error (ubi0:0 pid 2076): ubifs_read_node [ubifs]: bad node type (255 but expected 2)
drwxr-xr-x 2 root root 232 Jan 1 00:08 .
[ 488.459605] UBIFS error (ubi0:0 pid 2076): ubifs_read_node [ubifs]: bad node at LEB 11:160, LEB mapping status 1
[ 488.459642] Not a node, first 24 bytes:
drwxr-xr-x 3 root root 4096 Jan 1 00:05 ..[ 488.459649] 00000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........................
[ 488.459659] CPU: 1 PID: 2076 Comm: ls Tainted: G O 6.1.33-rt11-g685e771524 #1
[ 488.459667] Hardware name: Texas Instruments AM625 SK (DT)
[ 488.459672] Call trace:
[ 488.459676] dump_backtrace.part.0+0xdc/0xf0
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Do you know why this error occurs?

Regards,

Numata

  • Hi Numata-san,

    this was assigned to me but I'm currently traveling, so please allow a few days for a response (should be able to look at your request by early next week).

    Regards, Andreas

  • Hi Numata-san,

    apologies for the delay in getting back on this. Is this still an open issue on your end?

    If so, can you please also post the complete Kernel boot log?

    Thanks, Andreas

  • Hi Andreas-san,

    Thank you for your reply.
    It is not urgent or critical, but we will eventually need a filesystem on flash memory.

    Here are the console log and output of dmesg. Would you please check them?

    2526.console_log.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    U-Boot SPL 2023.04-g24098ea90d (Jul 06 2023 - 12:59:40 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.5--v09.00.05 (Kool Koala)')
    SPL initial stack usage: 13376 bytes
    Trying to boot from MMC2
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Starting ATF on ARM64 core...
    NOTICE: BL31: v2.8(release):v2.8-226-g2fcd408bb3-dirty
    NOTICE: BL31: Built : 00:42:57, Jan 13 2023
    U-Boot SPL 2023.04-g24098ea90d (Jul 06 2023 - 12:59:40 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.5--v09.00.05 (Kool Koala)')
    SPL initial stack usage: 1856 bytes
    Trying to boot from MMC2
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    5241.dmesg.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    root@am62xx-evm:/mnt/flash# dmesg
    [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
    [ 0.000000] Linux version 6.1.33-rt11-g685e771524 (oe-user@oe-host) (aarch64-oe-linux-gcc (GCC) 11.3.0, GNU ld (GNU Binutils) 2.38.20220708) #1 SMP PREEMPT_RT Thu Jul 6 16:09:58 UTC 2023
    [ 0.000000] Machine model: Texas Instruments AM625 SK
    [ 0.000000] earlycon: ns16550a0 at MMIO32 0x0000000002800000 (options '')
    [ 0.000000] printk: bootconsole [ns16550a0] enabled
    [ 0.000000] efi: UEFI not found.
    [ 0.000000] Reserved memory: created CMA memory pool at 0x00000000f7600000, size 128 MiB
    [ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created DMA memory pool at 0x000000009c800000, size 3 MiB
    [ 0.000000] OF: reserved mem: initialized node ipc-memories@9c800000, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created DMA memory pool at 0x000000009cb00000, size 1 MiB
    [ 0.000000] OF: reserved mem: initialized node m4f-dma-memory@9cb00000, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created DMA memory pool at 0x000000009cc00000, size 14 MiB
    [ 0.000000] OF: reserved mem: initialized node m4f-memory@9cc00000, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created DMA memory pool at 0x000000009da00000, size 1 MiB
    [ 0.000000] OF: reserved mem: initialized node r5f-dma-memory@9da00000, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created DMA memory pool at 0x000000009db00000, size 12 MiB
    [ 0.000000] OF: reserved mem: initialized node r5f-memory@9db00000, compatible id shared-dma-pool
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Best regards,

    Numata

  • Hi Numata-san,

    thanks for the additional log file. I'll be out of the office tomorrow but will look into this as soon as I'm back (later this week). Stay tuned.

    Regards, Andreas