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

KERNEL_DEVICETREE cannot be extended #300

Closed
nandra opened this issue Aug 3, 2018 · 5 comments
Closed

KERNEL_DEVICETREE cannot be extended #300

nandra opened this issue Aug 3, 2018 · 5 comments

Comments

@nandra
Copy link
Contributor

nandra commented Aug 3, 2018

I'm trying to add more dtbo to final image by specifying in linux-raspberrypi.bbappend or in local.conf by extending KEREL_DEVICETREE += "overlays/pwm.dtbo" but looks like when specify it in local.conf variable KERNEL_DEVICETREE is overwritten or when specify it in linux-raspberrypi.bbeappend it have no effect. Any ideas how to extend this variable to get more dtbo's on target? I workarounded it by extending variable in rpi-base.conf (but I would like to avoid that ;) ) Thanks.

@agherzan
Copy link
Owner

agherzan commented Aug 3, 2018

Hi @nandra . Have you tried appending? We are doing something similar here: https://github.com/resin-os/resin-raspberrypi/blob/master/layers/meta-resin-raspberrypi/conf/layer.conf#L17. Appending using _append.

@nandra
Copy link
Contributor Author

nandra commented Aug 3, 2018

I tried += also _append but it doesn't work. I'll re-check and report status (maybe my env gets broken somehow). Thanks.

@nandra
Copy link
Contributor Author

nandra commented Aug 29, 2018

OK with _append it work which is quite strange because I assume that += also should work. Anyway when looking in rpi-base.inc we have

KERNEL_DEVICETREE ?= " \

so softval is used while in
raspberrypi3-64.conf there is:

KERNEL_DEVICETREE = " \

So maybe this could be a problem that when user want to add something to KERNEL_DEVICETREEE for non 64bit rpi then it cannot be overwritten? Thanks.

@aswild
Copy link
Contributor

aswild commented Sep 20, 2018

  • local.conf is parsed before the ${MACHINE}.conf, so any sets with = in a machine (or distro) config will override local.conf
  • Using += will clobber a default set with ?= (I'm not sure why bitbake behaves this way, but it does)
  • Using _append should work around both of these (because _append is treated like an override and processed at the end of variable expansion)
  • You need to modify KERNEL_DEVICETREE in a .conf file, not by bbappending the kernel recipe, because KERNEL_DEVICETREE is used in multiple recipes (the kernel but also the image recipes via sdcard_image-rpi.bbclass)

@nandra
Copy link
Contributor Author

nandra commented Oct 2, 2018

@aswild thanks for detailed description. I think we can close this issue as _append works as expected. Thanks.

@nandra nandra closed this as completed Oct 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants