Copy the image to the eMMC-Card

Copy the gzipped SD-Card image to the rootfs of the SD-Card:

gzip sd.hdimg
cp sd.hdimg.gz $SD_MOUNT

On the target:

dd if=sd.hdimg | gunzip | dd of=/dev/mmcblk1

Alternative: copy the running image from SD-Card to the MMC:

dd if=/dev/mmcblk0 of=/dev/mmcblk1 bs=1M count=400

Booting Linux from the eMMC:

Change the DIP-Switches to boot from eMMC.

Hit any key to stop autoboot:  0
U-Boot# mmc dev 1
mmc1(part 0) is current device
U-Boot# set bootpart 1:1
U-Boot# run loaduimage
reading /uImage
3102000 bytes read in 351 ms (8.4 MiB/s)
U-Boot# run mmcboot
Booting from mmc ...

S2 Setting for MMC1 / eMMC:

Boot-Order: eMMC, SD

1 2 3 4 5
ON ON OFF OFF OFF

S2 Setting for MMC0 / SD-Card:

Boot-Order: SD, SPI-NOR

1 2 3 4 5
OFF OFF OFF ON OFF

S2 Setting for SPI-NOR:

Boot-Order: SPI-NOR, eMMC

1 2 3 4 5
ON ON ON OFF OFF



kernel configuration

to configure the TI Kernel use the following command

ptxdist menuconfig kernel-ti

Workflow

  1. Customise kernel respectively devicetree
  2. ptxdist drop kernel-ti compile
  3. ptxdist drop u-boot install
  4. ptxdist images –git

There are two RTC's on the TQMa335x:

  • rtc0 = RTC Sitara AM335x
  • rtc1 = RTC Module PMIC
An optional RTC DS1339 is available for the TQMa335x module
The RTC of the Sitara AM335x CPU is not usable on TQMa335x ≥ revision 0202.
Please see the TQMa335x for further information

Supply RTC from licell on MBa335x

Command to set RTC0

hwclock -w hwclock -f /dev/rtc0 -w

Command to read RTC0

hwclock -f /dev/rtc0 --show


Command to set RTC1

hwclock -w hwclock -f /dev/rtc1 -w

Command to read RTC1

hwclock -f /dev/rtc1 --show





Devicetree can be edit with the fdt commands under U-Boot.

Tested with Linux BSP Rev.0117 for TQMaXX

1) At first the fdt file has to be loaded from the current boot medium (mmc) into RAM.

U-Boot# run loadfdt

2) Next step is to set the predefined U-Boot environment variable fdtaddr through the fdt addr command.

U-Boot# fdt addr $fdtaddr

3) Afterwards the size of the fdt has to be increased (to the next 4K divider) in order to have some space for modifications. This is simply done by entering:

U-Boot# fdt resize 

4) List device in the tree you want to change to have a look at the default settings.

Example

5) To modify a value of a propertie use the fdt set command.

U-Boot# fdt set <path> <property> <value> 

Example

6) Optional: If you want to save your modified Devicetree back to mmc you'll have to run the following command:

U-Boot# fatwrite mmc $bootpart $fdtaddr $fdtfile <totalsize> 

You can find out <totalsize> of the modified fdt by entering the command fdt header

Otherwise you can boot your module with the changed Devicetree right after the modification.




Disclaimer
TQ-Systems GmbH provides the Board Support Packages (BSP) free of charge. The software included in the shipment has been configured individually for the starter kits. The software is only intended to evaluate the module. The use of the Board Support Packages (BSP) is only allowed within the scope of functionality described by TQ-Systems GmbH. TQ-Systems GmbH does not accept any liability for all further changes of the Board Support Package and for any damage resulting from its use.