Writing created image to sdcard

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

Writing created image to sdcard

1,185 Views
markofrelih
Contributor III

Dear Sirs and Madams!

I've succesfully built predefined image using for p2020rdb-pca board: 

bitbake fsl-image-full

and here is deploy directory output:

tuser@vmworkstation:/home/testuser/QorIQ-SDK-V1.9-20151210-yocto/build_p2020rdb/tmp/deploy/images/p2020rdb# ls -asl
total 499596
4 drwxr-xr-x 3 testuser testuser 4096 Dec 13 08:53 .
4 drwxr-xr-x 3 testuser testuser 4096 Dec 12 20:35 ..
4 drwxr-xr-x 2 testuser testuser 4096 Dec 13 02:08 boot
48 -rw-r--r-- 1 testuser testuser 46872 Dec 13 02:13 fsl-image-full-p2020rdb-20161212162213.tuserfs.manifest
240592 -rw-r--r-- 1 testuser testuser 246362902 Dec 13 02:16 fsl-image-full-p2020rdb-20161212162213.tuserfs.tar.gz
48 -rw-r--r-- 1 testuser testuser 46872 Dec 13 08:50 fsl-image-full-p2020rdb-20161213073923.tuserfs.manifest
240592 -rw-r--r-- 1 testuser testuser 246362921 Dec 13 08:53 fsl-image-full-p2020rdb-20161213073923.tuserfs.tar.gz
0 lrwxrwxrwx 1 testuser testuser 54 Dec 13 08:53 fsl-image-full-p2020rdb.manifest -> fsl-image-full-p2020rdb-20161213073923.tuserfs.manifest
0 lrwxrwxrwx 1 testuser testuser 52 Dec 13 08:53 fsl-image-full-p2020rdb.tar.gz -> fsl-image-full-p2020rdb-20161213073923.tuserfs.tar.gz
8416 -rw-r--r-- 2 testuser testuser 8615870 Dec 12 20:35 modules--3.12-r0-p2020rdb-20161212162213.tgz
0 lrwxrwxrwx 1 testuser testuser 44 Dec 12 20:35 modules-p2020rdb.tgz -> modules--3.12-r0-p2020rdb-20161212162213.tgz
4 -rw-r--r-- 2 testuser testuser 294 Dec 13 08:46 README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
780 -rwxr-xr-x 2 testuser testuser 794772 Dec 13 02:08 u-boot-36bit-nand-2015.01+fslgit-r0.bin
0 lrwxrwxrwx 1 testuser testuser 39 Dec 13 02:08 u-boot-36bit-nand.bin -> u-boot-36bit-nand-2015.01+fslgit-r0.bin
768 -rwxr-xr-x 2 testuser testuser 786432 Dec 13 02:08 u-boot-36bit-nor-2015.01+fslgit-r0.bin
0 lrwxrwxrwx 1 testuser testuser 38 Dec 13 02:08 u-boot-36bit-nor.bin -> u-boot-36bit-nor-2015.01+fslgit-r0.bin
652 -rwxr-xr-x 2 testuser testuser 663912 Dec 13 02:08 u-boot-36bit-sdcard-2015.01+fslgit-r0.bin
0 lrwxrwxrwx 1 testuser testuser 41 Dec 13 02:08 u-boot-36bit-sdcard.bin -> u-boot-36bit-sdcard-2015.01+fslgit-r0.bin
652 -rwxr-xr-x 2 testuser testuser 665088 Dec 13 02:08 u-boot-36bit-spi-2015.01+fslgit-r0.bin
0 lrwxrwxrwx 1 testuser testuser 38 Dec 13 02:08 u-boot-36bit-spi.bin -> u-boot-36bit-spi-2015.01+fslgit-r0.bin
0 lrwxrwxrwx 1 testuser testuser 32 Dec 13 02:08 u-boot.bin -> u-boot-nor-2015.01+fslgit-r0.bin
776 -rwxr-xr-x 2 testuser testuser 792404 Dec 13 02:08 u-boot-nand-2015.01+fslgit-r0.bin
0 lrwxrwxrwx 1 testuser testuser 33 Dec 13 02:08 u-boot-nand.bin -> u-boot-nand-2015.01+fslgit-r0.bin
768 -rwxr-xr-x 2 testuser testuser 786432 Dec 13 02:08 u-boot-nor-2015.01+fslgit-r0.bin
0 lrwxrwxrwx 1 testuser testuser 32 Dec 13 02:08 u-boot-nor.bin -> u-boot-nor-2015.01+fslgit-r0.bin
0 lrwxrwxrwx 1 testuser testuser 32 Dec 13 02:08 u-boot-p2020rdb.bin -> u-boot-nor-2015.01+fslgit-r0.bin
648 -rwxr-xr-x 2 testuser testuser 661548 Dec 13 02:08 u-boot-sdcard-2015.01+fslgit-r0.bin
0 lrwxrwxrwx 1 testuser testuser 35 Dec 13 02:08 u-boot-sdcard.bin -> u-boot-sdcard-2015.01+fslgit-r0.bin
648 -rwxr-xr-x 2 testuser testuser 663040 Dec 13 02:08 u-boot-spi-2015.01+fslgit-r0.bin
0 lrwxrwxrwx 1 testuser testuser 32 Dec 13 02:08 u-boot-spi.bin -> u-boot-spi-2015.01+fslgit-r0.bin
0 lrwxrwxrwx 1 testuser testuser 43 Dec 12 20:35 uImage -> uImage--3.12-r0-p2020rdb-20161212162213.bin
4176 -rw-r--r-- 2 testuser testuser 4275699 Dec 12 20:34 uImage--3.12-r0-p2020rdb-20161212162213.bin
16 -rw-r--r-- 2 testuser testuser 13899 Dec 12 20:35 uImage--3.12-r0-p2020rdb-pc_32b-20161212162213.dtb
0 lrwxrwxrwx 1 testuser testuser 43 Dec 12 20:35 uImage-p2020rdb.bin -> uImage--3.12-r0-p2020rdb-20161212162213.bin
0 lrwxrwxrwx 1 testuser testuser 50 Dec 12 20:35 uImage-p2020rdb-pc_32b.dtb -> uImage--3.12-r0-p2020rdb-pc_32b-20161212162213.dtb
tuser@vmworkstation:/home/testuser/QorIQ-SDK-V1.9-20151210-yocto/build_p2020rdb/tmp/deploy/images/p2020rdb

