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.
Hi,
Actually, i already follow this link
3.1.1.7. OSPI/QSPI — Processor SDK AM64X Documentation
I flashed the ospi.env files and rest files with tftp except rootfs file.
The main thing is that we are still depended on SD-card for that rootfs. So, currently we don't want to depend upon SD-card because in some board SD-card is working in some boards it not.
currently use version = 08.06.00.42 version
We also found one link to build the rootfs file system.
Flash Linux to OSPI (ti.com)
Hear they mention these commands to run in host machine.
1. "mkfs.ubifs -r sdk-tiny-fs -o am6-sdk-tiny-fs.ubifs -m 16 -e 262016 -c 143 -v" 2. "ubinize -o am6-sdk-tiny-fs.ubi -m 16 -s 16 -p 256KiB ubinize.cfg -v"
But its clearly written to extract from tisdk-tiny-image-am64xx-evm.tar.xz file.
Reference: The tiny file system “sdk-tiny-fs” is first untarred from the file “tisdk-tiny-image-am64xx-evm.tar.xz” that is included in the AM64x Processor SDK Linux package.
So, my question is where we will get this tar.xz file?
Regards
Debashis
Hi Debashis,
The file "tisdk-tiny-image-am64xx-evm.tar.xz" is in the SDK "filesystem/" folder.
Hi Bin,
Thank you, we had downloaded the .bin of version 9.
Now we can make the ubi format file system and after making that we have done these steps.
Fullscreen123456789root@am64xx-evm:/boot# ubiformat /dev/mtd7 -f am6-sdk-tiny-fs.ubiTest the mtd7 (ospi.rootfs) by attaching to the partition:root@am64xx-evm:/boot# ubiattach -m 7root@am64xx-evm:/boot# ubinfo -aroot@am64xx-evm:/boot# mkdir /mnt/fs_testroot@am64xx-evm:/boot# mount -t ubifs ubi0 /mnt/fs_testroot@am64xx-evm:/boot# cd /mnt/fs_testroot@am64xx-evm:/boot# ls -lrtXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXroot@am64xx-evm:/boot# ubiformat /dev/mtd7 -f am6-sdk-tiny-fs.ubi Test the mtd7 (ospi.rootfs) by attaching to the partition: root@am64xx-evm:/boot# ubiattach -m 7 root@am64xx-evm:/boot# ubinfo -a root@am64xx-evm:/boot# mkdir /mnt/fs_test root@am64xx-evm:/boot# mount -t ubifs ubi0 /mnt/fs_test root@am64xx-evm:/boot# cd /mnt/fs_test root@am64xx-evm:/boot# ls -lrt
After that when we boot from spi(switch setting 00000000 00011011), it did not boot up.
Then we reverted to sd card and by clicking ESC button entered uboot and ran these commands to boot up from OSPI.
run args_all; setenv bootargs console=${console} ${optargs} root=ubi0:rootfs rw ubi.mtd=ospi.rootfs rootfstype=ubifs rootwait=1 sf probe; sf read ${loadaddr} 0x800000 0x1240200; sf read ${fdtaddr} 0x700000 0xcfe7; run run_kern
We are able to boot up successfully with OSPI only with this set of steps.
To confirm that the kernel in OSPI was booted up, we looked at the ethernet interfaces by running 'ifconfig'. It showed only one ethernet interface which confirmed that kernel from OSPI was booted.
We are still dependent on SD card for accessing uboot and then run the commands to run the kernel. Is there any other way to run these commands directly to boot up with OSPI. We know that some environment variables need to be changed in order to do this, but are unsure of where these environment variables are and what we need to change. If you can give us any resources to help with this, that will be great.
Thanks & Regards,
Debashis
Hi Debashis,
After that when we boot from spi(switch setting 00000000 00011011), it did not boot up.
Can you try the xSPI boot mode: 00000000 01110011?
Hi Bin,
The xSPI boot mode worked for us. Thank you.
We have flashed the SPI and everything is working. We have updated the rootfs file successfully in the ospi.rootfs partition and included the kernel image and dtb file in the /boot/ folder of the ospi.rootfs. Though now, we are stuck at trying to run the kernel from uboot. The environment is still configured to look for the SD card/MMC, and we are not able to get past the uboot stage during bootup. Can you please help us with the environment that we need to run to be able to run the kernel from the ospi.rootfs?
Thanks & Regards,
Desbashis
Hi Desbashis,
Glad you made progress. Thanks for the update.
I am routing your query to our U-Boot expert to comment on configuring U-Boot environment.
Can you please help us with the environment that we need to run to be able to run the kernel from the ospi.rootfs?
If you are booting from OSPI to U-Boot prompt and this part is working the boot flow should continue using OSPI but there may be dependencies on SDK version, etc.
Can you provide a print/dump of your current U-Boot environment (`env print`)?
Regards, Andreas
Hi Andreas,
=> env print addr_fit=0x90000000 arch=arm args_all=setenv optargs ${optargs} earlycon=ns16550a,mmio32,0x02800000 ${mtdparts} args_mmc=run finduuid;setenv bootargs console=${console} ${optargs} root=PARTUUID=${uuid} rw rootfstype=${mmcrootfstype} args_nand=setenv bootargs console=${console} ${optargs} ubi.mtd=${nbootpart} root=${nbootvolume} rootfstype=ubifs args_usb=run finduuid;setenv bootargs console=${console} ${optargs} root=PARTUUID=${uuid} rw rootfstype=${mmcrootfstype} autoload=no baudrate=115200 board=am64x board_name=am64x_skevm board_rev=A board_serial=0039 board_software_revision=01 boot=mmc boot_fdt=try boot_fit=0 bootcmd=run findfdt; run envboot; run init_${boot}; if test ${boot_fit} -eq 1; then run get_fit_${boot}; run get_overlaystring; run run_fit; else; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern; fi; bootdelay=2 bootdir=/boot bootenvfile=uEnv.txt bootm_size=0x10000000 bootpart=1:2 bootscript=echo Running bootscript from mmc${mmcdev} ...; source ${loadaddr} console=ttyS2,115200n8 cpu=armv8 dfu_alt_info_emmc=rawemmc raw 0 0x800000 mmcpart 1;rootfs part 0 1 mmcpart 0;tiboot3.bin.raw raw 0x0 0x800 mmcpart 1;tispl.bin.raw raw 0x800 0x1000 mmcpart 1;u-boot.img.raw raw 0x1800 0x2000 mmcpart 1;u-env.raw raw 0x3800 0x100 mmcpart 1 dfu_alt_info_mmc=boot part 1 1;rootfs part 1 2;tiboot3.bin fat 1 1;tispl.bin fat 1 1;u-boot.img fat 1 1;uEnv.txt fat 1 1;sysfw.itb fat 1 1 dfu_alt_info_ospi=tiboot3.bin raw 0x0 0x100000;tispl.bin raw 0x100000 0x200000;u-boot.img raw 0x300000 0x400000;u-boot-env raw 0x700000 0x020000;rootfs raw 0x800000 0x3800000 dfu_alt_info_ram=tispl.bin ram 0x80080000 0x200000;u-boot.img ram 0x81000000 0x400000 dnsip=49.45.0.4 dtboaddr=0x89000000 env_test=env_ospiboot envboot=mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadbootscript; then run bootscript;else if run loadbootenv; then echo Loaded env from ${bootenvfile};run importbootenv;fi;if test -n $uenvcmd; then echo Running uenvcmd ...;run uenvcmd;fi;fi;fi; eth1addr=70:ff:76:1e:bc:91 ethact=ethernet@8000000port@1 ethaddr=34:08:e1:80:a9:22 fdt_addr_r=0x88000000 fdtaddr=0x88000000 fdtcontroladdr=fdeb7e80 fdtoverlay_addr_r=0x80200000 fileaddr=82000000 filesize=20000 findfdt=if test $board_name = am64x_gpevm; then setenv fdtfile k3-am642-evm.dtb; fi; if test $board_name = am64x_skevm; then setenv fdtfile k3-am642-sk.dtb; fi;if test $fdtfile = undefined; then echo WARNING: Could not determine device tree to use; fi; finduuid=part uuid ${boot} ${bootpart} uuid gatewayip=192.168.2.1 get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile} get_fdt_nand=ubifsload ${fdtaddr} ${bootdir}/${fdtfile}; get_fdt_usb=load usb ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile} get_fit_mmc=load mmc ${bootpart} ${addr_fit} ${bootdir}/${name_fit} get_fit_nand=ubifsload ${addr_fit} ${bootdir}/${name_fit} get_fit_usb=load usb ${bootpart} ${addr_fit} ${bootdir}/${name_fit} get_kern_mmc=load mmc ${bootpart} ${loadaddr} ${bootdir}/${name_kern} get_kern_nand=ubifsload ${loadaddr} ${bootdir}/${name_kern} get_kern_usb=load usb ${bootpart} ${loadaddr} ${bootdir}/${name_kern} get_overlay_mmc=fdt address ${fdtaddr};fdt resize 0x100000;for overlay in $name_overlays;do;load mmc ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && fdt apply ${dtboaddr};done; get_overlay_nand=fdt address ${fdtaddr};fdt resize 0x100000;for overlay in $name_overlays;do;ubifsload ${dtboaddr} ${bootdir}/${overlay} && fdt apply ${dtboaddr};done; get_overlay_usb=fdt address ${fdtaddr};fdt resize 0x100000;for overlay in $name_overlays;do;load usb ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && fdt apply ${dtboaddr};done; get_overlaystring=for overlay in $name_overlays;do;setenv overlaystring ${overlaystring}'#'${overlay};done; importbootenv=echo Importing environment from mmc${mmcdev} ...; env import -t ${loadaddr} ${filesize} init_mmc=run args_all args_mmc init_nand=run args_all args_nand ubi_init init_usb=run args_all args_usb ipaddr=192.168.2.64 kernel_addr_r=0x82000000 loadaddr=0x82000000 loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile} loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile} loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile} mmcboot=mmc dev ${mmcdev}; devnum=${mmcdev}; devtype=mmc; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadimage; then run args_mmc; if test ${boot_fit} -eq 1; then run run_fit; else run mmcloados;fi;fi;fi; mmcdev=1 mmcloados=if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootz ${loadaddr} - ${fdtaddr}; else if test ${boot_fdt} = try; then bootz; else echo WARN: Cannot load the DT; fi; fi; else bootz; fi; mmcrootfstype=ext4 rootwait mtdids=nor0=fc40000.spi.0,nand0=omap2-nand.0 mtdparts=mtdparts=fc40000.spi.0:1m(ospi.tiboot3),2m(ospi.tispl),4m(ospi.u-boot),256k(ospi.env),256k(ospi.env.backup),57088k@8m(ospi.rootfs),256k(ospi.phypattern);omap2-nand.0:2m(NAND.tiboot3),2m(NAND.tispl),2m(NAND.tiboot3.backup),4m(NAND.u-boot),256k(NAND.u-boot-env),256k(NAND.u-boot-env.backup),-(NAND.file-system) name_fit=fitImage name_kern=Image nbootpart=NAND.file-system nbootvolume=ubi0:rootfs netmask=255.255.255.0 partitions=name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs} pxefile_addr_r=0x80100000 ramdisk_addr_r=0x88080000 rd_spec=- rdaddr=0x88080000 run_fit=bootm ${addr_fit}#${fdtfile}${overlaystring} run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr} scriptaddr=0x80000000 serial#=0000000000000039 serverip=192.168.2.123 soc=k3 stderr=serial@2800000 stdin=serial@2800000 stdout=serial@2800000 ubi_init=ubi part ${nbootpart}; ubifsmount ${nbootvolume}; update_to_fit=setenv loadaddr ${addr_fit}; setenv bootfile ${name_fit} usbboot=setenv boot usb;setenv bootpart 0:2;usb start;run findfdt;run init_usb;run get_kern_usb;run get_fdt_usb;run run_kern vendor=ti Environment size: 5915/131068 bytes
Thanks for posting your environment. You are saying you are using SDK v8.6, which should define some OSPI-related ENV variables as defined through EXTRA_ENV_AM625_BOARD_SETTINGS_OSPI_NAND here https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/include/configs/am62x_evm.h?h=ti-u-boot-2021.01#n196
#define EXTRA_ENV_AM625_BOARD_SETTINGS_OSPI_NAND \ "nbootpart=ospi.rootfs\0" \ "nbootvolume=ubi0:rootfs\0" \ "bootdir=/boot\0" \ "rd_spec=-\0" \ "ubi_init=ubi part ${nbootpart}; ubifsmount ${nbootvolume};\0" \ "args_ospi_nand=setenv bootargs console=${console} " \ "${optargs} ubi.mtd=${nbootpart} " \ "root=${nbootvolume} rootfstype=ubifs\0" \ "init_ospi_nand=run args_all args_ospi_nand ubi_init\0" \ "get_fdt_ospi_nand=ubifsload ${fdtaddr} ${bootdir}/${fdtfile};\0" \ "get_overlay_ospi_nand=" \ "fdt address ${fdtaddr};" \ "fdt resize 0x100000;" \ "for overlay in $name_overlays;" \ "do;" \ "ubifsload ${dtboaddr} ${bootdir}/${overlay} && " \ "fdt apply ${dtboaddr};" \ "done;\0" \ "get_kern_ospi_nand=ubifsload ${loadaddr} ${bootdir}/${name_kern}\0" \ "get_fit_ospi_nand=ubifsload ${addr_fit} ${bootdir}/${name_fit}\0"
So I'm not sure why those don't show in your environment (perhaps they didn't get included during your board port, assuming you are not running on a vanilla SK-AM62B board) but you should be able to model after this, and add this to your environment. If you do run on the standard SK-AM62B board perhaps your U-Boot environment needs a "hard reset" as follows:
=> env default -f -a => env save => reset
After you have the correct environment you'd need to set the boot environmental variable to ospi_nand for those settings to be used during the execution of the bootcmd env variable.
Regards, Andreas
Hi Andreas,
We are using SK-AM64B board not SK-AM62B as you mention above.
So, currently we can able to boot the board from XSPI with out SD-card. And regarding the rootfs file system we are using the tisdk-tiny.tar which is inside the <SDK_path>/filesystem(But this tiny system is not suitable for our application).
we follow this link
https://dev.ti.com/tirex/explore/node?node=A__AJ18sLHn3k.q.KnopPVnKw__linux_academy_am64x__7qm9DIS__LATEST&search=am64
But we didn't change the first 5 address or file size(in the sense tiboot3.bin to env.backup) at that time we can able to boot up successfully . But after that we have to run this commands(the highlighted address we are changing as per the kernel and dtb address)
run args_all; setenv bootargs console=${console} ${optargs} root=ubi0:rootfs rw ubi.mtd=ospi.rootfs rootfstype=ubifs rootwait=1
sf probe; sf read ${loadaddr} 0x800000 0x1240200; sf read ${fdtaddr} 0x700000 0xcfe7; run run_kern
when we change the address or file size(first 5 address or file size) by using mtdpart command we are not able to go to U-boot itself.
After that we follow this link to build the u-boot env
https://dev.ti.com/tirex/explore/node?node=A__AE9QJS6sYz1lbERsguPCIg__linux_academy_am64x__7qm9DIS__LATEST&search=am64
Can you guide me regarding that config file(am64x_evm_a53_defconfig). what are thing I have to mark yes/No.
Fullscreen123456789101112131415161718192021svaya@svaya-desktop:~/Videos/safety_osv8.06/board-support/u-boot-2021.01+gitAUTOINC+2ee8efd654-g2ee8efd654$ cat configs/am64x_evm_a53_defconfig | grep SDCONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=yCONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1800CONFIG_MMC_SDHCI=yCONFIG_MMC_SDHCI_ADMA=yCONFIG_SPL_MMC_SDHCI_ADMA=yCONFIG_MMC_SDHCI_AM654=ysvaya@svaya-desktop:~/Videos/safety_osv8.06/board-support/u-boot-2021.01+gitAUTOINC+2ee8efd654-g2ee8efd654$ cat configs/am64x_evm_a53_defconfig | grep SPICONFIG_SYS_SPI_U_BOOT_OFFS=0x300000CONFIG_SPL_DM_SPI=yCONFIG_SPL_SPI_FLASH_SUPPORT=yCONFIG_SPL_SPI_SUPPORT=yCONFIG_SPL_DM_SPI_FLASH=y# CONFIG_SPL_SPI_FLASH_TINY is not setCONFIG_SPL_SPI_FLASH_SFDP_SUPPORT=yCONFIG_SPL_SPI_LOAD=y# CONFIG_CMD_SPI is not setCONFIG_DM_SPI_FLASH=yXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXsvaya@svaya-desktop:~/Videos/safety_osv8.06/board-support/u-boot-2021.01+gitAUTOINC+2ee8efd654-g2ee8efd654$ cat configs/am64x_evm_a53_defconfig | grep SD CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1800 CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_ADMA=y CONFIG_SPL_MMC_SDHCI_ADMA=y CONFIG_MMC_SDHCI_AM654=y svaya@svaya-desktop:~/Videos/safety_osv8.06/board-support/u-boot-2021.01+gitAUTOINC+2ee8efd654-g2ee8efd654$ cat configs/am64x_evm_a53_defconfig | grep SPI CONFIG_SYS_SPI_U_BOOT_OFFS=0x300000 CONFIG_SPL_DM_SPI=y CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI_SUPPORT=y CONFIG_SPL_DM_SPI_FLASH=y # CONFIG_SPL_SPI_FLASH_TINY is not set CONFIG_SPL_SPI_FLASH_SFDP_SUPPORT=y CONFIG_SPL_SPI_LOAD=y # CONFIG_CMD_SPI is not set CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH_SFDP_SUPPORT=y CONFIG_SPI_FLASH_SOFT_RESET=y CONFIG_SPI_FLASH_SOFT_RESET_ON_BOOT=y CONFIG_SPI_FLASH_SPANSION=y CONFIG_SPI_FLASH_S28HS512T=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_SPI_FLASH_MT35XU=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set CONFIG_SPI_FLASH_MTD=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_CADENCE_QSPI=y CONFIG_CADENCE_QSPI_PHY=y
And similarly can you tell me what are the changes to be done in emmc(16Gb) side because we have ordered TMDS64EVM
and we want every thing to flash in emmc including rootfs (tisdk-default-image-am64xx-evm.tar.xz as you already know that
SD-card is not reliable) .
when we change the address or file size(first 5 address or file size) by using mtdpart command we are not able to go to U-boot itself.
If you move U-Boot artifacts (U-Boot A53 SPL, U-Boot A53) around in the OSPI memory, you'd need to update the respective CONFIG_SYS_SPI_U_BOOT_OFFS definition in am64x_evm_r5_defconfig to reflect the location of tispl.bin, and the CONFIG_SYS_SPI_U_BOOT_OFFS definition in am64x_evm_a53_defconfig to reflect the location of u-boot.img to make sure the boot flow works. 'mtdparts' is not used for booting U-Boot itself.
Can you guide me regarding that config file(am64x_evm_a53_defconfig). what are thing I have to mark yes/No.
Don't modify those config files manually; you should always use the Kconfig tool (via `make ... menuconfig`) to update the configurations to make sure all dependencies are being considered.
And similarly can you tell me what are the changes to be done in emmc(16Gb) side because we have ordered TMDS64EVM
Once you get the EVM, you should start out using the SDK default defconfig files. They will not need any customization to enable eMMC boot.
As for programming U-Boot into the eMMC boot sector, and the rootfs, please see here: https://dev.ti.com/tirex/explore/node?node=A__AJ0x6npKrLsG5-CgSKYlcw__linux_academy_am64x__7qm9DIS__LATEST
Regards, Andreas
Hi Andreas,
Thank you for your help!
We are able to set up the EVM with emmc boot option and it works without SD card. Though we have to always change the boot environment variables:
setenv mmcdev 0 setenv bootpart 0 boot
and then it successfully boots from emmc. How can we boot from emmc standalone?
We are able to set up the EVM with emmc boot option and it works without SD card.
Great!!
How can we boot from emmc standalone?
One easy way to do it is by updating EXTRA_ENV_AM642_BOARD_SETTINGS_MMC according to your boot device/partition needs, see https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/include/configs/am64x_evm.h?h=ti-u-boot-2021.01#n122
If you don't want to edit/change any U-Boot source files you could also customize CONFIG_BOOTCOMMAND for A53 U-Boot (via Kconfig).
Regards, Andreas