This commit is contained in:
deata 2018-07-02 12:18:21 +03:00
commit 799485b5c1
6 changed files with 58 additions and 33 deletions

View file

@ -1,7 +0,0 @@
# udev rules file
# All device names can be read from weston's logfile
# Touchscreen detection
SUBSYSTEM=="input", ATTRS{name}=="synaptics", \
ENV{ID_INPUT}="1", ENV{ID_INPUT_TOUCHSCREEN}="1"

View file

@ -1,25 +1,23 @@
pkgname=device-huawei-y530
pkgver=1
pkgrel=10
# Reference: <https://postmarketos.org/devicepkg>
pkgname="device-huawei-y530"
pkgdesc="Huawei Ascend Y530"
pkgver=1
pkgrel=11
url="https://postmarketos.org"
arch="noarch"
license="MIT"
depends="postmarketos-base linux-huawei-y530 mkbootimg mesa-dri-swrast"
makedepends=""
install=""
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
source="
deviceinfo
90-touchscreen-dev.rules
"
arch="noarch"
options="!check"
depends="postmarketos-base linux-huawei-y530 mkbootimg mesa-dri-swrast"
makedepends="devicepkg-dev"
source="deviceinfo"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
build() {
devicepkg_build $startdir $pkgname
}
package() {
install -D -m644 "$srcdir"/deviceinfo \
"$pkgdir"/etc/deviceinfo
install -D -m644 "$srcdir"/90-touchscreen-dev.rules \
"$pkgdir"/etc/udev/rules.d/90-touchscreen-dev.rules
devicepkg_package $startdir $pkgname
}
nonfree_firmware() {
@ -28,5 +26,4 @@ nonfree_firmware() {
mkdir "$subpkgdir"
}
sha512sums="cbe2c1d166f202923462ffe254d16d335eb0c7d16bd2c2aabb3aa8947278ce276bbe440aa03fc5098f28fb029750c5869ef280b514e36268ef2b8c0b5022fa78 deviceinfo
b2ebcd94e54b474d5a0d03f25af0d152583cddbb8ae8a70b72d65e96c9114a11fd535ffc964b23a0852fd541198c940fe6e867dafb6e6a8a12cb6fa5d1538d45 90-touchscreen-dev.rules"
sha512sums="c6d12a7869423b15b96938e05ca638b27a0e644ec4374978bfaacf9cf26d9bf6f4fa8a8e6bd708394ac0225fefe9f24b51a18b478730d1782cd64c5e6e0327f4 deviceinfo"

View file

@ -5,27 +5,28 @@ deviceinfo_format_version="0"
deviceinfo_name="Huawei Ascend Y530"
deviceinfo_manufacturer="Huawei"
deviceinfo_date=""
deviceinfo_nonfree="????"
deviceinfo_dtb=""
deviceinfo_modules=""
deviceinfo_modules_initfs=""
deviceinfo_external_storage="true"
deviceinfo_flash_method="fastboot"
deviceinfo_arch="armhf"
# Device related
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="480"
deviceinfo_screen_height="854"
deviceinfo_dev_touchscreen="/dev/input/event1"
deviceinfo_dev_touchscreen_calibration=""
deviceinfo_dev_keyboard=""
# Fastboot related
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_kernel_cmdline=""
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="true"
deviceinfo_kernel_cmdline=""
deviceinfo_flash_offset_base="0x00000000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x02000000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x01e00000"
deviceinfo_flash_pagesize="2048"

View file

@ -1,3 +1,4 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname="device-samsung-klte"
pkgdesc="Samsung Galaxy S5"
pkgver=0.2

View file

@ -1,5 +1,5 @@
pkgname="devicepkg-dev"
pkgver=0.2
pkgver=0.3
pkgrel=0
pkgdesc="Provides default device package functions"
url="https://postmarketos.org"
@ -8,6 +8,7 @@ license="MIT"
source="
devicepkg_build.sh
devicepkg_package.sh
downstreamkernel_prepare.sh
"
package() {
@ -15,6 +16,9 @@ package() {
"$pkgdir/usr/bin/devicepkg_build"
install -Dm755 "$srcdir/devicepkg_package.sh" \
"$pkgdir/usr/bin/devicepkg_package"
install -Dm755 "$srcdir/downstreamkernel_prepare.sh" \
"$pkgdir/usr/bin/downstreamkernel_prepare"
}
sha512sums="638d50e6388eabf0da6bf0cff2fe9719ad8a808946f0077228db57fa13a26d9eeb39c1f2689c9a6f93ff9b3bcfdcfb7c358b180bba90e5bba8b9a9e78d25ed18 devicepkg_build.sh
c732792596f56860f6ab9ddd53b9a7a80224400dd20097b20cebe17a6e7330e9178783f09db16132a28a555f83e29ef3643bfe069638b62998912a9a7ffefdc0 devicepkg_package.sh"
c732792596f56860f6ab9ddd53b9a7a80224400dd20097b20cebe17a6e7330e9178783f09db16132a28a555f83e29ef3643bfe069638b62998912a9a7ffefdc0 devicepkg_package.sh
9f240217084215e6a085616ae7dbe4ed7446f9cd4a1ca32631c083a1c74ea380bb8585a32a506491e54db091683bbe7300e94dba3a0d994a580017686386abc8 downstreamkernel_prepare.sh"

View file

@ -0,0 +1,29 @@
#!/bin/sh
srcdir=$1
builddir=$2
_config=$3
_carch=$4
HOSTCC=$5
if [ -z "$srcdir" ] || [ -z "$builddir" ] || [ -z "$_config" ] ||
[ -z "$_carch" ] || [ -z "$HOSTCC" ]; then
echo "ERROR: missing argument!"
echo "Please call downstreamkernel_prepare() with \$srcdir, \$builddir,"
echo "\$_config, \$_carch and \$HOSTCC as arguments."
exit 1
fi
# gcc6 support
cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/"
# Remove -Werror from all makefiles
makefiles="$(find . -type f -name Makefile)
$(find . -type f -name Kbuild)"
for i in $makefiles; do
sed -i 's/-Werror-/-W/g' "$i"
sed -i 's/-Werror//g' "$i"
done
# Prepare kernel config ('yes ""' for kernels lacking olddefconfig)
cp "$srcdir/$_config" "$builddir"/.config
yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig