unmaintained/samsung-a5ulte-downstream: new device (Samsung Galaxy A5) (MR 2177)

This commit is contained in:
Minecrell 2020-05-09 19:01:42 +02:00 committed by Alexey Minnekhanov
parent c2470162f9
commit 81e081b45b
No known key found for this signature in database
GPG key ID: EBF5ECFFFEE34DED
10 changed files with 4440 additions and 0 deletions

View file

@ -0,0 +1,17 @@
For some reason, CONFIG_USB_ANDROID_SAMSUNG_COMPOSITE disables the code in u_ether
that assigns a random MAC address to the USB network interface. This patch simply
disables it to fall back to the original code that works correctly.
diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/u_ether.c
index 5615b9e18f8..2fd18d56d13 100755
--- a/drivers/usb/gadget/u_ether.c
+++ b/drivers/usb/gadget/u_ether.c
@@ -1657,7 +1657,7 @@ struct eth_dev *gether_setup_name(struct usb_gadget *g, u8 ethaddr[ETH_ALEN],
if (get_ether_addr(dev_addr, net->dev_addr))
dev_warn(&g->dev,
"using random %s ethernet address\n", "self");
-#ifdef CONFIG_USB_ANDROID_SAMSUNG_COMPOSITE
+#if 0
if (ethaddr != NULL) {
memcpy(dev->host_mac, ethaddr, ETH_ALEN);
printk(KERN_DEBUG "usb: set unique host mac\n");

View file

@ -0,0 +1,25 @@
# Unmaintained: Downstream port, only for testing. Use mainline port (samsung-a5ulte)!
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-samsung-a5ulte-downstream
pkgdesc="Samsung Galaxy A5 (SM-A500FU)"
pkgver=1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="postmarketos-base linux-samsung-a5ulte-downstream mkbootimg mesa-dri-gallium msm-fb-refresher"
makedepends="devicepkg-dev"
source="deviceinfo"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
sha512sums="
b6f5d3301bdd3fcae6e8ff702b3a22e8a441a77cf3a7af1da14bb33c3f9179d92a4e29685ea7de2a26836155014c77e8337b4a481ada5b5e4800057da161adca deviceinfo
"

View file

@ -0,0 +1,32 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell scripts.
deviceinfo_format_version="0"
deviceinfo_name="Samsung Galaxy A5 (SM-A500FU)"
deviceinfo_manufacturer="Samsung"
deviceinfo_codename="samsung-a5ulte-downstream"
deviceinfo_year="2015"
deviceinfo_dtb=""
deviceinfo_modules_initfs=""
deviceinfo_arch="armv7"
# Device related
deviceinfo_chassis="handset"
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="720"
deviceinfo_screen_height="1280"
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_kernel_cmdline="console=null androidboot.hardware=qcom user_debug=23 msm_rtb.filter=0x3F ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="true"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_offset_base="0x80000000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x02000000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x01e00000"
deviceinfo_flash_pagesize="2048"
deviceinfo_flash_sparse="true"

View file

@ -0,0 +1,67 @@
# Unmaintained: Downstream port, only for testing. Use mainline port (samsung-a5ulte)!
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on:
# make msm8916_sec_defconfig VARIANT_DEFCONFIG=msm8916_sec_a5u_eur_defconfig SELINUX_DEFCONFIG=selinux_defconfig
pkgname=linux-samsung-a5ulte-downstream
pkgver=3.10.49
pkgrel=0
pkgdesc="Samsung Galaxy A5 (SM-A500FU) kernel fork"
arch="armv7"
_carch="arm"
_flavor="samsung-a5ulte-downstream"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native"
makedepends="bash bc bison devicepkg-dev flex openssl-dev perl dtbtool gcc4 linux-headers"
# Compiler: GCC 4
if [ "${CC:0:5}" != "gcc4-" ]; then
CC="gcc4-$CC"
HOSTCC="gcc4-gcc"
CROSS_COMPILE="gcc4-$CROSS_COMPILE"
fi
# Source
_repository="android_kernel_qcom_msm8916"
_commit="3b09f23015d2f0949d49fb81ea1f43c63a8be503"
_config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::https://github.com/msm8916-mainline/$_repository/archive/$_commit.tar.gz
$_config
cpr-dump.patch
gpio-debug.patch
memshare-debug.patch
remove-gcc-wrapper.patch
samsung-usb-ethaddr.patch
"
builddir="$srcdir/$_repository-$_commit"
_outdir="out"
prepare() {
default_prepare
REPLACE_GCCH=0 . downstreamkernel_prepare
}
build() {
unset LDFLAGS
make O="$_outdir" ARCH="$_carch" CC="$CC" HOSTCC="$HOSTCC" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
}
package() {
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" "$_outdir"
# Master DTB (deviceinfo_bootimg_qcdt)
dtbTool -p scripts/dtc/ -o "$pkgdir"/boot/dt.img "$_outdir/arch/$_carch/boot/"
}
sha512sums="
6f86d8945ab74b84825af44c006bd737877d93fcb779ebe5c3c407241ad6a5cc7f0a8529cabbdce01451e9cdf629ac7c71c74acce50a6605058342196945f2f3 linux-samsung-a5ulte-downstream-3b09f23015d2f0949d49fb81ea1f43c63a8be503.tar.gz
8eb744fa7bbc00df2359c9f13a6d9ccf8ea6fa3a9f6526a2c3ed1fb17b11cf82e03d63948734a93416bb1cb315b5926aeafcbbf7523ce596e8a5efc426fda5f0 config-samsung-a5ulte-downstream.armv7
f040a1d7169b9ddb5baabb7de1838441e8608894dc6dc61ececb1acb4fe9851289934b37d74afb61addc01d7a1e4f1d2413f5e542c2a4aeb0c01f680797d37c6 cpr-dump.patch
e9f809b6659375cd7e854821f9925faa263d287c06e44071017cd4afb32f79c47e63760c9c95b4f0c15b79b6b1af4a36911861104a7b56dea2195baf9e4f4685 gpio-debug.patch
56083a8b290a7b1b1ffc9c8e3333db6d786a20d6e91ee400e895ecee8d31cccc75d809be13bcfe5cfb7d5b53a687b25281e8fd454cf420468ded3f77dcea9897 memshare-debug.patch
4a09fdcf99a4716a4ced11b7d74b7867423e5f6fa6c62674e57f496a10647c0b704fd5f91c46711e363337b54d3b7917b6c685230568eab44b6303bd285a2b61 remove-gcc-wrapper.patch
04f7df03f4c9e4b144c24c33b6fadc98381dacf891535ba18d791c250366550c59dba19418e47dbe575671e253d19a1e8076dd7f46743c0123e624a65366aaa6 samsung-usb-ethaddr.patch
"

View file

@ -0,0 +1 @@
../../.shared-patches/linux/qcom/msm8916/cpr-dump.patch

View file

@ -0,0 +1 @@
../../.shared-patches/linux/qcom/msm8916/gpio-debug.patch

View file

@ -0,0 +1 @@
../../.shared-patches/linux/qcom/msm8916/memshare-debug.patch

View file

@ -0,0 +1 @@
../../.shared-patches/linux/qcom/msm8916/remove-gcc-wrapper.patch

View file

@ -0,0 +1 @@
../../.shared-patches/linux/samsung-usb-ethaddr.patch