All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trevor Woerner <twoerner@gmail.com>
To: "yocto@yoctoproject.org" <yocto@yoctoproject.org>
Subject: [meta-raspberrypi] du giving non-integer result?
Date: Sun, 6 Sep 2015 22:40:52 -0400	[thread overview]
Message-ID: <55ECF934.80902@gmail.com> (raw)

I can't explain why, but when I build "core-image-minimal" for
MACHINE=raspberrpi2 I get the following SD creation error:

    ERROR: Error: The image creation script
    '/z/layerindex-master/raspi2/tmp/work/raspberrypi2-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/create_image.rpi-sdimg'
    returned 2:
    expr: non-integer argument
    WARNING:
    /z/layerindex-master/raspi2/tmp/work/raspberrypi2-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/create_image.rpi-sdimg:1
    exit 2 from
      ROOTFS_SIZE_ALIGNED=$(expr 12288.0 + 4096 - 1)


Looking at meta-raspberrypi/classes/sdcard_image-rpi.bbclass, line 83:

    ROOTFS_SIZE_ALIGNED=$(expr ${ROOTFS_SIZE} +
${IMAGE_ROOTFS_ALIGNMENT} - 1)

which looks like the offending line. ROOTFS_SIZE seems to come from the
line immediately above:

    ROOTFS_SIZE=`du -bks ${SDIMG_ROOTFS} | awk '{print $1}'`

But 'du' doesn't return non-integer values, does it? When I invoke the
host's 'du' I get the correct value:

    du -bks
/z/layerindex-master/raspi2/tmp/deploy/images/raspberrypi2/core-image-minimal-raspberrypi2-20150906234844.rootfs.ext3
| awk '{print $1}'
    12288

Does anyone have any idea why the ".0" is getting tacked on?

Best regards,
    Trevor


             reply	other threads:[~2015-09-07  2:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-07  2:40 Trevor Woerner [this message]
2015-09-07  7:21 ` [meta-raspberrypi] du giving non-integer result? Khem Raj
2015-09-07  7:40   ` Trevor Woerner
2015-09-08  5:56     ` Michael Fainstein
2015-09-25 14:12       ` Dave Wolaver
2015-09-25 15:00         ` Daniel.
2015-09-11  1:37 ` Trevor Woerner
2015-09-17  4:14   ` Jonathan Liu
2015-09-23 20:12     ` Andrei Gherzan
2015-09-24  0:44       ` Trevor Woerner
2015-09-24  7:36       ` Colin Helliwell
2015-10-21 12:14         ` Andrei Gherzan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55ECF934.80902@gmail.com \
    --to=twoerner@gmail.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.