Bitbake error - unable to create .sdcard file

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

Bitbake error - unable to create .sdcard file

4,924 Views
markbohanon
Contributor III

Hello,

I am having multiple issues that may be related.  I've been attempting to do bitbake fsl-community imx6ulevk core-image-base.  Does anyone have any ideas?  I can't find anything by doing searches on internet.

Ubuntu 16.04 64bit

 

I get following with either core-image-minimal and core-image-base

design@IL14U27fjm72:~/fsl-community-bsp/build$ bitbake -k core-image-minimal

WARNING: Host distribution "Ubuntu-16.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.

Loading cache: 100% |###########################################| ETA:  00:00:00

Loaded 2197 entries from dependency cache.

NOTE: Resolving any missing task queue dependencies

Build Configuration:

BB_VERSION        = "1.30.0"

BUILD_SYS         = "x86_64-linux"

NATIVELSBSTRING   = "universal"

TARGET_SYS        = "arm-poky-linux-gnueabi"

MACHINE           = "imx6ulevk"

DISTRO            = "poky"

DISTRO_VERSION    = "2.1.1"

TUNE_FEATURES     = "arm armv7ve vfp thumb neon callconvention-hard cortexa7"

TARGET_FPU        = "hard"

meta             

meta-poky         = "HEAD:f5da2a5913319ad6ac2141438ba1aa17576326ab"

meta-oe          

meta-multimedia   = "HEAD:247b1267bbe95719cd4877d2d3cfbaf2a2f4865a"

meta-fsl-arm      = "HEAD:e713e9d0cc2fc0dd407e2cbf9d1eea9c573a4de7"

meta-fsl-arm-extra = "HEAD:698cf389aa446244a39b597fbf58be1d55096500"

meta-fsl-demos    = "HEAD:7e4237db1f48cbbde776b17a66d71def14e3809e"

NOTE: Preparing RunQueue

NOTE: Executing SetScene Tasks

NOTE: Executing RunQueue Tasks

ERROR: core-image-minimal-1.0-r0 do_image_sdcard: Function failed: do_image_sdcard (log file is located at /home/design/fsl-community-bsp/build/tmp/work/imx6ulevk-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_image_sdcard.12660)

ERROR: Logfile of failure stored in: /home/design/fsl-community-bsp/build/tmp/work/imx6ulevk-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_image_sdcard.12660

Log data follows:

| DEBUG: Executing python function set_image_size

| DEBUG: Python function set_image_size finished

| DEBUG: Executing shell function do_image_sdcard

| 0+0 records in

| 0+0 records out

| 0 bytes copied, 7.3147e-05 s, 0.0 kB/s

| Error: Error opening /home/design/fsl-community-bsp/build/tmp/deploy/images/imx6ulevk/core-image-minimal-imx6ulevk-20160810183903.rootfs.sdcard: Operation not permitted

| WARNING: exit code 1 from a shell command.

| ERROR: Function failed: do_image_sdcard (log file is located at /home/design/fsl-community-bsp/build/tmp/work/imx6ulevk-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_image_sdcard.12660)

ERROR: Task 16 (/home/design/fsl-community-bsp/sources/poky/meta/recipes-core/images/core-image-minimal.bb, do_image_sdcard) failed with exit code '1'

NOTE: Tasks Summary: Attempted 2064 tasks of which 2056 didn't need to be rerun and 1 failed.

No currently running tasks (2064 of 2066)

Summary: 1 task failed:

/home/design/fsl-community-bsp/sources/poky/meta/recipes-core/images/core-image-minimal.bb, do_image_sdcard

Summary: There was 1 WARNING message shown.

Summary: There was 1 ERROR message shown, returning a non-zero exit code.

design@IL14U27fjm72:~/fsl-community-bsp/build$

log file:

DEBUG: Executing python function set_image_size

DEBUG: Python function set_image_size finished

DEBUG: Executing shell function do_image_sdcard

0+0 records in

0+0 records out

0 bytes copied, 6.2577e-05 s, 0.0 kB/s

Error: Error opening /home/design/fsl-community-bsp/build/tmp/deploy/images/imx6ulevk/core-image-base-imx6ulevk-20160810184401.rootfs.sdcard: Operation not permitted

WARNING: exit code 1 from a shell command.

ERROR: Function failed: do_image_sdcard (log file is located at /home/design/fsl-community-bsp/build/tmp/work/imx6ulevk-poky-linux-gnueabi/core-image-base/1.0-r0/temp/log.do_image_sdcard.12752)

 

I have other issues related to the .sdcard file that may be related.

I am unable to dd a .sdcard file to an SD card.  Person who created .sdcard does not have issue with it.

design@IL14U27fjm72:~$ cd akash/

design@IL14U27fjm72:~/akash$ cd Prototypes/

design@IL14U27fjm72:~/akash/Prototypes$ cd Software/

design@IL14U27fjm72:~/akash/Prototypes/Software$ lsblk

NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT

sda           8:0    0 465.8G 0 disk

─sda1        8:1    0 457.9G 0 part /

─sda2        8:2    0 1K  0 part

└─sda5        8:5    0 7.9G  0 part [SWAP]

