-
Notifications
You must be signed in to change notification settings - Fork 22
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? |
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 |
For the record, the customizations are checked in to @catarial's repo The base image is specified in The patches are applied through files in We are currently applying two patches
Let's see which others we need.
The first is really the most important one for setting up AC charging demos using the uMWC in the US. |
When @catarial shared a build with me earlier, she shared both a Ah it is a block map, which can be used to flash quickly. wrt
Not sure Balena Etcher supports the bmap file. if the bmaptool is recommended, let's see if we can get it for the mac. But wait, it is a python package. Can I just install it using pypi? Can I install it using Nope
|
Tried to use
Next steps:
|
Pulled the latest version of
|
Switched to a different USB port on my laptop. The Yak board now has a green LED turned on and I can see the There's no
Unmounting, and then using
Fails even though I use sudo
This is apparently because of issues with macos sandbox I was also not able to give the terminal "Full Disk Access". |
Personal laptop doesn't have enough resources to install both xcode and command line tools. |
there is an easier option that does not require futzing around with re-flashing, which is to cross-compile. However, when I tried to cross-compile last night, I ran into issues with "Illegal instruction". I tried running:
and all of them failed with the same error. I tried running with My laptop was upgraded to Sequoia last week, and I installed a new version of docker, but I double checked my messages and my recollection, and the timeline was:
I am not sure exactly why this happened, but there was another update (Sequoia -> Sequoia) last week, which may have something to do with it. It is fairly clear that the error happens because we are trying to run an x86 binary on an arm chip, and the virtualization isn't working for some reason. So something might have changed in the virtualization. Searching the internet indicates that some flakiness may be due to Rosetta @catarial for visibility |
Switching to the legacy QEMU emulation seems to have resolved the issues - I ran into the "Illegal instruction" error multiple times while setting up the cross-compile chain before and I didn't this time. HOWEVER, cross-compiling using x86 seems super weird here. We are running this on a arm chip; why do we need to emulate x86 so that we can compile back to arm? Well, we know why; it is because the image is not multi-platform. @catarial I wonder if one thing you can work while waiting for additional guidance is resolving the multi-platform issue so that we can lower the emulation overhead and compile arm <-> arm. This may also resolve the issues around having to patch for arm. It will likely involve a deeper understanding of what docker is doing under the hood wrt virtualization. It will likely not help @mjun70 since he is running on an intel mac anyway, but it may give some insight in case it is a generic virtualization issue |
I was able to get a successful build of the manager image in this repository on my silicon mac if that's what you mean. |
Successful build using which setup? Did you use a docker container? Did you use the cross-compile toolchain? |
The text was updated successfully, but these errors were encountered: