add pre-built binaries/files to romfs p2020DS sdk 1.0.3

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

add pre-built binaries/files to romfs p2020DS sdk 1.0.3

727 Views
brianlarsen
Contributor I

Hello,

 

I am having issues adding a pre-built binary to my romfs. Let’s call it hello_world.  I follow the steps in User_Manual_QorIQ_SDK_20110707.pdf in the FAQ section there is a question  claiming how to do this: “6. Q:How to adding a pre-built ppc binary to the rootfs” , yes “how to adding”…and I follow the instructions and when I try to run bitbake devel-image or bitbake minimal-image I get the error “ERROR: Required build target ‘devel-image’ has now buildable providers”…

I am trying to do it this way because I cannot find any documentation on how to set up a network file system while running linux on the target. Setting it up with U-boot works just fine, and I can tftp the images/filesystem to the flash or ram just fine.  I really don’t care at this time how I get hello_world on the p2020ds, I just need to get it on there while running linux. I can only get the minimal-image to boot/run on the p2020ds so I am not sure if that will even support the NFS on the target.

Thank you.

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

442 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Brian,


You could use the following methods to get the pre-built binaries on the target board.


1. Adding a pre-built ppc binary to the rootfs

a. $ cd <system_builder_installation_path>

b. Create a new custom collection, for example, mycollection/

$ mkdir -p mycollection/recipes/merge-files

c. Create files/merge folder in mycollection/recipes/merge-files

$ cd mycollection/recipes/merge-files

$ mkdir -p files/merge

Put the files in files/merge, e.g. put bash into files/merge/usr, bash will be included in usr/ of the new

rootfs.

d. Create an amend.inc file for image recipes

$ mkdir -p mycollection/recipes/images

$ touch mycollection/recipes/images/amend.inc

e. Append new packages to the existing packages list as the following

$ echo "PROJECT_EXTRA_PKGS += \" merge-files\"" > mycollection/recipes/images/amend.inc

f. Update the project configuration.

$ ./scripts/create-config.py --config-file=fsl-<bsp>/sample-create-config<bit-type>.ini --overridecollection

mycollection –t 2 –j 4

g. Build new rootfs image

$ bitbake devel-image

If your problem remains, please share your build log.

2. Setup the target board with devel-image, and use ifconfig configure ethernet port, then use "scp" command to copy the prebuilt binary from the remote to the target board.

3. Build and set up NFS rootfs filesystem and copy the prebuilt binaries into filesystem.

Add “IMAGE_FSTYPES = tar.gz” in build_<bsp>_release/conf/local.conf to generate a rootfs for NFS.

Please run following command to re-generate the rootfs image

$ bitbake devel-image


Have a great day,
Yiping

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

442 Views
brianlarsen
Contributor I

Hello,

 

Yes, that did put the image in the rootfs for the devel-iamge. It seems that
you copied and pasted that out of documentation of some sort, where is this
document? It seems to have slight differences than what I am trying to use,
that made it work correctly. Also, one typo in it is a dash in between
override-collection.

 

$ ./scripts/create-config.py --config-file=fsl-<bsp>/sample-create-config<bit-type>.ini –override-collection

 

I cannot seem to run the devel-image on the p2020ds out of ram because I run
out of memory before linux is even booted.. Nor can I tftp my “hello_world”
program into ram while running the minimal-iamge, because I only have 64Mbytes and the program is 64.4Mbytes. (Used the 'df' command) The documentation on running out of the hard disk does not work, and I am hoping you can point me to new/correct documentation, or explain how to boot out of flash in to the hard disk drive.

 

Thank you for your help,

Brian

0 Kudos

442 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Brian,


I only adjust the sort of the last steps to make the procedure  simpler.


Do you mean devel-image is too large to boot with ramdisk?

You could follow the above steps to build minimal ramdisk filesystem with "bitbake minimal-image", and boot the system with minimal-image including your program binary.

If you want to boot the system from hard disk, there should be a filesystem  named <BOARD NAME>_<DATE>_LRFS.tgz in the image ISO CD,  please mount your SATA hard disk and exact it in one SATA partition with the command "tar -zxvf BOARD NAME>_<DATE>_LRFS.tgz".

Set u-boot environment as the following.

setenv bootcmd 'setenv bootargs root=/dev/sda1 rw console=ttyS0,115200;sata init;ext2load sata 0:1 1000000 /boot/uImage;ext2load sata 0:1 c00000 /boot/<dtb_file>;bootm 1000000 - c00000'

Assume the partition number is 1.


Have a great day,
Yiping

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

0 Kudos