How to make a bootable SD/MMC-Card with U-boot for P2020RDB-PCA?

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

How to make a bootable SD/MMC-Card with U-boot for P2020RDB-PCA?

Jump to solution
3,441 Views
pradeepsysargus
Contributor II

I am in Ubuntu. I am using SDK 1.7 document for reference.

What is the procedure to create a bootable SD/MMC-Card with U-boot for P2020RDB-PCA.?

We have used the following link for reference, but it is a different target - Orange Pi

Please suggest.

Thanks,

1 Solution
2,592 Views
ufedor
NXP Employee
NXP Employee

This seems to be a typo.

In the document it is written:

"In SDK 1.6, after run “bitbake boot-format”, boot-format binary is deployed in <project>/tmp/sysroots/x86_64-linux/usr/bin/boot_format"

Please modify the command beginning:

# <install_path>/build_p1020rdb_release/tmp/sysroots/x86_64-linux/usr/bin/boot_format

as follows:

# <install_path>/build_p1020rdb_release/tmp/sysroots/x86_64-linux/usr/bin/boot_format/boot_format

Please note that it could be more convenient to put all three files (boot_format, U-Boot image and DAT file) into a single directory to simplify command sintax like:

./boot_format <config_file> <image> –sd <dev>

View solution in original post

11 Replies
2,592 Views
pradeepsysargus
Contributor II

santosh@santosh-Inspiron-3542:~/Freescale/build/p2020rdb/tmp/sysroots/p2020rdb/usr/bin/boot_format $

~/Freescale/build/p2020rdb/tmp/sysroots/p2020rdb/usr/bin/boot_format ~/Freescale/build/p2020rdb/tmp/sysroots/p2020rdb/usr/share/boot_format/config_sram_p1022ds.dat u-boot-sd-P2020RDB-PC_SDCARD-2014.07+fslgit-r0.bin -sd /dev/mmcblk0

bash: /home/santosh/Freescale/build/p2020rdb/tmp/sysroots/p2020rdb/usr/bin/boot_format: Is a directory

0 Kudos
Reply
2,593 Views
ufedor
NXP Employee
NXP Employee

This seems to be a typo.

In the document it is written:

"In SDK 1.6, after run “bitbake boot-format”, boot-format binary is deployed in <project>/tmp/sysroots/x86_64-linux/usr/bin/boot_format"

Please modify the command beginning:

# <install_path>/build_p1020rdb_release/tmp/sysroots/x86_64-linux/usr/bin/boot_format

as follows:

# <install_path>/build_p1020rdb_release/tmp/sysroots/x86_64-linux/usr/bin/boot_format/boot_format

Please note that it could be more convenient to put all three files (boot_format, U-Boot image and DAT file) into a single directory to simplify command sintax like:

./boot_format <config_file> <image> –sd <dev>

2,592 Views
pradeepsysargus
Contributor II

'<install_path>/build_p1020rdb_release/tmp/sysroots/x86_64-linux/usr/bin/boot_format' is a directory.

0 Kudos
Reply
2,592 Views
ufedor
NXP Employee
NXP Employee

'<install_path>/build_p1020rdb_release/tmp/sysroots/x86_64-linux/usr/bin/boot_format'

This obviously is an example which can't be used "as is".

Note that <install_path> represents a placeholder for the real PATH string.

It is a software developer responsibility to adjust the command for the specific case.

0 Kudos
Reply
2,592 Views
pradeepsysargus
Contributor II

We used the real PATH, I did not place it 'as is'. I am doubtful if the command syntax is correct as the first argument we are giving a directory path without any file

0 Kudos
Reply
2,592 Views
ufedor
NXP Employee
NXP Employee

Excuse me, it was several times requested to provide REAL command string and log.

0 Kudos
Reply
2,592 Views
pradeepsysargus
Contributor II

The steps that we did after inserting a blank 4GB SD card into the Linux Host are as follow:

# fdisk /dev/mmcblk0 (This command is used to divide the card into two partitions, one for fat16 file system(1GB) and another for ext4 file system(3GB))

The current partitions that are configured on the host are as follow:

Disk /dev/mmcblk0: 4026 MB, 4026531840 bytes
4 heads, 16 sectors/track, 122880 cylinders, total 7864320 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x08836c9a

        Device      Boot      Start         End        Blocks     Id    System
/dev/mmcblk0p1            2048     2099199     1048576    e  W95 FAT16 (LBA)
/dev/mmcblk0p2         2099200   7864319     2882560   83  Linux

After this partitioning the following command need to be executed I suppose:

<path>/boot_format <config_file> <image> -sd <dev>

The above command expands as follow:

# <install_path>/build_p1020rdb_release/tmp/sysroots/x86_64-linux/usr/bin/boot_format  <install_path>/build_p1020rdb_release/ tmp/sysroots/x86_64-linux/share/boot_format/config_sram_p2020rdb.dat u-boot-sd-P2020RDB-PC_SDCARD.bin -sd  /dev/mmcblk0

The above command seem to be copying config file and bin file to sd/mmc card.

But this command is not working.

0 Kudos
Reply
2,592 Views
ufedor
NXP Employee
NXP Employee

Please provide the commad execution log.

0 Kudos
Reply
2,592 Views
ufedor
NXP Employee
NXP Employee

Please refer to the sections 1.1 and 1.2 in the attached document.

0 Kudos
Reply
2,592 Views
pradeepsysargus
Contributor II

Thanks for the reply.

Can you explain the command:

# <install_path>/build_p1020rdb_release/tmp/sysroots/x86_64-linux/usr/bin/boot_format    <install_path>/build_p1020rdb_release/ tmp/sysroots/x86_64-linux/share/boot_format/config_sram_p1022ds.dat    u-boot-sd-P2020RDB-PC_SDCARD.bin   -sd    /dev/sdb

We tried with it, it says '<install_path>/build_p1020rdb_release/tmp/sysroots/x86_64-linux/usr/bin/boot_format' is a directory.

0 Kudos
Reply
2,592 Views
ufedor
NXP Employee
NXP Employee

What exactly you have tried?

Please provide the log.

0 Kudos
Reply