p2020 boot from sd card

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

p2020 boot from sd card

1,706 Views
weizhou
Contributor I

hi all:

My CPU is P2020,I want to boot from sd card,I use the P1020_P2020RDB_20101101_ltib software package,but no success,no message come from uart,I sure the communication between CPU and sd card is correct,the sd_clk,sd_cmd and sd_dat0 has wave from oscillograph,the flowing is my operation record:

[root@localhost u-boot-2009.11-cloud]# fdisk /dev/sdd

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to

         switch off the mode (command 'c') and change display units to

         sectors (command 'u').

Command (m for help): p

Disk /dev/sdd: 16.0 GB, 16021192704 bytes

64 heads, 32 sectors/track, 15279 cylinders

Units = cylinders of 2048 * 512 = 1048576 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System

/dev/sdd1   *           1          51       52208   83  Linux

/dev/sdd2              52       15279    15593472   83  Linux

Command action

   a   toggle a bootable flag

   b   edit bsd disklabel

   c   toggle the dos compatibility flag

   d   delete a partition

   l   list known partition types

   m   print this menu

   n   add a new partition

   o   create a new empty DOS partition table

   p   print the partition table

   q   quit without saving changes

   s   create a new empty Sun disklabel

   t   change a partition's system id

   u   change display/entry units

   v   verify the partition table

   w   write table to disk and exit

   x   extra functionality (experts only)

Command (m for help): q

[root@localhost u-boot-2009.11-cloud]# mkfs.vfat /dev/sdd1

mkfs.vfat 3.0.9 (31 Jan 2010)

[root@localhost u-boot-2009.11-cloud]# ./boot_format config_sram_p2020rdb.dat u-boot.bin -sd /dev/sdd

It is a little endian machine.

Read MBR from SDCard:

0x0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0040: 42 4f 4f 54 00 00 00 00 00 0a 1e 00 00 00 00 00

0x0050: 02 f1 0c 00 00 00 00 00 f8 f8 00 00 00 00 00 00

0x0060: f8 f8 00 00 00 00 00 00 00 00 00 06 00 00 00 00

0x0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0080: ff 72 01 00 f8 f8 00 00 ff 72 0e 44 00 00 00 0c

0x0090: ff 72 00 00 80 01 00 00 ff 72 e4 0c 00 00 00 40

0x00a0: 40 00 00 01 00 00 01 00 80 00 00 01 80 00 00 01

0x00b0: ff 70 21 0c 0f c0 88 db ff 70 21 14 24 40 10 00

0x00c0: ff 70 21 18 00 04 08 30 ff 70 21 24 08 20 01 00

0x00d0: ff 70 21 30 02 80 00 00 40 00 00 01 00 00 01 00

0x00e0: ff 70 21 28 de ad be ef ff 70 21 10 c7 0c 00 00

0x00f0: ff 70 0c 08 00 00 00 00 ff 70 0d 70 80 f0 00 1d

0x0100: ef ef ef ef 00 00 00 00 40 00 00 01 00 00 01 00

0x0110: ff 70 21 10 c7 0c 00 08 ff 70 0c 08 00 00 00 00

0x0120: ff 70 0c 10 80 f0 00 1d ef ef ef ef 00 00 00 00

0x0130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01b0: 20 14 06 03 3d 00 00 00 00 00 00 00 00 00 80 01

0x01c0: 01 00 83 3f 20 32 20 00 00 00 e0 97 01 00 00 00

0x01d0: 01 33 83 3f e0 ff 00 98 01 00 00 e0 db 01 00 00

0x01e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa

================== MBR ==================

boot_ind                = 0x80

start_head      = 0x1

start_cylesec   = 0x1

part_type       = 0x83

end_head                = 0x3f

end_cylsec      = 0x3220

rel_sectors     = 0x20

total_sectors   = 0x197e0

=========================================

It is a valid MBR

Read DBR from SDCard:

