diff --git a/reform2-imx8mq/blender.debdiff b/reform2-imx8mq/blender.debdiff
new file mode 100644
index 0000000000000000000000000000000000000000..50f53ea526fac29c7677e0b8dcabac4ea365d259
--- /dev/null
+++ b/reform2-imx8mq/blender.debdiff
@@ -0,0 +1,743 @@
+diff -Nru blender-2.79.b+dfsg0/debian/changelog blender-2.79.b+dfsg0/debian/changelog
+--- blender-2.79.b+dfsg0/debian/changelog	2019-04-23 21:43:18.000000000 +0200
++++ blender-2.79.b+dfsg0/debian/changelog	2021-12-30 11:20:26.000000000 +0100
+@@ -1,3 +1,9 @@
++blender (2.79.b+dfsg0-7+reform1) unstable; urgency=medium
++
++  * rebuild old blender on unstable
++
++ -- Johannes Schauer Marin Rodrigues <josch@debian.org>  Thu, 30 Dec 2021 11:20:26 +0100
++
+ blender (2.79.b+dfsg0-7) unstable; urgency=medium
+ 
+   * debian/patches/0007-fix_OpenJPEG2_build.patch:
+diff -Nru blender-2.79.b+dfsg0/debian/control blender-2.79.b+dfsg0/debian/control
+--- blender-2.79.b+dfsg0/debian/control	2018-12-28 11:28:03.000000000 +0100
++++ blender-2.79.b+dfsg0/debian/control	2021-12-30 11:20:26.000000000 +0100
+@@ -5,6 +5,7 @@
+ Uploaders: Matteo F. Vescovi <mfv@debian.org>
+ Build-Depends: cmake,
+                debhelper (>= 11~),
++               dh-python,
+                gettext,
+                libalut-dev,
+                libavcodec-dev (>> 6:10),
+@@ -20,13 +21,16 @@
+                libboost-thread-dev,
+                libfftw3-dev,
+                libfontconfig-dev,
++               libfreetype-dev:native,
+                libgettextpo-dev,
+                libglew-dev,
++               libglew-dev:native,
+                libgsm1-dev,
+                libilmbase-dev (>= 2.2.0),
+                libjack-dev,
+                libjemalloc-dev [!hurd-i386],
+                libjpeg-dev,
++               libjpeg-dev:native,
+                liblzma-dev,
+                liblzo2-dev,
+                libopenal-dev,
+@@ -36,6 +40,9 @@
+                libopenjp2-7-dev,
+                libopenvdb-dev [amd64 i386],
+                libpng-dev,
++               libpng-dev:native,
++               libpugixml-dev,
++               libpython3-dev,
+                libsdl-dev,
+                libsndfile-dev,
+                libspnav-dev,
+@@ -44,11 +51,13 @@
+                libtiff-dev,
+                libvorbis-dev,
+                libxi-dev,
++               libxi-dev:native,
+                libz-dev,
++               libz-dev:native,
+                opencollada-dev [linux-any],
+                pkg-config,
+-               python3-dev,
+-               python3-requests
++               python3-dev:any,
++               python3-requests:native
+ Build-Conflicts: nvidia-glx
+ Standards-Version: 4.3.0
+ Homepage: http://www.blender.org/
+diff -Nru blender-2.79.b+dfsg0/debian/patches/0001-Cleanup-fix-compiler-warnings.patch blender-2.79.b+dfsg0/debian/patches/0001-Cleanup-fix-compiler-warnings.patch
+--- blender-2.79.b+dfsg0/debian/patches/0001-Cleanup-fix-compiler-warnings.patch	1970-01-01 01:00:00.000000000 +0100
++++ blender-2.79.b+dfsg0/debian/patches/0001-Cleanup-fix-compiler-warnings.patch	2021-12-30 11:20:26.000000000 +0100
+@@ -0,0 +1,19 @@
++From 37889011070ff2ec52159690f652238d2b325185 Mon Sep 17 00:00:00 2001
++From: Brecht Van Lommel <brechtvanlommel@gmail.com>
++Date: Sun, 26 Jan 2020 16:35:58 +0100
++Subject: [PATCH] Cleanup: fix compiler warnings
++
++--- a/intern/openvdb/openvdb_util.cc
+++++ b/intern/openvdb/openvdb_util.cc
++@@ -34,5 +34,10 @@ ScopeTimer::ScopeTimer(const std::string
++ 
++ ScopeTimer::~ScopeTimer()
++ {
++-	std::printf("%s: %fms\n", m_message.c_str(), m_timer.delta());
+++#if OPENVDB_LIBRARY_MAJOR_VERSION_NUMBER >= 7
+++	double delta = m_timer.milliseconds();
+++#else
+++	double delta = m_timer.delta(); /* Deprecated in OpenVDB 7. */
+++#endif
+++	std::printf("%s: %fms\n", m_message.c_str(), delta);
++ }
+diff -Nru blender-2.79.b+dfsg0/debian/patches/0001-Cleanup-use-PyImport_GetModuleDict.patch blender-2.79.b+dfsg0/debian/patches/0001-Cleanup-use-PyImport_GetModuleDict.patch
+--- blender-2.79.b+dfsg0/debian/patches/0001-Cleanup-use-PyImport_GetModuleDict.patch	1970-01-01 01:00:00.000000000 +0100
++++ blender-2.79.b+dfsg0/debian/patches/0001-Cleanup-use-PyImport_GetModuleDict.patch	2021-12-30 11:20:26.000000000 +0100
+@@ -0,0 +1,115 @@
++From 44f719b63238503ef8f933f55383c6d4798995cc Mon Sep 17 00:00:00 2001
++From: Campbell Barton <ideasman42@gmail.com>
++Date: Thu, 13 Sep 2018 17:06:07 +1000
++Subject: [PATCH] Cleanup: use PyImport_GetModuleDict
++
++Replace direct access using PyThreadState_GET
++---
++ source/blender/python/bmesh/bmesh_py_api.c        | 2 +-
++ source/blender/python/generic/idprop_py_api.c     | 2 +-
++ source/blender/python/intern/bpy_interface.c      | 2 +-
++ source/blender/python/intern/gpu.c                | 4 ++--
++ source/blender/python/mathutils/mathutils.c       | 2 +-
++ source/blender/python/mathutils/mathutils_noise.c | 5 +++--
++ source/gameengine/Ketsji/KX_PythonInit.cpp        | 2 +-
++ 7 files changed, 10 insertions(+), 9 deletions(-)
++
++--- a/source/blender/python/bmesh/bmesh_py_api.c
+++++ b/source/blender/python/bmesh/bmesh_py_api.c
++@@ -196,7 +196,7 @@ PyObject *BPyInit_bmesh(void)
++ {
++ 	PyObject *mod;
++ 	PyObject *submodule;
++-	PyObject *sys_modules = PyThreadState_GET()->interp->modules;
+++	PyObject *sys_modules = PyImport_GetModuleDict();
++ 
++ 	BPy_BM_init_types();
++ 	BPy_BM_init_types_select();
++--- a/source/blender/python/generic/idprop_py_api.c
+++++ b/source/blender/python/generic/idprop_py_api.c
++@@ -1792,7 +1792,7 @@ PyObject *BPyInit_idprop(void)
++ {
++ 	PyObject *mod;
++ 	PyObject *submodule;
++-	PyObject *sys_modules = PyThreadState_GET()->interp->modules;
+++	PyObject *sys_modules = PyImport_GetModuleDict();
++ 
++ 	mod = PyModule_Create(&IDProp_module_def);
++ 
++--- a/source/blender/python/intern/bpy_interface.c
+++++ b/source/blender/python/intern/bpy_interface.c
++@@ -530,7 +530,7 @@ static bool python_script_exec(
++ 
++ 	if (py_dict) {
++ #ifdef PYMODULE_CLEAR_WORKAROUND
++-		PyModuleObject *mmod = (PyModuleObject *)PyDict_GetItemString(PyThreadState_GET()->interp->modules, "__main__");
+++		PyModuleObject *mmod = (PyModuleObject *)PyDict_GetItemString(PyImport_GetModuleDict(), "__main__");
++ 		PyObject *dict_back = mmod->md_dict;
++ 		/* freeing the module will clear the namespace,
++ 		 * gives problems running classes defined in this namespace being used later. */
++--- a/source/blender/python/intern/gpu.c
+++++ b/source/blender/python/intern/gpu.c
++@@ -323,7 +323,7 @@ PyObject *GPU_initPython(void)
++ {
++ 	PyObject *module;
++ 	PyObject *submodule;
++-	PyObject *sys_modules = PyThreadState_GET()->interp->modules;
+++	PyObject *sys_modules = PyImport_GetModuleDict();
++ 
++ 	module = PyInit_gpu();
++ 
++@@ -334,7 +334,7 @@ PyObject *GPU_initPython(void)
++ 	PyDict_SetItem(sys_modules, PyModule_GetNameObject(submodule), submodule);
++ 	Py_INCREF(submodule);
++ 
++-	PyDict_SetItem(PyImport_GetModuleDict(), PyModule_GetNameObject(module), module);
+++	PyDict_SetItem(sys_modules, PyModule_GetNameObject(module), module);
++ 	return module;
++ }
++ 
++--- a/source/blender/python/mathutils/mathutils.c
+++++ b/source/blender/python/mathutils/mathutils.c
++@@ -622,7 +622,7 @@ PyMODINIT_FUNC PyInit_mathutils(void)
++ {
++ 	PyObject *mod;
++ 	PyObject *submodule;
++-	PyObject *sys_modules = PyThreadState_GET()->interp->modules;
+++	PyObject *sys_modules = PyImport_GetModuleDict();
++ 
++ 	if (PyType_Ready(&vector_Type) < 0)
++ 		return NULL;
++--- a/source/blender/python/mathutils/mathutils_noise.c
+++++ b/source/blender/python/mathutils/mathutils_noise.c
++@@ -840,6 +840,7 @@ static struct PyModuleDef M_Noise_module
++ /*----------------------------MODULE INIT-------------------------*/
++ PyMODINIT_FUNC PyInit_mathutils_noise(void)
++ {
+++	PyObject *sys_modules = PyImport_GetModuleDict();
++ 	PyObject *submodule = PyModule_Create(&M_Noise_module_def);
++ 	PyObject *item_types, *item_metrics;
++ 
++@@ -847,11 +848,11 @@ PyMODINIT_FUNC PyInit_mathutils_noise(vo
++ 	setRndSeed(0);
++ 
++ 	PyModule_AddObject(submodule, "types", (item_types = PyInit_mathutils_noise_types()));
++-	PyDict_SetItemString(PyThreadState_GET()->interp->modules, "noise.types", item_types);
+++	PyDict_SetItemString(sys_modules, "noise.types", item_types);
++ 	Py_INCREF(item_types);
++ 
++ 	PyModule_AddObject(submodule, "distance_metrics", (item_metrics = PyInit_mathutils_noise_metrics()));
++-	PyDict_SetItemString(PyThreadState_GET()->interp->modules, "noise.distance_metrics", item_metrics);
+++	PyDict_SetItemString(sys_modules, "noise.distance_metrics", item_metrics);
++ 	Py_INCREF(item_metrics);
++ 
++ 	return submodule;
++--- a/source/gameengine/Ketsji/KX_PythonInit.cpp
+++++ b/source/gameengine/Ketsji/KX_PythonInit.cpp
++@@ -2239,7 +2239,7 @@ PyMODINIT_FUNC initBGE(void)
++ {
++ 	PyObject *mod;
++ 	PyObject *submodule;
++-	PyObject *sys_modules = PyThreadState_GET()->interp->modules;
+++	PyObject *sys_modules = PyImport_GetModuleDict();
++ 	const char *mod_full;
++ 
++ 	mod = PyModule_Create(&BGE_module_def);
+diff -Nru blender-2.79.b+dfsg0/debian/patches/0001-Fix-for-GCC9-new-OpenMP-data-sharing.patch blender-2.79.b+dfsg0/debian/patches/0001-Fix-for-GCC9-new-OpenMP-data-sharing.patch
+--- blender-2.79.b+dfsg0/debian/patches/0001-Fix-for-GCC9-new-OpenMP-data-sharing.patch	1970-01-01 01:00:00.000000000 +0100
++++ blender-2.79.b+dfsg0/debian/patches/0001-Fix-for-GCC9-new-OpenMP-data-sharing.patch	2021-12-30 11:20:26.000000000 +0100
+@@ -0,0 +1,61 @@
++From d780409156e838e366f4da5126e6aeab44174d62 Mon Sep 17 00:00:00 2001
++From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com>
++Date: Wed, 3 Apr 2019 01:36:52 +0200
++Subject: [PATCH] Fix for GCC9 new OpenMP data sharing
++MIME-Version: 1.0
++Content-Type: text/plain; charset=UTF-8
++Content-Transfer-Encoding: 8bit
++
++GCC 9 started implementing the OpenMP 4.0 and later behavior. When not using
++default clause or when using default(shared), this makes no difference, but
++if using default(none), previously the choice was not specify the const
++qualified variables on the construct at all, or specify in firstprivate
++clause. In GCC 9 as well as for OpenMP 4.0 compliance, those variables need
++to be specified on constructs in which they are used, either in shared or
++in firstprivate clause. Specifying them in firstprivate clause is one way to
++achieve compatibility with both older GCC versions and GCC 9,
++another option is to drop the default(none) clause.
++
++This patch thus drops the default(none) clause.
++
++See https://gcc.gnu.org/gcc-9/porting_to.html#ompdatasharing
++
++Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
++---
++ intern/elbeem/intern/solver_main.cpp | 6 +++---
++ 1 file changed, 3 insertions(+), 3 deletions(-)
++
++diff --git a/intern/elbeem/intern/solver_main.cpp b/intern/elbeem/intern/solver_main.cpp
++index 68f7c04cd54..514087b6130 100644
++--- a/intern/elbeem/intern/solver_main.cpp
+++++ b/intern/elbeem/intern/solver_main.cpp
++@@ -381,7 +381,7 @@ LbmFsgrSolver::mainLoop(const int lev)
++ 	GRID_REGION_INIT();
++ #if PARALLEL==1
++ 	const int gDebugLevel = ::gDebugLevel;
++-#pragma omp parallel default(none) num_threads(mNumOMPThreads) \
+++#pragma omp parallel num_threads(mNumOMPThreads) \
++   reduction(+: \
++ 	  calcCurrentMass,calcCurrentVolume, \
++ 		calcCellsFilled,calcCellsEmptied, \
++@@ -1126,7 +1126,7 @@ LbmFsgrSolver::preinitGrids()
++ 		GRID_REGION_INIT();
++ #if PARALLEL==1
++ 	const int gDebugLevel = ::gDebugLevel;
++-#pragma omp parallel default(none) num_threads(mNumOMPThreads) \
+++#pragma omp parallel num_threads(mNumOMPThreads) \
++   reduction(+: \
++ 	  calcCurrentMass,calcCurrentVolume, \
++ 		calcCellsFilled,calcCellsEmptied, \
++@@ -1164,7 +1164,7 @@ LbmFsgrSolver::standingFluidPreinit()
++ 	GRID_REGION_INIT();
++ #if PARALLEL==1
++ 	const int gDebugLevel = ::gDebugLevel;
++-#pragma omp parallel default(none) num_threads(mNumOMPThreads) \
+++#pragma omp parallel num_threads(mNumOMPThreads) \
++   reduction(+: \
++ 	  calcCurrentMass,calcCurrentVolume, \
++ 		calcCellsFilled,calcCellsEmptied, \
++-- 
++2.33.0
++
+diff -Nru blender-2.79.b+dfsg0/debian/patches/0001-PyAPI-use-public-API-s-for-module-builtin-access.patch blender-2.79.b+dfsg0/debian/patches/0001-PyAPI-use-public-API-s-for-module-builtin-access.patch
+--- blender-2.79.b+dfsg0/debian/patches/0001-PyAPI-use-public-API-s-for-module-builtin-access.patch	1970-01-01 01:00:00.000000000 +0100
++++ blender-2.79.b+dfsg0/debian/patches/0001-PyAPI-use-public-API-s-for-module-builtin-access.patch	2021-12-30 11:20:26.000000000 +0100
+@@ -0,0 +1,55 @@
++From e413b39a936181cc954dfbf054b0a19794d8902c Mon Sep 17 00:00:00 2001
++From: Campbell Barton <ideasman42@gmail.com>
++Date: Wed, 16 Oct 2019 23:15:30 +1100
++Subject: [PATCH] PyAPI: use public API's for module & builtin access
++
++D6038 by @Dormouse
++---
++ source/blender/python/generic/py_capi_utils.c | 23 ++++++++-----------
++ 1 file changed, 9 insertions(+), 14 deletions(-)
++
++--- a/source/blender/python/generic/py_capi_utils.c
+++++ b/source/blender/python/generic/py_capi_utils.c
++@@ -638,9 +638,10 @@ PyObject *PyC_UnicodeFromByte(const char
++  ****************************************************************************/
++ PyObject *PyC_DefaultNameSpace(const char *filename)
++ {
++-	PyInterpreterState *interp = PyThreadState_GET()->interp;
+++	PyObject *modules = PyImport_GetModuleDict();
+++	PyObject *builtins = PyEval_GetBuiltins();
++ 	PyObject *mod_main = PyModule_New("__main__");
++-	PyDict_SetItemString(interp->modules, "__main__", mod_main);
+++	PyDict_SetItemString(modules, "__main__", mod_main);
++ 	Py_DECREF(mod_main); /* sys.modules owns now */
++ 	PyModule_AddStringConstant(mod_main, "__name__", "__main__");
++ 	if (filename) {
++@@ -648,23 +649,23 @@ PyObject *PyC_DefaultNameSpace(const cha
++ 		 * note: this wont map to a real file when executing text-blocks and buttons. */
++ 		PyModule_AddObject(mod_main, "__file__", PyC_UnicodeFromByte(filename));
++ 	}
++-	PyModule_AddObject(mod_main, "__builtins__", interp->builtins);
++-	Py_INCREF(interp->builtins); /* AddObject steals a reference */
+++	PyModule_AddObject(mod_main, "__builtins__", builtins);
+++	Py_INCREF(builtins); /* AddObject steals a reference */
++ 	return PyModule_GetDict(mod_main);
++ }
++ 
++ /* restore MUST be called after this */
++ void PyC_MainModule_Backup(PyObject **main_mod)
++ {
++-	PyInterpreterState *interp = PyThreadState_GET()->interp;
++-	*main_mod = PyDict_GetItemString(interp->modules, "__main__");
+++	PyObject *modules = PyImport_GetModuleDict();
+++	*main_mod = PyDict_GetItemString(modules, "__main__");
++ 	Py_XINCREF(*main_mod); /* don't free */
++ }
++ 
++ void PyC_MainModule_Restore(PyObject *main_mod)
++ {
++-	PyInterpreterState *interp = PyThreadState_GET()->interp;
++-	PyDict_SetItemString(interp->modules, "__main__", main_mod);
+++	PyObject *modules = PyImport_GetModuleDict();
+++	PyDict_SetItemString(modules, "__main__", main_mod);
++ 	Py_XDECREF(main_mod);
++ }
++ 
+diff -Nru blender-2.79.b+dfsg0/debian/patches/0001-Python-support-building-again-version-3.9-unreleased.patch blender-2.79.b+dfsg0/debian/patches/0001-Python-support-building-again-version-3.9-unreleased.patch
+--- blender-2.79.b+dfsg0/debian/patches/0001-Python-support-building-again-version-3.9-unreleased.patch	1970-01-01 01:00:00.000000000 +0100
++++ blender-2.79.b+dfsg0/debian/patches/0001-Python-support-building-again-version-3.9-unreleased.patch	2021-12-30 11:20:26.000000000 +0100
+@@ -0,0 +1,143 @@
++From 56d0df51a36fdce7ec2d1fbb7b47b1d95b591b5f Mon Sep 17 00:00:00 2001
++From: Campbell Barton <ideasman42@gmail.com>
++Date: Mon, 22 Jun 2020 14:51:20 +1000
++Subject: [PATCH] Python: support building again version 3.9 (unreleased)
++
++Resolves T78089, no functional changes.
++---
++ .../blender/python/mathutils/mathutils_Matrix.c  | 16 +++++++++-------
++ .../python/mathutils/mathutils_Quaternion.c      | 14 ++++++++------
++ .../blender/python/mathutils/mathutils_Vector.c  |  6 +++---
++ 3 files changed, 20 insertions(+), 16 deletions(-)
++
++--- a/source/blender/python/mathutils/mathutils_Matrix.c
+++++ b/source/blender/python/mathutils/mathutils_Matrix.c
++@@ -48,7 +48,7 @@ static PyObject *Matrix_copy_notest(Matr
++ static PyObject *Matrix_copy(MatrixObject *self);
++ static PyObject *Matrix_deepcopy(MatrixObject *self, PyObject *args);
++ static int Matrix_ass_slice(MatrixObject *self, int begin, int end, PyObject *value);
++-static PyObject *matrix__apply_to_copy(PyNoArgsFunction matrix_func, MatrixObject *self);
+++static PyObject *matrix__apply_to_copy(PyObject *(*matrix_func)(MatrixObject *), MatrixObject *self);
++ static PyObject *MatrixAccess_CreatePyObject(MatrixObject *matrix, const eMatrixAccess_t type);
++ 
++ static int matrix_row_vector_check(MatrixObject *mat, VectorObject *vec, int row)
++@@ -385,14 +385,14 @@ static PyObject *Matrix_new(PyTypeObject
++ 	return NULL;
++ }
++ 
++-static PyObject *matrix__apply_to_copy(PyNoArgsFunction matrix_func, MatrixObject *self)
+++static PyObject *matrix__apply_to_copy(PyObject *(*matrix_func)(MatrixObject *), MatrixObject *self)
++ {
++ 	PyObject *ret = Matrix_copy(self);
++ 	if (ret) {
++-		PyObject *ret_dummy = matrix_func(ret);
+++		PyObject *ret_dummy = matrix_func((MatrixObject *)ret);
++ 		if (ret_dummy) {
++ 			Py_DECREF(ret_dummy);
++-			return (PyObject *)ret;
+++			return ret;
++ 		}
++ 		else { /* error */
++ 			Py_DECREF(ret);
++@@ -1598,7 +1598,7 @@ PyDoc_STRVAR(Matrix_adjugated_doc,
++ );
++ static PyObject *Matrix_adjugated(MatrixObject *self)
++ {
++-	return matrix__apply_to_copy((PyNoArgsFunction)Matrix_adjugate, self);
+++	return matrix__apply_to_copy(Matrix_adjugate, self);
++ }
++ 
++ PyDoc_STRVAR(Matrix_rotate_doc,
++@@ -1795,7 +1795,7 @@ PyDoc_STRVAR(Matrix_transposed_doc,
++ );
++ static PyObject *Matrix_transposed(MatrixObject *self)
++ {
++-	return matrix__apply_to_copy((PyNoArgsFunction)Matrix_transpose, self);
+++	return matrix__apply_to_copy(Matrix_transpose, self);
++ }
++ 
++ /*---------------------------matrix.normalize() ------------------*/
++@@ -1842,7 +1842,7 @@ PyDoc_STRVAR(Matrix_normalized_doc,
++ );
++ static PyObject *Matrix_normalized(MatrixObject *self)
++ {
++-	return matrix__apply_to_copy((PyNoArgsFunction)Matrix_normalize, self);
+++	return matrix__apply_to_copy(Matrix_normalize, self);
++ }
++ 
++ /*---------------------------matrix.zero() -----------------------*/
++--- a/source/blender/python/mathutils/mathutils_Quaternion.c
+++++ b/source/blender/python/mathutils/mathutils_Quaternion.c
++@@ -40,7 +40,7 @@
++ 
++ #define QUAT_SIZE 4
++ 
++-static PyObject *quat__apply_to_copy(PyNoArgsFunction quat_func, QuaternionObject *self);
+++static PyObject *quat__apply_to_copy(PyObject *(*quat_func)(QuaternionObject *), QuaternionObject *self);
++ static void      quat__axis_angle_sanitize(float axis[3], float *angle);
++ static PyObject *Quaternion_copy(QuaternionObject *self);
++ static PyObject *Quaternion_deepcopy(QuaternionObject *self, PyObject *args);
++@@ -381,7 +381,7 @@ PyDoc_STRVAR(Quaternion_normalized_doc,
++ );
++ static PyObject *Quaternion_normalized(QuaternionObject *self)
++ {
++-	return quat__apply_to_copy((PyNoArgsFunction)Quaternion_normalize, self);
+++	return quat__apply_to_copy(Quaternion_normalize, self);
++ }
++ 
++ PyDoc_STRVAR(Quaternion_invert_doc,
++@@ -409,7 +409,7 @@ PyDoc_STRVAR(Quaternion_inverted_doc,
++ );
++ static PyObject *Quaternion_inverted(QuaternionObject *self)
++ {
++-	return quat__apply_to_copy((PyNoArgsFunction)Quaternion_invert, self);
+++	return quat__apply_to_copy(Quaternion_invert, self);
++ }
++ 
++ PyDoc_STRVAR(Quaternion_identity_doc,
++@@ -473,7 +473,7 @@ PyDoc_STRVAR(Quaternion_conjugated_doc,
++ );
++ static PyObject *Quaternion_conjugated(QuaternionObject *self)
++ {
++-	return quat__apply_to_copy((PyNoArgsFunction)Quaternion_conjugate, self);
+++	return quat__apply_to_copy(Quaternion_conjugate, self);
++ }
++ 
++ PyDoc_STRVAR(Quaternion_copy_doc,
++@@ -1146,10 +1146,10 @@ static PyObject *Quaternion_new(PyTypeOb
++ 	return Quaternion_CreatePyObject(quat, type);
++ }
++ 
++-static PyObject *quat__apply_to_copy(PyNoArgsFunction quat_func, QuaternionObject *self)
+++static PyObject *quat__apply_to_copy(PyObject *(*quat_func)(QuaternionObject *), QuaternionObject *self)
++ {
++ 	PyObject *ret = Quaternion_copy(self);
++-	PyObject *ret_dummy = quat_func(ret);
+++	PyObject *ret_dummy = quat_func((QuaternionObject *)ret);
++ 	if (ret_dummy) {
++ 		Py_DECREF(ret_dummy);
++ 		return ret;
++--- a/source/blender/python/mathutils/mathutils_Vector.c
+++++ b/source/blender/python/mathutils/mathutils_Vector.c
++@@ -92,10 +92,10 @@ static PyObject *Vector_new(PyTypeObject
++ 	return Vector_CreatePyObject_alloc(vec, size, type);
++ }
++ 
++-static PyObject *vec__apply_to_copy(PyNoArgsFunction vec_func, VectorObject *self)
+++static PyObject *vec__apply_to_copy(PyObject *(*vec_func)(VectorObject *), VectorObject *self)
++ {
++ 	PyObject *ret = Vector_copy(self);
++-	PyObject *ret_dummy = vec_func(ret);
+++	PyObject *ret_dummy = vec_func((VectorObject *)ret);
++ 	if (ret_dummy) {
++ 		Py_DECREF(ret_dummy);
++ 		return (PyObject *)ret;
++@@ -378,7 +378,7 @@ PyDoc_STRVAR(Vector_normalized_doc,
++ );
++ static PyObject *Vector_normalized(VectorObject *self)
++ {
++-	return vec__apply_to_copy((PyNoArgsFunction)Vector_normalize, self);
+++	return vec__apply_to_copy(Vector_normalize, self);
++ }
++ 
++ PyDoc_STRVAR(Vector_resize_doc,
+diff -Nru blender-2.79.b+dfsg0/debian/patches/0001-Update-C-standard-to-C-14.patch blender-2.79.b+dfsg0/debian/patches/0001-Update-C-standard-to-C-14.patch
+--- blender-2.79.b+dfsg0/debian/patches/0001-Update-C-standard-to-C-14.patch	1970-01-01 01:00:00.000000000 +0100
++++ blender-2.79.b+dfsg0/debian/patches/0001-Update-C-standard-to-C-14.patch	2021-12-30 11:20:26.000000000 +0100
+@@ -0,0 +1,24 @@
++From 171c4fb238a2a65291540ac5406187bc69f3a6bc Mon Sep 17 00:00:00 2001
++From: Sergey Sharybin <sergey.vfx@gmail.com>
++Date: Thu, 18 Jun 2020 10:45:40 +0200
++Subject: [PATCH] Update C++ standard to C++14
++
++This is an intermittent state to get all dependencies to compile.
++
++For example, the latest Ceres is needed to bring C++17 support,
++but it has bumped minimal requirement to C++14.
++---
++ CMakeLists.txt | 11 +++--------
++ 1 file changed, 3 insertions(+), 8 deletions(-)
++
++--- a/CMakeLists.txt
+++++ b/CMakeLists.txt
++@@ -1531,7 +1531,7 @@ endif()
++ if(WITH_CXX11)
++ 	if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
++ 		# TODO(sergey): Do we want c++11 or gnu-c++11 here?
++-		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+++		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
++ 	elseif(MSVC)
++ 		# Nothing special is needed, C++11 features are available by default.
++ 	else()
+diff -Nru blender-2.79.b+dfsg0/debian/patches/cross.patch blender-2.79.b+dfsg0/debian/patches/cross.patch
+--- blender-2.79.b+dfsg0/debian/patches/cross.patch	1970-01-01 01:00:00.000000000 +0100
++++ blender-2.79.b+dfsg0/debian/patches/cross.patch	2021-12-30 11:20:26.000000000 +0100
+@@ -0,0 +1,165 @@
++--- a/source/blender/datatoc/CMakeLists.txt
+++++ b/source/blender/datatoc/CMakeLists.txt
++@@ -18,7 +18,7 @@
++ #
++ # ***** END GPL LICENSE BLOCK *****
++ 
++-
+++if(NOT CMAKE_CROSSCOMPILING)
++ # -----------------------------------------------------------------------------
++ # Build datatoc executable
++ set(SRC
++@@ -27,7 +27,7 @@ set(SRC
++ 
++ # SRC_DNA_INC is defined in the parent dir
++ add_executable(datatoc ${SRC})
++-
+++set(datatoc_targets datatoc)
++ 
++ # -----------------------------------------------------------------------------
++ # Build datatoc_icon executable
++@@ -67,4 +67,9 @@ if(NOT WITH_HEADLESS)
++ 	if(UNIX AND NOT APPLE)
++ 		target_link_libraries(datatoc_icon m)
++ 	endif()
+++
+++	set(datatoc_targets ${datatoc_targets} datatoc_icon)
+++endif()
+++
+++export(TARGETS ${datatoc_targets} FILE "${CMAKE_BINARY_DIR}/DataToCConfig.cmake")
++ endif()
++--- a/build_files/cmake/macros.cmake
+++++ b/build_files/cmake/macros.cmake
++@@ -23,6 +23,9 @@
++ #
++ # ***** END GPL LICENSE BLOCK *****
++ 
+++find_package(DataToC)
+++find_package(MsgFmt)
+++
++ macro(list_insert_after
++ 	list_id item_check item_add
++ 	)
++@@ -1350,7 +1353,7 @@ function(data_to_c
++ 	add_custom_command(
++ 		OUTPUT ${file_to}
++ 		COMMAND ${CMAKE_COMMAND} -E make_directory ${_file_to_path}
++-		COMMAND "$<TARGET_FILE:datatoc>" ${file_from} ${file_to}
+++		COMMAND datatoc ${file_from} ${file_to}
++ 		DEPENDS ${file_from} datatoc)
++ 
++ 	set_source_files_properties(${file_to} PROPERTIES GENERATED TRUE)
++@@ -1375,7 +1378,7 @@ function(data_to_c_simple
++ 	add_custom_command(
++ 		OUTPUT  ${_file_to}
++ 		COMMAND ${CMAKE_COMMAND} -E make_directory ${_file_to_path}
++-		COMMAND "$<TARGET_FILE:datatoc>" ${_file_from} ${_file_to}
+++		COMMAND datatoc ${_file_from} ${_file_to}
++ 		DEPENDS ${_file_from} datatoc)
++ 
++ 	set_source_files_properties(${_file_to} PROPERTIES GENERATED TRUE)
++@@ -1408,8 +1411,8 @@ function(data_to_c_simple_icons
++ 		OUTPUT  ${_file_from} ${_file_to}
++ 		COMMAND ${CMAKE_COMMAND} -E make_directory ${_file_to_path}
++ 		#COMMAND python3 ${CMAKE_SOURCE_DIR}/source/blender/datatoc/datatoc_icon.py ${_path_from_abs} ${_file_from}
++-		COMMAND "$<TARGET_FILE:datatoc_icon>" ${_path_from_abs} ${_file_from}
++-		COMMAND "$<TARGET_FILE:datatoc>" ${_file_from} ${_file_to}
+++		COMMAND datatoc_icon ${_path_from_abs} ${_file_from}
+++		COMMAND datatoc ${_file_from} ${_file_to}
++ 		DEPENDS
++ 			${_icon_files}
++ 			datatoc_icon
++@@ -1478,7 +1481,7 @@ function(msgfmt_simple
++ 	add_custom_command(
++ 		OUTPUT  ${_file_to}
++ 		COMMAND ${CMAKE_COMMAND} -E make_directory ${_file_to_path}
++-		COMMAND "$<TARGET_FILE:msgfmt>" ${_file_from} ${_file_to}
+++		COMMAND msgfmt ${_file_from} ${_file_to}
++ 		DEPENDS msgfmt ${_file_from})
++ 
++ 	set_source_files_properties(${_file_to} PROPERTIES GENERATED TRUE)
++--- a/source/blender/makesdna/intern/CMakeLists.txt
+++++ b/source/blender/makesdna/intern/CMakeLists.txt
++@@ -54,7 +54,12 @@ endif()
++ 
++ add_cc_flags_custom_test(makesdna)
++ 
+++if(NOT CMAKE_CROSSCOMPILING)
++ add_executable(makesdna ${SRC} ${SRC_DNA_INC})
+++export(TARGETS makesdna FILE "${CMAKE_BINARY_DIR}/MakesDnaConfig.cmake")
+++else()
+++find_package(MakesDna REQUIRED)
+++endif()
++ 
++ # Output dna.c
++ add_custom_command(
++@@ -62,7 +67,7 @@ add_custom_command(
++ 		${CMAKE_CURRENT_BINARY_DIR}/dna.c
++ 		${CMAKE_CURRENT_BINARY_DIR}/dna_type_offsets.h
++ 	COMMAND
++-		"$<TARGET_FILE:makesdna>"
+++	makesdna
++ 		${CMAKE_CURRENT_BINARY_DIR}/dna.c
++ 		${CMAKE_CURRENT_BINARY_DIR}/dna_type_offsets.h
++ 		${CMAKE_SOURCE_DIR}/source/blender/makesdna/
++--- a/source/blender/blentranslation/msgfmt/CMakeLists.txt
+++++ b/source/blender/blentranslation/msgfmt/CMakeLists.txt
++@@ -26,6 +26,7 @@
++ # -----------------------------------------------------------------------------
++ # Build msgfmt executable
++ 
+++if(NOT CMAKE_CROSSCOMPILING)
++ blender_include_dirs(
++ 	../../../../intern/guardedalloc
++ 	../../blenlib
++@@ -48,3 +49,6 @@ endif()
++ 
++ target_link_libraries(msgfmt ${ZLIB_LIBRARIES})
++ target_link_libraries(msgfmt ${PLATFORM_LINKLIBS})
+++
+++export(TARGETS msgfmt FILE "${CMAKE_BINARY_DIR}/MsgFmtConfig.cmake")
+++endif()
++--- a/source/blenderplayer/CMakeLists.txt
+++++ b/source/blenderplayer/CMakeLists.txt
++@@ -81,6 +81,10 @@ else()
++ 	endif()
++ endif()
++ 
+++if(CMAKE_CROSSCOMPILING)
+++find_package(MakesDna REQUIRED)
+++endif()
+++
++ add_dependencies(blenderplayer makesdna)
++ 
++ get_property(BLENDER_LINK_LIBS GLOBAL PROPERTY BLENDER_LINK_LIBS)
++--- a/source/creator/CMakeLists.txt
+++++ b/source/creator/CMakeLists.txt
++@@ -1050,6 +1050,10 @@ unset(BLENDER_TEXT_FILES_DESTINATION)
++ # -----------------------------------------------------------------------------
++ # Setup link libs
++ 
+++if(CMAKE_CROSSCOMPILING)
+++find_package(MakesDna REQUIRED)
+++endif()
+++
++ add_dependencies(blender makesdna)
++ 
++ setup_blender_sorted_libs()
++--- a/source/blender/makesrna/intern/CMakeLists.txt
+++++ b/source/blender/makesrna/intern/CMakeLists.txt
++@@ -364,10 +364,14 @@ blender_include_dirs_sys(
++ 
++ add_cc_flags_custom_test(makesrna)
++ 
+++if(NOT CMAKE_CROSSCOMPILING)
++ add_executable(makesrna ${SRC} ${SRC_RNA_INC} ${SRC_DNA_INC})
++-
++ target_link_libraries(makesrna bf_dna)
++ target_link_libraries(makesrna bf_dna_blenlib)
+++export(TARGETS makesrna FILE "${CMAKE_BINARY_DIR}/MakesRnaConfig.cmake")
+++else()
+++find_package(MakesRna REQUIRED)
+++endif()
++ 
++ # Output rna_*_gen.c
++ # note (linux only): with crashes try add this after COMMAND: valgrind --leak-check=full --track-origins=yes
+diff -Nru blender-2.79.b+dfsg0/debian/patches/series blender-2.79.b+dfsg0/debian/patches/series
+--- blender-2.79.b+dfsg0/debian/patches/series	2018-12-28 11:27:16.000000000 +0100
++++ blender-2.79.b+dfsg0/debian/patches/series	2021-12-30 11:20:26.000000000 +0100
+@@ -9,3 +9,10 @@
+ 0009-fix_gcc-8_ftbfs.patch
+ 0010-fix_PyRNA_with_Python3.7.patch
+ 0011-adapt_build_against_OIIO2.patch
++0001-Fix-for-GCC9-new-OpenMP-data-sharing.patch
++0001-Cleanup-use-PyImport_GetModuleDict.patch
++0001-PyAPI-use-public-API-s-for-module-builtin-access.patch
++0001-Python-support-building-again-version-3.9-unreleased.patch
++0001-Update-C-standard-to-C-14.patch
++0001-Cleanup-fix-compiler-warnings.patch
++cross.patch
+diff -Nru blender-2.79.b+dfsg0/debian/rules blender-2.79.b+dfsg0/debian/rules
+--- blender-2.79.b+dfsg0/debian/rules	2018-12-02 22:31:23.000000000 +0100
++++ blender-2.79.b+dfsg0/debian/rules	2021-12-30 11:20:26.000000000 +0100
+@@ -22,7 +22,26 @@
+ 	SETCOLLADA = ON
+ endif
+ 
++# Only build man pages when the blender-data package is being built.
++# The man page is built by running `blender --help`. This doesn't work when
++# cross compiling blender because foreign architecture binaries cannot be
++# executed. Arch:all packages are not built when cross compiling, so we
++# disable man page generation when blender-data is not getting built.
++ifneq (,$(filter blender-data,$(shell dh_listpackages)))
++	SETMANPAGE = ON
++else
++	SETMANPAGE = OFF
++endif
++
+ override_dh_auto_configure:
++ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
++	# build several helper utilities that are run during the build natively
++	mkdir nativeutils
++	cmake -S . -B nativeutils \
++		-Cbuild_files/cmake/config/blender_lite.cmake \
++		-DWITH_PYTHON=OFF
++	cmake --build nativeutils -- datatoc datatoc_icon makesdna makesrna msgfmt
++endif
+ 	dh_auto_configure -- \
+ 		-DCMAKE_INSTALL_PREFIX=/usr \
+ 		-DCMAKE_SKIP_RPATH=ON \
+@@ -33,7 +52,7 @@
+ 		-DWITH_CODEC_SNDFILE=ON \
+ 		-DWITH_CPU_SSE=$(SETSSE) \
+ 		-DWITH_CYCLES=ON \
+-		-DWITH_DOC_MANPAGE=ON \
++		-DWITH_DOC_MANPAGE=$(SETMANPAGE) \
+ 		-DWITH_FFTW3=ON \
+ 		-DWITH_FONTCONFIG=ON \
+ 		-DWITH_GAMEENGINE=ON \
+@@ -47,7 +66,11 @@
+ 		-DWITH_OPENVDB=$(SETVDB) \
+ 		-DWITH_PLAYER=ON \
+ 		-DWITH_PYTHON_INSTALL=OFF \
+-		-DWITH_SYSTEM_OPENJPEG=ON
++		-DWITH_SYSTEM_OPENJPEG=ON \
++		-DDataToC_DIR=$(CURDIR)/nativeutils \
++		-DMakesDna_DIR=$(CURDIR)/nativeutils \
++		-DMakesRna_DIR=$(CURDIR)/nativeutils \
++		-DMsgFmt_DIR=$(CURDIR)/nativeutils
+ 
+ override_dh_auto_install:
+ 	dh_auto_install --buildsystem=cmake
diff --git a/reform2-imx8mq/mkimage.sh b/reform2-imx8mq/mkimage.sh
index 9ae1c6f680b816ed54d544401d4af3389b00c559..198c0f98bb41398297453d56c2a90fbab09ac239 100755
--- a/reform2-imx8mq/mkimage.sh
+++ b/reform2-imx8mq/mkimage.sh
@@ -4,7 +4,8 @@ set -x
 set -e
 
 # make sure build tools are installed
-sudo apt-get -y install parted multistrap udisks2 gcc-aarch64-linux-gnu make device-tree-compiler qemu-user-static binfmt-support build-essential bison flex libssl-dev mmdebstrap
+# FIXME: replace this by a check that everything is installed
+#sudo apt-get -y install parted multistrap udisks2 gcc-aarch64-linux-gnu make device-tree-compiler qemu-user-static binfmt-support build-essential bison flex libssl-dev mmdebstrap
 
 # if we are in a git repository and if SOURCE_DATE_EPOCH is not set, use the
 # timestamp of the latest git commit
@@ -20,42 +21,49 @@ export SOURCE_DATE_EPOCH
 # build u-boot
 ./mkuboot.sh
 
+# build all custom packages
+./mkrepo.sh
+
 # build the debian userland and configure it
-sudo ./mkuserland.sh
-# chroot into the userland and build custom packages (mesa, xserver...)
-sudo ./mkuserland2.sh
+./mkuserland.sh
 
 # Rescue System ---------------------------------------------------------
 
-SIZE=4096M
-# create ext4 partition from target root directory directly at 4MiB offset
-sudo /sbin/mke2fs -v -L 'MNTRESCUE' -N 0 -O 64bit -E offset=4194304 -d target-userland -m 5 -r 1 -t ext4 reform-rescue-system.img $SIZE
+SIZE=2000000
+genext2fs --block-size 1024 --size-in-blocks $SIZE --bytes-per-inode 16384 --tarball target-userland.tar reform-rescue-system.img
+dd if=reform-rescue-system.img of=reform-rescue-system.img.tmp seek=1 bs=4194304
+mv reform-rescue-system.img.tmp reform-rescue-system.img
 
-sudo /sbin/parted -s reform-rescue-system.img "mklabel msdos"
-sudo /sbin/parted -s reform-rescue-system.img "mkpart primary ext4 4MiB -1s"
-sudo /sbin/parted -s reform-rescue-system.img print
+/sbin/parted -s reform-rescue-system.img "mklabel msdos"
+# reproducible disk signature
+printf mntr | dd of=reform-rescue-system.img seek=440 bs=1 conv=notrunc
+/sbin/parted -s reform-rescue-system.img "mkpart primary ext4 4MiB -1s"
+/sbin/parted -s reform-rescue-system.img print
 
 # mkuboot.sh needs to run before. this creates flash.bin.
 # install u-boot for i.MX8MQ
-sudo dd if=./u-boot/flash.bin of=reform-rescue-system.img conv=notrunc bs=1k seek=33
+dd if=./u-boot/flash.bin of=reform-rescue-system.img conv=notrunc bs=1k seek=33
 
 echo Reform Rescue System Image created: reform-rescue-system.img
 
 # Full System -----------------------------------------------------------
 
 # chroot into the userland and add extra applications
-sudo ./mkuserland3.sh
+./mkuserland3.sh
 
-SIZE=9000M
-# create ext4 partition from target root directory directly at 4MiB offset
-sudo /sbin/mke2fs -v -L 'MNTREFORM' -N 0 -O 64bit -E offset=4194304 -d target-userland -m 5 -r 1 -t ext4 reform-system.img $SIZE
+SIZE=5000000
+genext2fs --block-size 1024 --size-in-blocks $SIZE --bytes-per-inode 16384 --tarball target-userland-full.tar reform-system.img
+dd if=reform-system.img of=reform-system.img.tmp seek=1 bs=4194304
+mv reform-system.img.tmp reform-system.img
 
-sudo /sbin/parted -s reform-system.img "mklabel msdos"
-sudo /sbin/parted -s reform-system.img "mkpart primary ext4 4MiB -1s"
-sudo /sbin/parted -s reform-system.img print
+/sbin/parted -s reform-system.img "mklabel msdos"
+# reproducible disk signature
+printf mntr | dd of=reform-system.img seek=440 bs=1 conv=notrunc
+/sbin/parted -s reform-system.img "mkpart primary ext4 4MiB -1s"
+/sbin/parted -s reform-system.img print
 
 # install u-boot for i.MX8MQ
-sudo dd if=./u-boot/flash.bin of=reform-system.img conv=notrunc bs=1k seek=33
+dd if=./u-boot/flash.bin of=reform-system.img conv=notrunc bs=1k seek=33
 
 echo Reform Full System Image created: reform-system.img
 
diff --git a/reform2-imx8mq/mkkernel.sh b/reform2-imx8mq/mkkernel.sh
index 2f9529ffbe9823c3134907b8596a75b2831fef4b..9534e69ccf93c0f2c9023df4549e0db9aef94d42 100755
--- a/reform2-imx8mq/mkkernel.sh
+++ b/reform2-imx8mq/mkkernel.sh
@@ -6,6 +6,9 @@ set -e
 export ARCH=arm64
 export CROSS_COMPILE=aarch64-linux-gnu-
 export KBUILD_BUILD_TIMESTAMP=$(date --date="@$SOURCE_DATE_EPOCH" --rfc-email)
+export KBUILD_BUILD_VERSION=1
+export KBUILD_BUILD_USER=reformuser
+export KBUILD_BUILD_HOST=reformhost
 
 if [ ! -d linux ]
 then
diff --git a/reform2-imx8mq/mkrepo.sh b/reform2-imx8mq/mkrepo.sh
index 5714144086c3c9f0f9bf739870930c7100417b75..8aad970b0146dd534407c7a8267dc5800b461ec9 100755
--- a/reform2-imx8mq/mkrepo.sh
+++ b/reform2-imx8mq/mkrepo.sh
@@ -39,6 +39,13 @@ SRC_LIST_PATCHED="deb [ trusted=yes ] http://127.0.0.1:$HTTP_PORT/ $OURSUITE mai
 BUILD_ARCH=$(dpkg --print-architecture)
 HOST_ARCH=arm64
 
+DEB_BUILD_PROFILES="nobiarch nocheck noudeb"
+if [ "$BUILD_ARCH" != "$HOST_ARCH" ]; then
+	DEB_BUILD_PROFILES="cross $DEB_BUILD_PROFILES"
+fi
+export DEB_BUILD_PROFILES
+export DEB_BUILD_OPTIONS="noautodbgsym nocheck noudeb"
+
 if ! test -d "$REPREPRO_BASE_DIR"; then
 	mkdir -p "$REPREPRO_BASE_DIR/conf"
 	cat > "$REPREPRO_BASE_DIR/conf/distributions" <<EOF
@@ -118,19 +125,49 @@ for p in patches/*; do
 		"$PATCHDIR/$p"
 		dch --local "+$OURSUITE" "apply mnt reform patch"
 		dch --release ""
-		# build foreign arch:any packages
+		# cross build foreign arch:any packages
 		if ! chdist_base apt-cache showsrc --only-source "$p" | grep -q '^Architecture: all$'; then
 			rm -f ../*.changes
-			DEB_BUILD_OPTIONS="noautodbgsym nocheck" sbuild -d "$BASESUITE" --host="$HOST_ARCH" --no-arch-all --arch-any --nolog --no-clean-source --no-source-only-changes --no-run-lintian --no-run-autopkgtest --profiles=cross,nobiarch,nocheck,noudeb --extra-repository="$SRC_LIST_PATCHED" --chroot-mode=unshare --chroot="$BUILD_CHROOT"
+			sbuild -d "$BASESUITE" --host="$HOST_ARCH" --no-arch-all --arch-any --nolog --no-clean-source --no-source-only-changes --no-run-lintian --no-run-autopkgtest --extra-repository="$SRC_LIST_PATCHED" --chroot-mode=unshare --chroot="$BUILD_CHROOT" --no-apt-upgrade --no-apt-distupgrade
 			reprepro include "$OURSUITE" ../*.changes
 		fi
-		# build potential arch:all packages
+		# natively build arch:all packages
 		if chdist_base apt-cache showsrc --only-source "$p" | grep -q '^Architecture:.* all$'; then
 			rm -f ../*.changes
-			DEB_BUILD_OPTIONS="noautodbgsym nocheck" sbuild -d "$BASESUITE" --arch-all --no-arch-any --nolog --no-clean-source --no-source-only-changes --no-run-lintian --no-run-autopkgtest --profiles=nobiarch,nocheck,noudeb --extra-repository="$SRC_LIST_PATCHED" --chroot-mode=unshare --chroot="$BUILD_CHROOT"
+			sbuild -d "$BASESUITE" --arch-all --no-arch-any --nolog --no-clean-source --no-source-only-changes --no-run-lintian --no-run-autopkgtest --extra-repository="$SRC_LIST_PATCHED" --chroot-mode=unshare --chroot="$BUILD_CHROOT" --no-apt-upgrade --no-apt-distupgrade
 			reprepro include "$OURSUITE" ../*.changes
 		fi
 		cd ..
 	)
 	rm -Rf "$WORKDIR"
 done
+
+if [ -z "$(reprepro listfilter reform "\$Source (== blender)")" ]; then
+	blenderpatch=$(realpath blender.debdiff)
+	rm -Rf "$WORKDIR"
+	mkdir --mode=0777 "$WORKDIR"
+	(
+		cd "$WORKDIR"
+		dget http://snapshot.debian.org/archive/debian/20190424T035015Z/pool/main/b/blender/blender_2.79.b%2Bdfsg0-7.dsc
+		cd blender-2.79.b+dfsg0
+		patch -p1 < "$blenderpatch"
+		if [ "$BUILD_ARCH" = "$HOST_ARCH" ]; then
+			# build everything natively
+			sbuild -d "$BASESUITE" --arch-any --arch-all --nolog --no-clean-source --no-source-only-changes --no-run-lintian --no-run-autopkgtest --chroot-mode=unshare --chroot="$BUILD_CHROOT" --no-apt-upgrade --no-apt-distupgrade
+			reprepro include "$OURSUITE" ../blender_2.79.b+dfsg0-7+reform1_arm64.changes
+		else
+			# cross build arch:any
+			sbuild -d "$BASESUITE" --host="$HOST_ARCH" --arch-any --no-arch-all --nolog --no-clean-source --no-source-only-changes --no-run-lintian --no-run-autopkgtest --chroot-mode=unshare --chroot="$BUILD_CHROOT" --no-apt-upgrade --no-apt-distupgrade
+			# native build arch:all
+			sbuild -d "$BASESUITE" --no-arch-any --arch-all --nolog --no-clean-source --no-source-only-changes --no-run-lintian --no-run-autopkgtest --chroot-mode=unshare --chroot="$BUILD_CHROOT" --no-apt-upgrade --no-apt-distupgrade
+			reprepro include "$OURSUITE" ../blender_2.79.b+dfsg0-7+reform1_arm64.changes
+			reprepro include "$OURSUITE" ../blender_2.79.b+dfsg0-7+reform1_all.changes
+		fi
+	)
+	rm -Rf "$WORKDIR"
+fi
+
+if [ -z "$(reprepro listfilter reform "Package (== reform-tools)")" ]; then
+	dpkg-deb --root-owner-group --build reform-tools_1.0-7
+	reprepro includedeb "$OURSUITE" reform-tools_1.0-7.deb
+fi
diff --git a/reform2-imx8mq/mkuserland.sh b/reform2-imx8mq/mkuserland.sh
index 6e4f2aba172917f8cfdffb8890cf7b7cd50fea0c..b76c4acf2a5467c9e71dbe613b2aefcb79582ecf 100755
--- a/reform2-imx8mq/mkuserland.sh
+++ b/reform2-imx8mq/mkuserland.sh
@@ -5,94 +5,57 @@ set -x
 
 ETC=./template-etc
 SKEL=./template-skel
-
-mmdebstrap --architectures=arm64 --components=main --variant="minbase" --include="apt apt-utils gnupg ca-certificates cpio bsdmainutils init-system-helpers procps gpgv debian-archive-keyring readline-common cron netbase iproute2 ifupdown isc-dhcp-client iptables iputils-ping locales less net-tools curl wget nano micro vim coreutils parted file git sudo console-setup console-data unicode-data kbd gpm systemd libpam-systemd systemd-sysv bash-completion ncurses-term alsa-utils brightnessctl brightness-udev usbutils pciutils fbset netcat-traditional nfacct traceroute wpasupplicant htop ncdu ntpdate ntp screen tmux telnet lm-sensors rfkill dosfstools e2fsprogs dialog rsync busybox pulseaudio  sway grim slurp xwayland xterm xfce4-terminal rofi arc-theme thunar policykit-1 libblockdev-dm2 libblockdev-crypto2 gnome-disk-utility cryptsetup openjdk-11-jre-headless  gnome-system-monitor eog evince mpv gedit engrampa connman-gtk gnome-icon-theme breeze-icon-theme fonts-noto-color-emoji lxpolkit mesa-utils w3m man-db pavucontrol python3-psutil ircii elinks  zlib1g-dev patch expat bison flex libunwind-dev libwayland-dev wayland-protocols libwayland-egl-backend-dev libx11-dev libx11-xcb-dev libxdamage-dev libxfixes-dev libxcb-dri3-dev libxcb-xfixes0-dev libxcb-sync-dev libxrandr-dev libxext-dev libxcb-glx0-dev libxcb-present-dev libxcb-dri2-0-dev gettext autopoint libpixman-1-dev libbsd-dev libxkbfile-dev libxcb-composite0-dev libxcb-xinput-dev libxcb-icccm4-dev libxfont-dev nettle-dev libdbus-1-dev libsystemd-dev libpciaccess-dev llvm-dev libudev-dev libmtdev-dev libevdev-dev libxshmfence-dev xutils-dev libdrm-dev libxxf86vm-dev meson gcc g++ python3-setuptools python3-mako xfonts-utils libepoxy-dev libjson-c-dev libpcre3-dev libpango1.0-dev libxkbcommon-dev libinput-dev autoconf make libtool intltool libxml2-dev libxfce4ui-2-dev libgarcon-1-dev xfce4-dev-tools libdbusmenu-gtk3-dev libfmt-dev libgirepository1.0-dev libgtkmm-3.0-dev libjsoncpp-dev libmpdclient-dev libnl-3-dev libnl-genl-3-dev libpulse-dev  libsigc++-2.0-dev libspdlog-dev  libsdl2-gfx-dev libsdl2-mixer-dev libsdl2-net-dev libsdl2-ttf-dev libsdl2-dev libsdl2-image-dev libflac-dev libmpg123-dev libpng-dev libmpeg2-4-dev" sid target-userland http://ftp.de.debian.org/debian
-
-# install kernel
-cp linux/arch/arm64/boot/Image target-userland/
-# install DTBs
-cp linux/arch/arm64/boot/dts/freescale/imx8mq-mnt-reform2.dtb target-userland/imx8mq-mnt-reform2-single-display.dtb
-cp linux/arch/arm64/boot/dts/freescale/imx8mq-mnt-reform2-hdmi.dtb target-userland/imx8mq-mnt-reform2-dual-display.dtb
-# default to single display (less flickery)
-cp linux/arch/arm64/boot/dts/freescale/imx8mq-mnt-reform2.dtb target-userland/imx8mq-mnt-reform2.dtb
-# provide a copy of u-boot for (re)flashing
-mkdir -p target-userland/boot
-cp ./u-boot/flash.bin target-userland/boot/
-cp ./u-boot/flash-rescue.bin target-userland/boot/
-cp ./u-boot/flash-rescue.sh target-userland/boot/
-
-# default audio settings, or PCM will be muted
-mkdir -p target-userland/var/lib/alsa
-cp $ETC/asound.state target-userland/var/lib/alsa/
-
-# populate root user and skel
-cp -RavT $SKEL target-userland/root/
-cp -RavT $SKEL target-userland/etc/skel/
-mkdir -p target-userland/etc/skel/Desktop
-mkdir -p target-userland/etc/skel/Documents
-mkdir -p target-userland/etc/skel/Downloads
-mkdir -p target-userland/etc/skel/Music
-mkdir -p target-userland/etc/skel/Pictures
-mkdir -p target-userland/etc/skel/Videos
-
-# populate /etc
-cp $ETC/ld.so.conf target-userland/etc # or our libraries won't be picked up
-mkdir -p target-userland/etc/dhcp
-cp $ETC/dhclient.conf target-userland/etc/dhcp
-cp $ETC/motd-rescue target-userland/etc/motd # we start with the rescue system
-cp $ETC/hostname target-userland/etc
-cp $ETC/hosts target-userland/etc
-cp $ETC/adduser.conf target-userland/etc # or else EXTRA_GROUPS doesn't work?!
-cp $ETC/reform-* target-userland/etc
-
-# copy pulse config files that will be moved inside the target fs later
-cp $ETC/pulse/* target-userland/
-
-# custom built libraries
-mkdir -p target-userland/root/src
-
-chroot target-userland /bin/bash <<EOF
-export DEBIAN_FRONTEND=noninteractive
-export DEBCONF_NONINTERACTIVE_SEEN=true
-export LC_ALL=C
-export LANGUAGE=C
-export LANG=C
-
-set -x
-set -e
-
-echo "root:root" | chpasswd
-passwd -d root # remove root password
-
-ln --force --symbolic /usr/share/zoneinfo/Europe/Berlin /etc/localtime
-dpkg --configure -a
-
-echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
-locale-gen
-echo "LANG=en_US.UTF-8" > /etc/default/locale
-
-# add MNT Research/Reform apt repository
-apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 376511EB67AD7BAF
-
-echo "deb https://mntre.com/reform-debian sid/" >>/etc/apt/sources.list
-apt update
-
-# install essential MNT Reform system management scripts and docs
-apt install -y reform-tools reform-handbook
-
-# move pulse config in place
-# FIXME: this is brittle and should go into a .deb
-mv /analog-input-reform.conf /usr/share/pulseaudio/alsa-mixer/paths/
-mv /default.conf /usr/share/pulseaudio/alsa-mixer/profile-sets/
-
-# move hardware setup one-shot service in place
-mv /etc/reform-hw-setup.service /etc/systemd/system/
-systemctl enable reform-hw-setup.service
-
-# remove some unnecessary stuff (apparmor slows down boot)
-apt remove -y ofono foot apparmor
-
-# disable built-in sleep targets in favor of reform-standby script
-systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
-
-EOF
+REPO=$(realpath repo)
+
+mmdebstrap \
+	--architectures=arm64 \
+	--components=main \
+	--variant="minbase" \
+	--include="apt apt-utils gnupg ca-certificates cpio bsdmainutils init-system-helpers procps gpgv debian-archive-keyring readline-common cron netbase iproute2 ifupdown isc-dhcp-client iptables iputils-ping locales less net-tools curl wget nano micro vim coreutils parted file git sudo console-setup console-data unicode-data kbd gpm systemd libpam-systemd systemd-sysv bash-completion ncurses-term alsa-utils brightnessctl brightness-udev usbutils pciutils fbset netcat-traditional nfacct traceroute wpasupplicant htop ncdu ntpdate ntp screen tmux telnet lm-sensors rfkill dosfstools e2fsprogs dialog rsync busybox pulseaudio sway grim slurp xwayland xterm xfce4-terminal rofi arc-theme thunar policykit-1 gnome-disk-utility cryptsetup openjdk-11-jre-headless gnome-system-monitor eog evince mpv gedit engrampa connman-gtk gnome-icon-theme breeze-icon-theme fonts-noto-color-emoji lxpolkit mesa-utils w3m man-db pavucontrol python3-psutil ircii elinks reform-tools reform-handbook flash-kernel" \
+	${comment#install kernel} \
+	--essential-hook='mkdir "$1"/etc/flash-kernel' \
+	--essential-hook='echo "MNT Reform 2" > "$1"/etc/flash-kernel/machine' \
+	--customize-hook='copy-in linux/arch/arm64/boot/Image /' \
+	--customize-hook='chown -R root:root "$1"/Image' \
+	${comment#install DTBs} \
+	--customize-hook='upload linux/arch/arm64/boot/dts/freescale/imx8mq-mnt-reform2.dtb      /imx8mq-mnt-reform2-single-display.dtb' \
+	--customize-hook='upload linux/arch/arm64/boot/dts/freescale/imx8mq-mnt-reform2-hdmi.dtb /imx8mq-mnt-reform2-dual-display.dtb' \
+	${comment#default to single display (less flickery)} \
+	--customize-hook='upload linux/arch/arm64/boot/dts/freescale/imx8mq-mnt-reform2.dtb      /imx8mq-mnt-reform2.dtb' \
+	${comment#provide a copy of u-boot for (re)flashing} \
+	--customize-hook='copy-in u-boot/flash.bin /boot' \
+	--customize-hook='copy-in u-boot/flash-rescue.bin /boot' \
+	--customize-hook='copy-in u-boot/flash-rescue.sh /boot' \
+	--customize-hook='chown -R root:root "$1"/boot' \
+	${comment#default audio settings, or PCM will be muted} \
+	--customize-hook="copy-in $ETC/asound.state /var/lib/alsa/" \
+	--customize-hook='chown root:root "$1"/var/lib/alsa/asound.state' \
+	${comment#populate root user and skel} \
+	--customize-hook="sync-in $SKEL /root" \
+	--customize-hook='chown -R root:root "$1"/root' \
+	--customize-hook="sync-in $SKEL /etc/skel" \
+	--customize-hook='mkdir "$1"/etc/skel/Desktop' \
+	--customize-hook='mkdir "$1"/etc/skel/Documents' \
+	--customize-hook='mkdir "$1"/etc/skel/Downloads' \
+	--customize-hook='mkdir "$1"/etc/skel/Music' \
+	--customize-hook='mkdir "$1"/etc/skel/Pictures' \
+	--customize-hook='mkdir "$1"/etc/skel/Videos' \
+	--customize-hook='chown -R root:root "$1"/etc/skel' \
+	${comment#populate /etc} \
+	--customize-hook="copy-in $ETC/dhclient.conf /etc/dhcp" \
+	--customize-hook='chown root:root "$1"/etc/dhcp/dhclient.conf' \
+	--customize-hook="upload $ETC/motd-rescue /etc/motd" ${comment#we start with the rescue system} \
+	--customize-hook="copy-in $ETC/hostname /etc" \
+	--customize-hook="copy-in $ETC/hosts /etc" \
+	--customize-hook="copy-in $ETC/adduser.conf /etc" ${comment#or else EXTRA_GROUPS doesnt work?} \
+	--customize-hook="copy-in $ETC/reform-hw-setup.service /etc" \
+	--customize-hook='chown root:root "$1"/etc/hostname "$1"/etc/hosts "$1"/etc/adduser.conf "$1"/etc/reform-hw-setup.service' \
+	${comment#copy pulse config files that will be moved inside the target fs later} \
+	--customize-hook="sync-in $ETC/pulse /" \
+	--customize-hook='./mkuserland2.sh' \
+	--customize-hook='find "$1"/usr -type f -name "*.pyc" -delete' ${comment#regenerate with FIXME} \
+	--customize-hook='rm -rf "$1"/var/cache/man/*' ${comment#regenerate with mandb -cq} \
+	--customize-hook='rm "$1"/etc/ssl/certs/java/cacerts' ${comment#regenerate with update-ca-certificates -f} \
+	--customize-hook='rm "$1"/var/lib/dbus/machine-id' ${comment#gets regenerated by dbus} \
+	--customize-hook='sed -i "/^deb \[trusted=yes\] copy:\/\//d" "$1"/etc/apt/sources.list' \
+	unstable target-userland.tar http://ftp.de.debian.org/debian "deb [trusted=yes] copy://$REPO reform main" ./reform.sources
diff --git a/reform2-imx8mq/mkuserland2.sh b/reform2-imx8mq/mkuserland2.sh
index 6b332f72d981c6a8bbc56e463dbc56054d56bbbd..87eec3d5b593db46058812886ea0007e8755b681 100755
--- a/reform2-imx8mq/mkuserland2.sh
+++ b/reform2-imx8mq/mkuserland2.sh
@@ -1,127 +1,39 @@
-#!/bin/bash
+#!/bin/sh
 
-chroot target-userland /bin/bash <<EOF
+chroot "$1" /bin/bash <<'EOF'
+export DEBIAN_FRONTEND=noninteractive
+export DEBCONF_NONINTERACTIVE_SEEN=true
 export LC_ALL=C
 export LANGUAGE=C
 export LANG=C
 
-set -e
 set -x
+set -e
 
-cd /root
-mkdir -p src
-cd src
-
-git clone --depth 1 --branch libdrm-2.4.106 https://gitlab.freedesktop.org/mesa/drm.git
-
-# there's no tag yet for 21.1.3 which will probably include all patches we need
-# so fetch the most recent commit at the time of putting this script together.
-mkdir -p mesa
-cd mesa
-git init
-git remote add origin https://gitlab.freedesktop.org/mesa/mesa.git
-git fetch origin 2ebf4e984b51825c37562e0221bde327188e3eaf
-git reset --hard FETCH_HEAD
-cd ..
-
-mkdir -p xserver
-cd xserver
-git init
-git remote add origin https://gitlab.freedesktop.org/xorg/xserver.git
-git fetch origin f3eb1684fa5008ad7c881f798a5efb7441b23035
-git reset --hard FETCH_HEAD
-cd ..
-
-git clone https://github.com/swaywm/wlroots.git
-git clone https://github.com/swaywm/sway.git
-git clone --depth 1 --branch 0.9.7 https://github.com/Alexays/Waybar.git
-git clone --depth 1 --branch v0.4.0 https://github.com/any1/wayvnc.git
-git clone --depth 1 --branch v0.1.3 https://github.com/Hjdskes/cage.git
-
-cd drm
-meson build -Detnaviv=true -Dradeon=false -Damdgpu=false -Dvmwgfx=false -Dfreedreno=false -Dvc4=false -Dnouveau=false
-ninja -C build install
-cd ..
-rm -rf drm
-
-ldconfig
-
-cd mesa
-meson build -Dplatforms=x11,wayland -Ddri3=true -Dgallium-drivers=swrast,etnaviv,kmsro,virgl -Dgbm=enabled -Degl=enabled -Dbuildtype=release -Db_ndebug=true
-ninja -C build install
-cd ..
-rm -rf mesa
-
-ldconfig
-
-cd wlroots
-git checkout 0.13.0
-meson build
-ninja -C build install
-cd ..
-rm -rf wlroots
-
-ldconfig
-
-cd sway
-git checkout 1.6
-meson build
-ninja -C build install
-chmod +s /usr/local/bin/sway
-cd ..
-rm -rf sway
-
-cd xserver
-
-# patch to work around flickery GTK2 and other legacy X11 GUIs on etnaviv
-
-patch -p1 <<ENDPATCH
-diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c
-index be0741a..1dd2876 100644
---- a/glamor/glamor_render.c
-+++ b/glamor/glamor_render.c
-@@ -1584,6 +1584,8 @@ glamor_composite_clipped_region(CARD8 op,
-     if (prect != rect)
-         free(prect);
-  out:
-+    glFinish();
-+
-     if (temp_src != source)
-         FreePicture(temp_src, 0);
-     if (temp_mask != mask)
-ENDPATCH
+echo "root:root" | chpasswd
+# remove root password -- using `passwd -d root` produces unreproducible output
+sed -i 's/^root:[^:]\+:/root::/' /etc/shadow
 
-meson build -Dxorg=true -Dxwayland=true -Dglamor=true -Dxwayland_eglstream=false -Dxnest=false -Ddmx=false -Dxvfb=true -Dxwin=false -Dxephyr=false -Ddri3=true
-ninja -C build install
-cd ..
-rm -rf xserver
+ln --force --symbolic /usr/share/zoneinfo/Europe/Berlin /etc/localtime
+dpkg --configure -a
 
-# overwrite /usr/bin/Xwayland with symlink to our Xwayland (FIXME: brittle)
+echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
+locale-gen
+echo "LANG=en_US.UTF-8" > /etc/default/locale
 
-rm -f /usr/bin/Xwayland
-ln -s /usr/local/bin/Xwayland /usr/bin/Xwayland
+# move pulse config in place
+# FIXME: this is brittle and should go into a .deb
+mv /analog-input-reform.conf /usr/share/pulseaudio/alsa-mixer/paths/
+mv /default.conf /usr/share/pulseaudio/alsa-mixer/profile-sets/
 
-cd Waybar
-meson build
-ninja -C build install
-cd ..
-rm -rf Waybar
+# move hardware setup one-shot service in place
+mv /etc/reform-hw-setup.service /etc/systemd/system/
+systemctl enable reform-hw-setup.service
 
-cd wayvnc
-mkdir subprojects
-cd subprojects
-git clone https://github.com/any1/neatvnc.git
-git clone https://github.com/any1/aml.git
-cd ..
-meson build
-ninja -C build install
-cd ..
-rm -rf wayvnc
+# remove some unnecessary stuff (apparmor slows down boot)
+apt remove -y ofono foot apparmor
 
-cd cage
-meson build
-ninja -C build install
-cd ..
-rm -rf cage
+# disable built-in sleep targets in favor of reform-standby script
+systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
 
 EOF
diff --git a/reform2-imx8mq/mkuserland3.sh b/reform2-imx8mq/mkuserland3.sh
index 33e40889d14e12091ec55a2a87be05731de10ed9..43570a414150c3b6d741be8b3e5aa20a5ba3051f 100755
--- a/reform2-imx8mq/mkuserland3.sh
+++ b/reform2-imx8mq/mkuserland3.sh
@@ -8,33 +8,16 @@ set -e
 ETC=./template-etc
 SKEL=./template-skel
 
-# populate /etc
-cp $ETC/motd target-userland/etc
-
-chroot target-userland /bin/bash <<EOF
-export DEBIAN_FRONTEND=noninteractive
-export DEBCONF_NONINTERACTIVE_SEEN=true
-export LC_ALL=C
-export LANGUAGE=C
-export LANG=C
-
-set -x
-set -e
-
-# install applications
-
-apt install -y libreoffice libreoffice-gtk3 inkscape firefox-esr emacs gimp wmaker x11-utils
-apt install -y chromium evolution freecad ardour sxiv neverball scummvm dosbox wf-recorder wev linphone-desktop
-
-# install patched software from mntre
-
-apt install -y kicad=5.1.9+dfsg1-1.1 minetest libjsoncpp1 blender=2.79b+mntreform-2
-
-# install a minimal gnome3
-
-apt install -y --no-install-recommends gnome-control-center gnome-session
-
-# remove apparmor (slows down boot)
-apt remove -y apparmor
-
-EOF
+/home/josch/git/mmdebstrap/mmdebstrap \
+	--architectures=arm64 \
+	--variant=custom \
+	--setup-hook='mmtarfilter "--path-exclude=/dev/*" < target-userland.tar | tar -C "$1" -x' \
+	--customize-hook="upload $ETC/motd /etc/motd" \
+	--customize-hook='chroot "$1" apt-get install --yes apparmor- libreoffice libreoffice-gtk3 inkscape firefox-esr emacs gimp wmaker x11-utils' \
+	--customize-hook='chroot "$1" apt-get install --yes evolution freecad ardour sxiv neverball scummvm dosbox wf-recorder wev linphone-desktop' ${comment#re-add chromium once it is installable again} \
+	${comment#--customize-hook='/usr/sbin/chroot "$1" apt-get install --yes minetest blender=2.79.b+dfsg0-7+reform1 kicad/experimental'} \
+	--customize-hook='chroot "$1" apt-get install --yes --no-install-recommends gnome-control-center gnome-session' \
+	--customize-hook='chroot "$1" apt-get remove --yes apparmor' ${comment#slows down boot} \
+	--customize-hook='find "$1"/usr -type f -name "*.pyc" -delete' ${comment#regenerate with FIXME} \
+	--customize-hook='rm -rf "$1"/var/cache/man/*' ${comment#regenerate with mandb -cq} \
+	'' target-userland-full.tar
diff --git a/reform2-imx8mq/patches/flash-kernel b/reform2-imx8mq/patches/flash-kernel
new file mode 100755
index 0000000000000000000000000000000000000000..fbef1fdb07b3b99fa248c34601f2d345b8024393
--- /dev/null
+++ b/reform2-imx8mq/patches/flash-kernel
@@ -0,0 +1,21 @@
+#!/bin/sh
+set -e
+patch -p1 << 'EOF'
+diff -Nru flash-kernel-3.104/db/all.db flash-kernel-3.104+nmu1/db/all.db
+--- flash-kernel-3.104/db/all.db	2021-02-07 00:13:15.000000000 +0100
++++ flash-kernel-3.104+nmu1/db/all.db	2022-01-03 17:37:18.000000000 +0100
+@@ -1064,6 +1064,13 @@
+ U-Boot-Script-Name: bootscr.sunxi
+ Required-Packages: u-boot-tools
+
++Machine: MNT Reform 2
++Kernel-Flavors: arm64
++DTB-Id: freescale/imx8mq-mnt-reform2.dtb
++Boot-Initrd-Path: /boot/initrd.img
++Boot-Kernel-Path: /boot/vmlinuz
++Required-Packages: u-boot-tools
++
+ Machine: MK802
+ Kernel-Flavors: armmp
+ Boot-Script-Path: /boot/boot.scr
+EOF
diff --git a/reform2-imx8mq/patches/fontconfig b/reform2-imx8mq/patches/fontconfig
new file mode 100755
index 0000000000000000000000000000000000000000..b881bc02a82739dc926b7516e9df3aeaa982e89d
--- /dev/null
+++ b/reform2-imx8mq/patches/fontconfig
@@ -0,0 +1,66 @@
+#!/bin/sh
+set -e
+# https://bugs.debian.org/864082
+patch -p1 << 'EOF'
+diff -Nru fontconfig-2.13.1/debian/patches/0001-Make-the-cache-filenames-determinstic.patch fontconfig-2.13.1/debian/patches/0001-Make-the-cache-filenames-determinstic.patch
+--- fontconfig-2.13.1/debian/patches/0001-Make-the-cache-filenames-determinstic.patch	1970-01-01 01:00:00.000000000 +0100
++++ fontconfig-2.13.1/debian/patches/0001-Make-the-cache-filenames-determinstic.patch	2021-12-27 20:53:49.000000000 +0100
+@@ -0,0 +1,49 @@
++From 70565e0f73d116a2a9523146228efcca1e76b016 Mon Sep 17 00:00:00 2001
++From: Chris Lamb <chris@chris-lamb.co.uk>
++Date: Mon, 29 Oct 2018 15:48:51 -0400
++Subject: [PATCH] Make the cache filenames determinstic
++
++Whilst working on the Reproducible Builds[0] effort, we noticed that
++fontconfig generates cache files with unreproducible/non-deterministic
++filenames.
++
++This is a supplement to the changes added in f098adac54ab where we
++ensured that the checksums themselves were determistic but the files
++that were stored in the cache directory are currently being given
++"random" names via uuid(3)'s uuid_generate_random function, thus
++any images that generate such files have different contents on every
++build.
++
++This patch changes the behaviour of the cache directory filename
++calculation to be based on the "source" directory name, rather than
++being entirely random.
++
++An alternative solution could be to continue to use the previous
++uuid_generate_random function but use this alternative codepath if the
++SOURCE_DATE_EPOCH[1] environment variable was determined to be
++present via getenv(3).
++
++This work was sponsored by Tails[2] and tracked in Debian in #864082[3].
++
++ [0] https://reproducible-builds.org/
++ [1] https://reproducible-builds.org/specs/source-date-epoch/
++ [2] https://tails.boum.org/
++ [3] https://bugs.debian.org/864082
++---
++ src/fccache.c | 2 +-
++ 1 file changed, 1 insertion(+), 1 deletion(-)
++
++--- a/src/fccache.c
+++++ b/src/fccache.c
++@@ -101,7 +101,10 @@ FcDirCacheCreateUUID (FcChar8  *dir,
++ 	    ret = FcFalse;
++ 	    goto bail3;
++ 	}
++-	uuid_generate_random (uuid);
+++	if (getenv("SOURCE_DATE_EPOCH"))
+++	    uuid_generate_sha1 (uuid, target, target, strlen(target));
+++	else
+++	    uuid_generate_random (uuid);
++ 	if (force)
++ 	    hash_add = FcHashTableReplace;
++ 	else
+diff -Nru fontconfig-2.13.1/debian/patches/series fontconfig-2.13.1/debian/patches/series
+--- fontconfig-2.13.1/debian/patches/series	2020-05-13 12:18:40.000000000 +0200
++++ fontconfig-2.13.1/debian/patches/series	2021-12-27 20:53:43.000000000 +0100
+@@ -6,3 +6,4 @@
+ 0001-fix-memory-leaks.patch
+ 0002-more-memory-leaks.patch
+ 0003-Set-name_mapping-to-NULL-after-freeing.patch
++0001-Make-the-cache-filenames-determinstic.patch
+EOF
diff --git a/reform2-imx8mq/reform.sources b/reform2-imx8mq/reform.sources
new file mode 100644
index 0000000000000000000000000000000000000000..a7f49f9ea9b902a8877e875628dc1c9e400b78f5
--- /dev/null
+++ b/reform2-imx8mq/reform.sources
@@ -0,0 +1,62 @@
+Types: deb
+URIs: https://mntre.com/reform-debian
+Suites: sid/
+Signed-By:
+ -----BEGIN PGP PUBLIC KEY BLOCK-----
+ .
+ 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
+ xhM/7UqXfyVvxS7/G09tYRcb7EU=
+ =n4Vj
+ -----END PGP PUBLIC KEY BLOCK-----