Add Droidian packaging

This commit is contained in:
Evie Viau-Chow-Stuart 2023-08-18 01:02:08 -07:00
parent 637b83730f
commit 9b4bda65c0
Signed by: evie
GPG key ID: 928652CDFCEC8099
9 changed files with 4997 additions and 5 deletions

5
.gitignore vendored
View file

@ -52,11 +52,6 @@ Module.symvers
/System.map
/Module.markers
#
# Debian directory (make deb-pkg)
#
/debian/
#
# tar directory (make tar*-pkg)
#

4708
debian/changelog vendored Normal file

File diff suppressed because it is too large Load diff

1
debian/compat vendored Normal file
View file

@ -0,0 +1 @@
13

79
debian/control vendored Normal file
View file

@ -0,0 +1,79 @@
Source: linux-android-oneplus-msm8998
Section: kernel
Priority: optional
Maintainer: Droidian porters <info@droidian.org>
Uploaders: Eugenio Paolantonio (g7) <eugenio@droidian.org>,
r3vn <giuseppe@droidian.org>,
Erfan Abdi <erfan@droidian.org>,
Erik Inkinen <erik@droidian.org>,
Bardia Moshiri <fakeshell@bardia.tech>,
XS-Droidian-Host-Arch: arm64
XS-Droidian-Build-On: amd64
Build-Depends: build-essential,
dpkg-dev,
findutils,
android-platform-prebuilts-python-linux-x86-2.7.5,
debhelper (>= 13),
bc,
rsync,
kmod,
cpio,
bison,
flex,
libssl-dev,
linux-initramfs-halium-generic,
linux-packaging-snippets,
android-sdk-ufdt-tests,
mkbootimg (>= 10.0.0),
mkdtboimg,
avbtool,
linux-initramfs-halium-generic:arm64, binutils-aarch64-linux-gnu, clang-android-6.0-4691093, gcc-4.9-aarch64-linux-android, g++-4.9-aarch64-linux-android, libgcc-4.9-dev-aarch64-linux-android-cross
Standards-Version: 4.5.0.3
Vcs-Browser: https://github.com/droidian/linux-android-oneplus-msm8998
Vcs-Git: https://github.com/droidian/linux-android-oneplus-msm8998.git
Package: linux-image-4.4.153-oneplus-msm8998
Architecture: arm64
Depends: ${misc:Depends}
Description: Linux kernel for OnePlus 5/5T
This package contains the Linux kernel for the OnePlus 5/5T device.
.
Note: This package only ships the kernel image and modules, you should probably
look at the linux-bootimage-4.4.153-oneplus-msm8998 package for a bootimage suitable
for Android boot loaders.
Package: linux-bootimage-4.4.153-oneplus-msm8998
Architecture: arm64
Pre-Depends: flash-bootimage (>= 4)
Depends: ${misc:Depends},
linux-image-4.4.153-oneplus-msm8998 (= ${binary:Version})
Description: Linux kernel for OnePlus 5/5T - Android Boot Image
This package contains the Linux kernel for the OnePlus 5/5T device.
.
Note: This package ships an Android Boot Image bundled with Halium's
initramfs.
Package: linux-headers-4.4.153-oneplus-msm8998
Architecture: arm64
Depends: ${misc:Depends},
linux-image-4.4.153-oneplus-msm8998 (= ${binary:Version})
Description: Linux kernel for OnePlus 5/5T - Headers
This package contains the Linux kernel headers for the OnePlus 5/5T device.
Package: linux-image-oneplus-msm8998
Architecture: arm64
Depends: linux-image-4.4.153-oneplus-msm8998 (= ${binary:Version})
Description: Linux kernel for OnePlus 5/5T (latest)
This package depends to the latest kernel image available for the OnePlus 5/5T.
Package: linux-bootimage-oneplus-msm8998
Architecture: arm64
Depends: linux-bootimage-4.4.153-oneplus-msm8998 (= ${binary:Version})
Description: Linux kernel for OnePlus 5/5T - Android Boot Image (latest)
This package depends to the latest kernel bootimage available for the OnePlus 5/5T.
Package: linux-headers-oneplus-msm8998
Architecture: arm64
Depends: linux-headers-4.4.153-oneplus-msm8998 (= ${binary:Version})
Description: Linux kernel for OnePlus 5/5T - Headers (latest)
This package depends to the latest kernel headers available for the OnePlus 5/5T.

7
debian/files vendored Normal file
View file