0x0000: eb 3c 90 6d 6b 64 6f 73 66 73 00 00 02 04 04 00

0x0010: 02 00 02 00 00 f8 68 00 20 00 40 00 00 00 00 00

0x0020: e0 97 01 00 00 00 29 1a a7 c5 c5 20 20 20 20 20

0x0030: 20 20 20 20 20 20 46 41 54 31 36 20 20 20 0e 1f

0x0040: be 5b 7c ac 22 c0 74 0b 56 b4 0e bb 07 00 cd 10

0x0050: 5e eb f0 32 e4 cd 16 cd 19 eb fe 54 68 69 73 20

0x0060: 69 73 20 6e 6f 74 20 61 20 62 6f 6f 74 61 62 6c

0x0070: 65 20 64 69 73 6b 2e 20 20 50 6c 65 61 73 65 20

0x0080: 69 6e 73 65 72 74 20 61 20 62 6f 6f 74 61 62 6c

0x0090: 65 20 66 6c 6f 70 70 79 20 61 6e 64 0d 0a 70 72

0x00a0: 65 73 73 20 61 6e 79 20 6b 65 79 20 74 6f 20 74

0x00b0: 72 79 20 61 67 61 69 6e 20 2e 2e 2e 20 0d 0a 00

0x00c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x00d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x00e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x00f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa

================== DBR ==================

jmp_code[0]     = 0xeb

sector_size     = 0x200

root_entries    = 0x200

small_sector    = 0x0

sectors_p_fat   = 0x68

=========================================

Writing image to SDCard...

OK.

Writing config words to MBR's buffer first...OK.

Writing MBR to SDCard...

================== MBR ==================

boot_ind                = 0x80

start_head      = 0x1

start_cylesec   = 0x1

part_type       = 0x83

end_head                = 0x3f

end_cylsec      = 0x3220

rel_sectors     = 0x20

total_sectors   = 0x197e0

=========================================

0x0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0040: 42 4f 4f 54 00 00 00 00 00 08 00 00 00 00 00 00

0x0050: 03 20 00 00 00 00 00 00 f8 f8 00 00 00 00 00 00

0x0060: f8 f8 00 00 00 00 00 00 00 00 00 06 00 00 00 00

0x0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0080: ff 72 01 00 f8 f8 00 00 ff 72 0e 44 00 00 00 0c

0x0090: ff 72 00 00 80 01 00 00 ff 72 e4 0c 00 00 00 40

0x00a0: 40 00 00 01 00 00 01 00 80 00 00 01 80 00 00 01

0x00b0: ff 70 21 0c 0f c0 88 db ff 70 21 14 24 40 10 00

0x00c0: ff 70 21 18 00 04 08 30 ff 70 21 24 08 20 01 00

0x00d0: ff 70 21 30 02 80 00 00 40 00 00 01 00 00 01 00

0x00e0: ff 70 21 28 de ad be ef ff 70 21 10 c7 0c 00 00

0x00f0: ff 70 0c 08 00 00 00 00 ff 70 0d 70 80 f0 00 1d

0x0100: ef ef ef ef 00 00 00 00 40 00 00 01 00 00 01 00

0x0110: ff 70 21 10 c7 0c 00 08 ff 70 0c 08 00 00 00 00

0x0120: ff 70 0c 10 80 f0 00 1d ef ef ef ef 00 00 00 00

0x0130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01b0: 20 14 06 03 3d 00 00 00 00 00 00 00 00 00 80 01

0x01c0: 01 00 83 3f 20 32 20 00 00 00 e0 97 01 00 00 00

0x01d0: 01 33 83 3f e0 ff 00 98 01 00 00 e0 db 01 00 00

0x01e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa

OK.

Writing DBR to SDCard...

================== DBR ==================

jmp_code[0]     = 0xeb

sector_size     = 0x200

root_entries    = 0x200

small_sector    = 0x0

sectors_p_fat   = 0x68

=========================================