sdb 8:16   1   3.6G 0 disk

└─sdb1 8:17   1   3.6G 0 part

mmcblk0     179:0    0 15G  0 disk

└─mmcblk0p1 179:1 0    15G  0 part

design@IL14U27fjm72:~/akash/Prototypes/Software$ sudo dd if=custom-image.rootfs.sdcard of=/dev/mmcblk0 bs=1M && sync

[sudo] password for design:

dd: failed to open 'custom-image.rootfs.sdcard': Operation not permitted

design@IL14U27fjm72:~/akash/Prototypes/Software$ sudo dd if=custom-image.rootfs.sdcard of=mmcblk0 bs=1M && sync

dd: failed to open 'custom-image.rootfs.sdcard': Operation not permitted

design@IL14U27fjm72:~/akash/Prototypes/Software$

I have permissions

-rw-rw-rw- 1 design design 83886080 Jun  9 19:15 custom-image.rootfs.sdcard

If I double click on an .sdcard file, I get permission denied.

I am unable to download from an svn repository

design@IL14U27fjm72:~$ cd akash/

design@IL14U27fjm72:~/akash$ svn checkout https://acssvn.honeywell.com/HSF/NorthAmerica/Video-Beam/trunk/Source/HTS/Prototypes

A Prototypes/Test_Linux_SVN

A Prototypes/Software

A Prototypes/Test_Linux_SVN/Common_SVN_commands.txt

A Prototypes/Test_Linux_SVN/history.txt

A Prototypes/Test_Linux_SVN/SVN_Commands

A Prototypes/Software/my_first_app

A Prototypes/Software/README_custom-image.rootfs.txt

A Prototypes/Software/steps_another_machine.txt

A Prototypes/Software/custom-image.rootfs.sdcard

svn: E155009: Failed to run the WC DB work queue associated with '/home/design/akash/Prototypes/Software', work item 7 (file-install Software/custom-image.rootfs.sdcard 1 0 1 1)

svn: E000001: Can't open file '/home/design/akash/Prototypes/.svn/pristine/2b/2b3cbb47ef36d71c0d315b409f717719aff084b0.svn-base': Operation not permitted

design@IL14U27fjm72:~/akash$

Labels (4)
0 Kudos
2 Replies

1,649 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Mark Bohanon,

There are several variables involved. You didn’t mention what BSP you are using but from the commit information I’m assuming you’re using the Community BSP’s Krogoth branch. My first recommendation if you’re building using Yocto would be to use Ubuntu 14.04 as host as 16.04 has not been tested and may cause issues when building. This is a general recommendation and not specific to the symptoms you’re facing.

It would appear as if Bitbake cannot access the .sdcard file so perhaps you should try doing a clean and then trying baking the image again, if you haven’t already.

$ bitbake -c cleanall core-image-minimal

The issues found when performing the dd are, I think, two fold.

- It seems that the .sdcard file may be corrupted as it cannot be opened by bitbake nor when trying to copy it. I would recommend obtaining the .sdcard file again.

- You are not allowed to write to /dev/mmcblk0 for some reason, which is why there is also a Operation not permitted message. There is a post on an external forum that may be of help (link below) in which it’s recommended to turn off the GEOM’s protection for the MBR of the drive with the following command, perhaps it’s worth a try.

$ sysctl kern.geom.debugflags=0x10

http://www.freebsdonline.com/content/view/666/528/

I am not familiar with SNV as the NXP’s Yocto BSP’s use Git instead but I would recommend making sure that the user settings and access are set correctly.

I hope this helps! Please let us know of your findings!

Regards,

0 Kudos

1,649 Views
markbohanon
Contributor III

Hello Gusarambula,

Thanks, but there is more to it than corrupted file, or problems with sd card.  I have more info to share.  I believe I'm am using Community BSP Krogoth.

Also, I did not originally mention that the .sdcard file I was dd'ing was one that someone else bitbaked and sent to me.  I don't think it's corrupted as explained below.  I think my Ubuntu just does not like the .sdcard files.  Maybe it has something to do with McAfee that IT put on the machine.

I was finally able to get the .sdcard file that was sent to me onto the SD card however,

  •     I could only do this as root user (sudo -s), with the .sdcard file on the USB stick (dd from usb stick to SD card).  The image worked on eval kit
  •     I could not dd it when it was on the hard drive, even as root user.

I was not able to extract a BZip archive .sdcard file downloaded directly from NXP.  I get "An error occurred while extracting files" message.

I am unable to open .sdcard files with gedit.  I get "You do not have the permissions necessary to open the file" error even though I have -rw-rw-rw permissions.  When I use file custom-image.rootfs.sdcard, I get "custom-image.rootfs.sdcard: writable, regular file, no read permission"

So it seams to be a problem with my Ubuntu not reading .sdcard files from the hard drive.  BTW, the bitbake does write some .sdcard files, the ones with a version number (ie. core-image-base-imx6ulevk-2016081084401.rootfs.sdcard).

BTW, I get "sysctl: cannot stat /proc/sys/kern/geom/debugflags: No such file or directory"

0 Kudos