@ -0,0 +1,7 @@
linux-android-oneplus-msm8998_0.0.0+git20230613002909.fc45d1f.bookworm_arm64.buildinfo kernel optional
linux-bootimage-4.4.153-oneplus-msm8998_0.0.0+git20230613002909.fc45d1f.bookworm_arm64.deb kernel optional
linux-bootimage-oneplus-msm8998_0.0.0+git20230613002909.fc45d1f.bookworm_arm64.deb kernel optional
linux-headers-4.4.153-oneplus-msm8998_0.0.0+git20230613002909.fc45d1f.bookworm_arm64.deb kernel optional
linux-headers-oneplus-msm8998_0.0.0+git20230613002909.fc45d1f.bookworm_arm64.deb kernel optional
linux-image-4.4.153-oneplus-msm8998_0.0.0+git20230613002909.fc45d1f.bookworm_arm64.deb kernel optional
linux-image-oneplus-msm8998_0.0.0+git20230613002909.fc45d1f.bookworm_arm64.deb kernel optional

194
debian/kernel-info.mk vendored Normal file
View file

@ -0,0 +1,194 @@
########################################################################
# Kernel settings
########################################################################
# Kernel variant. This is currently used only on the Source package name.
# Use 'android' for Android kernels ("downstream") or 'mainline' for upstream
# kernels.
VARIANT = android
# Kernel base version
KERNEL_BASE_VERSION = 4.4.153
# The kernel cmdline to use
KERNEL_BOOTIMAGE_CMDLINE = androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 sched_enable_hmp=1 sched_enable_power_aware=1 service_locator.enable=1 swiotlb=2048 androidboot.usbconfigfs=true androidboot.usbcontroller=a800000.dwc3 firmware_class.path=/vendor/firmware_mnt/image loop.max_part=7 buildvariant=user console=tty0 droidian.lvm.prefer
# Slug for the device vendor. This is going to be used in the KERNELRELASE
# and package names.
DEVICE_VENDOR = oneplus
# Slug for the device model. Like above.
DEVICE_MODEL = msm8998
# Slug for the device platform. If unsure, keep this commented.
#DEVICE_PLATFORM = platform
# Marketing-friendly full-name. This will be used inside package descriptions
DEVICE_FULL_NAME = OnePlus 5/5T
# Whether to use configuration fragments to augment the kernel configuration.
# If unsure, keep this to 0.
KERNEL_CONFIG_USE_FRAGMENTS = 0
# Whether to use diffconfig to generate the device-specific configuration.
# If you enable this, you should set KERNEL_CONFIG_USE_FRAGMENTS to 1.
# If unsure, keep this to 0.
KERNEL_CONFIG_USE_DIFFCONFIG = 0
# The diffconfig to apply. Only used when KERNEL_CONFIG_USE_DIFFCONFIG is
# enabled.
#KERNEL_PRODUCT_DIFFCONFIG = my_diffconfig
# Defconfig to use
KERNEL_DEFCONFIG = droidian_defconfig
# Whether to include DTBs with the image. Use 0 (no) or 1.
KERNEL_IMAGE_WITH_DTB = 1
# Path to the DTB
# If you leave this undefined, an attempt to find it automatically
# will be made.
KERNEL_IMAGE_DTB = arch/arm64/boot/dts/qcom/dumpling-v2.1-pvt.dtb
# Whether to include a DTB Overlay. Use 0 (no) or 1.
KERNEL_IMAGE_WITH_DTB_OVERLAY = 0
# Path to the DTB overlay.
# If you leave this undefined, an attempt to find it automatically
# will be made.
#KERNEL_IMAGE_DTB_OVERLAY = arch/arm64/boot/dts/qcom/my_overlay.dtbo
# Whether to include the DTB Overlay into the kernel image
# Use 0 (no, default) or 1.
# dtbo.img will always be shipped in the linux-bootimage- package.
KERNEL_IMAGE_WITH_DTB_OVERLAY_IN_KERNEL = 0
# Path to a specifc configuration file for mkdtboimg.
# The default is to leave it undefined.
#KERNEL_IMAGE_DTB_OVERLAY_CONFIGURATION = debian/custom_dtbo_config.cfg
# Path to the DTB directory. Only define if KERNEL_IMAGE_DTB_OVERLAY_CONFIGURATION
# is defined too.
#KERNEL_IMAGE_DTB_OVERLAY_DTB_DIRECTORY = arch/arm64/boot/dts/qcom
# Path to the prebuilt DT image. should only be defined on header version 1 and below.
# mostly used on samsung devices. default is to leave it undefined
#KERNEL_PREBUILT_DT = debian/dt.img
# Various other settings that will be passed straight to mkbootimg
KERNEL_BOOTIMAGE_PAGE_SIZE = 4096
KERNEL_BOOTIMAGE_BASE_OFFSET = 0x00000000
KERNEL_BOOTIMAGE_KERNEL_OFFSET = 0x00008000
KERNEL_BOOTIMAGE_INITRAMFS_OFFSET = 0x01000000
KERNEL_BOOTIMAGE_SECONDIMAGE_OFFSET = 0x00f00000
KERNEL_BOOTIMAGE_TAGS_OFFSET = 0x00000100
# Specify boot image security patch level if needed
#KERNEL_BOOTIMAGE_PATCH_LEVEL = 2022-04-05
# Required for header version 2, ignore otherwise
KERNEL_BOOTIMAGE_DTB_OFFSET = 0x1f00000
# Kernel bootimage version. Defaults to 0 (legacy header).
# As a rule of thumb:
# Devices launched with Android 8 and lower: version 0
# Devices launched with Android 9: version 1
# Devices launched with Android 10: version 2
# Devices launched with Android 11: version 2 or 3 (GKI)
KERNEL_BOOTIMAGE_VERSION = 1
########################################################################
# Android verified boot
########################################################################
# Whether to build a flashable vbmeta.img. Please note that currently
# only empty vbmeta images (disabling verified boot) can be generated.
# Use 0 (no) or 1 (default).
DEVICE_VBMETA_REQUIRED = 0
# Samsung devices require a special flag. Enable the following if your
# device is a Samsung device that requires flag 0 to be present
# Use 0 (no, default) or 1.
DEVICE_VBMETA_IS_SAMSUNG = 0
########################################################################
# Automatic flashing on package upgrades
########################################################################
# Whether to enable kernel upgrades on package upgrades. Use 0 (no) or 1.
FLASH_ENABLED = 1
# If your device is treble-ized, but aonly, you should set the following to
# 1 (yes).
FLASH_IS_AONLY = 0
# `flash-bootimage` defaults are enough for most recent devices, but legacy
# devices won't work out of the box.
# If you set the following to 1, this package will set `flash-bootimage`'s
# DEVICE_IS_AB and BOOTIMAGE_SLOT_A accordingly, thus enabling flashing
# on older devices.
#
# Do not enable if you don't know what you're doing
FLASH_IS_LEGACY_DEVICE = 1
# On some exynos devices partition names are capitalized (boot is BOOT and so on)
# This flag makes the kernel to get flashed to the correct partition on updates.
FLASH_IS_EXYNOS = 0
# Device manufacturer. This must match the `ro.product.vendor.manufacturer`
# Android property. If you don't want to specify this, leave it undefined,
# FLASH_INFO_CPU will be checked instead.
#FLASH_INFO_MANUFACTURER = Vendor
# Device model. This must match the `ro.product.vendor.model`
# Android property. If you don't want to specify this, leave it undefined,
# FLASH_INFO_CPU will be checked instead.
#FLASH_INFO_MODEL = Device1
# Device CPU. This will be grepped against /proc/cpuinfo to check if
# we're running on the specific device. Note this is a last-resort
# method, specifying FLASH_INFO_MANUFACTURER and FLASH_INFO_MODEL is
# recommended.
FLASH_INFO_CPU = Qualcomm Technologies, Inc MSM8998
# Space-separated list of supported device ids as reported by fastboot
FLASH_INFO_DEVICE_IDS = msm8998
########################################################################
# Kernel build settings
########################################################################
# Whether to cross-build. Use 0 (no) or 1.
BUILD_CROSS = 1
# (Cross-build only) The build triplet to use. You'll probably want to
# use aarch64-linux-android- if building Android kernels.
BUILD_TRIPLET = aarch64-linux-android-
# (Cross-build only) The build triplet to use with clang. You'll probably
# want to use aarch64-linux-gnu- here.
BUILD_CLANG_TRIPLET = aarch64-linux-gnu-
# The compiler to use. Recent Android kernels are built with clang.
BUILD_CC = aarch64-linux-android-gcc-4.9
# Extra paths to prepend to the PATH variable. You'll probably want
# to specify the clang path here (the default).
#BUILD_PATH = /usr/lib/llvm-android-6.0-4691093/bin
# Extra packages to add to the Build-Depends section. Mainline builds
# can have this section empty, unless cross-building.
# The default is enough to install the Android toolchain, including clang.
DEB_TOOLCHAIN = linux-initramfs-halium-generic:arm64, binutils-aarch64-linux-gnu, clang-android-6.0-4691093, gcc-4.9-aarch64-linux-android, g++-4.9-aarch64-linux-android, libgcc-4.9-dev-aarch64-linux-android-cross
# Where we're building on
DEB_BUILD_ON = amd64
# Where we're going to run this kernel on
DEB_BUILD_FOR = arm64
# Target kernel architecture
KERNEL_ARCH = arm64
# Kernel target to build
KERNEL_BUILD_TARGET = Image.gz

1
debian/path-override/python vendored Symbolic link
View file

@ -0,0 +1 @@
/opt/android/prebuilts/python/2.7.5/bin/python

6
debian/rules vendored Executable file
View file

@ -0,0 +1,6 @@
#!/usr/bin/make -f
include /usr/share/linux-packaging-snippets/kernel-snippet.mk
%:
dh $@

1
debian/source/format vendored Normal file
View file

@ -0,0 +1 @@
3.0 (native)