Make vendor.prop the single source of truth for WiFi country code
ro.boot.wificountrycode was set in two places: androidboot.wificountrycode=US on the kernel cmdline (mkimg.sh extlinux heredoc) and ro.boot.wificountrycode=00 in vendor.prop. Because ro.* properties are set-once and init processes the cmdline first, the cmdline always won and the vendor.prop value silently lost (init logs 'Read-only property was already set' every boot). Worse, the vendor.prop value was 00 (world regulatory domain), a landmine that would activate if the cmdline param were ever dropped. Remove the cmdline param and set vendor.prop to US so the country code lives in exactly one place, delivered via vendor.img instead of a hand-maintained boot heredoc. Note this only feeds the Android framework (WifiCountryCode); the kernel side additionally needs regulatory.db to actually apply it (fixed separately by embedding it via CONFIG_EXTRA_FIRMWARE in the kernel).
This commit is contained in:
parent
6c2ea1b408
commit
fe62849cb0
2 changed files with 5 additions and 2 deletions
2
mkimg.sh
2
mkimg.sh
|
|
@ -140,7 +140,7 @@ label LineageOS Android TV
|
||||||
kernel /Image
|
kernel /Image
|
||||||
fdt /rk3588-orangepi-5-ultra.dtb
|
fdt /rk3588-orangepi-5-ultra.dtb
|
||||||
initrd /ramdisk.img
|
initrd /ramdisk.img
|
||||||
append console=ttyS2,1500000 no_console_suspend root=/dev/ram0 rootwait androidboot.hardware=tart androidboot.selinux=permissive androidboot.boot_devices=fe2c0000.mmc androidboot.console=ttyS2 androidboot.wificountrycode=US
|
append console=ttyS2,1500000 no_console_suspend root=/dev/ram0 rootwait androidboot.hardware=tart androidboot.selinux=permissive androidboot.boot_devices=fe2c0000.mmc androidboot.console=ttyS2
|
||||||
EXTLINUX_EOF
|
EXTLINUX_EOF
|
||||||
sudo cp ${KERNEL_PATH}/boot.scr "${BOOT_MOUNT}/"
|
sudo cp ${KERNEL_PATH}/boot.scr "${BOOT_MOUNT}/"
|
||||||
sudo cp ${KERNEL_PATH}/android-sdcard.dtbo "${BOOT_MOUNT}/"
|
sudo cp ${KERNEL_PATH}/android-sdcard.dtbo "${BOOT_MOUNT}/"
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,10 @@ persist.device_config.mglru_native.lru_gen_config=core
|
||||||
ro.boot.hypervisor.vm.supported=1
|
ro.boot.hypervisor.vm.supported=1
|
||||||
|
|
||||||
# Wifi
|
# Wifi
|
||||||
ro.boot.wificountrycode=00
|
# Single source of truth for the regulatory country code. Init exports this to
|
||||||
|
# the framework's WifiCountryCode; ro.boot.* is set-once, so this must NOT also
|
||||||
|
# appear as androidboot.wificountrycode on the kernel cmdline (mkimg.sh).
|
||||||
|
ro.boot.wificountrycode=US
|
||||||
wifi.interface=wlan0
|
wifi.interface=wlan0
|
||||||
|
|
||||||
# Window extensions
|
# Window extensions
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue