-
Notifications
You must be signed in to change notification settings - Fork 77
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
Added Raspberrypi2 support #40
Conversation
Hi Izak, great that you are already got it working! Some questions/remarks:
|
|
|
There are still some things about bitbake I don't understand, clearly. I was concerned that just adding it into the jethro configuration would cause the recipes to pollute the ccgx and bbb builds. I want those changes (for example the kernel patches) to only apply to the rpi2 build. I already made a pull request for meta-victronenergy. It only adds a configuration for simple-upnpd, without which it doesn't build. I forked meta-raspberrypi because of this issue. The patch the commenter refers to is quite old, yet there is no movement on the issue. How do we deal with something like this, where a fix is needed but it is not making it into upstream? |
Polluting is prevented by having a linux-[machine-name] in meta-bsp and referencing it from the conf files as the preferred virtual/kernel provider. Yes, we'll take the upnp commit. I'm on holiday and Jeroen has v1.70 as his priority. So things take a little while. When an additional patch is necessary, we'll clone the repo into github/victronenergy, and make a new branch. So the master branch can be kept up to date with upstream. @jhofstee is the specialist in this. |
It seems as if this is already taken care of in the meta-raspberrypi layer. So I can just add it into the jethro config then. |
Also created a pull request into the meta-raspberrypi layer for the kernel config patch. |
Our conf files include some more info than the default one in meta-raspberrypi. Which serial ports are dedicated vedirect ports for example (none for a raspberrypi ;) so that is a bad example). Just copy that one from meta-raspberrypi and add the other parts that you see in beaglebone.conf and bpp3.conf. As an example, specify 'headless', as in beaglebone. At least I assume most people will want to run the rpi2 headless. (??) machine-runtime-config will create /etc/venus/headless. And that will make the GUI / and Remote Console functions initialize with a different set of defaults: Remote Console on LAN enabled, so one can set the thing up without having to buy a proper tv or USB keyboard or adafruit touchscreen. Details here in the GUI run script. In case adding headless to the machine features breaks the option to add a touchscreen, we could make a separate variable for it that isn't already used in OE. |
I'll probably close this PR later, then rebase the changes and make a new one. Just keeping this here for now. |
So this is my present problem. If I copy that machine conf file into the meta-bsp layer, it doesn't work because bitbake finds the one in the meta-raspberrypi layer first. If I change the layer's priority, it still finds it first. If I rename the raspberrypi2.conf file in that layer to force it to find the meta-bsp one first, then it works. So far I have not been able to figure out a way to extend machine configurations. So that leaves me with a few options.
Any ideas? I'm leaning towards option 1. |
Well, on 1 and 2: we'll never implicitly get support. There will always be some work required. At the very least some settings in the [machine].conf file. How much recipes and things do we need to copy over to meta-victronenergy to no longer need meta-raspberrypi? Perhaps it is an idea to try that first? If it is not too much, I'd say yes let's do that. |
I think it's just two recipes. The one for the kernel, and the one for the firmware. The rest of the recipes in the layer has to do with bluetooth, media players, development stuff (WiringPi etc). So agreed then, I'll go with option 1. |
In the end, I had to bring over three recipes, and this all went into meta-victronenergy. So I will close this PR shortly. The bits I had to steal:
Then it also needs:
Finally, this repo needs just one change: Add "raspberrypi2" to the machines file. |
Hello Izak, On 07-08-16 18:36, Izak Burger wrote:
First of all, openembedded has a search function for metas, so you can We do need u-boot though, I guess, to make updates reliable, since we Regards, |
Indeed, https://github.com/agherzan/meta-raspberrypi is simply forked to the yocto project, so it is the same. I mentioned it in the commit log. I rebased now and made one commit of it. I'm not sure how to integrate u-boot at all. What I've read so far is you "hack" it to use u-boot by copying the bootable image to kernel7.img on the FAT partition of the pi. Then you chainload u-boot (like you chainloaded a linux boot sector from boot.ini on windows NT in the old days). I'll need to figure out how u-boot works on the others to see if we can bridge this divide. Sadly I just don't know enough about it. For now, here it is. I was at the point of making a pull request, but then I saw your message, and now I need to read up on u-boot first. https://github.com/izak/meta-victronenergy/tree/rpi-integration |
Don't worry about u-boot for now, lets make the rest work first. Sounds like you are almost there. Some comments on these lines on the rpi conf file:
Leave VE_MKx_PORT empty. And to prevent the executable from endlessly running on the rpi add something like DAEMONTOOLS_DOWN_raspberrypi2 = "1" to the vecan_mk2 recipe. There are no real VE.Direct ports on the rpi, right? So leave VE_VEDIRECT_PORTS empty as well. And that might mess up the serial starter script, (might not! I haven't tested it). If it does, fix that here. |
ps on u-boot we have some other experts that I can pull in when necessary |
ps2: the end result will / should be an image that works plug & play with VE.Direct USB devices. Also Fronius inverters and some other things by the way. And quite soon we'll be able to have plug & play for VE.Bus (Inverters/Quattros) as well. This needs the MK3-USB. The sw developer that is finishing off support for that into Venus will be back in the office from his summer holidays on Wednesday. |
On u-boot: It seems the BBB and the CCGX use the same setup where /boot is on the first FAT partition, so it might not be THAT different to what I know. I made the *_PORTS empty and force-pushed it (having rewritten history and all). Using /dev/ttyAMA0 was a little cheeky, it would allow you to tie a vedirect via a level converter to one of the headers of the Rpi. I doubt anyone would ever use it like that. That is to say, the Rpi doesn't have real vedirect ports just like the BBB doesn't have real vedirect ports, but it does have a TTL-level serial port just like the BBB :-) There is also a fix to serial-starter I can suggest, which I saw some weeks ago, where you don't need to escape the slashes in the TTY_DEV used in the I'm going to move this discussion to the new pull request then, will link it here. |
Pull Request is now here. |
No description provided.