Verified Commit e3921e5d authored by Asriel Dreemurr's avatar Asriel Dreemurr Committed by Oliver Smith

xiaomi-santoni: add android adaptation (!420)

Signed-off-by: Asriel Dreemurr's avatarAsriel Dreemurr <asriel.danctnix@gmail.com>
parent f5ef288d
This diff is collapsed.
# Reference: <https://postmarketos.org/devicepkg>
pkgname="device-xiaomi-santoni"
pkgdesc="Xiaomi Redmi 4X"
pkgver=0.1
pkgrel=6
pkgver=0.5
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
install="$pkgname.post-install"
options="!check !archcheck"
depends="postmarketos-base linux-xiaomi-santoni mkbootimg mesa-dri-swrast msm-fb-refresher mdss-fb-init-hack pulseaudio pulseaudio-alsa alsa-plugins-pulse alsa-utils"
depends="postmarketos-base linux-xiaomi-santoni mkbootimg mesa-dri-swrast msm-fb-refresher pulseaudio pulseaudio-alsa alsa-plugins-pulse alsa-utils"
makedepends="devicepkg-dev"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware
$pkgname-nonfree-userland:nonfree_userland
$pkgname-hybris:hybris
$pkgname-hybris-x11:hybris_x11"
source="deviceinfo
90-device-xiaomi-santoni-audio.rules
HiFi
......@@ -20,7 +23,9 @@ source="deviceinfo
charging.sh
discharging.sh
asound.conf
msm8920-sku7-snd-card.conf"
msm8920-sku7-snd-card.conf
fstab.android
70-santoni-android.rules"
build() {
devicepkg_build $startdir $pkgname
......@@ -45,6 +50,12 @@ package() {
install -Dm755 "$srcdir"/discharging.sh "$pkgdir"/usr/lib/device-xiaomi-santoni/discharging.sh
install -Dm644 "$srcdir"/100-charging.rules \
"$pkgdir"/etc/udev/rules.d/100-charging.rules
# Disable v4l udev rules (video4linux), because without the camera
# firmware blobs this makes udev helper hang (#1033)
mkdir -p "$pkgdir"/etc/udev/rules.d
ln -s /dev/null "$pkgdir"/etc/udev/rules.d/60-persistent-v4l.rules
}
nonfree_firmware() {
......@@ -53,6 +64,36 @@ nonfree_firmware() {
mkdir "$subpkgdir"
}
nonfree_userland() {
pkgdesc="Pulls libhybris (Android) hardware adaptation"
depends="$pkgname-hybris"
mkdir "$subpkgdir"
}
hybris () {
pkgdesc="libhybris (Android) hardware adaptation"
depends="hybris-base"
install="$pkgname-hybris.post-install"
mkdir "$subpkgdir"
# Android mounts (needed for loading firmware and configs from android container)
# Appended to fstab in post-install script
install -Dm644 "${startdir}/fstab.android" "${subpkgdir}/etc/fstab.android"
# Android udev rules, depend on android users and groups presence
install -Dm644 "${startdir}/70-santoni-android.rules" \
"${subpkgdir}/etc/udev/rules.d/70-santoni-android.rules"
}
hybris_x11() {
pkgdesc="x11 modules for libhybris adaptation"
depends="hybris-base-x11-caf"
install_if="$pkgname-hybris xorg-server"
mkdir "$subpkgdir"
}
sha512sums="4a7ba291c30cc5c05cee60f1d54d026b92b270f6499ceb83111cd5c05fe6c6c8182401abc99a8c10d81f0ee95b1414fd72d0aa7f635226f44b9cf659e3cc3471 deviceinfo
dc4bf7871307e659f220aebc3c9f7d74b861f46e1f3df1be37d724af984e46d91e553dbd36c2bd4482aa17dbe4d76d28dabe214952638f00830907466b110146 90-device-xiaomi-santoni-audio.rules
1d2f98a9570212d3026c9565754337574ae046ad4de90265029b7e4a7cd4a2df473ca18ea41d1730f0a01046b40d343446fc88f5d70a1050e0dc578ad460f941 HiFi
......@@ -62,4 +103,6 @@ b634d13cac1f10535a31c142c7391986ab402ae9910d8093989920f4c2dbd63722ee8595f11962bf
c4853babd5cd6371297e5e5d64364c064d540cd4beaba06d79b1001fe5c78fe3ee8bc5f6f4ba3e383743a09263028abc55f41bad45240b1c505e27ed087725c9 charging.sh
6012be4184af6c4f12f9b20a6f2d377ebd72b9b334df4fbb921ed9d8da865633631f77d19b02748ebee70442e2f3ffcb6af511ee5deaa40635bc53730c301076 discharging.sh
b1f374547e9a0ebb99c0740af50ed17d40dfa1e283046ca2aad42a8e31604fee2916612e0579b2dbf1c6cd88a1d2c6117fec7754e745f654a705f8e5073aba92 asound.conf
6cbe9079b6eb1fc889fbb13d8b3da620b39abde3e93e2301601e5416fda8b768aa11876238378af6571ddc3c4ce662dd49f1491cbe8b96153451ffdc7b761926 msm8920-sku7-snd-card.conf"
6cbe9079b6eb1fc889fbb13d8b3da620b39abde3e93e2301601e5416fda8b768aa11876238378af6571ddc3c4ce662dd49f1491cbe8b96153451ffdc7b761926 msm8920-sku7-snd-card.conf
8419c1c5d20bc7c7e4d8d72ec2848655526f99cabf9037ae1f7152f5df31363b70b724769225a88c1d614bea6ebe4ee24190702ea947229a843cc2884eac7175 fstab.android
7c0cda58ddc36e8a6120ce969c1e7afc445817e20b38a4c33e986d3d584bcf0fbb4d82eeda4dab5abdf3429845621a4ffa155512f40e885be615042faf1de171 70-santoni-android.rules"
#!/bin/sh
# Append Android mounts to Linux fstab
cat /etc/fstab.android >> /etc/fstab
# Create Android mount points
mkdir -p /data
mkdir -p /system
mkdir -p /cache
mkdir -p /persist
mkdir -p /dsp
mkdir -p /firmware
mkdir -p /usb_otg
# /vendor symlink (points to nowhere until /system is mounted)
ln -s /system/vendor /vendor
# This file defines mount points that are expected by Android 7.1
# (Halium-7.1) adaptation; its contents should be appended to device's
# default /etc/fstab file (see postmarketos-base).
# Android device-specific mount points:
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
# Userdata partition (Android apps, user files are here. Only ext4 is supported)
/dev/mmcblk0p49 /data ext4 nosuid,nodev,noatime,noauto_da_alloc
# Cache partition
/dev/mmcblk0p25 /cache ext4 nosuid,nodev,noatime 0 0
# Persist partition, this partition contains sensitive data about sensors, WLAN.
/dev/mmcblk0p26 /persist ext4 nosuid,nodev 0 0
# DSP
/dev/mmcblk0p12 /dsp ext4 ro,nosuid,nodev 0 0
# Firmware partition. This partition is house for WLAN, ADSP, Modem firmwares.
/dev/mmcblk0p1 /firmware vfat ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337 0 0
# Kernel config based on: arch/arm64/configs/santoni_defconfig
pkgname="linux-xiaomi-santoni"
pkgver=3.18.140
pkgrel=0
pkgrel=1
pkgdesc="Xiaomi Redmi 4X kernel fork - msm-3.18 rebase"
arch="aarch64"
_carch="arm64"
......@@ -73,4 +73,4 @@ package() {
sha512sums="d7a290e676aa40d35289cedbad5dd077accff4e1a2467223765a79f101ff4c1313315cbffd574ad74c648c4b8f5751d16a1fa1607c9939b373d3f2974a7b2326 linux-xiaomi-santoni-2dd8017f40290eb326e352cca254cd8bdd1614c9.tar.gz
a277af28a718f5caf94257005393aa92d62c96110a8ec6368ff62f2e0d871b69c56c4ce00174db637204d53fa63ad3a79b8d6141713dca0878e1f06fe0379caa fix-xorg-mdss-update-fb-info.patch
14ee08e4f93befeaabfb35e6bf0b8bb5b2eecba1c21ce4498499c377c2cf4d5fccbfe85e14ca92c704d067386ec08a06805ab886f0ec7691471cf379838545aa disable-substream-runtime-errors.patch
a84337f245e3f6327e4e475942c3316f2af14977ce546ad7041a4303870455edc44af2e960d1968087655f5a233ed10ffbd75291c65746094f3d4a1e3376e549 config-xiaomi-santoni.aarch64"
c296816069ef2d1182e95e4a864c403310d1729cedb534d4e5d8300eb5b71f9fb763dbaabd4426c9d99cb8f3cbf66ecb2209b1290f2de5aa831e39ef2663d064 config-xiaomi-santoni.aarch64"
......@@ -581,9 +581,9 @@ CONFIG_COMPAT_NETLINK_MESSAGES=y
# Networking options
#
CONFIG_PACKET=y
# CONFIG_PACKET_DIAG is not set
CONFIG_PACKET_DIAG=y
CONFIG_UNIX=y
# CONFIG_UNIX_DIAG is not set
CONFIG_UNIX_DIAG=y
CONFIG_XFRM=y
CONFIG_XFRM_ALGO=y
CONFIG_XFRM_USER=y
......@@ -721,7 +721,7 @@ CONFIG_NETFILTER_XT_CONNMARK=y
# Xtables targets
#
# CONFIG_NETFILTER_XT_TARGET_AUDIT is not set
# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set
CONFIG_NETFILTER_XT_TARGET_CHECKSUM=y
CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y
CONFIG_NETFILTER_XT_TARGET_CONNMARK=y
CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=y
......@@ -846,7 +846,8 @@ CONFIG_NF_DEFRAG_IPV6=y
CONFIG_NF_CONNTRACK_IPV6=y
CONFIG_NF_REJECT_IPV6=y
CONFIG_NF_LOG_IPV6=y
# CONFIG_NF_NAT_IPV6 is not set
CONFIG_NF_NAT_IPV6=y
CONFIG_NF_NAT_MASQUERADE_IPV6=y
CONFIG_IP6_NF_IPTABLES=y
# CONFIG_IP6_NF_MATCH_AH is not set
# CONFIG_IP6_NF_MATCH_EUI64 is not set
......@@ -864,7 +865,9 @@ CONFIG_IP6_NF_TARGET_REJECT=y
CONFIG_IP6_NF_MANGLE=y
CONFIG_IP6_NF_RAW=y
# CONFIG_IP6_NF_SECURITY is not set
# CONFIG_IP6_NF_NAT is not set
CONFIG_IP6_NF_NAT=y
CONFIG_IP6_NF_TARGET_MASQUERADE=y
# CONFIG_IP6_NF_TARGET_NPT is not set
CONFIG_BRIDGE_NF_EBTABLES=y
CONFIG_BRIDGE_EBT_BROUTE=y
# CONFIG_BRIDGE_EBT_T_FILTER is not set
......@@ -899,8 +902,11 @@ CONFIG_L2TP_ETH=y
CONFIG_STP=y
CONFIG_BRIDGE=y
CONFIG_BRIDGE_IGMP_SNOOPING=y
# CONFIG_BRIDGE_VLAN_FILTERING is not set
CONFIG_HAVE_NET_DSA=y
# CONFIG_VLAN_8021Q is not set
CONFIG_VLAN_8021Q=y
# CONFIG_VLAN_8021Q_GVRP is not set
# CONFIG_VLAN_8021Q_MVRP is not set
# CONFIG_DECNET is not set
CONFIG_LLC=y
# CONFIG_LLC2 is not set
......@@ -981,7 +987,7 @@ CONFIG_DNS_RESOLVER=y
# CONFIG_BATMAN_ADV is not set
# CONFIG_OPENVSWITCH is not set
# CONFIG_VSOCKETS is not set
# CONFIG_NETLINK_DIAG is not set
CONFIG_NETLINK_DIAG=y
# CONFIG_NET_MPLS_GSO is not set
# CONFIG_HSR is not set
CONFIG_RMNET_DATA=y
......@@ -1384,7 +1390,8 @@ CONFIG_DUMMY=y
# CONFIG_NET_FC is not set
# CONFIG_IFB is not set
# CONFIG_NET_TEAM is not set
# CONFIG_MACVLAN is not set
CONFIG_MACVLAN=y
# CONFIG_MACVTAP is not set
# CONFIG_VXLAN is not set
# CONFIG_NETCONSOLE is not set
# CONFIG_NETPOLL is not set
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment