Merge lp:~mabac/linaro-image-tools/igep-fix into lp:linaro-image-tools/11.11

Proposed by Mattias Backman
Status: Merged
Merged at revision: 431
Proposed branch: lp:~mabac/linaro-image-tools/igep-fix
Merge into: lp:linaro-image-tools/11.11
Diff against target: 42 lines (+14/-7)
1 file modified
linaro_image_tools/media_create/boards.py (+14/-7)
To merge this branch: bzr merge lp:~mabac/linaro-image-tools/igep-fix
Reviewer Review Type Date Requested Status
Ricardo Salveti (community) Approve
Guilherme Salgado (community) Approve
Review via email: mp+74968@code.launchpad.net

Description of the change

Hi,

This branch removes the assert that checks for uboot_flavor when uboot_in_boot_part is True. Instead we assert that an actual uboot file is found.

This resolves the issue where l-m-c fails for igep when the uboot_in_boot_part field in hwpacks v2 is set but the uboot_flavor never was set in l-m-c.

Thanks,

Mattias

To post a comment you must log in.
Revision history for this message
Guilherme Salgado (salgado) wrote :

Looks good to me

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

Just tested and it ran fine, also copying u-boot.bin to the first partition.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'linaro_image_tools/media_create/boards.py'
2--- linaro_image_tools/media_create/boards.py 2011-08-31 13:35:02 +0000
3+++ linaro_image_tools/media_create/boards.py 2011-09-12 11:07:58 +0000
4@@ -375,6 +375,7 @@
5
6 @classmethod
7 def get_file(cls, file_alias, default=None):
8+ # XXX remove the 'default' parameter when V1 support is removed!
9 file_in_hwpack = cls.hardwarepack_handler.get_file(file_alias)
10 if file_in_hwpack is not None:
11 return file_in_hwpack
12@@ -594,17 +595,23 @@
13 cmd_runner.run(['mkdir', '-p', boot_disk]).wait()
14 with partition_mounted(boot_partition, boot_disk):
15 if cls.uboot_in_boot_part:
16- assert cls.uboot_flavor is not None, (
17- "uboot_in_boot_part is set but not uboot_flavor")
18 with cls.hardwarepack_handler:
19- default = os.path.join(
20- chroot_dir, 'usr', 'lib', 'u-boot', cls.uboot_flavor,
21- 'u-boot.img')
22- if not os.path.exists(default):
23+ # <legacy v1 support>
24+ if cls.uboot_flavor is not None:
25 default = os.path.join(
26 chroot_dir, 'usr', 'lib', 'u-boot', cls.uboot_flavor,
27- 'u-boot.bin')
28+ 'u-boot.img')
29+ if not os.path.exists(default):
30+ default = os.path.join(
31+ chroot_dir, 'usr', 'lib', 'u-boot', cls.uboot_flavor,
32+ 'u-boot.bin')
33+ else:
34+ default = None
35+ # </legacy v1 support>
36 uboot_bin = cls.get_file('u_boot', default=default)
37+ assert uboot_bin is not None, (
38+ "uboot binary could not be found")
39+
40 proc = cmd_runner.run(
41 ['cp', '-v', uboot_bin, boot_disk], as_root=True)
42 proc.wait()

Subscribers

People subscribed via source and target branches