0x0000: eb 3c 90 6d 6b 64 6f 73 66 73 00 00 02 04 04 00

0x0010: 02 00 02 00 00 f8 68 00 20 00 40 00 00 00 00 00

0x0020: e0 97 01 00 00 00 29 1a a7 c5 c5 20 20 20 20 20

0x0030: 20 20 20 20 20 20 46 41 54 31 36 20 20 20 0e 1f

0x0040: be 5b 7c ac 22 c0 74 0b 56 b4 0e bb 07 00 cd 10

0x0050: 5e eb f0 32 e4 cd 16 cd 19 eb fe 54 68 69 73 20

0x0060: 69 73 20 6e 6f 74 20 61 20 62 6f 6f 74 61 62 6c

0x0070: 65 20 64 69 73 6b 2e 20 20 50 6c 65 61 73 65 20

0x0080: 69 6e 73 65 72 74 20 61 20 62 6f 6f 74 61 62 6c

0x0090: 65 20 66 6c 6f 70 70 79 20 61 6e 64 0d 0a 70 72

0x00a0: 65 73 73 20 61 6e 79 20 6b 65 79 20 74 6f 20 74

0x00b0: 72 79 20 61 67 61 69 6e 20 2e 2e 2e 20 0d 0a 00

0x00c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x00d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x00e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x00f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa

OK.

Congratulations! It is done successfully.

the content of config_sram_p2020rdb.dat is flowing:

40:424f4f54

44:00000000

48:00010000

4c:00000000

50:00000008

54:00000000

58:f8f80000

5c:00000000

60:f8f80000

64:00000000

68:00000006

80:ff720100

84:f8f80000

88:ff720e44

8c:0000000c

90:ff720000

94:80010000

98:ff72e40c

9c:00000040

a0:40000001

a4:00000100

a8:80000001

ac:80000001

has  where improper operation?

It torments me two weeks!!!!

thank you!

thank you!

Labels (1)
0 Kudos
13 Replies

1,137 Views
ufedor
NXP Employee
NXP Employee

In the log it is printed "part_type = 0x83" - this is incorrect.

Should be "part_type = 0x6" - because only FAT16 and FAT32 are supported.

Use 'fdisk' to to change the partition ID = 6

0 Kudos

1,137 Views
weizhou
Contributor I

Thank you ,ufedor

My sdk is  P1020_P2020RDB_20101101_ltib.

there is no any debugger connect to my board.

the board designed by I in scratch,not offical develop board.

I change part_type=6 use 'fdisk' ,but still no success,but I add address/value pairs in config_sram_p1022ds.dat that operates GPIO port 9 that connect a LED on my board,the LED can been turned on,but I can not  turn off it in start.S.

the flowing is whole information:

[root@localhost u-boot-2009.11-cloud]# ./boot_format config_sram_p1022ds.dat u-boot.bin -sd /dev/sde

It is a little endian machine.

Read MBR from SDCard:

0x0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0040: 42 4f 4f 54 00 00 00 00 00 08 00 00 00 00 00 00

0x0050: 06 20 20 00 00 00 00 00 f8 f8 00 00 00 00 00 00

0x0060: f8 ff f0 00 00 00 00 00 00 00 00 06 00 00 00 00

0x0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0080: ff 72 01 00 f8 f8 00 00 ff 72 0e 44 00 00 00 0c

0x0090: ff 72 00 00 80 01 00 00 ff 72 e4 0c 00 00 00 40

0x00a0: 40 00 00 01 00 00 01 00 80 00 00 01 80 00 00 01

0x00b0: 40 00 00 01 00 00 01 00 80 00 00 01 80 00 00 01

0x00c0: 40 00 00 01 00 00 01 00 80 00 00 01 80 00 00 01

0x00d0: 40 00 00 01 00 00 01 00 80 00 00 01 80 00 00 01

0x00e0: ff 70 21 28 de ad be ef ff 70 21 10 c7 0c 00 00

0x00f0: ff 70 0c 08 00 00 00 00 ff 70 0d 70 80 f0 00 1d

0x0100: ef ef ef ef ff ff 00 00 ff e0 f0 08 00 00 00 00

0x0110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 01

0x01c0: 01 00 06 c0 34 14 34 00 00 00 10 37 03 00 00 00

0x01d0: 01 15 83 c0 74 7d 44 37 03 00 54 48 37 00 00 00

0x01e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa

================== MBR ==================

boot_ind                = 0x80

start_head      = 0x1

start_cylesec   = 0x1

part_type       = 0x6

end_head                = 0xc0

end_cylsec      = 0x1434

rel_sectors     = 0x34

total_sectors   = 0x33710

=========================================

It is a valid MBR

Read DBR from SDCard:

0x0000: eb 3c 90 6d 6b 64 6f 73 66 73 00 00 02 04 04 00

0x0010: 02 00 02 00 00 f8 d0 00 34 00 c1 00 00 00 00 00

0x0020: 10 37 03 00 00 00 29 4d fb ee 26 20 20 20 20 20

0x0030: 20 20 20 20 20 20 46 41 54 31 36 20 20 20 0e 1f

0x0040: be 5b 7c ac 22 c0 74 0b 56 b4 0e bb 07 00 cd 10

0x0050: 5e eb f0 32 e4 cd 16 cd 19 eb fe 54 68 69 73 20

0x0060: 69 73 20 6e 6f 74 20 61 20 62 6f 6f 74 61 62 6c

0x0070: 65 20 64 69 73 6b 2e 20 20 50 6c 65 61 73 65 20

0x0080: 69 6e 73 65 72 74 20 61 20 62 6f 6f 74 61 62 6c

0x0090: 65 20 66 6c 6f 70 70 79 20 61 6e 64 0d 0a 70 72

0x00a0: 65 73 73 20 61 6e 79 20 6b 65 79 20 74 6f 20 74

0x00b0: 72 79 20 61 67 61 69 6e 20 2e 2e 2e 20 0d 0a 00

0x00c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x00d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x00e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x00f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa

================== DBR ==================

jmp_code[0]     = 0xeb

sector_size     = 0x200

root_entries    = 0x200

small_sector    = 0x0

sectors_p_fat   = 0xd0

Writing image to SDCard...

OK.

Writing config words to MBR's buffer first...OK.

Writing MBR to SDCard...

================== MBR ==================

boot_ind                = 0x80

start_head      = 0x1

start_cylesec   = 0x1

part_type       = 0x6

end_head                = 0xc0

end_cylsec      = 0x1434

rel_sectors     = 0x34

total_sectors   = 0x33710

=========================================

0x0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0040: 42 4f 4f 54 00 00 00 00 00 08 00 00 00 00 00 00

0x0050: 06 20 20 00 00 00 00 00 f8 f8 00 00 00 00 00 00

0x0060: f8 ff f0 00 00 00 00 00 00 00 00 08 00 00 00 00

0x0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0080: ff 72 01 00 f8 f8 00 00 ff 72 0e 44 00 00 00 0c

0x0090: ff 72 00 00 80 01 00 00 ff 72 e4 0c 00 00 00 40

0x00a0: ff 70 f0 00 00 40 00 00 ff 70 f0 08 00 40 00 00

0x00b0: 40 00 00 01 00 00 01 00 80 00 00 01 80 00 00 01

0x00c0: 40 00 00 01 00 00 01 00 80 00 00 01 80 00 00 01

0x00d0: 40 00 00 01 00 00 01 00 80 00 00 01 80 00 00 01

0x00e0: ff 70 21 28 de ad be ef ff 70 21 10 c7 0c 00 00

0x00f0: ff 70 0c 08 00 00 00 00 ff 70 0d 70 80 f0 00 1d

0x0100: ef ef ef ef ff ff 00 00 ff e0 f0 08 00 00 00 00

0x0110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 01

0x01c0: 01 00 06 c0 34 14 34 00 00 00 10 37 03 00 00 00

0x01d0: 01 15 83 c0 74 7d 44 37 03 00 54 48 37 00 00 00

0x01e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa

OK.

Writing DBR to SDCard...

================== DBR ==================

jmp_code[0]     = 0xeb

sector_size     = 0x200

root_entries    = 0x200

small_sector    = 0x0

sectors_p_fat   = 0xd0

=========================================

0x0000: eb 3c 90 6d 6b 64 6f 73 66 73 00 00 02 04 04 00

0x0010: 02 00 02 00 00 f8 d0 00 34 00 c1 00 00 00 00 00

0x0020: 10 37 03 00 00 00 29 4d fb ee 26 20 20 20 20 20

0x0030: 20 20 20 20 20 20 46 41 54 31 36 20 20 20 0e 1f

0x0040: be 5b 7c ac 22 c0 74 0b 56 b4 0e bb 07 00 cd 10

0x0050: 5e eb f0 32 e4 cd 16 cd 19 eb fe 54 68 69 73 20

0x0060: 69 73 20 6e 6f 74 20 61 20 62 6f 6f 74 61 62 6c

0x0070: 65 20 64 69 73 6b 2e 20 20 50 6c 65 61 73 65 20

0x0080: 69 6e 73 65 72 74 20 61 20 62 6f 6f 74 61 62 6c

0x0090: 65 20 66 6c 6f 70 70 79 20 61 6e 64 0d 0a 70 72

0x00a0: 65 73 73 20 61 6e 79 20 6b 65 79 20 74 6f 20 74

0x00b0: 72 79 20 61 67 61 69 6e 20 2e 2e 2e 20 0d 0a 00

0x00c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x00d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x00e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x00f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa

OK.

Congratulations! It is done successfully.

the content of config_sram_p1022ds.dat is flowing:

040:424f4f54

044:00000000

048:00010000

04c:00000000

050:00001000

054:00000000

058:f8f80000

05c:00000000

060:f8fff000

064:00000000

068:00000008

080:ff720100

084:f8f80000

088:ff720e44

08c:0000000c

090:ff720000

094:80010000

098:ff72e40c

09c:00000040

0a0:ff70f000

0a4:00400000

0a8:ff70f008

0ac:00400000

0b0:40000001

0b4:00000100

0b8:80000001

0bc:80000001

0 Kudos

1,137 Views
weizhou
Contributor I

I do not know that my u-boot whether has been executed,the code I added to control GPIO in start.S  is the first instruction,flowing is :

.globl _start_e500

_start_e500:

/*let the status led turn off*/
lisr1,GPIOBASE@h //0xff70f000
lisr0,GPIOVAL@h  //0x00000000
stwr0,0(r1)
stwr0,+8(r1)

/* clear registers/arrays not reset by hardware */
/* L1 */
lir0,2
mtsprL1CSR0,r0/* invalidate d-cache */
mtsprL1CSR1,r0/* invalidate i-cache */

mfsprr1,DBSR
mtsprDBSR,r1/* Clear all valid bits */

so,I feel the u-boot is not executed at all.

0 Kudos

1,137 Views
ufedor
NXP Employee
NXP Employee

Please consider to open a sevice case because this could be a complicated technical issue - refer to the How I could create a Service Request?

Please provide the SDCARD U-Boot binary image for inspection.

0 Kudos

1,137 Views
weizhou
Contributor I

I do not know how provide my u-boot binary file ? !

0 Kudos

1,137 Views
ufedor
NXP Employee
NXP Employee
0 Kudos

1,137 Views
weizhou
Contributor I

I have created a service request. thank you.

0 Kudos

1,137 Views
weizhou
Contributor I

hi ufedor:

this is my u-boot.bin binary file. I use flowing way to compile it:

make P2020RDB_SDCARD_config

make

0 Kudos

