mirror of
https://github.com/stornic56/debianito-post-install.git
synced 2026-09-14 06:02:35 +00:00
Broadcom WiFi & zram enhancements
- modules/firmware.sh — 4 fixes: - Added _detect_broadcom_plan_lines() helper to display firmware-brcm80211 in the firmware plan. The plan now shows the correct package for all Tier 1 Broadcom chips. - Added post-install verification for Tier 1 (brcmfmac): checks that /lib/firmware/brcm/brcmfmac43* files exist after apt install. If missing, displays a warning with dpkg-reconfigure guidance. - Added conflict detection between broadcom-sta-dkms and brcmfmac (wl). If broadcom-sta-dkms is installed, the script prompts the user to purge it before installing firmware-brcm80211, preserving the correct driver. - Added a reboot warning after successful brcmfmac firmware installation: [+] Broadcom brcmfmac firmware installed. A system reboot is required to load the new firmware. - Added || true to the Tier 3 (wl) _run_cmd call and introduced a wl_build_failed flag to suppress the "No special WiFi firmware needed" message when the DKMS build fails. - Removed BCM4313 (ID 4727), BCM43225 (ID 4357), and BCM43227 (ID 4358) from _is_broadcom_brcm. These chips belong to the wl tier and should use broadcom-sta-dkms, not firmware-brcm80211. - modules/zram.sh — 1 fix: - Changed zram sizing logic from 3 branches to 2: the >16 GB branch (which allocated 25% or 50% of RAM) is replaced by a single threshold check. RAM > 8 GB → fixed 4096 MB; RAM ≤ 8 GB → 50% of RAM (using the same ((RAM_KB / 1024 / 1024 + 1) / 2) * 1024 rounding pattern).
This commit is contained in:
+2
-3
@@ -86,9 +86,8 @@ _zram_create() {
|
||||
fi
|
||||
|
||||
local ram_gb=$(( RAM_KB / 1024 / 1024 ))
|
||||
local recommended_mb
|
||||
if [ "$ram_gb" -gt 16 ]; then
|
||||
recommended_mb=$(( ((RAM_KB / 1024 / 1024 + 1) / 4) * 1024 ))
|
||||
if [ "$ram_gb" -gt 8 ]; then
|
||||
recommended_mb=4096
|
||||
else
|
||||
recommended_mb=$(( ((RAM_KB / 1024 / 1024 + 1) / 2) * 1024 ))
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user