T1040RDB boot from SD card

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

T1040RDB boot from SD card

4,169 Views
jaket
Contributor II

I'm in a situation where my USB TAP is still on backorder and I've bricked my flash image (I was trying to get a 64-bit RCW, etc... into the flash). Now I'm trying to build up a SD card to boot from. The answer by yipingwang inthis post here has got most of the way I think but the board (T1040RDB) is not booting all the way. In my terminal output I get:

Initializing....using SPD

WARNING: Calling __hwconfig without a buffer and before environment is ready

WARNING: Calling __hwconfig without a buffer and before environment is ready

WARNING: Calling __hwconfig without a buffer and before environment is ready

Since I didn't have access to u-boot I used the shell and dd commands instead. Here's what I did (P.S. I built these images from the 1.7 SDK 32-bit)

1) I changed the following line in t1040rdb.conf and rebuilt:

UBOOT_MACHINES ?= "T1040RDB T1040RDB_SECURE_BOOT T1040RDB_SDCARD"

bitbake now produces u-boot-sd-T1040RDB_SDCARD.bin in the images folder. I also grabbed iram_Type_A_T1040_r1.0.bin and fsl_man_ucode_r1.0_107_4_2.bin from the images folder

I've formatted a 4GB SD card as FAT32 (not sure that it matters) and run the following commands

sudo dd /dev/disk1 if=u-boot-sd-T1040RDB_SDCARD.bin of=/dev/disk1 bs=512 seek=8

sudo dd /dev/disk1 if=fsl_man_ucode_t1040_r1.0_107_4_2.bin of=/dev/disk1 bs=512 seek=2080

sudo dd /dev/disk1 if=iram_Type_A_T1040_r1.0.bin of=/dev/disk1 bs=512 seek=2336

I chose a block format of 512 based on the answer in the linked post that the u-boot block is 2048 blocks and 1MB, hence 512KB blocks.

I'm suspicious that the u-boot environment is not landing in the correct location. Looking at the u-boot-sd-xxx.bin it looks around offset 0x00012380

00012380: 0000 0048 7364 7862 696d 0000 626f 6f74  ...Hsdxbim..boot

00012390: 636d 643d 7365 7465 6e76 2062 6f6f 7461  cmd=setenv boota

000123a0: 7267 7320 726f 6f74 3d2f 6465 762f 7261  rgs root=/dev/ra

Any suggestions?

Labels (1)
Tags (2)
0 Kudos
6 Replies

1,589 Views
lunminliang
NXP Employee
NXP Employee

Hi,

It seems you have missed the other image u-boot-spl.bin, haven't you?

As Yiping stated, as T4240/T2080/T1040 has a smaller CPC, a two stage u-boot is required, thus two image got in SDK u-boot.bin and u-boot-spi.bin.

If you missed the one u-boot-spl.bin, please generating PBL image with QCVS tool, you need to create QorIQ configuration Project:

1. In the wizard choose T1040, select PBL

2. open a Component Inspector window and import RCW

3. Setting RCW source, PBI_SRC and BOOT_LOC in the Properties tab

4. Putting together the PBI data by append the common PBI commands

5. Insert the u-boot image file, here for T1040 it's u-boot-spl.bin

6. Add for these 2 PBI commands: Flush & Wait

7. Generate output PBL1.bin


Have a great day,
Lunmin

0 Kudos

1,589 Views
sinanakman
Senior Contributor III

Hi Jacob

I don't have access to this board right now but

there is usually two NOR banks. You mentioned you

bricked your board. Can't you change the switch

settings to boot from the alternate bank ?

Hope this helps

Sinan Akman

0 Kudos

1,589 Views
sinanakman
Senior Contributor III

Hi Jacob, please take a look at the bottom

of Table 2-12 in T1040 RDB's User Guide. It

talks about SW3[5:7] for selecting different

banks.

Regards

Sinan Akman

