[yocto] [meta-raspberrypi] du giving non-integer result?
Trevor Woerner
twoerner at gmail.com
Sun Sep 6 19:40:52 PDT 2015
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
More information about the yocto
mailing list