1,137 Views
ufedor
NXP Employee
NXP Employee

Please use attached pre-built SDCARD U-Boot image from the SDK 1.4.

If there will be no UART output, then the board has to be debugged.

0 Kudos

1,137 Views
weizhou
Contributor I

hi ufedor:

I use pre-build sdcard u-boot image from the sdk 1.4,but no message come from uart,the flowing is my operation recorder:

./boot_format config_sram_p1022ds.dat u-boot-sd-P2020RDB-PC_SDCARD-git-r34.bin -sd /dev/sde

It is a little endian machine.

Read MBR from SDCard:

0x0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0040: 42 4f 4f 54 00 00 00 00 00 08 00 00 00 00 00 00

0x0050: 06 20 20 00 00 00 00 00 f8 f8 00 00 00 00 00 00

0x0060: f8 ff f0 00 00 00 00 00 00 00 00 08 00 00 00 00

0x0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0080: ff 72 01 00 f8 f8 00 00 ff 72 0e 44 00 00 00 0c

0x0090: ff 72 00 00 80 01 00 00 ff 72 e4 0c 00 00 00 40

0x00a0: ff 70 f0 00 00 40 00 00 ff 70 f0 08 00 40 00 00

0x00b0: 40 00 00 01 00 00 01 00 80 00 00 01 80 00 00 01

0x00c0: 40 00 00 01 00 00 01 00 80 00 00 01 80 00 00 01

0x00d0: 40 00 00 01 00 00 01 00 80 00 00 01 80 00 00 01

0x00e0: ff 70 21 28 de ad be ef ff 70 21 10 c7 0c 00 00

0x00f0: ff 70 0c 08 00 00 00 00 ff 70 0d 70 80 f0 00 1d

0x0100: ef ef ef ef ff ff 00 00 ff e0 f0 08 00 00 00 00

0x0110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 01

0x01c0: 01 00 06 c0 34 14 34 00 00 00 10 37 03 00 00 00

0x01d0: 01 15 83 c0 74 7d 44 37 03 00 54 48 37 00 00 00

0x01e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa

================== MBR ==================

boot_ind = 0x80

start_head = 0x1

start_cylesec = 0x1

part_type = 0x6

end_head = 0xc0

end_cylsec = 0x1434

rel_sectors = 0x34

total_sectors = 0x33710

=========================================

It is a valid MBR

Read DBR from SDCard:

0x0000: eb 3c 90 6d 6b 64 6f 73 66 73 00 00 02 04 04 00

0x0010: 02 00 02 00 00 f8 d0 00 34 00 c1 00 00 00 00 00

0x0020: 10 37 03 00 00 00 29 4d fb ee 26 20 20 20 20 20

0x0030: 20 20 20 20 20 20 46 41 54 31 36 20 20 20 0e 1f

0x0040: be 5b 7c ac 22 c0 74 0b 56 b4 0e bb 07 00 cd 10

0x0050: 5e eb f0 32 e4 cd 16 cd 19 eb fe 54 68 69 73 20

0x0060: 69 73 20 6e 6f 74 20 61 20 62 6f 6f 74 61 62 6c

0x0070: 65 20 64 69 73 6b 2e 20 20 50 6c 65 61 73 65 20

0x0080: 69 6e 73 65 72 74 20 61 20 62 6f 6f 74 61 62 6c

0x0090: 65 20 66 6c 6f 70 70 79 20 61 6e 64 0d 0a 70 72

0x00a0: 65 73 73 20 61 6e 79 20 6b 65 79 20 74 6f 20 74

0x00b0: 72 79 20 61 67 61 69 6e 20 2e 2e 2e 20 0d 0a 00

0x00c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x00d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x00e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x00f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa

================== DBR ==================

jmp_code[0] = 0xeb

sector_size = 0x200

root_entries = 0x200

small_sector = 0x0

sectors_p_fat = 0xd0

=========================================

Writing image to SDCard...

OK.

Writing config words to MBR's buffer first...OK.

