From dc5dfca47fb372bfc9f2c306f45073f6f7fb9512 Mon Sep 17 00:00:00 2001
From: Robert Nelson <robertcnelson@gmail.com>
Date: Tue, 29 Jun 2021 14:55:13 -0500
Subject: [PATCH] kernel v5.13 rebase with: device-tree/etc BBDTBS:
 https://github.com/beagleboard/BeagleBoard-DeviceTrees/commit/399463995d629fb60e8964006392bd5c770412d2
 TI_AMX3_CM3:
 http://git.ti.com/gitweb/?p=processor-firmware/ti-amx3-cm3-pm-firmware.git;a=commit;h=fb484c5e54f2e31cf0a338d2927a06a2870bcc2c
 WPANUSB:
 https://github.com/statropy/wpanusb/commit/251f0167545bf2dcaa3cad991a59dbf5ab05490a
 WIRELESS_REGDB:
 https://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git/commit/?id=04f3e5411b1cdc59292775e7b8e05a5d35ea4a80

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
---
 patch.sh                                              | 11 ++++++++++-
 patches/defconfig                                     |  2 +-
 patches/git/AUFS                                      |  1 -
 patches/ref_omap2plus_defconfig                       |  2 +-
 .../0001-Add-BeagleBoard.org-DTBS-v5.13.x.patch       |  4 ++--
 ...-Add-wireless-regdb-regulatory-database-file.patch |  4 ++--
 ...ge-wpanusb-https-github.com-statropy-wpanusb.patch |  4 ++--
 version.sh                                            |  4 ++--
 8 files changed, 20 insertions(+), 12 deletions(-)
 delete mode 100644 patches/git/AUFS

diff --git a/patch.sh b/patch.sh
index 130513ee1..f684c5de0 100644
--- a/patch.sh
+++ b/patch.sh
@@ -352,6 +352,12 @@ sancloud_next () {
 	dir 'dts/sancloud'
 }
 
