[OE-core] create_image() fails with cannot concatenate 'str' and 'NoneType'error
Paul Eggleton
paul.eggleton at linux.intel.com
Tue Jan 27 15:16:08 UTC 2015
On Tuesday 27 January 2015 07:55:56 Walter Giroir wrote:
> I am relatively new to the Yocto environment so I’m probably not defining
> something correctly here.
>
> The IMAGE_CLASSES appears to be configured properly.
>
> bitbake -e | grep ^IMAGE_CLASSES
> IMAGE_CLASSES=" sdcard_image-sunxi-wigwag"
>
>
>
> I added a few “debug” statements in image.py around line 300
>
> for fstype_group in fstype_groups:
> image_cmds = []
> for type in fstype_group:
> cmds = []
> subimages = []
>
> localdata = bb.data.createCopy(self.d)
> localdata.setVar('OVERRIDES', '%s:%s' % (type,
> old_overrides)) bb.data.update_data(localdata)
> localdata.setVar('type', type)
> print "************************"
> print "************************"
> print fstype_group
> print type
> print localdata.getVar("IMAGE_CMD", True)
> print "************************"
> print "************************"
> cmds.append("\t" + localdata.getVar("IMAGE_CMD", True))
> cmds.append(localdata.expand("\tcd ${DEPLOY_DIR_IMAGE}"))
>
>
> And the end of the log.do_rootfs.pid shows the output of the print
> statements File:
> '/home/walt/workspace/wwrelay-rootfs/yocto/meta/lib/oe/image.py', lineno:
> 305, function: _get_imagecmds 0301: print type
> 0302: print localdata.getVar("IMAGE_CMD", True)
> 0303: print "************************"
> 0304: print "************************"
> *** 0305: cmds.append("\t" + localdata.getVar("IMAGE_CMD",
> True)) 0306: cmds.append(localdata.expand("\tcd
> ${DEPLOY_DIR_IMAGE}")) 0307:
> 0308: if type in cimages:
> 0309: for ctype in cimages[type]:
> Exception: TypeError: cannot concatenate 'str' and 'NoneType' objects
>
> DEBUG: Python function do_rootfs finished
> ERROR: Function failed: do_rootfs
> ************************
> ************************
> ['tar', 'ext3', 'sunxi-sdimg']
> tar
> tar -cvf
> /home/walt/workspace/wwrelay-rootfs/yocto/build/tmp/deploy/images/wigwagrel
> ay/wigwag-prod-lsb-wigwagrelay-20150127133345.rootfs.tar -C
> /home/walt/workspace/wwrelay-rootfs/yocto/build/tmp/work/wigwagrelay-poky-l
> inux-gnueabi/wigwag-prod-lsb/1.0-r0/rootfs . ************************
> ************************
> ************************
> ************************
> ['tar', 'ext3', 'sunxi-sdimg']
> ext3
> oe_mkext234fs ext3 -i 4096
> ************************
> ************************
> ************************
> ************************
> ['tar', 'ext3', 'sunxi-sdimg']
> sunxi-sdimg
> None
> ************************
> ************************
>
>
> It looks like it’s not looking at the second group
>
> NOTE: The image creation groups are: [['tar', 'ext3', 'sunxi-sdimg'],
> ['sunxi-wigwag-sdimg']]
>
>
>
>
> Here are my BBLAYERS
>
> > bitbake -e | grep ^BBLAYERS=
>
> BBLAYERS="/home/walt/workspace/wwrelay-rootfs/yocto/meta
> /home/walt/workspace/wwrelay-rootfs/yocto/meta-yocto
> /home/walt/workspace/wwrelay-rootfs/yocto/meta-yocto-bsp
> /home/walt/workspace/wwrelay-rootfs/meta-sunxi
> /home/walt/workspace/wwrelay-rootfs/meta-wigwag-relay
> /home/walt/workspace/wwrelay-rootfs/yocto/meta-hob"
>
> Which does contain our layer:
> /home/walt/workspace/wwrelay-rootfs/meta-wigwag-relay
>
> The conf file for this layer contains:
> > cat /home/walt/workspace/wwrelay-rootfs/meta-wigwag-relay/conf/layer.conf
>
> # We have a conf and classes directory, append to BBPATH
> BBPATH .= ":${LAYERDIR}"
>
> # We have a recipes directory, add to BBFILES
> BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend"
>
> BBFILE_COLLECTIONS += "wigwagrelay"
> BBFILE_PATTERN_wigwagrelay := "^${LAYERDIR}/"
> BBFILE_PRIORITY_wigwagrelay = "10"
>
>
>
> The machine conf;
>
> > cat
> > /home/walt/workspace/wwrelay-rootfs/meta-wigwag-relay/conf/machine/wigwag
> > relay.conf
> #@TYPE: Machine
> #@NAME: WigWag Relay
> #@DESCRIPTION: Machine configuration for the WigWag Relay, based on
> allwinner a10 CPU
>
> # Only has DVI connector for external screen
> GUI_MACHINE_CLASS = "bigscreen"
>
> require conf/machine/include/tune-cortexa7.inc
> require conf/machine/include/sunxi-wigwag.inc
> require conf/machine/include/sunxi-mali.inc
>
> UBOOT_MACHINE = "wigwag_controller_config"
> UBOOT_ENTRYPOINT = "0x40008000"
> UBOOT_LOADADDRESS = "0x40008000"
>
> #MACH=sun4i
> #KERNEL_CONFIG=sun4i_defconfig
>
>
> SERIAL_CONSOLE = "115200 ttyS0"
>
> MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat alsa wifi"
>
> And the contents of sunxi-wigwag.inc add the IMAGE_CLASSES:
>
> cat
> /home/walt/workspace/wwrelay-rootfs/meta-wigwag-relay/conf/machine/include/
> sunxi-wigwag.inc PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
> XSERVER = "xserver-xorg \
> xf86-video-fbturbo \
> xf86-input-evdev \
> xf86-input-mouse \
> xf86-input-keyboard"
>
> PREFERRED_PROVIDER_virtual/kernel = "linux"
> PREFERRED_VERSION_linux-libc-headers = "3.4.61"
>
> KERNEL_IMAGETYPE = "uImage"
>
> IMAGE_CLASSES += "sdcard_image-sunxi-wigwag"
> IMAGE_FSTYPES += "ext3 tar.gz sunxi-wigwag-sdimg"
>
> MACHINE_EXTRA_RRECOMMENDS = "kernel-modules"
OK, so from what I can see, no IMAGE_CMD is defined for sunxi-sdimg which
apparently is in IMAGE_FSTYPES, that's what's actually triggering the error.
This error prevents the code from continuing on to the second group.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
More information about the Openembedded-core
mailing list