raspberrypi / rpi-update

An easier way to update the firmware of your Raspberry Pi
MIT License
131 stars 18 forks source link

WANT_32BIT:1 WANT_64BIT:0 WANT_PI4:0 WANT_PI5:0 still installs *-v8-16k (and *-v7) kernels #39

Open DougieLawson opened 1 week ago

DougieLawson commented 1 week ago

If I run rpi-update on an ancient old Raspberry Pi model 1B it installs the *-v8-16k kernel which is a waste of time and uses SDCard space. [It also installs *-v7 kernels but I don't suppose we can suppress that without adding more code to check for models.]

I'm running rpi-update with the following overrides WANT_32BIT=1 WANT_64BIT=0 WANT_PI4=0 WANT_PI5=0

That gets this log

 *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
FW_REV:01be90cf9623fb08984a37ead6e6b4e703f61003
BOOTLOADER_REV:
WANT_32BIT:1 WANT_64BIT:0 WANT_PI4:0 WANT_PI5:0
 *** Downloading specific firmware revision (this will take a few minutes)
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  142M  100  142M    0     0   823k      0  0:02:57  0:02:57 --:--:--  502k
 *** Updating firmware
 *** Updating kernel modules
Pruning //lib/modules/6.6.34-v7+
Pruning //lib/modules/6.6.34-v8-16k+
Pruning //lib/modules/6.6.34+
 *** depmod 6.6.35-v7+
 *** depmod 6.6.35+
 *** depmod 6.6.35-v8-16k+
 *** Updating VideoCore libraries
 *** Running ldconfig
 *** Storing current firmware revision
 *** Deleting downloaded files
 *** Syncing changes to disk
 *** If no errors appeared, your firmware was successfully updated to 01be90cf9623fb08984a37ead6e6b4e703f61003
 *** A reboot is needed to activate the new firmware

I thought that WANT_PI5=0 would be enough to suppress the *-v8-16k kernels.

pelwell commented 1 week ago

The Pi 5 kernel install may be fallout from the v8_16k+ -> v8-16k+ rename. Can you confirm what has actually been installed in your case (not just mentioned in the log above)?

pelwell commented 1 week ago

Here's one thing that needs updating: https://github.com/raspberrypi/rpi-update/blob/master/rpi-update#L196-L200

DougieLawson commented 1 week ago

I've got

pi@odyssey:/lib/modules$ ls -la
total 20
drwxr-xr-x  5 root root 4096 Jun 25 14:51 .
drwxr-xr-x 94 root root 4096 May  8 08:12 ..
drwxr-xr-x  3 root root 4096 Jun 25 14:51 6.6.35+
drwxr-xr-x  3 root root 4096 Jun 25 14:50 6.6.35-v7+
drwxr-xr-x  3 root root 4096 Jun 25 14:51 6.6.35-v8-16k+
pi@odyssey:/lib/modules$

It only really needs 6.6.35+.