+cleanup_dts_builds () {
+	rm -rf arch/arm/boot/dts/.*cmd || true
+	rm -rf arch/arm/boot/dts/.*tmp || true
+	rm -rf arch/arm/boot/dts/*dtb || true
+}
+
 dtb_makefile_append () {
 	sed -i -e 's:am335x-boneblack.dtb \\:am335x-boneblack.dtb \\\n\t'$device' \\:g' arch/arm/boot/dts/Makefile
 }
@@ -377,6 +383,9 @@ beagleboard_dtbs () {
 		fi
 		cd ./KERNEL/
 
+		cleanup_dts_builds
+		rm -rf arch/arm/boot/dts/overlays/ || true
+
 		mkdir -p arch/arm/boot/dts/overlays/
 		cp -vr ../${work_dir}/src/arm/* arch/arm/boot/dts/
 		cp -vr ../${work_dir}/include/dt-bindings/* ./include/dt-bindings/
@@ -547,7 +556,7 @@ soc
 packaging () {
 	#do_backport="enable"
 	if [ "x${do_backport}" = "xenable" ] ; then
-		backport_tag="v5.10.45"
+		backport_tag="v5.10.46"
 
 		subsystem="bindeb-pkg"
 		#regenerate="enable"
diff --git a/patches/defconfig b/patches/defconfig
index 85782aa2f..8f877cc32 100644
--- a/patches/defconfig
+++ b/patches/defconfig
@@ -1,6 +1,6 @@
 #
 # Automatically generated file; DO NOT EDIT.
-# Linux/arm 5.13.0-rc7 Kernel Configuration
+# Linux/arm 5.13.0 Kernel Configuration
 #
 CONFIG_CC_VERSION_TEXT="arm-linux-gnueabi-gcc (GCC) 11.1.0"
 CONFIG_CC_IS_GCC=y
diff --git a/patches/git/AUFS b/patches/git/AUFS
deleted file mode 100644
index e80085558..000000000
--- a/patches/git/AUFS
+++ /dev/null
@@ -1 +0,0 @@
-AUFS: https://github.com/sfjro/aufs5-standalone/commit/f6866937f66eb6ceacfed9b4fe534611030cc813
diff --git a/patches/ref_omap2plus_defconfig b/patches/ref_omap2plus_defconfig
index dfd08dc7b..1192e733b 100644
--- a/patches/ref_omap2plus_defconfig
+++ b/patches/ref_omap2plus_defconfig
@@ -1,6 +1,6 @@
 #
 # Automatically generated file; DO NOT EDIT.
-# Linux/arm 5.13.0-rc7 Kernel Configuration
+# Linux/arm 5.13.0 Kernel Configuration
 #
 CONFIG_CC_VERSION_TEXT="arm-linux-gnueabi-gcc (GCC) 11.1.0"
 CONFIG_CC_IS_GCC=y
diff --git a/patches/soc/ti/beagleboard_dtbs/0001-Add-BeagleBoard.org-DTBS-v5.13.x.patch b/patches/soc/ti/beagleboard_dtbs/0001-Add-BeagleBoard.org-DTBS-v5.13.x.patch
index c8194d7c5..4bbc33c94 100644
--- a/patches/soc/ti/beagleboard_dtbs/0001-Add-BeagleBoard.org-DTBS-v5.13.x.patch
+++ b/patches/soc/ti/beagleboard_dtbs/0001-Add-BeagleBoard.org-DTBS-v5.13.x.patch
@@ -1,6 +1,6 @@
-From 24b4c596e868be31debe1a8c1930e7ed6cdeb01b Mon Sep 17 00:00:00 2001
+From 6d912847e298343908beef258c0b6fa9d1b4b430 Mon Sep 17 00:00:00 2001
 From: Robert Nelson <robertcnelson@gmail.com>
-Date: Wed, 23 Jun 2021 09:56:34 -0500
+Date: Tue, 29 Jun 2021 14:40:13 -0500
 Subject: [PATCH] Add BeagleBoard.org DTBS: v5.13.x
 
 https://github.com/beagleboard/BeagleBoard-DeviceTrees/tree/v5.13.x
diff --git a/patches/wireless_regdb/0001-Add-wireless-regdb-regulatory-database-file.patch b/patches/wireless_regdb/0001-Add-wireless-regdb-regulatory-database-file.patch
index 4f501d3c4..fbe0a248c 100644
--- a/patches/wireless_regdb/0001-Add-wireless-regdb-regulatory-database-file.patch
+++ b/patches/wireless_regdb/0001-Add-wireless-regdb-regulatory-database-file.patch
@@ -1,6 +1,6 @@
-From 758b9ca6aad5cf2408940b37a7aa7e699c0660ab Mon Sep 17 00:00:00 2001
+From 4a25b6070f308a81863f7d23262adbbcad562c91 Mon Sep 17 00:00:00 2001
 From: Robert Nelson <robertcnelson@gmail.com>
-Date: Mon, 21 Jun 2021 10:38:01 -0500
+Date: Tue, 29 Jun 2021 14:05:50 -0500
 Subject: [PATCH] Add wireless-regdb regulatory database file
 
 https://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git/commit/?id=04f3e5411b1cdc59292775e7b8e05a5d35ea4a80
diff --git a/patches/wpanusb/0001-merge-wpanusb-https-github.com-statropy-wpanusb.patch b/patches/wpanusb/0001-merge-wpanusb-https-github.com-statropy-wpanusb.patch
index aab7fc437..0ebd4613c 100644
--- a/patches/wpanusb/0001-merge-wpanusb-https-github.com-statropy-wpanusb.patch
+++ b/patches/wpanusb/0001-merge-wpanusb-https-github.com-statropy-wpanusb.patch
@@ -1,6 +1,6 @@
-From a448589dbc1c0f262c3ca2f85c9ce0ee4bfc15b0 Mon Sep 17 00:00:00 2001
+From 06dc6fbe87eabc7cc0ef747f0949edc6c3c63735 Mon Sep 17 00:00:00 2001
 From: Robert Nelson <robertcnelson@gmail.com>
-Date: Mon, 21 Jun 2021 10:37:42 -0500
+Date: Tue, 29 Jun 2021 14:03:05 -0500
 Subject: [PATCH] merge: wpanusb: https://github.com/statropy/wpanusb
 
 https://github.com/statropy/wpanusb/commit/251f0167545bf2dcaa3cad991a59dbf5ab05490a
diff --git a/version.sh b/version.sh
index 0620c4201..8c2b5a852 100644
--- a/version.sh
+++ b/version.sh
@@ -38,10 +38,10 @@ toolchain="gcc_11_arm"
 
 #Kernel
 KERNEL_REL=5.13
-KERNEL_TAG=${KERNEL_REL}-rc7
+KERNEL_TAG=${KERNEL_REL}
 kernel_rt=".X-rtY"
 #Kernel Build
-BUILD=${build_prefix}9
+BUILD=${build_prefix}9.1
 
 #v5.X-rcX + upto SHA
 #prev_KERNEL_SHA=""
-- 
GitLab