Thank you Alida. Just one query if it’s appropriate to ask here. I’m curious about how my Balena login picks up my device when the only thing I appear to have given the image before flashing it is configured it with an app name. If that was the case, I would expect to see other people’s devices popping up if for example I just called the app ‘MyApp’.
When you create an image for your application (using the cli or the dashboard), that image is configured specifically for the application, which exists under your user account. (A provisioning api key is created in the backed, which is unique to that image, and with this key, the device is allowed to register in that specific application.) It therefore will not matter if many users have apps called “MyApp”, since your “MyApp” app is associated with your user account, and the image you downloaded only allows the device to be register in this specific one.
Good morning!
I am attempting to make a change to this custom build, but unsure where I need to make it.
I am trying to use linuxptp to get ptp information to a balena container and I want to set the following in the linux build:
CONFIG_PTP_1588_CLOCK=y
CONFIG_PPS=y
Can you tell me which file and in which of the meta layers I need to set these?
Also, how do you configure the yocto build such that linuxptp can run up in the host as opposed to a container?
Thanks
Probably the easiest custom kernel change is to apply it to meta-balena like it’s done for example for the dummy module in:
As per running linuxptp in the host, could you please explain why not in the container? Modifying the hostOS is not maintainable and also you won’t be able to update to custom hostOS versions via balenaCloud.
That brings me back to the Linux kernel configuration change. If you require this to be maintainable / updatable, we could consider adding the change to the default BalenaOS on a future release, or you could build them as modules and install them in your container application.
Hi Alex,
Thank you for your response. It seems like PTP is already turned on by default and I can run them up manually in the container.
I totally understand about modifying the hostOS. However, I’m trying to understand if starting the linuxptp services (ptp4l and phc2sys) are doable from a container. I don’t have systemctl command in a container (although maybe I will have this if I add dbus to docker-compose). Also, I need to add a ptp4l.conf file to /etc/ and also a ptp file to /etc/sysconfig/ Are these container locations or hostos? Also, would both these services be configured in the dockerfile or docker-compose? For example the linuxptp documentation describes using ‘systemctl start ptp4l’ and ‘systemctl start phc2sys’.
Would other containers be accessing the same system time set by ptp4l in a container? Also, I see balenaos uses chrony for time management, would this service need to be stopped to avoid a conflict?
Alex,
Thank you so much that, it’s very helpful indeed and I can see the config files actually exist in /etc/linuxptp
Regarding the systemd, if it’s not really needed, would I then add them to the CMD arguments in the dockerfile so they run up as say background tasks in addition to my main application?
Hi, thanks for confirming this, as although I would prefer to start them as services, if starting via shell script is best practice then I would rather follow it.
Thanks once again for this, it’s really helpful.
I think I will probably have a single privileged container running both tasks in a shell script. I understand I will need to provide all the arguments rather than use the ptp4l.conf file, but that’s ok.
Hi, a quick question regarding the custom build.
I understand that if there is a new version of balenaos, there is a mechanism to update it with openbalena. However, I have my own custom Yocto build. Would the balenaos update break my custom build? What is the normal practice in this situation using custom images and openbalena?
Thanks
Hi Rich, thanks for your reponse. There is a thread here which seems to suggest there is support for updating the hostOS in openbalena Roadmap for BalenaOS Updates in OpenBalena
Thank you for your message. Rich and another one of our engineers are looking into this matter to make sure of the exact current status, and will come back to you.
Hi there, just to follow up, we have written a PSA here regarding openBalena hostOS updates and the plan for the future. I hope this clears the confusion that might have been caused by other conflicting information sources. Have a nice day!