diff --git a/device/testing/device-samsung-kminilte/APKBUILD b/device/testing/device-samsung-kminilte/APKBUILD index c26e1a135..fe7f839ba 100644 --- a/device/testing/device-samsung-kminilte/APKBUILD +++ b/device/testing/device-samsung-kminilte/APKBUILD @@ -3,13 +3,14 @@ pkgname="device-samsung-kminilte" pkgdesc="Samsung Galaxy S5 Mini" pkgver=0.1 -pkgrel=7 +pkgrel=8 url="https://postmarketos.org" license="MIT" arch="armv7" options="!check !archcheck" depends="postmarketos-base linux-samsung-kminilte mkbootimg mesa-dri-swrast" makedepends="devicepkg-dev" +subpackages="$pkgname-nonfree-firmware:nonfree_firmware" source=" deviceinfo fb.modes @@ -24,6 +25,11 @@ package() { install -Dm644 "$srcdir"/fb.modes "$pkgdir"/etc/fb.modes } +nonfree_firmware() { + pkgdesc="Non-free firmware for Samsung Galaxy S5 Mini" + depends="firmware-samsung-kminilte" + mkdir "$subpkgdir" +} sha512sums="cef10768f39751da6d30c14da383782caf652d07e23a1377e699580ecf59a4a3778e6122cd5d6fa59fa4b98680b53245ccabb94de5927e5075008ff4db52cf78 deviceinfo 245efec73f85ef715c877d6c24eb4b7b677d250bd38167dc19b1b0ed84c3ea91049576adbbf21dd48940c08e40f0294a1a01b0ab3e56efd794109a7e7ebc1104 fb.modes" diff --git a/device/testing/linux-samsung-kminilte/APKBUILD b/device/testing/linux-samsung-kminilte/APKBUILD index 38d65e95f..47b8c2986 100644 --- a/device/testing/linux-samsung-kminilte/APKBUILD +++ b/device/testing/linux-samsung-kminilte/APKBUILD @@ -2,7 +2,7 @@ pkgname="linux-samsung-kminilte" pkgver=3.4.113 -pkgrel=3 +pkgrel=4 pkgdesc="Samsung Galaxy S5 Mini kernel fork" arch="armv7" _carch="arm" @@ -48,5 +48,5 @@ package() { } sha512sums="351b043822d9fc25a002f07a490422341fd03671d661bb949085ef8d69042f1ae528f80ade7076aba3eaffec80f65c09fdbb600ffe04063c69d876c22a53709b linux-samsung-kminilte-7a8c010f226189116dcf2301d338555ae0d270c3.tar.gz -21ab0cfa31f0c7297676f86425d0135f639e03a16658979bc3a81160e528b4f0160ed4d743ac6a327f075cc553481f04d6f608506d5794649310935412f5161c config-samsung-kminilte.armv7 +0279b76e569da5042178c78b1781ce85ef65f60ef402655953996ca737cbc2a2b2bea44ac290540ab7fcf70c11434bf375f18dec21d2d84a050d0c7d6373496f config-samsung-kminilte.armv7 d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h" diff --git a/device/testing/linux-samsung-kminilte/config-samsung-kminilte.armv7 b/device/testing/linux-samsung-kminilte/config-samsung-kminilte.armv7 index 0c3a39bf3..b1ab8f986 100644 --- a/device/testing/linux-samsung-kminilte/config-samsung-kminilte.armv7 +++ b/device/testing/linux-samsung-kminilte/config-samsung-kminilte.armv7 @@ -1507,8 +1507,8 @@ CONFIG_BCM4334=y # CONFIG_BCM43455 is not set # CONFIG_BCM4334W is not set CONFIG_BROADCOM_WIFI=y -CONFIG_BCMDHD_FW_PATH="/system/etc/wifi/bcmdhd_sta.bin" -CONFIG_BCMDHD_NVRAM_PATH="/system/etc/wifi/nvram_net.txt" +CONFIG_BCMDHD_FW_PATH="/lib/firmware/postmarketos/bcmdhd_sta.bin" +CONFIG_BCMDHD_NVRAM_PATH="/lib/firmware/postmarketos/nvram_net.txt" CONFIG_BROADCOM_WIFI_RESERVED_MEM=y CONFIG_WIFI_BROADCOM_COB=y CONFIG_WLAN_REGION_CODE=100 diff --git a/firmware/firmware-samsung-kminilte/APKBUILD b/firmware/firmware-samsung-kminilte/APKBUILD new file mode 100644 index 000000000..1ec3d8dfb --- /dev/null +++ b/firmware/firmware-samsung-kminilte/APKBUILD @@ -0,0 +1,37 @@ +# Contributor: Niklas Cathor +pkgname="firmware-samsung-kminilte" +pkgver=1 +pkgrel=0 +pkgdesc="Samsung Galaxy S5 Mini firmware" +url="https://github.com/cm-3470/android_vendor_samsung_kminilte" +arch="armv7" +license="proprietary" +options="!check !strip !archcheck !spdx" +install="$pkgname.post-install" + +_repository="android_vendor_samsung_kminilte" +_commit="996b9e165baf687c1dcc0b95e83f3208ee711f89" + +source=" + $pkgname-$_commit.tar.gz::https://github.com/cm-3470/$_repository/archive/$_commit.tar.gz +" + +# The installed location of these files must match CONFIG_BCMDHD_FW_PATH +# and CONFIG_BCMDHD_NVRAM_PATH respectively. +# Note that "_b2" is appended to the firmware path (in drivers/net/wireless/bcmdhd/dhd_sdio.c), +# so CONFIG_BCMDHD_FW_PATH must end in ".bin", not ".bin_b2" +_files=" + proprietary/etc/wifi/bcmdhd_sta.bin_b2 + proprietary/etc/wifi/nvram_net.txt +" + +package() { + mkdir -p "$pkgdir" + cd "$srcdir/$_repository-$_commit" + for _f in $_files; do + _filename=$(basename $_f) + install -Dm644 $_f "$pkgdir"/lib/firmware/postmarketos/$_filename + done +} + +sha512sums="84732c5470f917395bdb291a82b0dce613ea0559e2a869d245ef367be8ec7d2dcc8c7db1f63a4ddd7e4e46d7e24105bd3f3104c0603d2f742567c0df205d7672 firmware-samsung-kminilte-996b9e165baf687c1dcc0b95e83f3208ee711f89.tar.gz" diff --git a/firmware/firmware-samsung-kminilte/firmware-samsung-kminilte.post-install b/firmware/firmware-samsung-kminilte/firmware-samsung-kminilte.post-install new file mode 100644 index 000000000..7b758e41f --- /dev/null +++ b/firmware/firmware-samsung-kminilte/firmware-samsung-kminilte.post-install @@ -0,0 +1,10 @@ +#!/bin/sh + +# Enable autostart of deferred initcalls (needed to bring Wi-Fi online) +rc-update -q add deferred-initcalls sysinit + +# Explicitly specify wlan device. Without this, p2p0 will be +# selected automatically instead of wlan0, and Wi-Fi will not work. +if ! grep -q "i wlan0" /etc/conf.d/wpa_supplicant ; then + sed -i 's/-Dnl80211,wext/-Dnl80211,wext -i wlan0/' /etc/conf.d/wpa_supplicant +fi