diff --git a/arch/arm64/configs/rockchip_linux_defconfig b/arch/arm64/configs/rockchip_linux_defconfig index d511387f6e5672..a15639c9ab4643 100644 --- a/arch/arm64/configs/rockchip_linux_defconfig +++ b/arch/arm64/configs/rockchip_linux_defconfig @@ -1,3 +1,4 @@ +# CONFIG_LOCALVERSION_AUTO is not set CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y CONFIG_GENERIC_IRQ_DEBUGFS=y diff --git a/dev.mk b/dev.mk index 52b44b89a5952f..fb99709d9ed512 100644 --- a/dev.mk +++ b/dev.mk @@ -1,6 +1,12 @@ RELEASE ?= KERNEL_DEFCONFIG ?= rockchip_linux_defconfig +ifneq (,$(RELEASE)) +LOCALVERSION ?= -$(RELEASE)-ayufan-g$$(git rev-parse --short HEAD) +else +LOCALVERSION ?= -dev +endif + KERNEL_VERSION ?= $(shell $(KERNEL_MAKE) -s kernelversion) KERNEL_RELEASE ?= $(shell $(KERNEL_MAKE) -s kernelrelease) KDEB_PKGVERSION ?= $(KERNEL_VERSION)-$(RELEASE)-ayufan @@ -8,24 +14,17 @@ KDEB_PKGVERSION ?= $(KERNEL_VERSION)-$(RELEASE)-ayufan KERNEL_MAKE ?= make \ ARCH=arm64 \ HOSTCC=aarch64-linux-gnu-gcc \ - CROSS_COMPILE="ccache aarch64-linux-gnu-" + CROSS_COMPILE="ccache aarch64-linux-gnu-" \ + LOCALVERSION=$(LOCALVERSION) .config: arch/arm64/configs/$(KERNEL_DEFCONFIG) $(KERNEL_MAKE) $(KERNEL_DEFCONFIG) -.PHONY: .scmversion -.scmversion: -ifneq (,$(RELEASE)) - @echo "-$(RELEASE)-ayufan-g$$(git rev-parse --short HEAD)" > .scmversion -else - @echo "-dev" > .scmversion -endif - version: @echo "$(KDEB_PKGVERSION)" .PHONY: info -info: .config .scmversion +info: .config @echo $(KERNEL_RELEASE) .PHONY: kernel-menuconfig @@ -36,33 +35,33 @@ kernel-menuconfig: mv defconfig arch/arm64/configs/$(KERNEL_DEFCONFIG) .PHONY: kernel-image -kernel-image: .config .scmversion +kernel-image: .config $(KERNEL_MAKE) Image dtbs -j$$(nproc) .PHONY: kernel-modules -kernel-image-and-modules: .config .scmversion +kernel-image-and-modules: .config $(KERNEL_MAKE) Image modules dtbs -j$$(nproc) $(KERNEL_MAKE) modules_install INSTALL_MOD_PATH=$(CURDIR)/out/linux_modules .PHONY: kernel-package -kernel-package: .config .scmversion +kernel-package: .config KDEB_PKGVERSION=$(KDEB_PKGVERSION) $(KERNEL_MAKE) bindeb-pkg -j$$(nproc) REMOTE_DIR ?= root@$(REMOTE_HOST): .PHONY: kernel-update-modules -kernel-update-modules: .config .scmversion +kernel-update-modules: .config $(KERNEL_MAKE) modules -j$$(nproc) $(KERNEL_MAKE) modules_install INSTALL_MOD_PATH=$(CURDIR)/out/linux_modules rsync --partial --checksum -av out/linux_modules/lib/modules/$(KERNEL_RELEASE) $(REMOTE_DIR)/lib/modules .PHONY: kernel-update-dts -kernel-update-dts: .config .scmversion +kernel-update-dts: .config $(KERNEL_MAKE) dtbs -j$$(nproc) rsync --partial --checksum --include="*.dtb" -rv arch/arm64/boot/dts/rockchip $(REMOTE_DIR)/boot/dtbs/$(KERNEL_RELEASE) .PHONY: kernel-update -kernel-update-image: .scmversion +kernel-update-image: rsync --partial --checksum -rv arch/arm64/boot/Image $(REMOTE_DIR)/boot/vmlinuz-$(KERNEL_RELEASE) rsync --partial --checksum --include="*.dtb" -rv arch/arm64/boot/dts/rockchip $(REMOTE_DIR)/boot/dtbs/$(KERNEL_RELEASE) rsync --partial --checksum -av out/linux_modules/lib/modules/$(KERNEL_RELEASE) $(REMOTE_DIR)/lib/modules