Writing MBR to SDCard...

================== MBR ==================

boot_ind = 0x80

start_head = 0x1

start_cylesec = 0x1

part_type = 0x6

end_head = 0xc0

end_cylsec = 0x1434

rel_sectors = 0x34

total_sectors = 0x33710

=========================================

0x0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0040: 42 4f 4f 54 00 00 00 00 00 08 00 00 00 00 00 00

0x0050: 06 20 20 00 00 00 00 00 f8 f8 00 00 00 00 00 00

0x0060: f8 ff f0 00 00 00 00 00 00 00 00 08 00 00 00 00

0x0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0080: ff 72 01 00 f8 f8 00 00 ff 72 0e 44 00 00 00 0c

0x0090: ff 72 00 00 80 01 00 00 ff 72 e4 0c 00 00 00 40

0x00a0: ff 70 f0 00 00 40 00 00 ff 70 f0 08 00 40 00 00

0x00b0: 40 00 00 01 00 00 01 00 80 00 00 01 80 00 00 01

0x00c0: 40 00 00 01 00 00 01 00 80 00 00 01 80 00 00 01

0x00d0: 40 00 00 01 00 00 01 00 80 00 00 01 80 00 00 01

0x00e0: ff 70 21 28 de ad be ef ff 70 21 10 c7 0c 00 00

0x00f0: ff 70 0c 08 00 00 00 00 ff 70 0d 70 80 f0 00 1d

0x0100: ef ef ef ef ff ff 00 00 ff e0 f0 08 00 00 00 00

0x0110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 01

0x01c0: 01 00 06 c0 34 14 34 00 00 00 10 37 03 00 00 00

0x01d0: 01 15 83 c0 74 7d 44 37 03 00 54 48 37 00 00 00

0x01e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa

OK.

Writing DBR to SDCard...

================== DBR ==================

jmp_code[0] = 0xeb

sector_size = 0x200

root_entries = 0x200

small_sector = 0x0

sectors_p_fat = 0xd0

=========================================

0x0000: eb 3c 90 6d 6b 64 6f 73 66 73 00 00 02 04 04 00

0x0010: 02 00 02 00 00 f8 d0 00 34 00 c1 00 00 00 00 00

0x0020: 10 37 03 00 00 00 29 4d fb ee 26 20 20 20 20 20

0x0030: 20 20 20 20 20 20 46 41 54 31 36 20 20 20 0e 1f

0x0040: be 5b 7c ac 22 c0 74 0b 56 b4 0e bb 07 00 cd 10

0x0050: 5e eb f0 32 e4 cd 16 cd 19 eb fe 54 68 69 73 20

0x0060: 69 73 20 6e 6f 74 20 61 20 62 6f 6f 74 61 62 6c

0x0070: 65 20 64 69 73 6b 2e 20 20 50 6c 65 61 73 65 20

0x0080: 69 6e 73 65 72 74 20 61 20 62 6f 6f 74 61 62 6c

0x0090: 65 20 66 6c 6f 70 70 79 20 61 6e 64 0d 0a 70 72

0x00a0: 65 73 73 20 61 6e 79 20 6b 65 79 20 74 6f 20 74

0x00b0: 72 79 20 61 67 61 69 6e 20 2e 2e 2e 20 0d 0a 00

0x00c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x00d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x00e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x00f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x0190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x01f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa

OK.

Congratulations! It is done successfully.

0 Kudos

1,137 Views
weizhou
Contributor I

OK,thank you ufedor,I try it.

0 Kudos

1,137 Views
ufedor
NXP Employee
NXP Employee

1) Which Freescale's SDK is used?

2) Please provide the SDCARD U-Boot binary image for inspection.

3) Is debugger connection possibe during booting from SD card?

4) Is the board capable to boot from another source (NOR, NAND, SPI)?

0 Kudos

1,137 Views
weizhou
Contributor I

My board only can boot from sd

0 Kudos