Prework //Create partition in UDA root@am62xx-evm:~# fdisk /dev/mmcblk0 Welcome to fdisk (util-linux 2.37.4). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): n Partition number (1-128, default 1):  First sector (34-31080414, default 2048):  Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-31080414, default 31080414): Created a new partition 1 of type 'Linux filesystem' and of size 14.8 GiB. Partition #1 contains a vfat signature. Do you want to remove the signature? [Y]es/[N]o: y The signature will be removed by a write command. Command (m for help): w The partition table has been altered. Calling ioctl() to re-read partition table. [ 1323.173517] mmcblk0: p1 Syncing disks. root@am62xx-evm:~# sudo mkfs -t ext4 /dev/mmcblk0p1 mke2fs 1.46.5 (30-Dec-2021) Discarding device blocks: done Creating filesystem with 3884795 4k blocks and 972944 inodes Filesystem UUID: 48f071ad-ff8b-47b2-86d8-60529ca74775 Superblock backups stored on blocks:     32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208 Allocating group tables: done Writing inode tables: done Creating journal (16384 blocks): done Writing superblocks and filesystem accounting information: done root@am62xx-evm:~# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS mtdblock0 31:0 0 512K 0 disk  mtdblock1 31:1 0 2M 0 disk  mtdblock2 31:2 0 4M 0 disk  mtdblock3 31:3 0 256K 0 disk  mtdblock4 31:4 0 256K 0 disk  mtdblock5 31:5 0 55.8M 0 disk  mtdblock6 31:6 0 256K 0 disk  mmcblk0 179:0 0 14.8G 0 disk  `-mmcblk0p1 179:1 0 14.8G 0 part  mmcblk0boot0 179:32 0 31.5M 1 disk  mmcblk0boot1 179:64 0 31.5M 1 disk  mmcblk1 179:96 0 58.2G 0 disk  |-mmcblk1p1 179:97 0 128M 0 part /media/mmcblk1p1 | /run/media/boot-mmcblk1p1 `-mmcblk1p2 179:98 0 58.1G 0 part / root@am62xx-evm:~#  //SD card boot to verify partition in eMMC 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 Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted U-Boot 2023.04-g24098ea90d (Jul 06 2023 - 12:59:40 +0000) SoC: AM62X SR1.0 GP Model: Texas Instruments AM625 SK EEPROM not available at 80, trying to read at 81 Board: AM62-SKEVM rev E3 DRAM: 2 GiB Core: 71 devices, 31 uclasses, devicetree: separate MMC: mmc@fa10000: 0, mmc@fa00000: 1 Loading Environment from nowhere... OK In: serial Out: serial Err: serial Net: eth0: ethernet@8000000port@1 Hit any key to stop autoboot: 0  =>  => mmc dev 0 switch to partitions #0, OK mmc0(part 0) is current device => mmc info Device: mmc@fa10000 Manufacturer ID: 13 OEM: 4e Name: S0J56X  Bus Speed: 200000000 Mode: HS200 (200MHz) Rd Block Len: 512 MMC version 5.1 High Capacity: Yes Capacity: 14.8 GiB Bus Width: 8-bit Erase Group Size: 512 KiB HC WP Group Size: 8 MiB User Capacity: 14.8 GiB WRREL Boot Capacity: 31.5 MiB ENH RPMB Capacity: 4 MiB ENH Boot area 0 is not write protected Boot area 1 is not write protected => mmc list mmc@fa10000: 0 (eMMC) mmc@fa00000: 1 => mmc part Partition Map for MMC device 0 -- Partition Type: EFI Part    Start LBA    End LBA        Name    Attributes    Type GUID    Partition GUID 1    0x00000800    0x01da3fde    ""    attrs:    0x0000000000000000    type:    0fc63daf-8483-4772-8e79-3d69d8477de4    guid:    711ec7cd-3b32-2b4b-84f6-f8a410f33111 =>  // Create tisdk-base.ext4 /filesystem$ dd if=/dev/null of=tisdk-base.ext4 bs=1M seek=400 0+0 records in 0+0 records out 0 bytes copied, 0.00024402 s, 0.0 kB/s /filesystem$ mkfs.ext4 -F tisdk-base.ext4 mke2fs 1.46.5 (30-Dec-2021) Discarding device blocks: done Creating filesystem with 102400 4k blocks and 102400 inodes Filesystem UUID: b4fc5618-e027-4eb1-aa02-38cba1366a54 Superblock backups stored on blocks:     32768, 98304 Allocating group tables: done Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done /filesystem$ mkdir mnt_fs /filesystem$ sudo mount -t ext4 tisdk-base.ext4 mnt_fs /filesystem$ cd mnt_fs /filesystem/mnt_fs$ sudo tar xvf ../tisdk-base-image-am62xx-evm.tar.xz ……. ./var/lib/opkg/info/util-linux-fdisk.control ./var/lib/opkg/info/util-linux-fdisk.list ./var/lib/opkg/info/util-linux-fdisk.postinst ./var/lib/opkg/info/util-linux-fdisk.prerm ./var/lib/opkg/info/util-linux-fsck.control ./var/lib/opkg/info/util-linux-fsck.list ./var/lib/opkg/info/util-linux-fsck.postinst ./var/lib/opkg/info/util-linux-fsck.prerm ./var/lib/opkg/info/util-linux-mkfs.control ./var/lib/opkg/info/util-linux-mkfs.list ./var/lib/opkg/info/util-linux-mount.control ./var/lib/opkg/info/util-linux-mount.list ./var/lib/opkg/info/util-linux-mount.postinst ./var/lib/opkg/info/util-linux-mount.prerm ./var/lib/opkg/info/util-linux-sfdisk.control ./var/lib/opkg/info/util-linux-sfdisk.list ./var/lib/opkg/info/util-linux-sulogin.control ./var/lib/opkg/info/util-linux-sulogin.list ./var/lib/opkg/info/util-linux-sulogin.postinst ./var/lib/opkg/info/util-linux-sulogin.prerm ./var/lib/opkg/info/util-linux-umount.control ./var/lib/opkg/info/util-linux-umount.list ./var/lib/opkg/info/util-linux-umount.postinst ./var/lib/opkg/info/util-linux-umount.prerm ./var/lib/opkg/info/volatile-binds.control ./var/lib/opkg/info/volatile-binds.list ./var/lib/opkg/info/volatile-binds.postinst ./var/lib/opkg/info/volatile-binds.prerm ./var/lib/opkg/status ./var/lib/systemd/ ./var/local/ ./var/lock ./var/log ./var/run ./var/spool/ ./var/spool/mail/ ./var/tmp ./var/volatile/ /filesystem/mnt_fs$ cd ../ /filesystem$ sudo umount mnt_fs // Boot with USB-DFU, use am62x_evm_r5_usbdfu_defconfig U-Boot SPL 2021.01 (Jul 25 2023 - 15:17:20 -0500) SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar') SPL initial stack usage: 13424 bytes Trying to boot from DFU ##############################################DOWNLOAD ... OK Ctrl+C to exit ... 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 Loading Environment from MMC... MMC Device 0 not found *** Warning - No MMC card found, using default environment init_env from device 10 not supported! Starting ATF on ARM64 core... NOTICE: BL31: v2.7(release):v2.7.0-359-g1309c6c80 NOTICE: BL31: Built : 15:17:25, Jul 25 2023 I/TC:  I/TC: OP-TEE version: 3.19.0-15-gd6c5d0037 (gcc version 9.2.1 20191025 (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10))) #1 Tue Jul 25 20:17:30 UTC 2023 aarch64 I/TC: WARNING: This OP-TEE configuration might be insecure! I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html I/TC: Primary CPU initializing I/TC: SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar') I/TC: HUK Initialized I/TC: Activated SA2UL device I/TC: Fixing SA2UL firewall owner for GP device I/TC: Enabled firewalls for SA2UL TRNG device I/TC: SA2UL TRNG initialized I/TC: SA2UL Drivers initialized I/TC: Primary CPU switching to normal world boot U-Boot SPL 2021.01 (Jul 25 2023 - 15:17:35 -0500) SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar') Trying to boot from DFU ####DOWNLOAD ... OK Ctrl+C to exit ... U-Boot 2021.01 (Jul 25 2023 - 15:17:35 -0500) SoC: AM62X SR1.0 GP Model: Texas Instruments AM625 SK EEPROM not available at 0x50, trying to read at 0x51 Board: AM62-SKEVM rev E3 DRAM: 2 GiB MMC: mmc@fa10000: 0, mmc@fa00000: 1, mmc@fa20000: 2 Loading Environment from MMC... OK In: serial@2800000 Out: serial@2800000 Err: serial@2800000 Net: eth0: ethernet@8000000port@1 Hit any key to stop autoboot: 0  =>  =>  =>  => setenv dfu_alt_info ${dfu_alt_info_emmc} => dfu 0 mmc 0 //Flash to eMMC after USB-DFU boot: // First prepare eMMC binaries, apply patch: diff --git a/arch/arm/mach-k3/am625_init.c b/arch/arm/mach-k3/am625_init.c index 03572cf84e..533d6f0f58 100644 --- a/arch/arm/mach-k3/am625_init.c +++ b/arch/arm/mach-k3/am625_init.c @@ -25,6 +25,9 @@ #define K3RTC_KICK0_UNLOCK_VALUE 0x83e70b13 #define K3RTC_KICK1_UNLOCK_VALUE 0x95a4f1e0 +/*eMMC boot mode fix*/ +#define EMMC_BOOT 9 + #if defined(CONFIG_SPL_BUILD) /* @@ -245,6 +248,10 @@ u32 spl_mmc_boot_mode(const u32 boot_device) switch (boot_device) { case BOOT_DEVICE_MMC1: + if (((devstat & MAIN_DEVSTAT_PRIMARY_BOOTMODE_MASK) >> + MAIN_DEVSTAT_PRIMARY_BOOTMODE_SHIFT) == EMMC_BOOT) + return MMCSD_MODE_EMMCBOOT; + if ((bootmode_cfg & MAIN_DEVSTAT_PRIMARY_MMC_FS_RAW_MASK) >> MAIN_DEVSTAT_PRIMARY_MMC_FS_RAW_SHIFT) return MMCSD_MODE_EMMCBOOT; diff --git a/configs/am62x_evm_a53_defconfig b/configs/am62x_evm_a53_defconfig index c32826f1db..413f884179 100644 --- a/configs/am62x_evm_a53_defconfig +++ b/configs/am62x_evm_a53_defconfig @@ -81,7 +81,7 @@ CONFIG_MULTI_DTB_FIT=y CONFIG_SPL_MULTI_DTB_FIT=y CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y CONFIG_ENV_IS_IN_MMC=y -CONFIG_SYS_MMC_ENV_PART=1 +CONFIG_SYS_MMC_ENV_PART=2 CONFIG_NET_RANDOM_ETHADDR=y CONFIG_DM=y CONFIG_SPL_DM=y /filesystem$ sudo dfu-util -a tiboot3.bin.raw-D tiboot3-emmc.bin /filesystem$ sudo dfu-util -a tispl.bin.raw -D tispl-emmc.bin /filesystem$ sudo dfu-util -a u-boot.img.raw -D u-boot-emmc.img /filesystem$ sudo dfu-util -a rootfs -D tisdk-base.ext4 dfu-util 0.9 Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. Copyright 2010-2016 Tormod Volden and Stefan Schmidt This program is Free Software and has ABSOLUTELY NO WARRANTY Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ dfu-util: Invalid DFU suffix signature dfu-util: A valid DFU suffix will be required in a future dfu-util release!!! Opening DFU capable USB device... ID 0451:6165 Run-time device DFU version 0110 Claiming USB DFU Interface... Setting Alternate Setting #1 ... Determining device status: state = dfuIDLE, status = 0 dfuIDLE, continuing DFU mode device DFU version 0110 Device returned transfer size 4096 Copying data from PC to DFU device Download    [=========================] 100% 419430400 bytes Download done. state(7) = dfuMANIFEST, status(0) = No error condition is present state(2) = dfuIDLE, status(0) = No error condition is present Done! /filesystem$ // Serial console when flashing to eMMC ##DOWNLOAD ... OK Ctrl+C to exit ... ####DOWNLOAD ... OK Ctrl+C to exit ... ####DOWNLOAD ... OK Ctrl+C to exit ... ################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################DOWNLOAD ... OK Ctrl+C to exit ... => => mmc partconf 0 1 1 1 => mmc bootbus 0 2 0 0 =>  // eMMC boot SW2:00000000 SW1:11010010 U-Boot SPL 2021.01-00001-g06ddf42cf9 (Jul 25 2023 - 15:35:09 -0500) SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar') SPL initial stack usage: 13424 bytes Trying to boot from MMC1 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 Loading Environment from MMC... OK init_env from device 9 not supported! Starting ATF on ARM64 core... NOTICE: BL31: v2.7(release):v2.7.0-359-g1309c6c80 NOTICE: BL31: Built : 15:35:13, Jul 25 2023 I/TC:  I/TC: OP-TEE version: 3.19.0-15-gd6c5d0037 (gcc version 9.2.1 20191025 (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10))) #1 Tue Jul 25 20:35:18 UTC 2023 aarch64 I/TC: WARNING: This OP-TEE configuration might be insecure! I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html I/TC: Primary CPU initializing I/TC: SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar') I/TC: HUK Initialized I/TC: Activated SA2UL device I/TC: Fixing SA2UL firewall owner for GP device I/TC: Enabled firewalls for SA2UL TRNG device I/TC: SA2UL TRNG initialized I/TC: SA2UL Drivers initialized I/TC: Primary CPU switching to normal world boot U-Boot SPL 2021.01-00001-g06ddf42cf9 (Jul 25 2023 - 15:35:24 -0500) SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar') Trying to boot from MMC1 U-Boot 2021.01-00001-g06ddf42cf9 (Jul 25 2023 - 15:35:24 -0500) SoC: AM62X SR1.0 GP Model: Texas Instruments AM625 SK EEPROM not available at 0x50, trying to read at 0x51 Board: AM62-SKEVM rev E3 DRAM: 2 GiB MMC: mmc@fa10000: 0, mmc@fa00000: 1, mmc@fa20000: 2 Loading Environment from MMC... OK In: serial@2800000 Out: serial@2800000 Err: serial@2800000 Net: eth0: ethernet@8000000port@1 Hit any key to stop autoboot: 0 => setenv mmcdev 0 => setenv bootpart 0 => boot switch to partitions #0, OK mmc0(part 0) is current device SD/MMC found on device 0 Failed to load 'boot.scr' ** Unrecognized filesystem type ** 18608640 bytes read in 105 ms (169 MiB/s) 55468 bytes read in 3 ms (17.6 MiB/s) ## Flattened Device Tree blob at 88000000 Booting using the fdt blob at 0x88000000 Loading Device Tree to 000000008feef000, end 000000008fffffff ... OK Starting kernel ... [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034] [ 0.000000] Linux version 5.10.153-g3eee621d16 (oe-user@oe-host) (aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 9.2.1 20191025, GNU ld (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 2.33.1.20191209) #1 SMP PREEMPT Wed Dec 14 11:54:42 UTC 2022 [ 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 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 ……. Starting Load/Save RF Kill Switch Status... [ OK ] Started Load/Save RF Kill Switch Status. [ 12.385864] wl18xx_driver wl18xx.2.auto: Direct firmware load for ti-connectivity/wl18xx-fw-4.bin failed with error -2 [ 12.396580] wlcore: ERROR could not get firmware ti-connectivity/wl18xx-fw-4.bin: -2 [ 12.749829] wl18xx_driver wl18xx.2.auto: Direct firmware load for ti-connectivity/wl18xx-fw-4.bin failed with error -2 [ 12.760534] wlcore: ERROR could not get firmware ti-connectivity/wl18xx-fw-4.bin: -2 [ 13.113800] wl18xx_driver wl18xx.2.auto: Direct firmware load for ti-connectivity/wl18xx-fw-4.bin failed with error -2 [ 13.124503] wlcore: ERROR could not get firmware ti-connectivity/wl18xx-fw-4.bin: -2 [ 13.132337] wlcore: ERROR firmware boot failed despite 3 retries _____ _____ _ _ | _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_  | | _| .'| . | . | | __| _| . | | | -_| _| _| |__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_| |___| |___| Arago Project am62xx-evm ttyS2 Arago 2021.09 am62xx-evm ttyS2 am62xx-evm login:  // Commit for 08.05 is 3eee621d164a02048ba26ca1342cba9c8d913d46 correct commit 3eee621d164a02048ba26ca1342cba9c8d913d46 (tag: cicd.2022.12.07.19.06.00, tag: cicd.2022.12.05.19.06.00, tag: cicd.2022.12.02.19.06.02, tag: cicd.2022.12.02.14.23.50, tag: 08.05.00.007) Merge: cb478b809c 39b1da46cb Author: LCPD Auto Merger Date: Fri Dec 2 10:30:46 2022 -0600 Merged TI feature connectivity into ti-linux-5.10.y-cicd TI-Feature: connectivity TI-Branch: connectivity-ti-linux-5.10.y * 'connectivity-ti-linux-5.10.y' of ssh://bitbucket.itg.ti.com/lcpdpublicdom/connectivity: usb: typec: tps6598x: Cancel delayed work instead of flushing Signed-off-by: LCPD Auto Merger