Mail archive
alpine-aports

Re: [alpine-aports] [PATCH] testing/raspicom-module: new aport

From: Timo Teras <timo.teras_at_iki.fi>
Date: Thu, 4 Jun 2015 08:43:45 +0300

Hi,

Sorry for the very late reply. Few additional notes based on attempt
to apply it. Also few spots that maybe _at_ncopa can comment also?

On Thu, 7 May 2015 09:31:11 +0200
Marian Buschsieweke <mari.hahn_at_wwu.de> wrote:

> http://www.amescon.com/products/raspicomm/
>
> Kernel module for RS-485 Port and OpenRC services to set up RTC,
> Joystick and LEDs of Amescon's RasPiComm module
>
> diff --git a/testing/raspicomm-module/APKBUILD
> b/testing/raspicomm-module/APKBUILD new file mode 100644
> index 0000000..bf3dd99
> --- /dev/null
> +++ b/testing/raspicomm-module/APKBUILD
> _at_@ -0,0 +1,83 @@
> +# Contributor: Marian Buschsieweke <mari.hahn_at_wwu.de>
> +
> +_flavor=rpi
> +_kpkg=linux-$_flavor
> +_kver=3.18.12
> +_kpkgrel=0
> +_mypkgrel=0
> +_realname=raspicomm-module
> +
> +# verify the kernel version before entering chroot
> +if [ -f ../../main/linux-${_flavor}/APKBUILD ]; then
> + . ../../main/linux-${_flavor}/APKBUILD
> + [ "$_kver" != "$pkgver" ] && die "${_realname}: please
> update _kver to $pkgver"
> + [ "$_kpkgrel" != "$pkgrel" ] && die "${_realname}: please
> update _kpkgrel to $pkgrel" +fi
> +

main/linux-rpi now ships linux-rpi and linux-rpi2 flavors. Both are
included in the 3.2.0 rpi tarball, and correct version is automatically
used based on bootloader's hardware detection.

I wonder if this should be made somehow to build for both flavors too?

> +build() {
> + cd "$_builddir"
> + export GCC_SPECS=hardenednopie.specs

_at_ncopa, Could we drop GCC_SPECS here, and infact all of the aports
tree? The gcc pie-patches have longtime disabled esp support if
__KERNEL__ is defined.

> + make -f Makefile_rpi

This failed with:

 raspicomm-module:
 Unpacking /var/cache/distfiles/raspicomm-module-v1.12.tar.gz...
 raspicomm-module: Creating group gpio
make -C /lib/modules/3.18.12-1-grsec/build
M=/home/tteras/aports/testing/raspicomm-module/src/raspicomm-module-1.12
modules make[1]: *** /lib/modules/3.18.12-1-grsec/build: No such file
or directory. Stop. Makefile_rpi:6: recipe for target 'all' failed

I suspect you need to explicitly specify the kernel source tree to use.
So it'll use /lib/modules/$_kpkg-$_kver-$_kpkgrel-$_flavor. The reason
is that raspberry pi stuff is complied on wandboard, and the running
kernel will not match what we want to build.

Otherwise it's starting to look good.

Thanks,
Timo


---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Thu Jun 04 2015 - 08:43:45 GMT