Last active
January 24, 2018 19:02
-
-
Save halamix2/d562b782458529c6075db00a1817ddbf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reference: <https://postmarketos.org/devicepkg> | |
pkgname="device-samsung-s6500d" | |
pkgdesc="Samsung Galaxy Mini 2" | |
pkgver=0.1 | |
pkgrel=1 | |
url="https://postmarketos.org" | |
license="MIT" | |
arch="noarch" | |
options="!check" | |
depends="linux-samsung-s6500d mkbootimg mesa-dri-swrast" | |
makedepends="devicepkg-dev" | |
source="deviceinfo" | |
build() { | |
devicepkg_build $startdir $pkgname | |
} | |
package() { | |
devicepkg_package $startdir $pkgname | |
} | |
sha512sums="048548b95047d9d0e3911752e59dc2d64d5af4b3d6038a1208c63a3cb21c3c5338c9c452bdb8467201e486f7d11407b426c9a49a4c410386cc0b1580c8707789 deviceinfo" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Kernel config based on: arch/arm/configs/jenad_defconfig | |
pkgname="linux-samsung-s6500d" | |
pkgver=3.4.105 | |
pkgrel=0 | |
pkgdesc="Samsung Galaxy Mini 2 kernel fork" | |
arch="armhf" | |
_carch="arm" | |
_flavor="samsung-s6500d" | |
url="https://github.com/Shadowofleaf/android_kernel_samsung_msm7x27a/" | |
license="GPL2" | |
options="!strip !check !tracedeps" | |
depends="postmarketos-mkinitfs" | |
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev python2 e2fsprogs e2fsprogs-extra" | |
HOSTCC="${CC:-gcc}" | |
HOSTCC="${HOSTCC#${CROSS_COMPILE}}" | |
# Source | |
_repository="android_kernel_samsung_msm7x27a" | |
_commit="d70eebdb55d7011c82ce64fe5eae2fdcbfd4e425" | |
_config="config-${_flavor}.${arch}" | |
source=" | |
$pkgname-$_commit.tar.gz::https://github.com/Shadowofleaf/${_repository}/archive/${_commit}.tar.gz | |
$_config | |
compiler-gcc6.h | |
00_return_address.patch | |
02_gpu-msm-fix-gcc5-compile.patch | |
" | |
builddir="$srcdir/${_repository}-${_commit}" | |
prepare() { | |
default_prepare | |
# gcc6 support | |
cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" | |
# Remove -Werror from all makefiles | |
find . -type f -name Makefile -print0 | \ | |
xargs -0 sed -i 's/-Werror-/-W/g' | |
find . -type f -name Makefile -print0 | \ | |
xargs -0 sed -i 's/-Werror//g' | |
# Prepare kernel config ('yes ""' for kernels lacking olddefconfig) | |
cp "$srcdir"/$_config "$builddir"/.config | |
yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig | |
} | |
menuconfig() { | |
cd "$builddir" | |
make ARCH="$_carch" menuconfig | |
cp .config "$startdir"/$_config | |
} | |
build() { | |
unset LDFLAGS | |
make ARCH="$_carch" CC="${CC:-gcc}" \ | |
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS" | |
#build modules | |
make ARCH="$_carch" CC="${CC:-gcc}" \ | |
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS" modules | |
} | |
package() { | |
# kernel.release | |
install -D "$builddir/include/config/kernel.release" \ | |
"$pkgdir/usr/share/kernel/$_flavor/kernel.release" | |
# zImage (find the right one) | |
cd "$builddir/arch/$_carch/boot" | |
_target="$pkgdir/boot/vmlinuz-$_flavor" | |
for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do | |
[ -e "$_zimg" ] || continue | |
msg "zImage found: $_zimg" | |
install -Dm644 "$_zimg" "$_target" | |
break | |
done | |
if ! [ -e "$_target" ]; then | |
error "Could not find zImage in $PWD!" | |
return 1 | |
fi | |
#install modules | |
make ARCH="$_carch" CC="${CC:-gcc}" \ | |
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS" \ | |
INSTALL_MOD_PATH="$pkgdir" INSTALL_MOD_STRIP=1 modules_install | |
} | |
sha512sums="a46d52f79597fc3a8ded036fbdcc4cdbb96ba1582fb1349002183c1e23598da10da2faede1a251f55705ae6e8e54232797866f4c03acc2b1ace1664b315dd216 linux-samsung-s6500d-d70eebdb55d7011c82ce64fe5eae2fdcbfd4e425.tar.gz | |
41f5709398318f4d26b82ea7c5a58bce2b733d92cfc88838926658be602ff379567f41690f27ce47830983efd9508ccc149c8c80583de5a366d6d3d6cab36cd7 config-samsung-s6500d.armhf | |
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h | |
c40eaa11547f5bc2b1ff965506bdfe3015ff16e4b5ad9ccb3b8134ceafd1d32407c4ef2b213e02e036ce1e9bdcbfe768dff7d4b054bec77705a176c1f783b6f5 00_return_address.patch | |
7be03a9e78b7ac330a54b1f00509caa0621a95c0c55901878ad757f9dd69cc05ba2c8b5ea987063ae1224f92c4d090d515fa5d369e7755181a4871b0d0f82881 02_gpu-msm-fix-gcc5-compile.patch" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CALL scripts/checksyscalls.sh | |
Building modules, stage 2. | |
MODPOST 27 modules | |
>>> linux-samsung-s6500d: Entering fakeroot... | |
>>> linux-samsung-s6500d*: zImage found: zImage | |
make: *** No rule to make target 'modules_install'. Stop. | |
>>> ERROR: linux-samsung-s6500d*: package failed | |
>>> ERROR: linux-samsung-s6500d: all failed | |
(003823) [19:28:57] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
(003823) [19:28:57] NOTE: The failed command's output is above the ^^^ line in the logfile: /home/halamix2/.local/var/pmbootstrap/log.txt | |
(003823) [19:28:57] ERROR: Command failed: (native) % cd /home/pmos/build && busybox su pmos -c 'CARCH=armhf CROSS_COMPILE=armv6-alpine-linux-muslgnueabihf- CC=armv6-alpine-linux-muslgnueabihf-gcc abuild -d' | |
(003823) [19:28:57] Run 'pmbootstrap log' for details. | |
(003823) [19:28:57] See also: <https://postmarketos.org/troubleshooting> | |
(003823) [19:28:57] Traceback (most recent call last): | |
File "/home/halamix2/repos/hardware/pmbootstrap/pmb/helpers/run.py", line 53, in core | |
stderr=args.logfd) | |
File "/usr/lib/python3.6/subprocess.py", line 291, in check_call | |
raise CalledProcessError(retcode, cmd) | |
subprocess.CalledProcessError: Command '['sudo', '/bin/sh', '-c', 'env -i CHARSET=UTF-8 PATH=/usr/lib/ccache/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin SHELL=/bin/ash HISTFILE=~/.ash_history /usr/sbin/chroot /home/halamix2/.local/var/pmbootstrap/chroot_native sh -c \'cd /home/pmos/build;busybox su pmos -c \'"\'"\'CARCH=armhf CROSS_COMPILE=armv6-alpine-linux-muslgnueabihf- CC=armv6-alpine-linux-muslgnueabihf-gcc abuild -d\'"\'"\'\'']' returned non-zero exit status 1. | |
The above exception was the direct cause of the following exception: | |
Traceback (most recent call last): | |
File "/home/halamix2/repos/hardware/pmbootstrap/pmb/__init__.py", line 61, in main | |
getattr(frontend, args.action)(args) | |
File "/home/halamix2/repos/hardware/pmbootstrap/pmb/helpers/frontend.py", line 148, in build | |
args.buildinfo, args.strict) | |
File "/home/halamix2/repos/hardware/pmbootstrap/pmb/build/_package.py", line 342, in package | |
suffix) | |
File "/home/halamix2/repos/hardware/pmbootstrap/pmb/build/_package.py", line 271, in run_abuild | |
pmb.chroot.user(args, cmd, suffix, "/home/pmos/build") | |
File "/home/halamix2/repos/hardware/pmbootstrap/pmb/chroot/user.py", line 34, in user | |
auto_init, return_stdout, check) | |
File "/home/halamix2/repos/hardware/pmbootstrap/pmb/chroot/root.py", line 86, in root | |
return_stdout, check) | |
File "/home/halamix2/repos/hardware/pmbootstrap/pmb/helpers/run.py", line 66, in core | |
raise RuntimeError("Command failed: " + log_message) from exc | |
RuntimeError: Command failed: (native) % cd /home/pmos/build && busybox su pmos -c 'CARCH=armhf CROSS_COMPILE=armv6-alpine-linux-muslgnueabihf- CC=armv6-alpine-linux-muslgnueabihf-gcc abuild -d' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment