Comment 11 for bug 716627

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

Still broken for me, but because of another bug.

Call trace with current trunk:
`/tmp/tmpkA7QQp/u-boot/u-boot.bin' -> `/tmp/tmpEetHIm/boot-disc/u-boot.bin'
Traceback (most recent call last):
  File "./linaro-media-create", line 170, in <module>
    args.is_live, args.is_lowmem, args.consoles)
  File "/home/rsalveti/projects/linaro/linaro-image-tools/linaro_image_tools/media_create/boards.py", line 706, in populate_boot
    rootfs_uuid, boot_disk, boot_device_or_file)
  File "/home/rsalveti/projects/linaro/linaro-image-tools/linaro_image_tools/media_create/boards.py", line 817, in make_boot_files
    rootfs_uuid, boot_dir, boot_device_or_file)
  File "/home/rsalveti/projects/linaro/linaro-image-tools/linaro_image_tools/media_create/boards.py", line 587, in make_boot_files
    parts_dir)
  File "/home/rsalveti/projects/linaro/linaro-image-tools/linaro_image_tools/media_create/boards.py", line 714, in _get_kflavor_files
    return cls._get_kflavor_files_v2(path)
  File "/home/rsalveti/projects/linaro/linaro-image-tools/linaro_image_tools/media_create/boards.py", line 753, in _get_kflavor_files_v2
    "No kernel found matching %s." % (cls.vmlinuz))
ValueError: No kernel found matching vmlinuz-*-linaro-omap.

This is happening because path is pointing to chroot instead of chroot/boot, because of the following change:
270 def make_boot_files(cls, uboot_parts_dir, is_live, is_lowmem, consoles,
271 chroot_dir, rootfs_uuid, boot_dir, boot_device_or_file):
272 + if cls.hwpack_format == HardwarepackHandler.FORMAT_1:
273 + parts_dir = uboot_parts_dir
274 + else:
275 + parts_dir = chroot_dir

uboot_parts_dir is basically chroot_dir + "boot", so it works fine with V1 but then with V2 it fails as it'll try to look for the kernel file at chroot_dir instead.

Why can't we just use uboot_parts_dir for both? (and the variable name seems weird, as it's nothing actually related with uboot).