From 44e9c0f7ddc3ab05011e6dbe0bc73ca8538935ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=88=90=E5=88=9A?= Date: Mon, 28 Aug 2023 09:05:22 +0800 Subject: [PATCH] feat: add build support --- debian/arch | 1 + debian/changelog | 5 +++++ debian/control | 36 ++++++++++++++++++++++++++++++++++++ debian/copyright | 16 ++++++++++++++++ debian/files | 1 + debian/rules | 32 ++++++++++++++++++++++++++++++++ debian/source/format | 1 + debian/source/local-options | 2 ++ 8 files changed, 94 insertions(+) create mode 100644 debian/arch create mode 100644 debian/changelog create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/files create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 debian/source/local-options diff --git a/debian/arch b/debian/arch new file mode 100644 index 0000000000000..21d5bd8c7f982 --- /dev/null +++ b/debian/arch @@ -0,0 +1 @@ +amd64 diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000000000..74aafa9d5c8df --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +linux-upstream (6.4.9-g9e5249bf7de3-8) apricot; urgency=low + + * Custom built Linux kernel. + + -- LiChengGang Sun, 27 Aug 2023 00:22:56 +0800 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000000000..5203a252c54a0 --- /dev/null +++ b/debian/control @@ -0,0 +1,36 @@ +Source: linux-upstream +Section: kernel +Priority: optional +Maintainer: LiChengGang +Rules-Requires-Root: no +Build-Depends: zstd, bc, debhelper, rsync, kmod, cpio, bison, flex, libelf-dev:native, libssl-dev:native +Homepage: https://www.kernel.org/ + +Package: linux-image-6.4.9 +Architecture: amd64 arm64 +Description: Linux kernel, version 6.4.9 + This package contains the Linux kernel, modules and corresponding other + files, version: 6.4.9. + +Package: linux-libc-dev +Section: devel +Provides: linux-kernel-headers +Architecture: amd64 arm64 +Description: Linux support headers for userspace development + This package provides userspaces headers from the Linux kernel. These headers + are used by the installed headers for GNU glibc and other system libraries. +Multi-Arch: same + +Package: linux-headers-6.4.9 +Architecture: amd64 arm64 +Description: Linux kernel headers for 6.4.9 on amd64 + This package provides kernel header files for 6.4.9 on amd64 + . + This is useful for people who need to build external modules + +Package: linux-image-6.4.9-dbg +Section: debug +Architecture: amd64 arm64 +Description: Linux kernel debugging symbols for 6.4.9 + This package will come in handy if you need to debug the kernel. It provides + all the necessary debug symbols for the kernel and its modules. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000000000..388a204b0b2b2 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,16 @@ +This is a packaged upstream version of the Linux kernel. + +The sources may be found at most Linux archive sites, including: +https://www.kernel.org/pub/linux/kernel + +Copyright: 1991 - 2018 Linus Torvalds and others. + +The git repository for mainline kernel development is at: +git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 dated June, 1991. + +On Debian GNU/Linux systems, the complete text of the GNU General Public +License version 2 can be found in `/usr/share/common-licenses/GPL-2'. diff --git a/debian/files b/debian/files new file mode 100644 index 0000000000000..21d6b7f34b46b --- /dev/null +++ b/debian/files @@ -0,0 +1 @@ +linux-upstream_6.4.9-g9e5249bf7de3-8_source.buildinfo kernel optional diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000000000..45045679ad6d9 --- /dev/null +++ b/debian/rules @@ -0,0 +1,32 @@ +#!/usr/bin/make -f + +srctree ?= . +KERNELRELEASE = 6.4.9 +DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH 2>/dev/null) +ifneq (,$(filter amd64,$(DEB_HOST_ARCH))) +BUILD_ARCH = x86 +else +BUILD_ARCH = ${DEB_HOST_ARCH} +endif + +.PHONY: clean build build-arch build-indep binary binary-arch binary-indep + +build-indep: +build-arch: +ifneq (,$(filter amd64,$(DEB_HOST_ARCH))) + $(MAKE) -f $(srctree)/Makefile ARCH=${BUILD_ARCH} KERNELRELEASE=$(KERNELRELEASE) $(shell $(srctree)/scripts/package/deb-build-option) deepin_desktop_common_defconfig all -j$(shell nproc) +else ifneq (,$(filter arm64,$(DEB_HOST_ARCH))) + $(MAKE) -f $(srctree)/Makefile ARCH=${BUILD_ARCH} KERNELRELEASE=$(KERNELRELEASE) $(shell $(srctree)/scripts/package/deb-build-option) deepin_arm_desktop_defconfig all -j$(shell nproc) +endif + +build: build-arch + +binary-indep: +binary-arch: build-arch + $(MAKE) -f $(srctree)/Makefile ARCH=${BUILD_ARCH} KERNELRELEASE=$(KERNELRELEASE) intdeb-pkg + +clean: + rm -rf debian/files debian/linux-* + $(MAKE) -f $(srctree)/Makefile ARCH=${BUILD_ARCH} clean + +binary: binary-arch diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000000000..d3827e75a5cad --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +1.0 diff --git a/debian/source/local-options b/debian/source/local-options new file mode 100644 index 0000000000000..9e4ddc4ab0da4 --- /dev/null +++ b/debian/source/local-options @@ -0,0 +1,2 @@ +diff-ignore +extend-diff-ignore = .*