Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initscripts: Correct WiFi MAC and mount /firmware.
Setup the MAC addresss for the WiFi chip prior to starting the system. This fixes autoconnect after a reboot when using connman. Also make sure to mount /firmware to fix potential issues with adsp not working.
- Loading branch information
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
recipes-core/initrdscripts/initramfs-scripts-android/init.machine.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/sh | ||
|
||
BOOT_DIR=$1 | ||
|
||
mkdir $BOOT_DIR/nvdata | ||
mount -t ext4 /dev/mmcblk0p9 $BOOT_DIR/nvdata | ||
|
||
mkdir $BOOT_DIR/firmware | ||
mount -t ext4 /dev/mmcblk0p32 $BOOT_DIR/firmware | ||
|
||
mkdir -p /nvdata | ||
mkdir -p /firmware | ||
mkdir -p /system/etc/wifi | ||
mkdir -p /system/vendor/firmware/ | ||
mkdir -p /vendor/firmware | ||
|
||
mount --bind $BOOT_DIR/system/etc/wifi /system/etc/wifi | ||
mount --bind $BOOT_DIR/system/vendor/firmware/ /system/vendor/firmware/ | ||
mount --bind $BOOT_DIR/vendor/firmware /vendor/firmware | ||
mount --bind $BOOT_DIR/nvdata /nvdata | ||
mount --bind $BOOT_DIR/firmware /firmware | ||
|
||
dd if=/nvdata/MACWLAN of=/proc/wifi/mac | ||
|
||
ip link set up dev wlan0 | ||
sleep 1 | ||
ip link set down dev wlan0 |
8 changes: 8 additions & 0 deletions
8
recipes-core/initrdscripts/initramfs-scripts-android_1.0.bbappend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,10 @@ | ||
FILESEXTRAPATHS_prepend_sawfish := "${THISDIR}/${PN}:" | ||
COMPATIBLE_MACHINE_sawfish = "sawfish" | ||
|
||
SRC_URI_append_sawfish += " file://init.machine.sh" | ||
|
||
do_install_append_sawfish() { | ||
install -m 0755 ${WORKDIR}/init.machine.sh ${D}/init.machine | ||
} | ||
|
||
FILES_${PN} += "/init.machine" |