Adding a file/folder in rootfs nxp yocto build

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Adding a file/folder in rootfs nxp yocto build

7,098件の閲覧回数
rammurmu
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

ラベル(1)
0 件の賞賛
6 返答(返信)

4,853件の閲覧回数
Pavel
NXP Employee
NXP Employee
  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 件の賞賛

4,853件の閲覧回数
rammurmu
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 件の賞賛

4,853件の閲覧回数
Pavel
NXP Employee
NXP Employee

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 件の賞賛

4,853件の閲覧回数
rammurmu
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 件の賞賛

4,853件の閲覧回数
Pavel
NXP Employee
NXP Employee

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 件の賞賛

4,853件の閲覧回数
rammurmu
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 件の賞賛