1diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile 2index 485b7dbd4..d79c30baf 100644 3--- a/arch/arm64/Makefile 4+++ b/arch/arm64/Makefile 5@@ -198,3 +198,18 @@ define archhelp 6 echo ' (distribution) /sbin/installkernel or' 7 echo ' install to $$(INSTALL_PATH) and run lilo' 8 endef 9+ 10+MAKE_MODULES ?= y 11+ 12+%.img: 13+ifeq ("$(CONFIG_MODULES)$(MAKE_MODULES)$(srctree)","yy$(objtree)") 14+ $(Q)$(MAKE) rockchip/$*.dtb Image.lz4 modules 15+else 16+ $(Q)$(MAKE) rockchip/$*.dtb Image.lz4 17+endif 18+ $(Q)$(KERNEL_SOURCE_PATH)/mvkfile --mv $(vendortree)/rockchip $(objdtstree) $*.dtb .$*.dtb* 19+ $(Q)$(KERNEL_SOURCE_PATH)/mvkfile --mv $(KERNEL_SOURCE_PATH)/scripts $(KBUILD_OUTPUT)/scripts resource_tool .resource_tool.cmd 20+ $(Q)$(KERNEL_SOURCE_PATH)/scripts/mkimg --dtb $*.dtb 21+ 22+CLEAN_DIRS += out 23+CLEAN_FILES += boot.img kernel.img resource.img zboot.img 24diff --git a/arch/arm64/include/asm/system_info.h b/arch/arm64/include/asm/system_info.h 25new file mode 100644 26index 000000000..a82fe791b 27--- /dev/null 28+++ b/arch/arm64/include/asm/system_info.h 29@@ -0,0 +1,14 @@ 30+/* SPDX-License-Identifier: GPL-2.0 */ 31+#ifndef __ASM_ARM_SYSTEM_INFO_H 32+#define __ASM_ARM_SYSTEM_INFO_H 33+ 34+#ifndef __ASSEMBLY__ 35+ 36+/* information about the system we're running on */ 37+extern unsigned int system_rev; 38+extern unsigned int system_serial_low; 39+extern unsigned int system_serial_high; 40+ 41+#endif /* !__ASSEMBLY__ */ 42+ 43+#endif /* __ASM_ARM_SYSTEM_INFO_H */ 44diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c 45index 61204ba07..e0e2d919c 100644 46--- a/arch/arm64/kernel/cpuinfo.c 47+++ b/arch/arm64/kernel/cpuinfo.c 48@@ -25,6 +25,12 @@ 49 #include <linux/smp.h> 50 #include <linux/delay.h> 51 52+unsigned int system_serial_low; 53+EXPORT_SYMBOL(system_serial_low); 54+ 55+unsigned int system_serial_high; 56+EXPORT_SYMBOL(system_serial_high); 57+ 58 /* 59 * In case the boot CPU is hotpluggable, we record its initial state and 60 * current state separately. Certain system registers may contain different 61diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c 62index 4999caff3..b47d477f4 100644 63--- a/arch/arm64/kernel/process.c 64+++ b/arch/arm64/kernel/process.c 65@@ -191,6 +191,8 @@ void machine_restart(char *cmd) 66 local_irq_disable(); 67 smp_send_stop(); 68 69+ do_kernel_pre_restart(cmd); 70+ 71 /* 72 * UpdateCapsule() depends on the system being reset via 73 * ResetSystem(). 74