-
Notifications
You must be signed in to change notification settings - Fork 21
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
Build Yocto with recent EVerest release #76
Comments
I've successfully built the 'core-image-sato' yocto image as described in the yocto project quick build. https://docs.yoctoproject.org/brief-yoctoprojectqs/index.html I used a Debian 12 VM with 4 threads and 8GB of RAM. It took ~12 hours with no downloaded substitutes. I'm currently working on trying to run the image in a VM outside of the build environment. It looks like right now that Yocto only supports virtualization with QEMU. I think they used to support Virtualbox as suggested by this post I found, but it failed when I tried the config it suggested. QEMU supports converting images with |
There is also a mac version of QEMU (https://wiki.qemu.org/Hosts/Mac). I am 99% sure that the android emulator is built on qemu. I remember seeing that in a menu item or process name, at least in an earlier version of the emulator. |
Yes, that's correct. I'm looking into Virtualbox so that we can also test on windows. |
There is also a qemu for windows?! Note that the android emulator also has an android version. It is only iOS that needs xcode. https://www.qemu.org/download/ |
Oh, I wasn't aware of that. I'll look into just qemu for now. |
runqemu qemux86-64 = |
Following this guide to setup yocto dev environment on Mac. https://github.com/crops/docker-win-mac-docs/wiki/Mac-Instructions |
Did the |
Yes I built yocto on Debian outside of a VM and it worked. Currently testing building on a Mac |
Was it faster outside of the VM? |
Yes, it was faster. This time I actually did record the time for it, it was 301 min, ~5 hours. |
Building a core image for the orangepi zero2
Add required layers for orangepi zero2:The CWD: poky
CWD: poky/build - init script changes directory to
Edit
|
Building core-image-full-cmdline for my orangepi-zero2 on my Debian 12 laptop took ~2 hours
|
Output of the orangepi build:
Need to figure out what to do with these files |
Successful orangepi build on MacIt got to 50% in 30 minutes and then failed with an error. After I fixed the error it took about another 30 minutes so total time was an hour. How to build Yocto on MacIf you your using an older amd64 Mac you can follow this guide, otherwise use this one Once you have your build container up you need to enter the root shell on it to install some packages and run locale-gen
Then go back to your user shell and it should be ready to build an image. See #76 (comment) for how to build an image. VPN IssuesI had some connection issues while building the docker containers and building yocto while I was connected to the NREL VPN. I just disconnected from the VPN temporarily to get around it. I'm not sure if that's going to be an issue for people who are on site at NREL. |
Contents of
|
Not sure what the part command is it's not in the yocto environment or on my debian system |
This seems to clarify things https://linux-sunxi.org/Bootable_SD_card#Partitioning I don't think |
I'm running into issues building certain images on Mac. The orange pi image built fine, but when I try to build a qemu image it fails. I'm hoping it's something to do with the build environment and not a problem with MacOS or Docker.
|
Adding everest to a core imageAdd this line to
Switch to Setup layers:
Then start the build for your image. If you run into an issue where Contents of
Move
|
I started the qemu image and everest wasnt running. It appears everest provides a systemd service, so I'm going to try enabling systemd and seeing what happens after. I added this to the config to enable systemd.
|
Some clarification on the dependencies @shankari you asked if Opening the bitbake file for everest-core,
It does include nodejs, I'm not sure why. And then
So I don't believe node red is being pulled in. You would have to add it explicitly by adding |
Interesting. After the CharIN demo, I think it would be helpful to try both options:
But for now, we are just going to get this working.... |
@shankari Is there any specific testing you want me to do now that I have this running? |
wait, that was a mistake
I already did roll back the entire module. Here's the patch file I'm using |
@catarial, I realized that the config file needs this line changed: https://github.com/catarial/meta-charin-demo/blob/65c65c7a029b72bf30f5a94dd6a1da23fc91bf38/recipes-core/everest/files/config-charin.yaml#L92 Device in the iso15118_charger config should be set to eth1
|
I am pretty sure that the PLC "modem" is exposed as a serial interface and not an ethernet interface. @ed-watt do you know where you saw that it was an ethernet interface? |
EvseSlac module takes a device config that the manifest.yaml describes as "Ethernet device used for PLC". That was already set to eth1 in the config that Aria linked and I think it would error out if that was not a PLC device based on the EvseSlac module code. It defaults to eth1 also if not set explicitly and maybe the yocto build configuration ensures that the PLC device gets enumerated as eth1 consistently. The EvseV2G module on the other hand is set to auto in our config and defaults to eth0 if not set. The auto setting also seems to end up choosing eth0 from my experience with SIL and the uMW testing we've done so far. That is happening here too, see these log messages:
This needs to be set to eth1, the ethernet interface for the PLC where the charging messages will arrive, or else the V2G messages will not get seen by the EvseV2G module. We saw this in our recent lab testing and fixed by changing auto to eth1. |
Interesting. I went back and double-checked my notes, and the firmware update is indeed via the serial port.
Reading through the Pionix documentation, I see that there are two boards:
I guess the power delivery board (uMWC-Yeti) is connected to the Yak board via a serial port (aka "10 pin connector for high level board with control UART"). The uMWC-Yeti has separate firmware because "the very basic state machine for states A-F remains in the microcontroller. This basic state machine is essential for electrical safety as it is the actual decision point for switching power on/off etc." So we update the firmware over a serial port. And since we are dealing with the uMWC-Yeti instead of the Yeti, we can't use the same firmware as the Belay Box.[1] When we ssh into the uMWC, we are running on the Yak board, and can see the PLC modem as an ethernet port. The BSP driver runs on the Yak and communicates with the uMWC-Yeti over the serial port. Ah I understand all this so much better now; hopefully it helps some others too 😄 [1] I still don't understand why the firmware needs to be so different. Presumably they are using the same microcontroller (STM32), if they use the same input and output pins as the open hardware, the same firmware can theoretically be used for both, right? I thought it might be because the classic Yeti communicates with a power controller while the uMWC-Yeti outputs the 1W of power directly, but that can't be true because the output is at 1000V, which a regular CPU can't output. It must also have a power controller. Something to think about and understand better after CharIN |
Debugging techniques:
-> to be safe, pull of journalctl logs before powering down, as they're only somewhat persistent, depends on the size tried for packet sniffer, but not currently working, maybe we can try to get it working for testival, some obstacles encountered - error at the end of the attempted packet captured, as triggered by EVSE manager -- could test in software by potentially faking out with MQTT ---- failing with a blank error now so debugging will take a while Ethernet: 192.168.1.100 |
Results of 11/7 testing:
|
For ethernet, make sure your interface is configured to be on the same subnet |
what is firmware v1.0? I would suggest putting in a month for now; and we should suggest to the community that the firmware also has proper release numbering. You could also post this into the Zulip Chat. Congrats! It turned out to be fairly easy at the end, but I know it took a lot of effort to get here. |
I have no idea. It should be either the firmware version that came with the charger when it was bought or whatever firmware was flashed most recently. |
The firmware that was flashed most recently is from June 2024, so let's call it the 2024.06 firmware. What changed? |
Ah, "yet" turned out to be the key word in that log message, it got initialized/"enabled" shortly after that log, which @ed-watt pointed out and I think @catarial confirmed by adding log statements. |
@catarial has figured this out, but it requires a Linux machine. Will close after we have a setup that allows others (namely me) to build as well. ETA this week. |
Running into issues where nodejs requires QEMU to cross compile and it seems like I don't have the proper permissions to run QEMU on NREL's HPC. |
can we do without nodejs for the yocto build? |
yes, but we wouldn't be able to use certain modules cause I think some of them use nodejs, the hardware ones should be fine. |
Right, so can we try with removing that, since the build is fast?! Would be much easier than sshing into my personal server from CharIN if I need to make any last minute changes |
@shankari yeah, I just need to figure out how to remove it since I'm pulling in the image from the yeti-yak-sdk |
It works! I ran into an issue where the node was writing to RAM instead of local storage so my build files disappeared. To fix that you just need to request local storage with |
Building Yocto for NREL HPC users: This is meant to be run interactively for now, I plan to write an sbatch script in the future.
You can also copy out all of See https://nrel.gov/hpc and https://nrel.github.io/HPC/ for help with HPC |
@catarial after we save the build, what do we do? How do we run the new code on the uMWC? |
@catarial can you also generate a build with all the patches from main? I am not able to log into the HPC from here... |
Will it be enough to just apply the compile patches |
Flashing The uMWC After A Yocto Build
Connecting Via EthernetI configured the charger to use On MacOS and Linux you can go into your network settings after the charger is on The password for Setting Up WifiI didn't have enough time to add the wifi configs to the build so you have to After copying the configs you can setup a hotspot with the name Connecting to everest-demoChange the Make sure to run Edit If you're only using one EvseManager, remove You can change the everest config by either editing |
@catarial we don't need it, but I would like the library patches as well if possible. |
Sorry that took longer than expected, uploading the image to teams right now |
Alas:
we will be better prepared for the next testival… |
I am going to try to build once on my own and then close this issue |
The text was updated successfully, but these errors were encountered: