aboutsummaryrefslogtreecommitdiffstats
path: root/packages/gpe-today/gpe-today-0.08/.mtn2git_empty
blob: e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 (plain)

" with the port number which is used. # # Usage: # IMAGE_CLASSES += "qemuboot" # See "runqemu help" for more info QB_MEM ?= "-m 256" QB_SERIAL_OPT ?= "-serial mon:stdio -serial null" QB_DEFAULT_KERNEL ?= "${KERNEL_IMAGETYPE}" QB_DEFAULT_FSTYPE ?= "ext4" QB_OPT_APPEND ?= "-show-cursor" # Create qemuboot.conf ROOTFS_POSTPROCESS_COMMAND += "write_qemuboot_conf; " def qemuboot_vars(d): build_vars = ['MACHINE', 'TUNE_ARCH', 'DEPLOY_DIR_IMAGE', 'KERNEL_IMAGETYPE', 'IMAGE_NAME', 'IMAGE_LINK_NAME', 'STAGING_DIR_NATIVE', 'STAGING_BINDIR_NATIVE', 'STAGING_DIR_HOST'] return build_vars + [k for k in d.keys() if k.startswith('QB_')] write_qemuboot_conf[vardeps] += "${@' '.join(qemuboot_vars(d))}" python write_qemuboot_conf() { import configparser qemuboot = "%s/%s.qemuboot.conf" % (d.getVar('DEPLOY_DIR_IMAGE', True), d.getVar('IMAGE_NAME', True)) qemuboot_link = "%s/%s.qemuboot.conf" % (d.getVar('DEPLOY_DIR_IMAGE', True), d.getVar('IMAGE_LINK_NAME', True)) cf = configparser.ConfigParser() cf.add_section('config_bsp') for k in qemuboot_vars(d): cf.set('config_bsp', k, '%s' % d.getVar(k, True)) # QB_DEFAULT_KERNEL's value of KERNEL_IMAGETYPE is the name of a symlink # to the kernel file, which hinders relocatability of the qb conf. # Read the link and replace it with the full filename of the target. kernel_link = os.path.join(d.getVar('DEPLOY_DIR_IMAGE', True), d.getVar('QB_DEFAULT_KERNEL', True)) kernel = os.path.realpath(kernel_link) cf.set('config_bsp', 'QB_DEFAULT_KERNEL', kernel) bb.utils.mkdirhier(os.path.dirname(qemuboot)) with open(qemuboot, 'w') as f: cf.write(f) if os.path.lexists(qemuboot_link): os.remove(qemuboot_link) os.symlink(os.path.basename(qemuboot), qemuboot_link) }