-
Notifications
You must be signed in to change notification settings - Fork 1
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
Upstream balenaOS patches #2
base: master
Are you sure you want to change the base?
Upstream balenaOS patches #2
Conversation
We adapt to changes introduced by https://lore.kernel.org/lkml/20210121090020.3147058-2-gregkh@linuxfoundation.org/ Upstream-Status: Pending Signed-off-by: Florin Sarbu <florin@balena.io>
In a change to the SPI subsystem [1], a new `delay` struct was added to replace the `delay_usecs`. This change replaces the current `delay_usecs` with `delay` for this driver. [1] commit bebcfd272df6 ("spi: introduce `delay` field for `spi_transfer` + spi_transfer_delay_exec()") Upstream-status: pending Signed-off-by: Alex Gonzalez <alexg@balena.io>
Use of TTY_LDISC_MAGIC was removed in commit 981b22b8777d (tty: remove TTY_LDISC_MAGIC) Upstream-status: pending Signed-off-by: Alex Gonzalez <alexg@balena.io>
The tty_register_ldisc() call dropped accepting the ldisc number in commit fbadf70a805 (tty: set tty_ldisc_ops::num statically) Upstream-status: pending Signed-off-by: Alex Gonzalez <alexg@balena.io>
Adapt to commit 0f3dcf3b5d7(tty: make fp of tty_ldisc_ops::receive_buf{,2} const) Upstream-status: pending Signed-off-by: Alex Gonzalez <alexg@balena.io>
The spi_set_cs_timing() interface was removed in commit 4ccf359849ce (spi: remove spi_set_cs_timing()) Upstream-status: pending Signed-off-by: Alex Gonzalez <alexg@balena.io>
Adapt to the removal of the nvram ABI in commit 25ece30561d2 (rtc: nvmem: remove nvram ABI) Upstream-status: pending Signed-off-by: Alex Gonzalez <alexg@balena.io>
This change is introduced in commit 3a905c2d9544a (rtc: add devm_ prefix to rtc_nvmem_register()) Upstream-status: pending Signed-off-by: Alex Gonzalez <alexg@balena.io>
The rename happens in commit fdcfd854333 (rtc: rework rtc_register_device() resource management) Upstream-status: pending Signed-off-by: Alex Gonzalez <alexg@balena.io>
Hi @floion , thank you for your effort! However, this repository contains legacy 1st generation of the kernel drivers. Please consider upgrading your project to a new generation of drivers https://github.com/UniPiTechnology/unipi-kernel-modules. Can you please transform and move this PR to this repo? Thanks! |
Hi @martytriska and thanks for your reply. Can the drivers in the new repository https://github.com/UniPiTechnology/unipi-kernel-modules be unloaded at runtime? |
Hi @acostach, yes you are right. These modules should be unloadable at runtime (of course, you have to respect the order of particular modules during the unloading process). However, on some variants of Raspberry Pi, they can "block" the reboot without unloading them. As a workaround, our pre-compiled OS Images contain a tiny "daemon" that does the unloading stuff just before rebooting. |
thanks @martytriska ! Do you know what's causing the halt on reboot? And what exact modules need to be unloaded prior to rebooting, I could check that in the daemon if you can point me to the sources |
also @martytriska , I'm seeing this on the UniPi4 with the newer unipi-kernel-modules:
And there's no /dev/unipi* device drivers. Do I need to install other packages or dependencies in the image? |
New devicetree overlays are required. They are generated from templates (os-configurator-data-neuron), but they are not exported to public Github yet. |
@acostach Almost all Linux devices under /dev/ are created during driver initialization based on device tree overlays applied. This process is managed by the To dig deeper, I recommend you use our pre-build OS Image as a starting point. |
Thanks @martytriska , @miroslav-ondra , could you please point me to the OS image I should check? What I've tried:
and if I try the replacement package
|
Hi @acostach, as a good starting point, you can use the following beta testing image(s): 32bit 64bit |
Thanks @martyy665 , @miroslav-ondra I've looked into the 64bit Neuron image and can see the overlays being applied by the boot script according to the detected configuration. It's not clear to me though if the unipi-tools installed in the beta-image is at the same revision as https://github.com/UniPiTechnology/unipi-tools, because the unipi-tools repository has last been updated 3 years ago. It seems there's also other packages in the beta-image which aren't available in github. For example I see files like /opt/unipi/firmware/opt/unipi/firmware/00-1.img provided by a package named Is there an ETA for when the BSP in the beta image will become production ready, also with sources available in github? Thank you |
Hi @acostach, the unipi-tools repo has been updated to the latest version. Can you check if everything is clear for you now? Regarding the firmware - please use only 6.xx version as previous legacy versions are no longer supported and do not contain all current HW. All firmware files for version 6.xx are in .img format and follow the naming pattern xx-y.img. All of them are provided by unipi-firmware6 Debian package in its binary form. In the tools repo package, just tools for firmware upgrading are contained. You can download any of the packages from the repo directly: https://repo.unipi.technology/ Please let me know if there is anything else you need. Thank you for your effort :-)! |
Hi @tomashora , sorry, I've been caught up with other projects and didn't get to look at the updated repositories yet. I plan to get back to this in the following weeks and will let you know. Thank you! |
We use these patches in balenaOS for building unipi-kernel-modules with kernel 5.15.92
Would be great if we could have them in upstream, since they allow building with newer kernel versions