Merge lp:~salgado/linaro-image-tools/panda into lp:linaro-image-tools/11.11

Proposed by Guilherme Salgado
Status: Merged
Merged at revision: 247
Proposed branch: lp:~salgado/linaro-image-tools/panda
Merge into: lp:linaro-image-tools/11.11
Diff against target: 138 lines (+25/-20)
1 file modified
linaro_media_create/boards.py (+25/-20)
To merge this branch: bzr merge lp:~salgado/linaro-image-tools/panda
Reviewer Review Type Date Requested Status
Loïc Minier (community) Approve
James Westby (community) Approve
Review via email: mp+46163@code.launchpad.net

Description of the change

l-m-c expects the kernel images for panda boards to have a 'omap4' suffix but that's not the case as panda (currently) use the same kernel as beagle. This branch fixes that.

To post a comment you must log in.
Revision history for this message
James Westby (james-w) wrote :

Is this really a bug in the hwpacks?

Shouldn't they use omap4 for omap4?

Either way I have no problem with this change as the config should match the hwpacks.

Thanks,

James

review: Approve
Revision history for this message
Guilherme Salgado (salgado) wrote :

Do you mean that the hwpack wrongly includes omap3 packages instead of
the omap4 ones?

Revision history for this message
Guilherme Salgado (salgado) wrote :

Indeed there's a x-loader-omap4 package which has the MLO under /usr/lib/x-loader-omap4 and a -omap4 linux-image package which contain the vmlinuz-...-omap4 file that l-m-c expects. Given that I think this is really a bug on hwpacks.

Revision history for this message
Guilherme Salgado (salgado) wrote :

as per bug 702645, the new x-loader-omap will place the MLO file in different directories, but there are concerns that this is not optimal so it may be changed again. John suggested running a find on /usr/lib for a file named MLO as there should be only one there.

also, the -omap kernel is the one we should use for pandas, so indeed we seem to need to change sub_arch on PandaConfig to 'omap', but since that attr is only used to lookup the appropriate vmlinuz image, we might as well rename it to reflect that

Revision history for this message
Loïc Minier (lool) wrote :

The -omap kernel package is the right one though, at least for a mainline-based omap4 kernel package (we use the same binary kernel for OMAP3 and OMAP4). There might still be an omap4 package for some time.

We really ought to move this information in the hwpack itself so that the name doesn't matter too much.

Revision history for this message
Guilherme Salgado (salgado) wrote :

On Tue, 2011-01-18 at 23:56 +0000, Loïc Minier wrote:
> The -omap kernel package is the right one though, at least for a
> mainline-based omap4 kernel package (we use the same binary kernel for
> OMAP3 and OMAP4). There might still be an omap4 package for some
> time.

The -omap kernel is the one used for panda on this branch, so I assume
you're concurring with my changes?

>
> We really ought to move this information in the hwpack itself so that
> the name doesn't matter too much.

Indeed.

Revision history for this message
Loïc Minier (lool) wrote :

Yes, I think it's the right change

Now to the scary part: it might make sense to provide a panda hwpack built from mainline kernels, and then a TI BSP based one; I don't know how we would name them, maybe -panda and -ti-panda. Again this will be really confusing unless we move the meat of the boards' data to the hwpacks themselves.

Revision history for this message
Steve Langasek (vorlon) wrote :

On Wed, Jan 19, 2011 at 02:13:14PM -0000, Loïc Minier wrote:
> Now to the scary part: it might make sense to provide a panda hwpack built
> from mainline kernels, and then a TI BSP based one; I don't know how we
> would name them, maybe -panda and -ti-panda.

What about "panda-bsp" or "bsp-panda"? Calling it "-ti-" is also ambiguous.

