diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index 485b7dbd4..d79c30baf 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -198,3 +198,18 @@ define archhelp echo ' (distribution) /sbin/installkernel or' echo ' install to $$(INSTALL_PATH) and run lilo' endef + +MAKE_MODULES ?= y + +%.img: +ifeq ("$(CONFIG_MODULES)$(MAKE_MODULES)$(srctree)","yy$(objtree)") + $(Q)$(MAKE) rockchip/$*.dtb Image.lz4 modules +else + $(Q)$(MAKE) rockchip/$*.dtb Image.lz4 +endif + $(Q)$(KERNEL_SOURCE_PATH)/mvkfile --mv $(vendortree)/rockchip $(objdtstree) $*.dtb .$*.dtb* + $(Q)$(KERNEL_SOURCE_PATH)/mvkfile --mv $(KERNEL_SOURCE_PATH)/scripts $(KBUILD_OUTPUT)/scripts resource_tool .resource_tool.cmd + $(Q)$(KERNEL_SOURCE_PATH)/scripts/mkimg --dtb $*.dtb + +CLEAN_DIRS += out +CLEAN_FILES += boot.img kernel.img resource.img zboot.img diff --git a/arch/arm64/include/asm/system_info.h b/arch/arm64/include/asm/system_info.h new file mode 100644 index 000000000..a82fe791b --- /dev/null +++ b/arch/arm64/include/asm/system_info.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __ASM_ARM_SYSTEM_INFO_H +#define __ASM_ARM_SYSTEM_INFO_H + +#ifndef __ASSEMBLY__ + +/* information about the system we're running on */ +extern unsigned int system_rev; +extern unsigned int system_serial_low; +extern unsigned int system_serial_high; + +#endif /* !__ASSEMBLY__ */ + +#endif /* __ASM_ARM_SYSTEM_INFO_H */ diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c index 61204ba07..e0e2d919c 100644 --- a/arch/arm64/kernel/cpuinfo.c +++ b/arch/arm64/kernel/cpuinfo.c @@ -25,6 +25,12 @@ #include #include +unsigned int system_serial_low; +EXPORT_SYMBOL(system_serial_low); + +unsigned int system_serial_high; +EXPORT_SYMBOL(system_serial_high); + /* * In case the boot CPU is hotpluggable, we record its initial state and * current state separately. Certain system registers may contain different diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index 4999caff3..b47d477f4 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c @@ -191,6 +191,8 @@ void machine_restart(char *cmd) local_irq_disable(); smp_send_stop(); + do_kernel_pre_restart(cmd); + /* * UpdateCapsule() depends on the system being reset via * ResetSystem().