Add sunxi-mali version r3p0 packaging

Finalize chroot-buildpkg changes
This commit is contained in:
zador-blood-stained 2016-07-11 21:20:34 +03:00
parent d1159a081a
commit 86c514cca0
31 changed files with 312 additions and 11 deletions

View file

@ -255,6 +255,7 @@ fetch_from_repo()
chroot_installpackages()
{
local conf="/tmp/aptly-temp/aptly.conf"
rm -rf /tmp/aptly-temp/
mkdir -p /tmp/aptly-temp/
cat <<-'EOF' > $conf
{
@ -284,8 +285,6 @@ chroot_installpackages()
aptly -config=$conf -listen=":8189" serve &
local aptly_pid=$!
cp $SRC/lib/extras-buildpkgs/buildpkg.key $CACHEDIR/sdcard/tmp/buildpkg.key
chroot $CACHEDIR/sdcard /bin/bash -c "cat /tmp/buildpkg.key | apt-key add -"
rm $CACHEDIR/sdcard/tmp/buildpkg.key
cat <<-EOF > $CACHEDIR/sdcard/etc/apt/preferences.d/90-armbian-temp.pref
Package: *
Pin: origin "localhost"
@ -297,15 +296,24 @@ chroot_installpackages()
local install_list=""
for plugin in $SRC/lib/extras-buildpkgs/*.conf; do
source $plugin
# TODO: check install condition
install_list="$install_list $package_install_target"
unset package_install_target
if [[ $(type -t package_checkinstall) == function ]] && package_checkinstall; then
install_list="$install_list $package_install_target"
fi
unset package_install_target package_checkinstall
done
chroot $CACHEDIR/sdcard /bin/bash -c "apt-get update; apt-get install -y $install_list"
rm $CACHEDIR/sdcard/etc/apt/sources.list.d/armbian-temp.list
chroot $CACHEDIR/sdcard /bin/bash -c "apt-key del 128290AF"
rm $CACHEDIR/sdcard/etc/apt/preferences.d/90-armbian-temp.pref
cat <<-EOF > $CACHEDIR/sdcard/tmp/install.sh
#!/bin/bash
cat /tmp/buildpkg.key | apt-key add -
apt-get update
apt-get install -o Acquire::http::Proxy=\"http://${APT_PROXY_ADDR:-localhost:3142}\" \
--show-progress -o DPKG::Progress-Fancy=1 -y $install_list
apt-get clean
apt-key del 128290AF
rm /etc/apt/sources.list.d/armbian-temp.list /etc/apt/preferences.d/90-armbian-temp.pref /tmp/buildpkg.key
rm -- "\$0"
EOF
chmod +x $CACHEDIR/sdcard/tmp/install.sh
chroot $CACHEDIR/sdcard /bin/bash -c "/tmp/install.sh"
kill $aptly_pid
rm -rf /tmp/aptly-temp/
} #############################################################################

View file

@ -78,6 +78,8 @@ debootstrap_ng()
# install desktop files
[[ $BUILD_DESKTOP == yes ]] && install_desktop
[[ $EXTERNAL_NEW == yes ]] && chroot_installpackages
# cleanup for install_kernel and install_board_specific
umount $CACHEDIR/sdcard/tmp > /dev/null 2>&1

View file

@ -6,3 +6,8 @@ local package_upstream_version="1.0.1"
local package_builddeps="xutils-dev x11proto-xext-dev x11proto-dri2-dev quilt pkg-config libxfixes-dev libxext-dev libdrm-dev dh-autoreconf"
local package_install_chroot="libdri2-1 libdri2-dev"
local package_install_target="libdri2-1"
package_checkinstall()
{
[[ $LINUXFAMILY == sun*i && $BRANCH == default && $BUILD_DESKTOP == yes ]]
}

View file

@ -5,3 +5,8 @@ local package_ref="branch:master"
local package_builddeps="graphviz ghostscript doxygen-latex x11proto-dri2-dev pkg-config libxext-dev libx11-dev dh-autoreconf"
local package_install_chroot="libvdpau1 libvdpau-dev"
local package_install_target="libvdpau1"
package_checkinstall()
{
[[ $LINUXFAMILY == sun*i && $BRANCH == default && $BUILD_DESKTOP == yes ]]
}

View file

@ -5,3 +5,8 @@ local package_ref="branch:ump"
local package_builddeps="dh-autoreconf pkg-config"
local package_install_chroot="libump libump-dev"
local package_install_target="libump"
package_checkinstall()
{
[[ $LINUXFAMILY == sun*i && $BRANCH == default && $BUILD_DESKTOP == yes ]]
}

View file

@ -6,3 +6,8 @@ local package_ref="branch:master"
local package_upstream_version="1.0.1"
local package_install_chroot="libcedrus1 libcedrus1-dev"
local package_install_target="libcedrus1"
package_checkinstall()
{
[[ $LINUXFAMILY == sun*i && $BRANCH == default && $BUILD_DESKTOP == yes ]]
}

View file

@ -4,3 +4,9 @@ local package_repo="https://github.com/Snaipe/libcsptr.git"
local package_ref="branch:master"
local package_builddeps="cmake"
local package_install_chroot="libcsptr-dev"
local package_install_target="libcsptr-dev"
package_checkinstall()
{
false
}

View file

@ -5,3 +5,8 @@ local package_repo="https://github.com/ssvb/xf86-video-fbturbo.git"
local package_ref="branch:master"
local package_builddeps="dh-autoreconf pkg-config xserver-xorg-dev x11proto-core-dev x11proto-fonts-dev x11proto-randr-dev x11proto-render-dev x11proto-video-dev xutils-dev"
local package_install_target="xf86-video-fbturbo"
package_checkinstall()
{
[[ $LINUXFAMILY == sun*i && $BUILD_DESKTOP == yes ]]
}

View file

@ -6,3 +6,8 @@ local package_upstream_version="7:3.1.1"
local package_builddeps="dpkg-dev flite1-dev frei0r-plugins-dev ladspa-sdk libass-dev libavc1394-dev libbluray-dev libbs2b-dev libbz2-dev libcaca-dev libcdio-paranoia-dev libdc1394-22-dev libfontconfig1-dev libfreetype6-dev libfribidi-dev libgl1-mesa-dev libgme-dev libgnutls28-dev libgsm1-dev libiec61883-dev libjack-jackd2-dev liblzma-dev libmodplug-dev libmp3lame-dev libopenal-dev libopencv-dev libopenjpeg-dev libopus-dev libpulse-dev librtmp-dev libschroedinger-dev libsctp-dev libsdl1.2-dev libshine-dev libsnappy-dev libsoxr-dev libspeex-dev libssh-gcrypt-dev libtheora-dev libtwolame-dev libva-dev libvdpau-dev libvorbis-dev libvpx-dev libwavpack-dev libwebp-dev libx264-dev libx265-dev libxext-dev libxvidcore-dev libxvmc-dev libzmq3-dev libzvbi-dev pkg-config yasm"
local package_install_chroot="libavutil-ffmpeg54 libavutil-dev libpostproc-ffmpeg53 libswresample-ffmpeg1 libswscale-ffmpeg3 libswscale-dev libavresample-ffmpeg2 libavresample-dev libavcodec-ffmpeg56 libswresample-dev libavcodec-dev libpostproc-dev libavformat-ffmpeg56 libavformat-dev libavfilter-ffmpeg5 libavfilter-dev libavdevice-ffmpeg56 libavdevice-dev"
local package_install_target="libavutil-ffmpeg54 libpostproc-ffmpeg53 libswresample-ffmpeg1 libswscale-ffmpeg3 libavresample-ffmpeg2 libavcodec-ffmpeg56 libavformat-ffmpeg56 libavfilter-ffmpeg5 libavdevice-ffmpeg56 ffmpeg ffmpeg-doc"
package_checkinstall()
{
[[ $LINUXFAMILY == sun*i && $BRANCH == default && $BUILD_DESKTOP == yes ]]
}

View file

@ -6,3 +6,8 @@ local package_ref="branch:master"
local package_upstream_version="2.0.2.1"
local package_builddeps="intltool dh-autoreconf autotools-dev libsdl1.2-dev libgtk-3-dev portaudio19-dev libpng12-dev libavcodec-dev libavutil-dev libudev-dev libusb-1.0-0-dev libpulse-dev libgsl0-dev libv4l-dev libv4l2rds0 libsdl2-dev"
local package_install_target="libguvcview-1.1-1 guvcview"
package_checkinstall()
{
[[ $LINUXFAMILY == sun8i && $BRANCH == default && $BUILD_DESKTOP == yes ]]
}

View file

@ -5,3 +5,8 @@ local package_ref="branch:hostap_2_5"
local package_upstream_version="2.5"
local package_builddeps="pkg-config libssl-dev libreadline-dev libpcsclite-dev libnl-route-3-dev libnl-genl-3-dev libnl-3-dev libncurses5-dev libdbus-1-dev docbook-utils docbook-to-man"
local package_install_target="hostapd-realtek"
package_checkinstall()
{
false
}

View file

@ -5,3 +5,8 @@ local package_ref="branch:hostap_2_5"
local package_upstream_version="2.5"
local package_builddeps="pkg-config libssl-dev libreadline-dev libpcsclite-dev libnl-route-3-dev libnl-genl-3-dev libnl-3-dev libncurses5-dev libdbus-1-dev docbook-utils docbook-to-man"
local package_install_target="hostapd"
package_checkinstall()
{
true
}

View file

@ -7,3 +7,8 @@ local package_ref="branch:master"
local package_upstream_version="0.5.1"
local package_builddeps="libpixman-1-dev pkg-config"
local package_install_target="libvdpau-sunxi1"
package_checkinstall()
{
[[ $LINUXFAMILY == sun*i && $BRANCH == default && $BUILD_DESKTOP == yes ]]
}

View file

@ -7,3 +7,8 @@ local package_ref="tag:v0.18.0"
local package_upstream_version="0.18.0"
local package_builddeps="libasound2-dev libbluray-dev libcdio-paranoia-dev libdvdnav-dev libdvdread-dev libegl1-mesa-dev libenca-dev libgl1-mesa-dev libguess-dev libjack-dev libjpeg-dev liblcms2-dev liblua5.2-dev libpulse-dev librubberband-dev libsdl2-dev libsndio-dev libva-dev libvdpau-dev libwayland-dev libx11-dev libxinerama-dev libxkbcommon-dev libxrandr-dev libxss-dev libxv-dev pkg-config python python-docutils"
local package_install_target="libmpv1 mpv"
package_checkinstall()
{
[[ $LINUXFAMILY == sun*i && $BRANCH == default && $BUILD_DESKTOP == yes ]]
}

View file

@ -0,0 +1,12 @@
# sunxi-mali-r3p0
local package_name="sunxi-mali-r3p0"
local package_repo="https://github.com/linux-sunxi/sunxi-mali.git"
local package_ref="branch:master"
local package_prebuild_eval="git submodule update --init --depth 1"
local package_builddeps="xutils-dev"
local package_install_target="sunxi-mali-r3p0 sunxi-mali-r3p0-dev"
package_checkinstall()
{
[[ $LINUXFAMILY == sun*i && $BRANCH == default && $BUILD_DESKTOP == yes ]]
}

View file

@ -4,3 +4,8 @@ local package_repo="https://github.com/linux-sunxi/sunxi-tools.git"
local package_ref="branch:master"
local package_builddeps="libusb-1.0-0-dev ruby binutils-arm-none-eabi pkg-config u-boot-tools"
local package_install_target="sunxi-tools"
package_checkinstall()
{
true
}

View file

@ -5,3 +5,8 @@ local package_ref="branch:master"
local package_prebuild_eval="mkdir -p /usr/local/include/linux; cp linux/switch.h /usr/local/include/linux/"
local package_builddeps="linux-headers-armmp libnl-3-dev libnl-genl-3-dev"
local package_install_target="swconfig"
package_checkinstall()
{
[[ $BOARD == lamobo-r1 ]]
}

View file

@ -0,0 +1,5 @@
sunxi-mali-r3p0 (1.0-1) unstable; urgency=low
* Initial release
-- root <root@unknown> Mon, 11 Jul 2016 17:02:30 +0300

View file

@ -0,0 +1 @@
9

View file

@ -0,0 +1,28 @@
Source: sunxi-mali-r3p0
Priority: optional
Maintainer: root <root@unknown>
Build-Depends:
debhelper (>= 9),
xutils-dev,
Standards-Version: 3.9.5
Section: libs
Homepage: https://github.com/linux-sunxi/sunxi-mali/
Package: sunxi-mali-r3p0
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Conflicts: libegl1-x11, libgles1, libgles2
Replaces: libegl1-x11, libgles1, libgles2
Provides: libegl1-x11, libgles1, libgles2
Description: Mali userspace binary driver version r3p0
This package contains a complete set of Mali userspace drivers,
including proprietary OpenGLESv2/EGL binaries.
Package: sunxi-mali-r3p0-dev
Section: libdevel
Architecture: any
Depends: sunxi-mali-r3p0 (= ${binary:Version}), ${misc:Depends}
Description: Mali userspace binary driver version r3p0
This package contains a complete set of Mali userspace drivers,
including proprietary OpenGLESv2/EGL binaries.
This package contains OpenGLESv2/EGL development headers.

View file

@ -0,0 +1,8 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: sunxi-mali
Source: <https://github.com/linux-sunxi/sunxi-mali/>
Files: lib/mali
Copyright: Copyright (C) Allwinner Technology Co., Ltd.
License: Proprietary

View file

@ -0,0 +1 @@
README

View file

@ -0,0 +1,136 @@
diff --git a/.gitignore b/.gitignore
index 6865abf..e8a3713 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
config.mk
*~
+*.pc
diff --git a/Makefile b/Makefile
index 60d4a0f..ba752a8 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,7 @@
all: config.mk
$(MAKE) -C include
$(MAKE) -C lib
+ $(MAKE) -f Makefile.pc
config:
rm -f config.mk
@@ -16,11 +17,13 @@ clean:
$(MAKE) -C test clean
$(MAKE) -C lib clean
$(MAKE) -C include clean
+ $(MAKE) -f Makefile.pc clean
rm -f config.mk
install: config.mk
$(MAKE) -C lib install
$(MAKE) -C include install
+ $(MAKE) -f Makefile.pc install
test: config.mk
$(MAKE) -C test test
diff --git a/Makefile.pc b/Makefile.pc
new file mode 100644
index 0000000..c51d18c
--- /dev/null
+++ b/Makefile.pc
@@ -0,0 +1,21 @@
+include Makefile.setup
+include config.mk
+
+all:
+ echo "prefix=$(prefix)" > egl.pc
+ cat egl.pc.in >> egl.pc
+ sed -i "s/MVERSION/${MALI_VERSION}/g" egl.pc
+ echo "prefix=$(prefix)" > gles_cm.pc
+ cat gles_cm.pc.in >> gles_cm.pc
+ sed -i "s/MVERSION/${MALI_VERSION}/g" gles_cm.pc
+ echo "prefix=$(prefix)" > glesv2.pc
+ cat glesv2.pc.in >> glesv2.pc
+ sed -i "s/MVERSION/${MALI_VERSION}/g" glesv2.pc
+
+install: egl.pc gles_cm.pc glesv2.pc
+ $(MKDIR) $(libdir)/pkgconfig
+ $(INSTALL_DATA) $^ $(libdir)/pkgconfig
+
+clean:
+ $(RM) egl.pc gles_cm.pc glesv2.pc
+
diff --git a/egl.pc.in b/egl.pc.in
new file mode 100644
index 0000000..0697183
--- /dev/null
+++ b/egl.pc.in
@@ -0,0 +1,11 @@
+exec_prefix=${prefix}
+libdir=${prefix}/lib
+includedir=${prefix}/include
+
+Name: egl
+Description: Mali EGL library
+Requires.private:
+Version: MVERSION
+Libs: -L${libdir} -lEGL
+Libs.private: -lm -lpthread -ldl
+Cflags: -I${includedir}
diff --git a/gles_cm.pc.in b/gles_cm.pc.in
new file mode 100644
index 0000000..22bc348
--- /dev/null
+++ b/gles_cm.pc.in
@@ -0,0 +1,11 @@
+exec_prefix=${prefix}
+libdir=${prefix}/lib
+includedir=${prefix}/include
+
+Name: gles_cm
+Description: Mali OpenGL ES 1.1 CM library
+Requires.private:
+Version: MVERSION
+Libs: -L${libdir} -lGLES_CM
+Libs.private: -lm -lpthread -ldl
+Cflags: -I${includedir}
diff --git a/glesv2.pc.in b/glesv2.pc.in
new file mode 100644
index 0000000..efef2ed
--- /dev/null
+++ b/glesv2.pc.in
@@ -0,0 +1,11 @@
+exec_prefix=${prefix}
+libdir=${prefix}/lib
+includedir=${prefix}/include
+
+Name: glesv2
+Description: Mali OpenGL ES 2.0 library
+Requires.private:
+Version: MVERSION
+Libs: -L${libdir} -lGLESv2
+Libs.private: -lm -lpthread -ldl
+Cflags: -I${includedir}
diff --git a/include/GLES/gl.h b/include/GLES/gl.h
index 858f394..a6bb591 100644
--- a/include/GLES/gl.h
+++ b/include/GLES/gl.h
@@ -29,6 +29,7 @@ typedef float GLfloat;
typedef float GLclampf;
typedef signed int GLfixed;
typedef signed int GLclampx;
+typedef char GLchar;
typedef int * GLintptr;
typedef int * GLsizeiptr;
diff --git a/include/GLES2/gl2.h b/include/GLES2/gl2.h
index 59e376c..90d96bb 100644
--- a/include/GLES2/gl2.h
+++ b/include/GLES2/gl2.h
@@ -32,6 +32,7 @@ typedef unsigned int GLuint;
typedef khronos_float_t GLfloat;
typedef khronos_float_t GLclampf;
typedef khronos_int32_t GLfixed;
+typedef char GLchar;
/* GL types for handling large vertex buffer objects */
typedef khronos_intptr_t GLintptr;

View file

@ -0,0 +1 @@
pr-8.patch

View file

@ -0,0 +1,17 @@
#!/usr/bin/make -f
# output every command that modifies files on the build system.
#DH_VERBOSE = 1
%:
dh $@
override_dh_auto_clean:
override_dh_strip:
override_dh_auto_configure:
make config VERSION=r3p0 ABI=armhf EGL_TYPE=x11
override_dh_auto_install:
mkdir -p debian/tmp/usr/lib/ debian/tmp/usr/include
dh_auto_install

View file

@ -0,0 +1 @@
3.0 (quilt)

View file

@ -0,0 +1,2 @@
usr/lib
usr/include

View file

@ -0,0 +1,4 @@
usr/lib/libGLES*.so
usr/lib/libEGL*.so
usr/include/*
usr/lib/pkgconfig/*

View file

@ -0,0 +1 @@
usr/lib

View file

@ -0,0 +1,2 @@
usr/lib/lib*.so.*
usr/lib/libMali.so

View file

@ -237,8 +237,9 @@ fi
[[ -n $RELEASE ]] && create_board_package
# chroot-build-ackages
[[ $KERNEL_ONLY == yes && ($RELEASE == jessie || $RELEASE == xenial) && \
$EXPERIMENTAL_BUILDPKG == yes && $(lsb_release -sc) == xenial ]] && chroot_build_packages
$EXTERNAL_NEW == yes && $(lsb_release -sc) == xenial ]] && chroot_build_packages
if [[ $KERNEL_ONLY != yes ]]; then
if [[ $EXTENDED_DEBOOTSTRAP != no ]]; then