mirror of
https://github.com/armbian/build.git
synced 2026-01-06 09:58:46 -08:00
Move rockchip64 legacy to most recent kernel. Tested with standard https://github.com/armbian/autotests stress test on RockPro64 and Rock64.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/arm64 4.4.198 Kernel Configuration
|
||||
# Linux/arm64 4.4.207 Kernel Configuration
|
||||
#
|
||||
CONFIG_ARM64=y
|
||||
CONFIG_64BIT=y
|
||||
|
||||
@@ -11,7 +11,7 @@ case $BRANCH in
|
||||
|
||||
BOOTPATCHDIR="u-boot-rockchip64"
|
||||
KERNELSOURCE='https://github.com/ayufan-rock64/linux-kernel'
|
||||
KERNELBRANCH='tag:4.4.197-1236-rockchip-ayufan'
|
||||
KERNELBRANCH='tag:4.4.202-1237-rockchip-ayufan'
|
||||
KERNELDIR='linux-rockchip64'
|
||||
|
||||
;;
|
||||
|
||||
@@ -35,12 +35,18 @@ compilation_prepare()
|
||||
process_patch_file "${SRC}/patch/misc/general-packaging-4.14.y.patch" "applying"
|
||||
fi
|
||||
|
||||
if [[ $version == "4.4."* || $version == "4.9."* ]] && [[ "$LINUXFAMILY" == rockpis || "$LINUXFAMILY" == rockchip64 || "$LINUXFAMILY" == rk3399 ]]; then
|
||||
if [[ $version == "4.4."* || $version == "4.9."* ]] && [[ "$LINUXFAMILY" == rockpis || "$LINUXFAMILY" == rk3399 ]]; then
|
||||
display_alert "Adjustin" "packaging" "info"
|
||||
cd ${SRC}/cache/sources/${LINUXSOURCEDIR}
|
||||
process_patch_file "${SRC}/patch/misc/general-packaging-4.4.y-rk3399.patch" "applying"
|
||||
fi
|
||||
|
||||
if [[ $version == "4.4."* ]] && [[ "$LINUXFAMILY" == rockchip64 ]]; then
|
||||
display_alert "Adjustin" "packaging" "info"
|
||||
cd ${SRC}/cache/sources/${LINUXSOURCEDIR}
|
||||
process_patch_file "${SRC}/patch/misc/general-packaging-4.4.y-rockchip64.patch" "applying"
|
||||
fi
|
||||
|
||||
if [[ $version == "4.4."* ]] && [[ "$LINUXFAMILY" == rockchip ]]; then
|
||||
display_alert "Adjustin" "packaging" "info"
|
||||
cd ${SRC}/cache/sources/${LINUXSOURCEDIR}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -19,15 +19,6 @@ reverted:
|
||||
Suggests: $fwpackagename
|
||||
Architecture: any
|
||||
Description: Linux kernel, version $version
|
||||
@@ -337,7 +337,7 @@
|
||||
cat <<EOF >> debian/control
|
||||
|
||||
Package: $kernel_headers_packagename
|
||||
+Provides: linux-headers, linux-headers-2.6
|
||||
-Provides: linux-headers, linux-headers-rockchip, linux-headers-rockchip-4.4
|
||||
Architecture: any
|
||||
Description: Linux kernel headers for $KERNELRELEASE on \${kernel:debarch}
|
||||
This package provides kernel header files for $KERNELRELEASE on \${kernel:debarch}
|
||||
@@ -365,7 +365,7 @@
|
||||
|
||||
Package: $libc_headers_packagename
|
||||
|
||||
6275
patch/kernel/rockchip64-legacy/patch-4.4.202-203.patch
Normal file
6275
patch/kernel/rockchip64-legacy/patch-4.4.202-203.patch
Normal file
File diff suppressed because it is too large
Load Diff
4364
patch/kernel/rockchip64-legacy/patch-4.4.203-204.patch
Normal file
4364
patch/kernel/rockchip64-legacy/patch-4.4.203-204.patch
Normal file
File diff suppressed because it is too large
Load Diff
31
patch/kernel/rockchip64-legacy/patch-4.4.204-205.patch
Normal file
31
patch/kernel/rockchip64-legacy/patch-4.4.204-205.patch
Normal file
@@ -0,0 +1,31 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index c2a57420c570..9f97365b4bc6 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 4
|
||||
-SUBLEVEL = 204
|
||||
+SUBLEVEL = 205
|
||||
EXTRAVERSION =
|
||||
NAME = Blurry Fish Butt
|
||||
|
||||
diff --git a/net/core/sock.c b/net/core/sock.c
|
||||
index 92d5f6232ec7..8aa4a5f89572 100644
|
||||
--- a/net/core/sock.c
|
||||
+++ b/net/core/sock.c
|
||||
@@ -951,12 +951,10 @@ set_rcvbuf:
|
||||
clear_bit(SOCK_PASSSEC, &sock->flags);
|
||||
break;
|
||||
case SO_MARK:
|
||||
- if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) {
|
||||
+ if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN))
|
||||
ret = -EPERM;
|
||||
- } else if (val != sk->sk_mark) {
|
||||
+ else
|
||||
sk->sk_mark = val;
|
||||
- sk_dst_reset(sk);
|
||||
- }
|
||||
break;
|
||||
|
||||
case SO_RXQ_OVFL:
|
||||
2291
patch/kernel/rockchip64-legacy/patch-4.4.205-206.patch
Normal file
2291
patch/kernel/rockchip64-legacy/patch-4.4.205-206.patch
Normal file
File diff suppressed because it is too large
Load Diff
4271
patch/kernel/rockchip64-legacy/patch-4.4.206-207.patch
Normal file
4271
patch/kernel/rockchip64-legacy/patch-4.4.206-207.patch
Normal file
File diff suppressed because it is too large
Load Diff
230
patch/misc/general-packaging-4.4.y-rockchip64.patch
Normal file
230
patch/misc/general-packaging-4.4.y-rockchip64.patch
Normal file
@@ -0,0 +1,230 @@
|
||||
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
|
||||
index 6c3b038e..f4166fbe 100755
|
||||
--- a/scripts/package/builddeb
|
||||
+++ b/scripts/package/builddeb
|
||||
@@ -27,6 +27,28 @@ create_package() {
|
||||
chown -R root:root "$pdir"
|
||||
chmod -R go-w "$pdir"
|
||||
|
||||
+ # Create preinstall and post install script to remove dtb
|
||||
+ if [[ "$1" == *dtb* ]]; then
|
||||
+ echo "if [ -d /boot/dtb-$version ]; then mv /boot/dtb-$version /boot/dtb-$version.old; fi" >> $pdir/DEBIAN/preinst
|
||||
+ echo "if [ -d /boot/dtb.old ]; then rm -rf /boot/dtb.old; fi" >> $pdir/DEBIAN/preinst
|
||||
+ echo "if [ -d /dtb ]; then mv /dtb /dtb.old; fi" >> $pdir/DEBIAN/preinst
|
||||
+ echo "if [ -d /boot/dtb ]; then mv /boot/dtb /boot/dtb.old; fi" >> $pdir/DEBIAN/preinst
|
||||
+ echo "exit 0" >> $pdir/DEBIAN/preinst
|
||||
+ chmod 775 $pdir/DEBIAN/preinst
|
||||
+ #
|
||||
+ echo "if [ -d /boot/dtb-$version.old ]; then rm -rf /boot/dtb-$version.old; fi" >> $pdir/DEBIAN/postinst
|
||||
+ echo "ln -sf dtb-$version /boot/dtb > /dev/null 2>&1 || mv /boot/dtb-$version /boot/dtb" >> $pdir/DEBIAN/postinst
|
||||
+ echo "exit 0" >> $pdir/DEBIAN/postinst
|
||||
+ chmod 775 $pdir/DEBIAN/postinst
|
||||
+ fi
|
||||
+
|
||||
+ # Create postinstall script for headers
|
||||
+ if [[ "$1" == *headers* ]]; then
|
||||
+ echo "cd /usr/src/linux-headers-$version; echo \"Compiling headers - please wait ...\"; find -type f -exec touch {} +;make -s scripts >/dev/null; make -s M=scripts/mod/ >/dev/null" >> $pdir/DEBIAN/postinst
|
||||
+ echo "exit 0" >> $pdir/DEBIAN/postinst
|
||||
+ chmod 775 $pdir/DEBIAN/postinst
|
||||
+ fi
|
||||
+
|
||||
# Create the package
|
||||
dpkg-gencontrol $forcearch -Vkernel:debarch="${debarch}" -p$pname -P"$pdir"
|
||||
dpkg --build "$pdir" ..
|
||||
@@ -93,11 +115,13 @@ tmpdir="$objtree/debian/tmp"
|
||||
fwdir="$objtree/debian/fwtmp"
|
||||
kernel_headers_dir="$objtree/debian/hdrtmp"
|
||||
libc_headers_dir="$objtree/debian/headertmp"
|
||||
+dtb_dir="$objtree/debian/dtbtmp"
|
||||
dbg_dir="$objtree/debian/dbgtmp"
|
||||
-packagename=linux-image-$version
|
||||
-fwpackagename=linux-firmware-image-$version
|
||||
-kernel_headers_packagename=linux-headers-$version
|
||||
-libc_headers_packagename=linux-libc-dev
|
||||
+packagename=linux-image-"$BRANCH$LOCALVERSION"
|
||||
+fwpackagename=linux-firmware-image-"$BRANCH$LOCALVERSION"
|
||||
+kernel_headers_packagename=linux-headers-"$BRANCH$LOCALVERSION"
|
||||
+dtb_packagename=linux-dtb-"$BRANCH$LOCALVERSION"
|
||||
+libc_headers_packagename=linux-libc-dev-"$BRANCH$LOCALVERSION"
|
||||
dbg_packagename=$packagename-dbg
|
||||
debarch=
|
||||
forcearch=
|
||||
@@ -114,7 +138,7 @@ case $ARCH in
|
||||
um)
|
||||
installed_image_path="usr/bin/linux-$version"
|
||||
;;
|
||||
-parisc|mips|powerpc)
|
||||
+parisc|mips|powerpc|arm64)
|
||||
installed_image_path="boot/vmlinux-$version"
|
||||
;;
|
||||
*)
|
||||
@@ -124,7 +148,9 @@ esac
|
||||
BUILD_DEBUG="$(grep -s '^CONFIG_DEBUG_INFO=y' $KCONFIG_CONFIG || true)"
|
||||
|
||||
# Setup the directory structure
|
||||
-rm -rf "$tmpdir" "$fwdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" $objtree/debian/files
|
||||
+rm -rf "$tmpdir" "$fwdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" "$dtb_dir" $objtree/debian/files
|
||||
+mkdir -m 755 -p "$dtb_dir/DEBIAN"
|
||||
+mkdir -p "$dtb_dir/boot/dtb-$version" "$dtb_dir/usr/share/doc/$dtb_packagename"
|
||||
mkdir -m 755 -p "$tmpdir/DEBIAN"
|
||||
mkdir -p "$tmpdir/lib" "$tmpdir/boot"
|
||||
mkdir -p "$fwdir/lib/firmware/$version/"
|
||||
@@ -143,9 +169,10 @@ else
|
||||
fi
|
||||
# Not all arches include the boot path in KBUILD_IMAGE
|
||||
if [ -e $KBUILD_IMAGE ]; then
|
||||
- cp $KBUILD_IMAGE "$tmpdir/$installed_image_path"
|
||||
+#Forcing KBUILD_MAGE reference to Image instead of zImage.. Armbian LINUX_KERNEL_TYPE=Image not being honored
|
||||
+ cp Image "$tmpdir/$installed_image_path"
|
||||
else
|
||||
- cp arch/$ARCH/boot/$KBUILD_IMAGE "$tmpdir/$installed_image_path"
|
||||
+ cp arch/$ARCH/boot/Image "$tmpdir/$installed_image_path"
|
||||
fi
|
||||
|
||||
if grep -q "^CONFIG_OF=y" $KCONFIG_CONFIG ; then
|
||||
@@ -183,6 +210,11 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then
|
||||
fi
|
||||
fi
|
||||
|
||||
+if grep -q '^CONFIG_OF=y' $KCONFIG_CONFIG ; then
|
||||
+ #mkdir -p "$tmpdir/boot/dtb"
|
||||
+ INSTALL_DTBS_PATH="$dtb_dir/boot/dtb-$version" $MAKE KBUILD_SRC= dtbs_install
|
||||
+fi
|
||||
+
|
||||
if [ "$ARCH" != "um" ]; then
|
||||
$MAKE headers_check KBUILD_SRC=
|
||||
$MAKE headers_install KBUILD_SRC= INSTALL_HDR_PATH="$libc_headers_dir/usr"
|
||||
@@ -195,7 +227,7 @@ fi
|
||||
# so do we; recent versions of dracut and initramfs-tools will obey this.
|
||||
debhookdir=${KDEB_HOOKDIR:-/etc/kernel}
|
||||
if grep -q '^CONFIG_BLK_DEV_INITRD=y' $KCONFIG_CONFIG; then
|
||||
- want_initrd=Yes
|
||||
+ want_initrd=Yes
|
||||
else
|
||||
want_initrd=No
|
||||
fi
|
||||
@@ -207,9 +239,11 @@ for script in postinst postrm preinst prerm ; do
|
||||
set -e
|
||||
|
||||
# Pass maintainer script parameters to hook scripts
|
||||
+
|
||||
export DEB_MAINT_PARAMS="\$*"
|
||||
|
||||
# Tell initramfs builder whether it's wanted
|
||||
+
|
||||
export INITRD=$want_initrd
|
||||
|
||||
test -d $debhookdir/$script.d && run-parts --arg="$version" --arg="/$installed_image_path" $debhookdir/$script.d
|
||||
@@ -218,6 +252,58 @@ EOF
|
||||
chmod 755 "$tmpdir/DEBIAN/$script"
|
||||
done
|
||||
|
||||
+##
|
||||
+## Create sym link to kernel image
|
||||
+##
|
||||
+sed -e "s/set -e//g" -i $tmpdir/DEBIAN/postinst
|
||||
+sed -e "s/exit 0//g" -i $tmpdir/DEBIAN/postinst
|
||||
+cat >> $tmpdir/DEBIAN/postinst <<EOT
|
||||
+if [ "\$(grep nand /proc/partitions)" != "" ] && [ "\$(grep mmc /proc/partitions)" = "" ]; then
|
||||
+mkimage -A arm -O linux -T kernel -C gzip -a "0x40008000" -e "0x40008000" -n "Linux kernel" -d /$installed_image_path /boot/uImage > /dev/null 2>&1
|
||||
+cp /boot/uImage /tmp/uImage
|
||||
+##copy uncompressed Kernel Image w/o Uboot for espressobin--gzip compressed forced above for mkimage
|
||||
+cp $installed_image_path /tmp/Image
|
||||
+sync
|
||||
+mountpoint -q /boot || mount /boot
|
||||
+cp /tmp/uImage /boot/uImage
|
||||
+cp /tmp/Image /boot/Image
|
||||
+rm -f /$installed_image_path
|
||||
+else
|
||||
+ln -sf $(basename $installed_image_path) /boot/Image > /dev/null 2>&1 || mv /$installed_image_path /boot/Image
|
||||
+fi
|
||||
+touch /boot/.next
|
||||
+exit 0
|
||||
+EOT
|
||||
+##
|
||||
+## FAT install workaround
|
||||
+##
|
||||
+sed -e "s/set -e//g" -i $tmpdir/DEBIAN/preinst
|
||||
+sed -e "s/exit 0//g" -i $tmpdir/DEBIAN/preinst
|
||||
+cat >> $tmpdir/DEBIAN/preinst <<EOT
|
||||
+# exit if we are running chroot
|
||||
+if [ "\$(stat -c %d:%i /)" != "\$(stat -c %d:%i /proc/1/root/.)" ]; then exit 0; fi
|
||||
+
|
||||
+check_and_unmount (){
|
||||
+boot_device=\$(mountpoint -d /boot)
|
||||
+
|
||||
+for file in /dev/* ; do
|
||||
+ CURRENT_DEVICE=\$(printf "%d:%d" \$(stat --printf="0x%t 0x%T" \$file))
|
||||
+ if [[ "\$CURRENT_DEVICE" = "\$boot_device" ]]; then
|
||||
+ boot_partition=\$file
|
||||
+ break;
|
||||
+ fi
|
||||
+done
|
||||
+
|
||||
+bootfstype=\$(blkid -s TYPE -o value \$boot_partition)
|
||||
+if [ "\$bootfstype" = "vfat" ]; then
|
||||
+umount /boot;
|
||||
+rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage /boot/Image
|
||||
+fi
|
||||
+}
|
||||
+mountpoint -q /boot && check_and_unmount
|
||||
+EOT
|
||||
+echo "exit 0" >> $tmpdir/DEBIAN/preinst
|
||||
+
|
||||
# Try to determine maintainer and email values
|
||||
if [ -n "$DEBEMAIL" ]; then
|
||||
email=$DEBEMAIL
|
||||
@@ -328,17 +414,26 @@ fi
|
||||
(cd $objtree; find arch/$SRCARCH/include Module.symvers include scripts -type f) >> "$objtree/debian/hdrobjfiles"
|
||||
destdir=$kernel_headers_dir/usr/src/linux-headers-$version
|
||||
mkdir -p "$destdir"
|
||||
+######################## headers patch
|
||||
+ZACNI=$(pwd)
|
||||
+cd $destdir
|
||||
+patch -p1 < /tmp/headers-debian-byteshift.patch
|
||||
+cd $ZACNI
|
||||
+######################## headers patch
|
||||
(cd $srctree; tar -c -f - -T -) < "$objtree/debian/hdrsrcfiles" | (cd $destdir; tar -xf -)
|
||||
(cd $objtree; tar -c -f - -T -) < "$objtree/debian/hdrobjfiles" | (cd $destdir; tar -xf -)
|
||||
(cd $objtree; cp $KCONFIG_CONFIG $destdir/.config) # copy .config manually to be where it's expected to be
|
||||
ln -sf "/usr/src/linux-headers-$version" "$kernel_headers_dir/lib/modules/$version/build"
|
||||
rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles"
|
||||
|
||||
+(cd "$destdir"; make M=scripts clean)
|
||||
+
|
||||
cat <<EOF >> debian/control
|
||||
|
||||
Package: $kernel_headers_packagename
|
||||
-Provides: linux-headers, linux-headers-rockchip, linux-headers-rockchip-4.4
|
||||
+Provides: linux-headers
|
||||
Architecture: any
|
||||
+Depends: make, gcc, libc6-dev, libssl-dev
|
||||
Description: Linux kernel headers for $KERNELRELEASE on \${kernel:debarch}
|
||||
This package provides kernel header files for $KERNELRELEASE on \${kernel:debarch}
|
||||
.
|
||||
@@ -363,6 +458,16 @@ fi
|
||||
|
||||
cat <<EOF >> debian/control
|
||||
|
||||
+Package: $dtb_packagename
|
||||
+Architecture: any
|
||||
+Description: Linux DTB, version $version
|
||||
+ This package contains device blobs from the Linux kernel, version $version.
|
||||
+EOF
|
||||
+
|
||||
+create_package "$dtb_packagename" "$dtb_dir"
|
||||
+
|
||||
+cat <<EOF >> debian/control
|
||||
+
|
||||
Package: $libc_headers_packagename
|
||||
Section: devel
|
||||
Provides: linux-kernel-headers
|
||||
@@ -374,7 +479,7 @@ EOF
|
||||
|
||||
if [ "$ARCH" != "um" ]; then
|
||||
create_package "$kernel_headers_packagename" "$kernel_headers_dir"
|
||||
- create_package "$libc_headers_packagename" "$libc_headers_dir"
|
||||
+# create_package "$libc_headers_packagename" "$libc_headers_dir"
|
||||
fi
|
||||
|
||||
create_package "$packagename" "$tmpdir"
|
||||
Reference in New Issue
Block a user