0 Kudos

1,589 Views
jaket
Contributor II

Hi Sinan,

Thanks but I actually messed up both banks. I was putting on a 64 bit image and wound up with parts in bank 0 and parts in bank 1. I was thrown off by the intermingling of the current and alternative banks in one address range. I am aware of SW3.

Thanks, Jake

0 Kudos

1,589 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Jacob Tummond,


According to your description, it seems there is problem with your procedure to deploy SD u-boot.

For T1040, u-boot size is 768K, but CPC is 512K, not enough to store the whole u-boot, two stage u-boot images need to be used, the first stage u-boot is load to CPC, which will initialize DDR and load the second stage u-boot to DDR, then jump to DDR to boot up to u-boot prompt.

Here I used SDK 1.6 as an example.

1. Build u-boot

a. $ bitbake -c cleansstate u-boot

b. Configure SD u-boot configuration in machine configuration file, for example for T1040RDB. In the file meta-fsl-ppc/conf/machine/t1040rdb.conf, add T1040RDB_SDCARD as the following.

UBOOT_MACHINES ?= "T1040RDB T1040RDB_SDCARD"

c. $ bitbake u-boot

Get u-boot.bin and spl/u-boot-spl.bin in build_t1040rdb_release/tmp/work/t1040rdb-fsl-linux/u-boot/2014.01+fslgit-r0/git/T1040RDB_SDCARD/.

2. Generate PBL image with QCVS Tool, you could refer to System Boot from SD/MMC Card with SDK 1.6 images, please use image spl/u-boot-spl.bin.

3. Deploy PBL.bin and u-boot.bin to SD card.

=>tftp 100000 PBL1.bin

=>mmcinfo

=>mmc write 100000 8 block_number

=>tftp 100000 u-boot.bin

=>mmc write 100000 208 block_number

=>tftp 100000 ucode.bin

=>mmc write 100000 820 block_number

If you don't use u-boot, please deploy these images to correct locations as the above.

In addition, when T1040RDB is released to customers, there should be valid RCW and u-boot in NOR Flash.


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,589 Views
mathiasparnaude
Contributor III

Hi Yiping,

I want to boot T1040RDB with U-Boot on SD card. I followed instructions found in this forum and in the document "Boot system from SD" but I would need additionnal information.

You mentionned at the point 2) a section with PBI commands "For T-/B-series SoCs (with 512 KB CPC SRAM)". T1040RDB has a 256KB CPC here, is there anything to add?

Prior to the deployment of files on the SD card, should it be formatted with a specific filesystem? I used mkfs.vfat with "-F 32" but fdisk says the partition type is FAT16. Does it matter?

That would be great to update your document with the block size to use, and the block numbers as well, in "mmc write" commands. Do you also plan an update to match with the SDK 1.7 and to answer questions raised in forums?

I followed the whole procedure but when started the T1040RDB is stuck with the ASLEEP LED on. Is there a script or something to check files on the SD card?

I copied the files like that:

  sudo dd if=workspace-qcvs/pbl/Generated_Code/PBL.bin of=/dev/sdd1 bs=512 seek=8

  sudo dd if=u-boot/u-boot.bin of=/dev/sdd1 bs=512 seek=208

  sudo dd if=QorIQ-SDK-V1.7-20141218-yocto/build_t1040rdb_release/tmp/deploy/images/t1040rdb/fsl_fman_ucode_t1040_r1.1_106_4_14.bin of=/dev/sdd1 bs=512 seek=820

  sync

I also tried different ucode binaries (there are 4 provided in the images directories of the Yocto build), even if I suppose I have to use "fsl_fman_ucode_t1040_r1.1_106_4_14.bin" as U-Boot says:

  Board: T1040RDB

  Board rev: 0x01 CPLD ver: 0x06, vBank: 0

Any ideas about what could be the problem or what I could try?

Thanks,

Mathias

0 Kudos