kernel plugin: kernel targets depending on debarch #689

Merged
merged 3 commits into from Aug 5, 2016

Conversation

Projects
None yet
4 participants
Collaborator

sergiusens commented Jul 27, 2016

This allows using the same snapcraft.yaml to build kernels
for different arches as they have different image targets.

LP: #1604801

Signed-off-by: Sergio Schvezov sergio.schvezov@ubuntu.com

kernel plugin: kernel targets depending on debarch
This allows using the same snapcraft.yaml to build kernels
for different arches as they have different image targets.

LP: #1604801

Signed-off-by: Sergio Schvezov <sergio.schvezov@ubuntu.com>
Collaborator

sergiusens commented Jul 29, 2016

retest this please

Collaborator

sergiusens commented Aug 4, 2016

@leannogasawara any updates on testing for this?

On Wed, Aug 3, 2016 at 6:21 PM, Sergio Schvezov notifications@github.com
wrote:

@leannogasawara https://github.com/leannogasawara any updates on
testing for this?

Yep, Paolo tested this last week:

<goog_1295843>
https://bugs.launchpad.net/snapcraft/+bug/1604801/comments/3

"With this patch i was able to snap, from the same kernel tree, kernels for
amd64, arm64 and armhf - looks good."

Thanks,
Leann

Collaborator

sergiusens commented Aug 4, 2016

thanks @leannogasawara :-)

snapcraft/plugins/kernel.py
@@ -23,8 +23,8 @@
The following kernel specific options are provided by this plugin:
- kernel-image-target:
- (string; default: bzImage)
- the kernel image make target to build; maps to make target.
+ (yaml object; default: bzImage)
@elopio

elopio Aug 4, 2016

Member

Shouldn't this be: a string or a yaml object?
I think the help should explain that you can pass only one target, and how.

@sergiusens

sergiusens Aug 4, 2016

Collaborator

Yeah probably so

snapcraft/plugins/kernel.py
@@ -157,6 +153,23 @@ def enable_cross_compilation(self):
self.project.kernel_arch))
self.make_cmd.append('CROSS_COMPILE={}'.format(
self.project.cross_compiler_prefix))
+ self._set_kernel_targets()
@elopio

elopio Aug 4, 2016

Member

I'm confused here. Why do you call it again if you already called it in the init?

@sergiusens

sergiusens Aug 4, 2016

Collaborator

Backwards compatibility.

@sergiusens

sergiusens Aug 4, 2016

Collaborator

It depends on kernel arch from the debarch

sergiusens added some commits Aug 5, 2016

+ 'oneOf': [
+ {'type': 'string'},
+ {'type': 'object'},
+ ],
@kyrofa

kyrofa Aug 5, 2016

Member

I didn't know you could do this! Would have made some earlier changes easier.

Member

kyrofa commented Aug 5, 2016

I like it 👍

@sergiusens sergiusens merged commit f0a19eb into snapcore:master Aug 5, 2016

3 of 4 checks passed

autopkgtest snaps Started
Details
autopkgtest integration Success
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.007%) to 97.185%
Details

@sergiusens sergiusens deleted the sergiusens:bugfix/1604801/kernel-target-selection branch Aug 30, 2016

kalikiana pushed a commit to kalikiana/snapcraft that referenced this pull request Apr 6, 2017

kernel plugin: kernel targets depending on debarch (#689)
This allows using the same snapcraft.yaml to build kernels
for different arches as they have different image targets.

LP: #1604801

Signed-off-by: Sergio Schvezov <sergio.schvezov@ubuntu.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment