All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-raspberrypi] du giving non-integer result?
@ 2015-09-07  2:40 Trevor Woerner
  2015-09-07  7:21 ` Khem Raj
  2015-09-11  1:37 ` Trevor Woerner
  0 siblings, 2 replies; 12+ messages in thread
From: Trevor Woerner @ 2015-09-07  2:40 UTC (permalink / raw)
  To: yocto@yoctoproject.org

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


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-10-21 12:14 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-07  2:40 [meta-raspberrypi] du giving non-integer result? Trevor Woerner
2015-09-07  7:21 ` 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

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.