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.
I have a different eMMC part on m custom board and the boot0 partition for that is 4MB instead of 8MB on the TDA4 EVM.
I want to boot Linux from the boot partition on this eMMC part. My boot binaries can fit well within 4MB. Can you help me patch the u-boot to get the boot binaries from the modified offsets?
Intention will be to flash the boot0 partition with R5 SPL, A72 SPL, A72 u-boot and sysfw.itb and then flash the user partition with a tiny file system.
We use tiny fs right now as the full file system will take a lot of time to flash using JTAG.
Follow the below steps to acheive the above. Note that some commands need to run on TARGET (u-boot prompt) and some on HOST PC.
Physical connections needed:
Softwares required:
Each sector is 512B
boot0 partition (4 MB) user partition 0x0+----------------------------------+ 0x0+-------------------------+ | tiboot3.bin (384 KB) | | | 0x300+----------------------------------+ | | | tispl.bin (768 KB) | | | 0x900+----------------------------------+ | rootfs | | u-boot.img (2 MB) | | | 0x1900+----------------------------------+ | | | sysfw.itb (768 KB) | | | 0x1F00+----------------------------------+ +-------------------------+
The u-boot needs to be patched to change the offsets for the eMMC. Reason being that the eMMC part on the EVM has 8MB boot0 partition
Modify the offsets according to the layout above.
Apply the patch 0001-Change-the-offsets-for-eMMC-8MB-boot0-partition-to-4.patch
cd <PATH_TO_UBOOT_DIR>
git am 0001-Change-the-offsets-for-eMMC-8MB-boot0-partition-to-4.patch
make mrproper
Rebuild the u-boot and SPL
# use the top level makefile to build u-boot and SPL
cd <PATH_TO_SDK>
make u-boot-a53_clean -sj
make u-boot-a53
make u-boot-r5_clean -sj
make u-boot-r5
Path to binaries
ls -la <PATH_TO_SDK>/board-support/u-boot_build/r5/tiboot3.bin
ls -la <PATH_TO_SDK>/board-support/u-boot_build/a53/tispl.bin
ls -la <PATH_TO_SDK>/board-support/u-boot_build/a53/u-boot.img
ls -la <PATH_TO_SDK>/board-support/prebuilt-images/sysfw.itb
# Now copy these 4 binaries to <FULL_PATH_TO_BINS>
Refer http://downloads.ti.com/jacinto7/esd/processor-sdk-rtos-jacinto7/latest/exports/docs/pdk_jacinto_07_00_00/docs/userguide/board/uniflash.html#getting-started-with-uniflash for more details.
UNIFLASH Commands to flash to eMMC boot0 partition (restricted to 4MB):
UNIFLASH uses actual byte offsets rather than sector offsets.
Below commands run on the HOST
dslite.bat --mode processors -c COM7 -f C:\ti\uniflash_5.3.1\processors\FlashWriter\j721e_evm\uart_j721e_evm_flash_programmer_release.tiimage -i 0
dslite.bat --mode processors -c COM7 -f <FULL_PATH_TO_BINS>\tiboot3.bin -d 4 -o 0
dslite.bat --mode processors -c COM7 -f <FULL_PATH_TO_BINS>\tispl.bin -d 4 -o 60000
dslite.bat --mode processors -c COM7 -f <FULL_PATH_TO_BINS>\u-boot.img -d 4 -o 120000
dslite.bat --mode processors -c COM7 -f <FULL_PATH_TO_BINS>\sysfw.itb -d 4 -o 320000
Halt at u-boot prompt and run the below commands on the TARGET
setenv mmcdev 0
setenv bootpart 0
saveenv
gpt write mmc 0 ${partitions}
mmc partconf 0 1 1 1
mmc bootbus 0 2 0 0
Step a is optional, if you use the attached tisdk-tiny-image.tar.xz then you can stip step a
git clone git://arago-project.org/git/projects/oe-layersetup.git tisdk
cd tisdk/
# Copy config file from the 7.00 installer yocto-build/configs/psdkla/psdkla-07_00_00.txt
./oe-layertool-setup.sh -f psdkla-07_00_00.txt
# export proxy
export ftp_proxy=<a href="webproxy.ext.ti.com:80">http:/.../a>
export http_proxy=<a href="webproxy.ext.ti.com:80">http:/.../a>
export https_proxy=<a href="webproxy.ext.ti.com:80">http:/.../a>
cd build
# Edit config file if you want to reuse downloads folder
vi conf/local.conf
. conf/setenv
# this is the path to the toolchains for ARMv7 and ARMv8
TOOLCHAIN_BASE=/sdk/tools MACHINE=j7-evm bitbake -k tisdk-tiny-image
# build image can be found here
la -la tisdk/build/arago-tmp-external-arm-glibc/deploy/images/j7-evm/tisdk-tiny-image-j7-evm.tar.xz
Below steps need to be run on HOST machine to create the tisdk-tiny-image.img
# Create an empty image file, seek value will create an image of that size. Typically 100MB should be enough.
# Size will should be slightly greater than size of untarred tisdk-tiny-image-j7-evm.tar.xz + size (DTBs + Kernel image)
dd if=/dev/null of= bs=1M seek=100
# Add a filesystem to it
mkfs.ext4 -F tisdk-tiny-image.img
# Mount it on your local machine to copy DTB and Kernel image
mkdir example_mnt_pt
sudo mount -t ext4 -o loop tisdk-tiny-image.img /home/karan/yocto-build/example_mnt_pt
# Untar tisdk-tiny-image-j7-evm.tar.xz on the mounted file system which is currently empty
cd example_mnt_pt
sudo tar xvf ../tisdk-tiny-image-j7-evm.tar.xz
# Copy DTB, DTBOs and Kernel Image for your platform
sudo cp /media/karan/rootfs/boot/Image* example_mnt_pt/boot
sudo cp /media/karan/rootfs/boot/*dtb* example_mnt_pt/boot
sync
# Unmount the image, now the tisdk-tiny-image.img is ready
cd ../
sudo umount /home/karan/yocto-build/example_mnt_pt
# Now you have the tisdk-tiny-image.img ready to be flashed.
Do NOT power cycle throught this step
Halt at u-boot
Connect CCS using the XDS110/XDS560v2 and using the appropriate target ccxml (without GELs).
Load the tisdk-tiny-image.img to the DDR address 0x80080000
View -> Memory Browser -> Load Memory
File Type
as Binary
, click Next
Start Address
as 0x80080000, click Finish
.
Depending on the JTAG used the time taken to load this will vary. Expect 1Hr with XDS110 and 20mins with XDS560v2.
Now the image in loaded on the RAM, flash it using u-boot
Code runs at u-boot prompt on the TARGET
part start mmc 0 rootfs
# what ever the above command outputs, use that below (eg - 0x22)
mmc write 0x80080000 0x22 0x32000
# after the above completes
boot
With this you should be able to boot to the tiny file system in eMMC.
Package: /cfs-file/__key/communityserver-discussions-components-files/791/eMMC_5F00_flashing_5F00_package.zip
Regards,
Karan