Merge branch 'master' of https://github.com/igorpecovnik/lib
This commit is contained in:
commit
4eedf56dab
@ -108,7 +108,7 @@ for line in "${buildlist[@]}"; do
|
||||
unset LINUXFAMILY LINUXCONFIG KERNELDIR KERNELSOURCE KERNELBRANCH BOOTDIR BOOTSOURCE BOOTBRANCH ARCH UBOOT_NEEDS_GCC KERNEL_NEEDS_GCC \
|
||||
CPUMIN CPUMAX UBOOT_VER KERNEL_VER GOVERNOR BOOTSIZE UBOOT_TOOLCHAIN KERNEL_TOOLCHAIN PACKAGE_LIST_EXCLUDE KERNEL_IMAGE_TYPE \
|
||||
write_uboot_platform family_tweaks install_boot_script UBOOT_FILES LOCALVERSION UBOOT_COMPILER KERNEL_COMPILER UBOOT_TARGET \
|
||||
MODULES MODULES_NEXT
|
||||
MODULES MODULES_NEXT INITRD_ARCH
|
||||
|
||||
read BOARD BRANCH RELEASE BUILD_DESKTOP <<< $line
|
||||
n=$[$n+1]
|
||||
|
||||
@ -25,9 +25,12 @@ create_chroot()
|
||||
declare -A qemu_binary
|
||||
qemu_binary['armhf']='qemu-arm-static'
|
||||
qemu_binary['arm64']='qemu-aarch64-static'
|
||||
display_alert "Creating build chroot" "$release" "info"
|
||||
declare -A apt_mirror
|
||||
apt_mirror['jessie']='httpredir.debian.org/debian'
|
||||
apt_mirror['xenial']='ports.ubuntu.com'
|
||||
display_alert "Creating build chroot" "$release $arch" "info"
|
||||
local includes="ccache,locales,git,ca-certificates,devscripts,libfile-fcntllock-perl,debhelper,rsync,python3"
|
||||
debootstrap --variant=buildd --arch=$arch --foreign --include="$includes" $release $target_dir "http://localhost:3142/$APT_MIRROR"
|
||||
debootstrap --variant=buildd --arch=$arch --foreign --include="$includes" $release $target_dir "http://localhost:3142/${apt_mirror[$release]}"
|
||||
[[ $? -ne 0 || ! -f $target_dir/debootstrap/debootstrap ]] && exit_with_error "Create chroot first stage failed"
|
||||
cp /usr/bin/${qemu_binary[$arch]} $target_dir/usr/bin/
|
||||
[[ ! -f $target_dir/usr/share/keyrings/debian-archive-keyring.gpg ]] && \
|
||||
@ -55,7 +58,7 @@ create_chroot()
|
||||
mkdir -p $target_dir/var/lock
|
||||
fi
|
||||
touch $target_dir/root/.debootstrap-complete
|
||||
display_alert "Debootstrap complete" "$release" "info"
|
||||
display_alert "Debootstrap complete" "$release $arch" "info"
|
||||
} #############################################################################
|
||||
|
||||
# chroot_build_packages
|
||||
@ -200,7 +203,7 @@ chroot_installpackages_local()
|
||||
cat <<-EOF > $CACHEDIR/sdcard/etc/apt/sources.list.d/armbian-temp.list
|
||||
deb http://localhost:8189/ $RELEASE temp
|
||||
EOF
|
||||
chroot_installpackages_repo
|
||||
chroot_installpackages
|
||||
kill $aptly_pid
|
||||
} #############################################################################
|
||||
|
||||
@ -219,7 +222,7 @@ chroot_installpackages()
|
||||
done
|
||||
cat <<-EOF > $CACHEDIR/sdcard/tmp/install.sh
|
||||
#!/bin/bash
|
||||
[[ $remote_only != yes ]] && apt-key add /tmp/buildpkg.key
|
||||
[[ "$remote_only" != yes ]] && apt-key add /tmp/buildpkg.key
|
||||
apt-get -o Acquire::http::Proxy=\"http://${APT_PROXY_ADDR:-localhost:3142}\" \
|
||||
-o Acquire::http::Proxy::localhost="DIRECT" -q update
|
||||
# uncomment to debug
|
||||
@ -234,7 +237,7 @@ chroot_installpackages()
|
||||
-o Acquire::http::Proxy::localhost="DIRECT" \
|
||||
--show-progress -o DPKG::Progress-Fancy=1 install -y $install_list
|
||||
apt-get clean
|
||||
[[ $remote_only != yes ]] && apt-key del "925644A6"
|
||||
[[ "$remote_only" != yes ]] && apt-key del "925644A6"
|
||||
rm /etc/apt/sources.list.d/armbian-temp.list 2>/dev/null
|
||||
rm /etc/apt/preferences.d/90-armbian-temp.pref 2>/dev/null
|
||||
rm /tmp/buildpkg.key 2>/dev/null
|
||||
|
||||
@ -42,29 +42,11 @@ MAINLINE_UBOOT_DIR='u-boot'
|
||||
|
||||
# Let's set defalt data if not defined in board configuration above
|
||||
|
||||
[[ -z $OFFSET ]] && OFFSET=1 # Bootloader space in MB (1 x 2048 = default)
|
||||
[[ -z $ARCH ]] && ARCH=armhf
|
||||
[[ -z $KERNEL_IMAGE_TYPE ]] && KERNEL_IMAGE_TYPE=zImage
|
||||
[[ -z $SERIALCON ]] && SERIALCON=ttyS0
|
||||
[[ -z $BOOTSIZE ]] && BOOTSIZE=0 # Mb size of boot partition
|
||||
|
||||
case $ARCH in
|
||||
arm64)
|
||||
KERNEL_COMPILER="aarch64-linux-gnu-"
|
||||
UBOOT_COMPILER="aarch64-linux-gnu-"
|
||||
ARCHITECTURE=arm64
|
||||
INITRD_ARCH=arm64
|
||||
QEMU_BINARY="qemu-aarch64-static"
|
||||
;;
|
||||
|
||||
armhf)
|
||||
KERNEL_COMPILER="arm-linux-gnueabihf-"
|
||||
UBOOT_COMPILER="arm-linux-gnueabihf-"
|
||||
ARCHITECTURE=arm
|
||||
INITRD_ARCH=arm
|
||||
QEMU_BINARY="qemu-arm-static"
|
||||
;;
|
||||
esac
|
||||
OFFSET=1 # Bootloader space in MB (1 x 2048 = default)
|
||||
ARCH=armhf
|
||||
KERNEL_IMAGE_TYPE=zImage
|
||||
SERIALCON=ttyS0
|
||||
BOOTSIZE=0 # Mb size of boot partition
|
||||
|
||||
if [[ -f $SRC/lib/config/sources/$LINUXFAMILY.conf ]]; then
|
||||
source $SRC/lib/config/sources/$LINUXFAMILY.conf
|
||||
@ -72,6 +54,24 @@ else
|
||||
exit_with_error "Sources configuration not found" "$LINUXFAMILY"
|
||||
fi
|
||||
|
||||
case $ARCH in
|
||||
arm64)
|
||||
[[ -z $KERNEL_COMPILER ]] && KERNEL_COMPILER="aarch64-linux-gnu-"
|
||||
[[ -z $UBOOT_COMPILER ]] && UBOOT_COMPILER="aarch64-linux-gnu-"
|
||||
[[ -z $INITRD_ARCH ]] && INITRD_ARCH=arm64
|
||||
QEMU_BINARY="qemu-aarch64-static"
|
||||
ARCHITECTURE=arm64
|
||||
;;
|
||||
|
||||
armhf)
|
||||
[[ -z $KERNEL_COMPILER ]] && KERNEL_COMPILER="arm-linux-gnueabihf-"
|
||||
[[ -z $UBOOT_COMPILER ]] && UBOOT_COMPILER="arm-linux-gnueabihf-"
|
||||
[[ -z $INITRD_ARCH ]] && INITRD_ARCH=arm
|
||||
QEMU_BINARY="qemu-arm-static"
|
||||
ARCHITECTURE=arm
|
||||
;;
|
||||
esac
|
||||
|
||||
[[ $LINUXFAMILY == sun*i && $BRANCH != default && $LINUXFAMILY != sun8i ]] && LINUXCONFIG="linux-sunxi-${BRANCH}"
|
||||
[[ $LINUXFAMILY == udoo && $BRANCH == default ]] && LINUXCONFIG="linux-$BOARD-default"
|
||||
[[ -z $LINUXCONFIG ]] && LINUXCONFIG="linux-${LINUXFAMILY}-${BRANCH}"
|
||||
|
||||
10
desktop.sh
10
desktop.sh
@ -48,17 +48,17 @@ install_desktop ()
|
||||
umount $CACHEDIR/sdcard/tmp >/dev/null 2>&1
|
||||
|
||||
# Enable network manager
|
||||
if [ -f "${CACHEDIR}/sdcard/etc/NetworkManager/NetworkManager.conf" ]; then
|
||||
if [[ -f ${CACHEDIR}/sdcard/etc/NetworkManager/NetworkManager.conf ]]; then
|
||||
sed "s/managed=\(.*\)/managed=true/g" -i $CACHEDIR/sdcard/etc/NetworkManager/NetworkManager.conf
|
||||
# Disable dns management withing NM
|
||||
sed "s/\[main\]/\[main\]\ndns=none/g" -i $CACHEDIR/sdcard/etc/NetworkManager/NetworkManager.conf
|
||||
sed "s/\[main\]/\[main\]\ndns=none/g" -i $CACHEDIR/sdcard/etc/NetworkManager/NetworkManager.conf
|
||||
fi
|
||||
|
||||
|
||||
# Disable Pulseaudio timer scheduling which does not work with sndhdmi driver
|
||||
if [ -f "${CACHEDIR}/sdcard/etc/pulse/default.pa" ]; then
|
||||
if [[ -f ${CACHEDIR}/sdcard/etc/pulse/default.pa ]]; then
|
||||
sed "s/load-module module-udev-detect$/& tsched=0/g" -i $CACHEDIR/sdcard/etc/pulse/default.pa
|
||||
fi
|
||||
|
||||
|
||||
# Disable desktop mode autostart for now to enforce creation of normal user account
|
||||
sed "s/NODM_ENABLED=\(.*\)/NODM_ENABLED=false/g" -i $CACHEDIR/sdcard/etc/default/nodm
|
||||
|
||||
|
||||
@ -26,10 +26,25 @@ index 4859875..ac23371 100755
|
||||
|
||||
include_directories(include)
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 4cb3b30..1e42ecd 100755
|
||||
index 4cb3b30..21cffcc 100755
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -27,3 +27,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
@@ -16,9 +16,11 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
target_link_libraries(GL X11 m dl)
|
||||
endif()
|
||||
|
||||
-if(CMAKE_SHARED_LIBRARY_SUFFIX MATCHES ".so")
|
||||
- set_target_properties(GL PROPERTIES SUFFIX ".so.1")
|
||||
-endif()
|
||||
+SET_TARGET_PROPERTIES (GL
|
||||
+ PROPERTIES
|
||||
+ VERSION 1.2.0
|
||||
+ SOVERSION 1
|
||||
+)
|
||||
|
||||
aux_source_directory(preload PRELOAD_SOURCES)
|
||||
add_library(preload SHARED ${PRELOAD_SOURCES})
|
||||
@@ -27,3 +29,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
endif()
|
||||
|
||||
add_subdirectory(proxy)
|
||||
|
||||
@ -22,7 +22,12 @@ Description: Mali userspace binary driver version r3p0
|
||||
Package: libmali-sunxi-dev
|
||||
Section: libdevel
|
||||
Architecture: any
|
||||
Depends: libmali-sunxi-r3p0 (= ${binary:Version}), ${misc:Depends}
|
||||
Depends:
|
||||
libmali-sunxi-r3p0 (= ${binary:Version}),
|
||||
libegl1-mesa-dev,
|
||||
libgles1-mesa-dev,
|
||||
libgles2-mesa-dev,
|
||||
${misc:Depends}
|
||||
Replaces: libegl1-mesa-dev, libgles1-mesa-dev, libgles2-mesa-dev
|
||||
Provides: sunxi-mali-dev
|
||||
Description: Mali userspace binary driver version r3p0
|
||||
|
||||
@ -0,0 +1,23 @@
|
||||
diff --git a/lib/mali/Makefile.mashup b/lib/mali/Makefile.mashup
|
||||
index 99a2539..643ae90 100644
|
||||
--- a/lib/mali/Makefile.mashup
|
||||
+++ b/lib/mali/Makefile.mashup
|
||||
@@ -5,15 +5,18 @@ install: libMali.so
|
||||
|
||||
$(RM) $(libdir)libEGL.so.1.4 $(libdir)libEGL.so.1 $(libdir)libEGL.so
|
||||
$(LN) libMali.so $(libdir)libEGL.so.1.4
|
||||
+ $(LN) libMali.so $(libdir)libEGL.so.1.0.0
|
||||
$(LN) libEGL.so.1.4 $(libdir)libEGL.so.1
|
||||
$(LN) libEGL.so.1 $(libdir)libEGL.so
|
||||
|
||||
$(RM) $(libdir)libGLESv1_CM.so.1.1 $(libdir)libGLESv1_CM.so.1 $(libdir)libGLESv1_CM.so
|
||||
$(LN) libMali.so $(libdir)libGLESv1_CM.so.1.1
|
||||
+ $(LN) libMali.so $(libdir)libGLESv1_CM.so.1.1.0
|
||||
$(LN) libGLESv1_CM.so.1.1 $(libdir)libGLESv1_CM.so.1
|
||||
$(LN) libGLESv1_CM.so.1 $(libdir)libGLESv1_CM.so
|
||||
|
||||
$(RM) $(libdir)libGLESv2.so.2.0 $(libdir)libGLESv2.so.2 $(libdir)libGLESv2.so
|
||||
$(LN) libMali.so $(libdir)libGLESv2.so.2.0
|
||||
+ $(LN) libMali.so $(libdir)libGLESv2.so.2.0.0
|
||||
$(LN) libGLESv2.so.2.0 $(libdir)libGLESv2.so.2
|
||||
$(LN) libGLESv2.so.2 $(libdir)libGLESv2.so
|
||||
@ -1 +1,2 @@
|
||||
fix-multiarch.patch
|
||||
overwrite-libraries.patch
|
||||
|
||||
@ -43,8 +43,7 @@ compile_tools()
|
||||
END
|
||||
|
||||
cat <<-END > $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH}/DEBIAN/postinst
|
||||
systemctl enable brcm40183-patch.service
|
||||
systemctl start brcm40183-patch.service
|
||||
update-rc.d brcm40183-patch defaults
|
||||
exit 0
|
||||
END
|
||||
|
||||
@ -55,8 +54,7 @@ compile_tools()
|
||||
# brcm
|
||||
cp $tmpdir/brcm/{brcm_bt_reset,brcm_patchram_plus} $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH}/usr/bin
|
||||
# brcm configs and service
|
||||
install -m 600 $SRC/lib/scripts/brcm40183 $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH}/etc/default
|
||||
install -m 600 $SRC/lib/scripts/brcm40183-patch.service $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH}/lib/systemd/system
|
||||
install -m 644 $SRC/lib/scripts/brcm40183 $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH}/etc/default
|
||||
install -m 755 $SRC/lib/scripts/brcm40183-patch $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH}/etc/init.d
|
||||
|
||||
cd $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH}
|
||||
|
||||
@ -43,13 +43,13 @@ else
|
||||
fi
|
||||
|
||||
# reset port
|
||||
/usr/local/bin/brcm_bt_reset /dev/$PORT
|
||||
/usr/bin/brcm_bt_reset /dev/$PORT
|
||||
|
||||
# Start patching
|
||||
/bin/echo -en "" > /dev/$PORT # pull down RTS on UART
|
||||
log_action_begin_msg "Start pushing firmware to device and waiting max. 60sec to complete"
|
||||
|
||||
/usr/bin/timeout 60s /usr/local/bin/brcm_patchram_plus -d --patchram /lib/firmware/ap6210/bcm20710a1.hcd --enable_hci --no2bytes --tosleep 1000 $MAC_OPTIONS /dev/$PORT > /tmp/brcm40183.firmware 2>&1
|
||||
/usr/bin/timeout 60s /usr/bin/brcm_patchram_plus -d --patchram /lib/firmware/ap6210/bcm20710a1.hcd --enable_hci --no2bytes --tosleep 1000 $MAC_OPTIONS /dev/$PORT > /tmp/brcm40183.firmware 2>&1
|
||||
|
||||
case "$?" in
|
||||
0) log_action_end_msg 0
|
||||
|
||||
Loading…
Reference in New Issue
Block a user