Which file now do I have to copy to sdcard using dd command for its usage?

Labels (1)
5 Replies

655 Views
markofrelih
Contributor III

Ok, I;ve used following command: sudo tmp/sysroots/x86_64-linux/usr/bin/boot_format tmp/sysroots/x86_64-linux/usr/share/boot_format/config_sram_p2020rdb.dat tmp/deploy/images/p2020rdb/u-boot-sdcard.bin -sd /dev/sdb

and I've got following output:

This host is a little endian machine.
Using disk geometry of 245 heads and 62 sectors/track for CHS translation
SDCard has 15523840 sectors
Read MBR from SDCard:

0x0000: fa b8 00 10 8e d0 bc 00 b0 b8 00 00 8e d8 8e c0
0x0010: fb be 00 7c bf 00 06 b9 00 02 f3 a4 ea 21 06 00
0x0020: 00 be be 07 38 04 75 0b 83 c6 10 81 fe fe 07 75
0x0030: f3 eb 16 b4 02 b0 01 bb 00 7c b2 80 8a 74 01 8b
0x0040: 4c 02 cd 13 ea 00 7c 00 00 eb fe 00 00 00 00 00
0x0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 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 4c aa a7 c3 00 00 80 20
0x01c0: 21 00 06 aa 28 82 00 08 00 00 00 00 20 00 00 aa
0x01d0: 29 82 83 50 ca c6 00 08 20 00 00 d8 cc 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

It is a valid MBR
WARNING! CHS geometry for partition points to sector 2016 while LBA entry in MBR points to 2048. Updated LBA value with CHS value!
Found first partition in MBR
First partition seems to be also the last partition

================== MBR ==================
boot_ind = 0x80
start_head = 0x20
start_cylesec = 0x21
part_type = 0x6
end_head = 0xaa
end_cylsec = 0x8228
rel_sectors = 0x7e0
total_sectors = 0x200000
=========================================
Read DBR from SDCard at sector 2016 for partition size of 2097152 sectors:

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: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 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 00 00


