Adding a file/folder in rootfs nxp yocto build

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a file/folder in rootfs nxp yocto build

2,480 Views
Contributor III

Hi ,

   I am trying to add a file in rootfs so that the subsequent built image contain the added file/folder. I am performing the following steps -

1. Adding an entry for file in base-files_3.0.14.bb

2. Keeping corresponding file under ../poky/meta/recipes-core/base-files/base-files/

3. bitbake -c compile base-files

4. bitbake fsl-image-minimal

I am getting the following error -

ERROR: QA Issue: non debug package contains .debug directory: base-files path /work/p1022ds-fsl-linux-gnuspe/base-files/3.0.14-r86/packages-split/base-files/.debug/test_i2c_p1022
ERROR: QA run found fatal errors. Please consider fixing them.
ERROR: Function failed: do_package_qa
ERROR: Logfile of failure stored in: /home/ram/POTP/SDK-V1.8/QorIQ-SDK-V1.8-20150619-yocto/build_p1022ds_release/tmp/work/p1022ds-fsl-linux-gnuspe/base-files/3.0.14-r86/temp/log.do_package.8502
ERROR: Task 747 (/home/ram/POTP/SDK-V1.8/QorIQ-SDK-V1.8-20150619-yocto/poky/meta/recipes-core/base-files/base-files_3.0.14.bb, do_package) failed with exit code '1'

What is the problem and how to rectify it.

Regards

Ram

Labels (1)
0 Kudos
6 Replies

235 Views
NXP TechSupport
NXP TechSupport
  1. Create new empty file system using mkfs command:

https://en.wikipedia.org/wiki/Mkfs

and

https://linux.die.net/man/8/mkfs

 

  1. Copy you file system to new empty file system using command: cp -af

See the following page:

https://superuser.com/questions/307541/copy-entire-file-system-hierarchy-from-one-drive-to-another

 

Other method:

Change size of your file system.

See the following pages:

https://access.redhat.com/articles/1196333

 

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration...


Have a great day,
Pavel Chubakov

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

0 Kudos

235 Views
Contributor III

How to increase the size of your ramdisk -

1. Rename your RAM disk image to rootfs.ext2.gz.uboot and keep it under say '/home/ram/ramdisk_work'

2. Run 'sudo apt-get install u-boot-tools'

3. Run 'dd if=rootfs.ext2.gz.uboot of=rootfs.ext2.gz bs=64 skip=1'

4. Run 'gunzip rootfs.ext2.gz'

5. Run 'mkdir /mnt/iso_1'

6. Run 'sudo mount -o loop rootfs.ext2 /mnt/iso_1'

7. Now resize(increase) the size of ramdisk using the following steps -

        7.1 Run 'sudo umount /mnt/iso_1'

        7.2 Run 'sudo e2fsck -f /home/ram/ramdisk_work/rootfs.ext2'

        7.3 Run 'resize2fs /home/ram/ramdisk_work/rootfs.ext2 50M'  ## to increase the size to 30M from prev. smaller size

        7.4 Run 'sudo mount -o loop rootfs.ext2 /mnt/iso_1'

8. Now, one can copy files into appropriate location under “/mnt/iso_1” directory. e.g.

        8.1 Run 'sudo cp -af ~/xyz.bin .'

        8.2 Run 'sudo cp -af ~/abc.ko .'

9. Run 'sudo umount /mnt/iso_1'

10. Run 'gzip -9 rootfs.ext2'

11. Run 'mkimage -A ppc -O linux -T ramdisk -C gzip -n 'rootfs.ext2.gz.uboot' -d rootfs.ext2.gz rootfs.ext2.gz.uboot'

12. rootfs.ext2.gz.uboot thus created under '/home/ram/ramdisk_work' may be programmed on the target, that will contain the required executables.

Regards

Ram

0 Kudos

235 Views
NXP TechSupport
NXP TechSupport

Check permissions for this folder. It looks like that this folder is read-only.


Have a great day,
Pavel Chubakov

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

0 Kudos

235 Views
Contributor III

Hi Pavel,

 I could copy some of the binaries(smaller in size). The problem is something related to size I doubt.

The error is as follows on coping binary to that folder (/mnt/iso_1)

cp: error writing ‘/mnt/iso_1/./bcm.user’: No space left on device
cp: failed to extend ‘/mnt/iso_1/./bcm.user’: No space left on device

Regards

Ram

0 Kudos

235 Views
NXP TechSupport
NXP TechSupport

Look at SDK 2.0-1703 documentation about adding a pre-built binary into the rootfs:

http://www.nxp.com/docs/en/supporting-information/QORIQ-SDK-2.0-IC-REV0.pdf

Find FAQ in this document.

 

There is the other method for adding your files to RAM disk image

Use the following command sequence for adding file to RAM disk image.

  1. rename your RAM disk image to rootfs.ext2.gz.uboot
  2. sudo apt-get install u-boot-tools

Following are the steps for adding files into rootfilesystem:

 

  1. dd if=rootfs.ext2.gz.uboot of=rootfs.ext2.gz bs=64 skip=1

 

  1. gunzip rootfs.ext2.gz

 

  1. mkdir /mnt/iso_1

 

  1. sudo mount -oloop rootfs.ext2 /mnt/iso_1

 

  1. Now, one can copy files into appropriate location under “./mnt/iso_1” directory.

 

  1. sudo umount /mnt/iso_1

 

  1. gzip -9 rootfs.ext2

 

  1. mkimage -A ppc -O linux -T ramdisk -C gzip -n 'rootfs.ext2.gz.uboot' -d rootfs.ext2.gz rootfs.ext2.gz.uboot


Have a great day,
Pavel Chubakov

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

0 Kudos

235 Views
Contributor III

Thanks Pavel for your reply.

After step 5 , when I try to copy binaries into the location /mnt/iso_1, it says "No space left on device". How the size of mounted location can be increased to accommodate more binaries.

Regards

Ram

0 Kudos