Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix building kernel for sama5d3xek and sama5d3 xplained #37

Conversation

gizero
Copy link
Contributor

@gizero gizero commented Mar 9, 2015

This patchset adresses some problems I found while using meta-atmel for the first time. By following verbatim the instructions in README I came up with broken build for kernel recipe, which this patches solve, at least in my environment. Please help in reviewing them.

Issues belong to either of:

  • dependencies on tools which are not explicitly handled by metadata in meta-atmel, relying on them being installed on the host build system
  • the commit pointed to by the current kernel recipe (linux-yocto-custom_3.10) is broken at least for sama5d3{-xplained|xek} machines

Both issues were already discussed on the forum at the following links, but no solution was publicly provided:

Patches were designed to minimize the impact of the changes on current tree and to ensure that:

  • no additional dependencies need to be satisfied outside of Yocto
  • linux-yocto-custom_3.10 kernel recipe should be AUTOREV by default (I asked if so on #at91) but allow to pin SRCREV for specific machines that require to

gizero added 6 commits March 7, 2015 11:37
* every supported machine currently uses u-boot. Hence set the variable's
value to "uImage" and do it in conf/machine/include/bootloaders.inc for
convenience
* setting the variable triggers kernel recipes to bring in
u-boot-mkimage-native as a dependency (see kernel.bbclass)
* this patch fixes missing mkimage while running do_deploy_append() from
linux-yocto-custom_3.10.bbappend (required for sama5d3xek, where
UBOOT_FIT_IMAGE is set). This error pops up only when no
uboot-mkimage is installed on the host, which should not be required.
(discussed at http://www.at91.com/discussions/viewtopic.php/f,12/t,22461.html)
* do_deploy_append() uses mkimage to generate uboot FIT image: this
brings in a dependency on dtc-native for sama5d3xek where UBOOT_FIT_IMAGE is set
* fixes building with no dtc locally installed on the host as discussed
at http://www.at91.com/discussions/viewtopic.php/f,12/t,22461.html
* stick with linux-yocto-custom template: this variable is internally
used by kernel.bbclass
* this can be later overridden on a per-machine basis to allow sticking
with particular revisions
* this will be the default behaviour. Any machine that require to
can override it by setting SRCREV_machine_mymachine
* building with latest linux-3.10-at91 is broken at least for sama5d3xek and
sama5d3-xplained as discussed in [1].
* stick with latest working revision as long as we have a fix in
linux-3.10-at91: c7d17a25afd62259d31459751647261e978bfe32 seems the merge
commit to blame

[1] http://www.at91.com/discussions/viewtopic.php/t,23774.html
* fixes "[: =: unexpected operator" error in log.do_deploy when
${UBOOT_FIT_IMAGE} is not set
@noglitch
Copy link
Member

We've just changed the linux-3.10-at91 branch with a fix that must correct your issue.
I prefer to address this problem like this than changing the layer. So I close the pull-request.

(I take your patch about the missing quotes BTW).
But as Alexandre said, we plan to move to dizzy a modify a bunch of recipes...

Thanks: it was very useful as a "heads up". Bye.

@noglitch noglitch closed this Mar 10, 2015
@gizero
Copy link
Contributor Author

gizero commented Mar 11, 2015

@alexandrebelloni I'll investigate on alternative approaches to ensure that required dependencies are provided by the build system and not by the host environment without defaulting KERNEL_IMAGETYPE to uImage

@gizero
Copy link
Contributor Author

gizero commented Mar 11, 2015

@noglitch Thanks for reviewing the patches. I agree that fixing the kernel is the right approach: I'll run a test on your latest commit. I'm also doing some work with dizzy and meta-atmel: looking forward to see @alexandrebelloni's patch-set landing in master with dizzy support. Will also do some more investigation on the external tools dependency problems (namely u-boot-mkimage and dtc) this patches were meant to solve. I suspect they still exists for dizzy.

@gizero gizero deleted the fix-building-kernel-for-sama5d3xek-and-sama5d3-xplained branch March 13, 2015 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants