[meta-ti] has anyone actually tested sdcard_image.bbclass?

Trevor Woerner twoerner at gmail.com
Thu Jan 10 15:01:53 PST 2013


On Thu, Jan 10, 2013 at 10:11 AM, Robert P. J. Day <rpjday at crashcourse.ca>
wrote:
>> > ===== start =====
>> > ... big snip ...
>> > | /etc/fstab entries need to be created with the user flag for the
>> > loop devices like:
>> > | /dev/loop2
>> >
/home/rpjday/oe/builds/ti/bone/tmp-eglibc/work/beaglebone-oe-linux-gnueabi/core-image-minimal/1.0-r0/tmp-mnt-boot
>> > vfat user 0 0

>   i'm going to be testing all of the above again shortly from scratch
> to make sure it wasn't something silly i did.  but if someone wants to
> see if they can reproduce it, all i did was a standard configure using
> meta-ti layer for a beaglebone and i built a core-image-minimal.


I followed the same procedure and met the same end.

I was able to get the build to complete without error (NOTE: i don't own
this
device, so i can't be sure it all worked, but the build completed) with the
help of the following:

1) edit /etc/fstab

The build is telling you to update your /etc/fstab (which you have to do as
root, and which is very *this*-build-specific. In your case it wants you to
add the following line:

    /dev/loop2
/home/rpjday/oe/builds/ti/bone/tmp-eglibc/work/beaglebone-oe-linux-gnueabi/core-image-minimal/1.0-r0/tmp-mnt-boot
vfat user 0 0

2) path fixup

I'm building using openSuSE 12.2 so all the various hard-coded paths in the
script are wrong. Instead of "/sbin/fsdisk" mine is found at
"/usr/sbin/fsdisk".
I had to go through the entire script and perform that fixup for all such
paths.

3) genext2fs code hack

Within 5 yards of finish line the 'genext2fs' step fails with the following
error msg:

  genext2fs: set_file_size: ftruncate: Invalid argument

I googled and googled and couldn't find an answer. I found other people
with the
same problem, but others only said "works for me". In the end I actually
went
into the code of genext2fs and commented out the body of the
"set_file_size()"
function! I then replaced the one being called by the script with my new
one and
the build could then complete without error.

4) use the "root"

As I mentioned before, this script's use of losetup definitely requires root
permissions on my system. At first I made losetup "+s". Then sfdisk needed
more permissions, then dd, then... In the end I just simply ran bitbake as
root.
Of course, by default, bitbake complains and won't run as root, so I had to
"touch conf/sanity.conf" to force it.

After all these hacks (and maybe more?) I was able to get the build to
complete without
error. Whether or not the results are useful I'm not sure. In the end I
ended up with the
following artifact:


tmp/deploy/images/core-image-minimal-beagleboard-20130110215340-2013.01.10.img.gz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-ti/attachments/20130110/afcfb09b/attachment.html>


More information about the meta-ti mailing list