Skip to content
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

Kernel version? #7291

Closed
danergo opened this issue Nov 25, 2024 · 6 comments
Closed

Kernel version? #7291

danergo opened this issue Nov 25, 2024 · 6 comments

Comments

@danergo
Copy link

danergo commented Nov 25, 2024

My kernel version is 6.1.21-v8+ (DietPi v9.7.1).

I have a problem with an SPI-UART converter, for which I got a recommendation of updating the kernel.

I ran dietpi-update, it found a newer (9.8.0) version, but I couldn't find anywhere what kernel version is coming along with 9.8.0.

How can I know which kernel belongs to a certain DietPi version?

And how can I update the kernel on DietPi OS?

@Joulinar
Copy link
Collaborator

DietPi is not a separate operating system. It is a set of bash scripts on a Debian-based image. And there is no relationship between a DietPi version and the kernel. The kernel version depends on your SBC and the Debian version. And kernel updates are done with apt like on any other system. I assume you have a Raspberry PI device? Is that correct? In that case, the kernel is the original kernel provided by the RPi guys. However, there have been major changes to the structure of the kernel and firmware that we are not yet making available to all users. Actually something you can do manually if you want to switch to the new kernel structure. See #6676

@danergo
Copy link
Author

danergo commented Nov 26, 2024

Sure, thank you!

Yes, I'm on RPi CM3+.

Now my problem is that /boot is 128MB and it's not enough for rpi-update to update the kernel.

How can I enlarge it, while preventing all rootfs files?

@Joulinar
Copy link
Collaborator

128MB are pretty much ok. And as a first step, you would need to use our script I linked above to migrate to new structure for kernel and firmware. Just using rpi-update will not do that.

@danergo
Copy link
Author

danergo commented Nov 26, 2024

Huh, I was faster: just did a quick rpi-update next. It succeeded, now:

# uname -a
Linux rpi 6.12.1-v8+ #1822 SMP PREEMPT Mon Nov 25 14:19:09 GMT 2024 aarch64 GNU/Linux

But, now, my gpios are not working anymore:

# echo 0 > /sys/class/gpio/gpio25/value
-bash: /sys/class/gpio/gpio25/value: No such file or directory

# echo 25 > /sys/class/gpio/export
-bash: echo: write error: Invalid argument

dmesg shows:

export_store: invalid GPIO 25

What shall I do?

@Joulinar
Copy link
Collaborator

What shall I do?

Undo whatever you have done

@danergo
Copy link
Author

danergo commented Nov 26, 2024

I got it now!

For others might be interesting:

Older kernels (6.1):
# echo 25 > /sys/class/gpio/export

Newer kernels (6.12):
# echo 537 > /sys/class/gpio/export

You can know which gpio is which with

cat /sys/kernel/debug/gpio

I have no idea on why is it modified like this :)

@danergo danergo closed this as completed Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants