deploy-kernel.sh never installs modules, so modprobe cannot work #54
Labels
No labels
blocked-physical
cleanup
hardware
infra
kernel
P1-critical
P2-high
P3-normal
P4-later
reliability
security
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
tiagoagueda/a80#54
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
modprobecannot work on this board./lib/modulesholds directories for two kernels that are no longer running:and none for the running one. Confirmed:
Cause
deploy-kernel.shbuilds and installsuImageand the dtb and nothing else. It never runsmake modules_install, and never has.Why nothing has noticed
Everything this board needs is built into the kernel. That is also why
CONFIG_ZRAMwas added as=yrather than=min #13 —=mwould simply not have loaded.The one visible symptom is a warning on every initramfs build:
/boot/config-$(uname -r)is missing too, soupdate-initramfscannot check compression support and assumes it.Why it matters anyway
provision.shcannot honestly claim to rebuild this system (#8). It says so at the end of every run.=y. Nobody chose that, and nobody is reminded of it at the moment they are editing a defconfig.probe/*.c,insmoded directly) work only because they bypass/lib/modulesentirely. That is luck, not design.ls /lib/modulessuggests modules are managed here.Done when
deploy-kernel.shinstalls modules and/boot/config-$(uname -r)alongside the kernel, md5-verified like the restsync-rescue-sd.shpropagates them to the card, which currently builds its initramfs with the same warnings/lib/modulesdirectories are removedupdate-initramfsruns clean on both mediaDone — and installing the modules broke two other things on the way
deploy-kernel.shnow builds and installs the module tree and/boot/config-$(uname -r), both md5-verified end to end like the kernel and dtb, andsync-rescue-sd.shcarries them to the card.Both orphaned trees were pruned on the first run, by a rule rather than by hand: a module tree whose version appears in no image in
/bootcan never be loaded, so it goes. That is what stops this recurring — and it is why the problem was invisible in the first place, sincels /lib/moduleslooked managed.The script itself was never in the repo. It lived only at
~/a80/deploy-kernel.shon the build host while five files here referenced it. Now tracked attools/deploy-kernel.sh.Only
CONFIG_DMATEST=mcomes out of this config, so barely any.kowas being lost. What was being lost ismodules.builtin,modules.order,modules.aliasandmodules.builtin.modinfo— which is whydepmodfailed andupdate-initramfswarned every run.The part worth reading: fixing this broke the initramfs, then broke wifi
With
modules.builtin.modinfofinally present, initramfs-tools can enumerate built-in drivers' firmware — so it began copyingregulatory.dbitself, resolved through/etc/alternatives, which on Debian is the Debian-signed variant.First failure.
copy_filereturns 1 when the target already exists. As the last statement inhook-draco-firmwarethat became the hook's exit status:The board could no longer regenerate its initramfs at all.
Second failure, caused by my first fix. Adding
|| truemade it worse, and silently.copy_filedoes not overwrite, so the hook simply stopped installing the upstream-signedregulatory.db. This kernel is built withCONFIG_CFG80211_USE_KERNEL_REGDB_KEYSand carries only the upstream key, so at boot:Every 5 GHz band back to passive-scan — precisely the fault this hook exists to prevent, reintroduced by fixing something unrelated.
|| trueturned a loud failure into a quiet wrong answer, which is the worse of the two.The hook now writes into
$DESTDIRdirectly instead of askingcopy_fileto, so the upstream signature wins regardless of what copied first.Verified, by content rather than inference
.p7s(1ab34236cbd7, not the Debiandb6cb32aaaa5) andsun9i-a80-arisc.binmodprobe dmatestloads on bothupdate-initramfsruns clean on bothcountry FR: DFS-ETSI/lib/moduleson both holds exactly one tree, matching the running kernelOne caveat stated rather than glossed: the eMMC's own initramfs was verified by extracting and comparing signatures, not by booting it. Every reboot in this session used the card's
emmcentry, which loads the card's initrd. Confirming the eMMC end to end needs the card physically removed.Done when
deploy-kernel.shinstalls modules and/boot/config-$(uname -r), md5-verifiedsync-rescue-sd.shpropagates them to the card/lib/modulesdirectories are removedupdate-initramfsruns clean on both media