Revision history for this message
Loïc Minier (lool) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'linaro_media_create/boards.py'
2--- linaro_media_create/boards.py 2011-01-18 17:22:00 +0000
3+++ linaro_media_create/boards.py 2011-01-18 18:08:52 +0000
4@@ -31,7 +31,7 @@
5 kernel_addr = None
6 initrd_addr = None
7 load_addr = None
8- sub_arch = None
9+ kernel_suffix = None
10 boot_script = None
11
12 @classmethod
13@@ -101,8 +101,9 @@
14 def _make_boot_files(cls, uboot_parts_dir, boot_cmd, chroot_dir,
15 boot_dir, boot_script, boot_device_or_file):
16 install_omap_boot_loader(chroot_dir, boot_dir)
17- make_uImage(cls.load_addr, uboot_parts_dir, cls.sub_arch, boot_dir)
18- make_uInitrd(uboot_parts_dir, cls.sub_arch, boot_dir)
19+ make_uImage(
20+ cls.load_addr, uboot_parts_dir, cls.kernel_suffix, boot_dir)
21+ make_uInitrd(uboot_parts_dir, cls.kernel_suffix, boot_dir)
22 make_boot_script(boot_cmd, boot_script)
23 make_boot_ini(boot_script, boot_dir)
24
25@@ -114,7 +115,7 @@
26 kernel_addr = '0x80000000'
27 initrd_addr = '0x81600000'
28 load_addr = '0x80008000'
29- sub_arch = 'linaro-omap'
30+ kernel_suffix = 'linaro-omap'
31 boot_script = 'boot.scr'
32 extra_boot_args_options = (
33 'earlyprintk fixrtc nocompcache vram=12M omapfb.debug=y '
34@@ -128,7 +129,7 @@
35 kernel_addr = '0x80200000'
36 initrd_addr = '0x81600000'
37 load_addr = '0x80008000'
38- sub_arch = 'omap4'
39+ kernel_suffix = 'linaro-omap'
40 boot_script = 'boot.scr'
41 extra_boot_args_options = (
42 'earlyprintk fixrtc nocompcache vram=32M omapfb.debug=y '
43@@ -141,8 +142,9 @@
44 @classmethod
45 def _make_boot_files(cls, uboot_parts_dir, boot_cmd, chroot_dir,
46 boot_dir, boot_script, boot_device_or_file):
47- make_uImage(cls.load_addr, uboot_parts_dir, cls.sub_arch, boot_dir)
48- make_uInitrd(uboot_parts_dir, cls.sub_arch, boot_dir)
49+ make_uImage(
50+ cls.load_addr, uboot_parts_dir, cls.kernel_suffix, boot_dir)
51+ make_uInitrd(uboot_parts_dir, cls.kernel_suffix, boot_dir)
52 make_boot_script(boot_cmd, boot_script)
53 make_boot_ini(boot_script, boot_dir)
54
55@@ -153,7 +155,7 @@
56 kernel_addr = '0x00100000'
57 initrd_addr = '0x08000000'
58 load_addr = '0x00008000'
59- sub_arch = 'ux500'
60+ kernel_suffix = 'ux500'
61 boot_script = 'flash.scr'
62 extra_boot_args_options = (
63 'earlyprintk rootdelay=1 fixrtc nocompcache '
64@@ -165,8 +167,9 @@
65 @classmethod
66 def _make_boot_files(cls, uboot_parts_dir, boot_cmd, chroot_dir,
67 boot_dir, boot_script, boot_device_or_file):
68- make_uImage(cls.load_addr, uboot_parts_dir, cls.sub_arch, boot_dir)
69- make_uInitrd(uboot_parts_dir, cls.sub_arch, boot_dir)
70+ make_uImage(
71+ cls.load_addr, uboot_parts_dir, cls.kernel_suffix, boot_dir)
72+ make_uInitrd(uboot_parts_dir, cls.kernel_suffix, boot_dir)
73 make_boot_script(boot_cmd, boot_script)
74
75
76@@ -176,7 +179,7 @@
77 kernel_addr = '0x90000000'
78 initrd_addr = '0x90800000'
79 load_addr = '0x90008000'
80- sub_arch = 'linaro-mx51'
81+ kernel_suffix = 'linaro-mx51'
82 boot_script = 'boot.scr'
83 mmc_part_offset = 1
84 mmc_option = '0:2'
85@@ -187,8 +190,9 @@
86 uboot_file = os.path.join(
87 chroot_dir, 'usr', 'lib', 'u-boot', 'mx51evk', 'u-boot.imx')
88 install_mx51evk_boot_loader(uboot_file, boot_device_or_file)
89- make_uImage(cls.load_addr, uboot_parts_dir, cls.sub_arch, boot_dir)
90- make_uInitrd(uboot_parts_dir, cls.sub_arch, boot_dir)
91+ make_uImage(
92+ cls.load_addr, uboot_parts_dir, cls.kernel_suffix, boot_dir)
93+ make_uInitrd(uboot_parts_dir, cls.kernel_suffix, boot_dir)
94 make_boot_script(boot_cmd, boot_script)
95
96
97@@ -199,7 +203,7 @@
98 kernel_addr = '0x60008000'
99 initrd_addr = '0x81000000'
100 load_addr = kernel_addr
101- sub_arch = 'linaro-vexpress'
102+ kernel_suffix = 'linaro-vexpress'
103 boot_script = None
104 # ARM Boot Monitor is used to load u-boot, uImage etc. into flash and
105 # only allows for FAT16
106@@ -208,8 +212,9 @@
107 @classmethod
108 def _make_boot_files(cls, uboot_parts_dir, boot_cmd, chroot_dir,
109 boot_dir, boot_script):
110- make_uImage(cls.load_addr, uboot_parts_dir, cls.sub_arch, boot_dir)
111- make_uInitrd(uboot_parts_dir, cls.sub_arch, boot_dir)
112+ make_uImage(
113+ cls.load_addr, uboot_parts_dir, cls.kernel_suffix, boot_dir)
114+ make_uInitrd(uboot_parts_dir, cls.kernel_suffix, boot_dir)
115
116
117 board_configs = {
118@@ -256,17 +261,17 @@
119 raise ValueError("Too many files matching '%s' found." % regex)
120
121
122-def make_uImage(load_addr, uboot_parts_dir, sub_arch, boot_disk):
123+def make_uImage(load_addr, uboot_parts_dir, suffix, boot_disk):
124 img_data = _get_file_matching(
125- '%s/vmlinuz-*-%s' % (uboot_parts_dir, sub_arch))
126+ '%s/vmlinuz-*-%s' % (uboot_parts_dir, suffix))
127 img = '%s/uImage' % boot_disk
128 return _run_mkimage(
129 'kernel', load_addr, load_addr, 'Linux', img_data, img)
130
131
132-def make_uInitrd(uboot_parts_dir, sub_arch, boot_disk):
133+def make_uInitrd(uboot_parts_dir, suffix, boot_disk):
134 img_data = _get_file_matching(
135- '%s/initrd.img-*-%s' % (uboot_parts_dir, sub_arch))
136+ '%s/initrd.img-*-%s' % (uboot_parts_dir, suffix))
137 img = '%s/uInitrd' % boot_disk
138 return _run_mkimage('ramdisk', '0', '0', 'initramfs', img_data, img)
139

Subscribers

People subscribed via source and target branches