diff --git a/device/testing/device-samsung-logands/APKBUILD b/device/testing/device-samsung-logands/APKBUILD index b7e2e02b6..5eb31e4f2 100644 --- a/device/testing/device-samsung-logands/APKBUILD +++ b/device/testing/device-samsung-logands/APKBUILD @@ -1,8 +1,9 @@ # Reference: +# Maintainer: AppleCross pkgname=device-samsung-logands pkgdesc="Samsung Galaxy Ace 3 Duos" -pkgver=3.4.5 -pkgrel=1 +pkgver=3.5.0 +pkgrel=0 url="https://postmarketos.org" license="MIT" arch="armv7" @@ -11,10 +12,17 @@ depends=" linux-samsung-logands mkbootimg postmarketos-base + postmarketos-base-downstream msm-fb-refresher " makedepends="devicepkg-dev" -source="deviceinfo" +subpackages=" + $pkgname-nonfree-firmware:nonfree_firmware +" +source=" + deviceinfo + modules-load.conf +" build() { devicepkg_build $startdir $pkgname @@ -24,6 +32,13 @@ package() { devicepkg_package $startdir $pkgname } +nonfree_firmware() { + pkgdesc="WiFi firmware" + depends="firmware-samsung-logands" + mkdir "$subpkgdir" +} + sha512sums=" -231a4ff31c4c3fd8182f81647e3d8e7fa07c51cecfdb01a506d8511f2c63a627c9c1b85f4198341479a806891040177fd9de14691645b14c8debad2fd2ef111c deviceinfo +56e035a7185c241c03c6b9a3669b45cb8695e98d3f3b7f6a3a3aa02d35e2fb4b8dbc7d7884f0413113bd3a31c386aaa6fa3d366d043b059652fb6e7a281e4574 deviceinfo +d7ab8040186524169440cb8264757943d47015f1ebfa1decc416d8bda7c2de8cfebef1b714421f86f37e23b6004482d6cb9b7f1ca83da9a73d11e5fd38b105f7 modules-load.conf " diff --git a/device/testing/device-samsung-logands/deviceinfo b/device/testing/device-samsung-logands/deviceinfo index 2224fe01d..88009dc4c 100644 --- a/device/testing/device-samsung-logands/deviceinfo +++ b/device/testing/device-samsung-logands/deviceinfo @@ -31,3 +31,8 @@ deviceinfo_flash_offset_second="0x00f00000" deviceinfo_flash_offset_tags="0x00000100" deviceinfo_flash_heimdall_partition_kernel="KERNEL" deviceinfo_flash_heimdall_partition_system="system" +deviceinfo_flash_sparse="true" +# Samsung Electronics Co., Ltd +deviceinfo_usb_idVendor="0x04e8" +# Galaxy (MTP) +deviceinfo_usb_idProduct="0x6860" \ No newline at end of file diff --git a/device/testing/device-samsung-logands/modules-load.conf b/device/testing/device-samsung-logands/modules-load.conf new file mode 100644 index 000000000..146833324 --- /dev/null +++ b/device/testing/device-samsung-logands/modules-load.conf @@ -0,0 +1,5 @@ +# This file contains the names of kernel modules that should be loaded +# at boot time, one per line. Lines beginning with "#" are ignored. + +# WiFi module +dhd \ No newline at end of file diff --git a/device/testing/firmware-samsung-logands/APKBUILD b/device/testing/firmware-samsung-logands/APKBUILD new file mode 100644 index 000000000..da0387aca --- /dev/null +++ b/device/testing/firmware-samsung-logands/APKBUILD @@ -0,0 +1,23 @@ +pkgname=firmware-samsung-logands +pkgver=1.0.0 +pkgrel=0 +pkgdesc="Samsung Galaxy Ace 3 Duos Firmware" +_commit="68312770176a592d41ff3521a1d942b4ae8cb70a" +url="https://github.com/Wesley09/android_vendor_samsung_logands" +arch="armv7" +license="proprietary" +source="$pkgname-$_commit.tar.gz::https://github.com/Wesley09/android_vendor_samsung_logands/archive/$_commit.tar.gz" +options="!check !strip !archcheck !spdx !tracedeps pmb:cross-native" +builddir="$srcdir/android_vendor_samsung_logands-$_commit" + +package() { + # WiFi + for _i in bcmdhd_sta.bin nvram_net.txt; do + install -Dm644 proprietary/etc/wifi/"$_i" \ + "$pkgdir"/lib/firmware/postmarketos/"$_i" + done + +} +sha512sums=" +6472af9d5e33512fdf1112496410d872f0adde2e232a4e12a483762a8ef11f14b695bb2be7409a81d57d8247a6cb38d6d0369c3ed2eceb31d959ca2274612bcd firmware-samsung-logands-68312770176a592d41ff3521a1d942b4ae8cb70a.tar.gz +" diff --git a/device/testing/linux-samsung-logands/APKBUILD b/device/testing/linux-samsung-logands/APKBUILD index 7bfa5ea81..2c9d6d990 100644 --- a/device/testing/linux-samsung-logands/APKBUILD +++ b/device/testing/linux-samsung-logands/APKBUILD @@ -3,7 +3,7 @@ pkgname=linux-samsung-logands pkgver=3.4.5 -pkgrel=0 +pkgrel=2 pkgdesc="Samsung Galaxy Ace 3 Duos kernel fork" arch="armv7" _carch="arm" @@ -33,10 +33,10 @@ fi # Source _repository="android_kernel_samsung_loganxx" -_commit="77736a0e56ccf8fd8e65a5b5482b819f7e2a115d" +_commit="441fcacd172097a978d7f1bdcf8316ba11a98352" _config="config-$_flavor.$arch" source=" - $pkgname-$_commit.tar.gz::https://github.com/vasby77/$_repository/archive/$_commit.tar.gz + $pkgname-$_commit.tar.gz::https://github.com/ijiki16/$_repository/archive/$_commit.tar.gz $_config gcc7-give-up-on-ilog2-const-optimizations.patch gcc8-fix-put-user.patch @@ -55,16 +55,27 @@ build() { unset LDFLAGS make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \ KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS" + # the 'no-pic' flag is necessary to avoid the + # error 'Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)' when loading the module + make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" CFLAGS_MODULE="-fno-pic" \ + KBUILD_BUILD_VERSION="$((pkgrel + 1))-postmarketOS" modules } package() { downstreamkernel_package "$builddir" "$pkgdir" "$_carch" \ "$_flavor" "$_outdir" + + # Modules + unset LDFLAGS + make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \ + KBUILD_BUILD_VERSION="$((pkgrel + 1))-postmarketOS" \ + INSTALL_MOD_PATH="$pkgdir" INSTALL_MOD_STRIP=1 \ + modules_install } sha512sums=" -81a3450ab9397adce9cf5d2b39e283ccc8bda30639b7ec0bb546fe85a2efae0ae34612ebd898fe6c2df07a81da2882807cc92589e7cafe0fd77fc5d6187e2442 linux-samsung-logands-77736a0e56ccf8fd8e65a5b5482b819f7e2a115d.tar.gz -472d37feb7a48684e70e5fd22581cd586fad4c8fc0bc6e169e954906167cff8054c242cb0008acd29c2e3b5b67cb4a93aaf2aed41072ac97d283db30275b5ded config-samsung-logands.armv7 +5926d15e4f80bfde44485ef1048d89ffcb5bad901864f1724cf2ccca3b99b1f7a910027c8ed8dc4a82a0e88ffc3bef142f318cc255b7a1e23cc6af741df4e973 linux-samsung-logands-441fcacd172097a978d7f1bdcf8316ba11a98352.tar.gz +1577797f66d121b0064eae60d2de8e4272656b7c7fadce3935406cd12d4b10db31170e8664d4218e0fe4be24d4cd481894d5526c60e43f8197e6ca1a263e25d2 config-samsung-logands.armv7 77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch 197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch 2b48f1bf0e3f70703d2cdafc47d5e615cc7c56c70bec56b2e3297d3fa4a7a1321d649a8679614553dde8fe52ff1051dae38d5990e3744c9ca986d92187dcdbeb gcc10-extern_YYLOC_global_declaration.patch diff --git a/device/testing/linux-samsung-logands/config-samsung-logands.armv7 b/device/testing/linux-samsung-logands/config-samsung-logands.armv7 index d754c1911..bc8469537 100644 --- a/device/testing/linux-samsung-logands/config-samsung-logands.armv7 +++ b/device/testing/linux-samsung-logands/config-samsung-logands.armv7 @@ -1488,12 +1488,12 @@ CONFIG_BROADCOM_WIFI_RESERVED_MEM=y # CONFIG_B43 is not set # CONFIG_B43LEGACY is not set CONFIG_BCM4330=m -CONFIG_BCMDHD_FW_PATH_4330="/system/vendor/firmware/fw_wifi_4330.bin" -CONFIG_BCMDHD_NVRAM_PATH_4330="/system/vendor/firmware/fw_wifi_nvram_4330.txt" +CONFIG_BCMDHD_FW_PATH_4330="/lib/firmware/postmarketos/bcmdhd_sta.bin" +CONFIG_BCMDHD_NVRAM_PATH_4330="/lib/firmware/postmarketos/nvram_net.txt" # CONFIG_BCM4334 is not set # CONFIG_BCM43241 is not set -CONFIG_BCMDHD_FW_PATH="/system/vendor/firmware/fw_wifi.bin" -CONFIG_BCMDHD_NVRAM_PATH="/system/vendor/firmware/fw_wifi_nvram.txt" +CONFIG_BCMDHD_FW_PATH="/lib/firmware/postmarketos/bcmdhd_sta.bin" +CONFIG_BCMDHD_NVRAM_PATH="/lib/firmware/postmarketos/nvram_net.txt" CONFIG_WLAN_REGION_CODE=100 # CONFIG_BRCMFMAC is not set # CONFIG_HOSTAP is not set @@ -3424,7 +3424,7 @@ CONFIG_CRYPTO_ZLIB=y # # Random Number Generation # -CONFIG_CRYPTO_ANSI_CPRNG=m +CONFIG_CRYPTO_ANSI_CPRNG=y # CONFIG_CRYPTO_USER_API_HASH is not set # CONFIG_CRYPTO_USER_API_SKCIPHER is not set # CONFIG_CRYPTO_HW is not set