================== DBR ==================
jmp_code[0] = 0x0

sector_size = 0x0
root_entries = 0x0
small_sector = 0x0
sectors_p_fat = 0x0
=========================================
It is not a valid DBR
Configuration file is for a non-PBL boot
Updating boot image length to 662016 in configuration data
Checking if FAT partition needs to be shrinked

Writing image to SDCard...OK.

Writing MBR to SDCard...
0x0000: fa b8 00 10 8e d0 bc 00 b0 b8 00 00 8e d8 8e c0
0x0010: fb be 00 7c bf 00 06 b9 00 02 f3 a4 ea 21 06 00
0x0020: 00 be be 07 38 04 75 0b 83 c6 10 81 fe fe 07 75
0x0030: f3 eb 16 b4 02 b0 01 bb 00 7c b2 80 8a 74 01 8b
0x0040: 4c 02 cd 13 ea 00 7c 00 00 eb fe 00 00 00 00 00
0x0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 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 4c aa a7 c3 00 00 80 20
0x01c0: 21 00 06 aa 28 82 e0 07 00 00 00 00 20 00 00 aa
0x01d0: 29 82 83 50 ca c6 00 08 20 00 00 d8 cc 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] = 0x0

sector_size = 0x0
root_entries = 0x0
small_sector = 0x0
sectors_p_fat = 0x0
=========================================

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: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 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 00 00

OK.
Updating configuration words in target image ...
Reading sector 0
Writing sector 0
OK.
Congratulations! Completed successfully.

and I get error It is not valid DBR. What did I miss?

0 Kudos

655 Views
markofrelih
Contributor III

And wich sequence in the document should I follow for P2020RDB-PCA board, nonPBL ot PBL?

Sincerely,

Marko

0 Kudos

655 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please use the section for non PBL

0 Kudos

655 Views
markofrelih
Contributor III

I have been following instructions from mentioned manual, I've setup the u-boot on /dev/sdb1 and rootfs on /dev/sdb2 and at board boot I get following error:

U-Boot 2013.01-00115-g831b30d (Jun 14 2013 - 21:48:56)

CPU0: P2020E, Version: 2.1, (0x80ea0021)
Core: E500, Version: 5.1, (0x80211051)
Clock Configuration:
CPU0:1200 MHz, CPU1:1200 MHz,
CCB:600 MHz,
DDR:400 MHz (800 MT/s data rate) (Asynchronous), LBC:37.500 MHz
L1: D-cache 32 kB enabled
I-cache 32 kB enabled
Board: P2020RDB-PCA CPLD: V4.2 PCBA: V4.0
rom_loc: nor upper bank
SD/MMC : 4-bit Mode
eSPI : Enabled
I2C: ready
SPI: ready
DRAM: Detected UDIMM
1 GiB (DDR3, 64-bit, CL=6, ECC off)
Flash: 16 MiB
L2: 512 KB enabled
NAND: 128 MiB
MMC: FSL_SDHC: 0
PCIe1: Root Complex of mini PCIe SLOT, no link, regs @ 0xffe0a000
PCIe1: Bus 00 - 00
PCIe2: Root Complex of PCIe SLOT, x1, regs @ 0xffe09000
02:00.0 - 1095:3132 - Mass storage controller
PCIe2: Bus 01 - 02
In: serial
Out: serial
Err: serial
Net: eTSEC2 is in sgmii mode.
uploading VSC7385 microcode from ef000000
PHY reset timed out
eTSEC1, eTSEC2, eTSEC3
Hit any key to stop autoboot: 0
Device: FSL_SDHC
Manufacturer ID: 3
OEM: 5344
Name: SL08G
Tran Speed: 50000000
Rd Block Len: 512
SD version 2.0
High Capacity: Yes
Capacity: 7.4 GiB
Bus Width: 4-bit
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
WARNING: adjusting available memory to 30000000
Wrong Image Format for bootm command
ERROR: can't get kernel image!

Where should I put kernel image?

0 Kudos

655 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Marko Frelih,

Do you want to deploy SD u-boot? If so, you need to use boot_format, please refer to this document System Boot from SD/MMC Card with SDK 1.6 images , please use boot format configuration file "config_sram_p1022ds.dat" in SDK 1.9.


Have a great day,
Yiping

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