Skip to content

Commit

Permalink
add debian directory and kernel info
Browse files Browse the repository at this point in the history
  • Loading branch information
FakeShell committed Jul 1, 2022
1 parent 7788652 commit a594e55
Show file tree
Hide file tree
Showing 8 changed files with 54,052 additions and 0 deletions.
53,781 changes: 53,781 additions & 0 deletions debian/changelog

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
13
76 changes: 76 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
Source: linux-android-xiaomi-surya
Section: kernel
Priority: optional
Maintainer: Droidian porters <[email protected]>
Uploaders: Eugenio Paolantonio (g7) <[email protected]>,
r3vn <[email protected]>,
Erfan Abdi <[email protected]>,
Erik Inkinen <[email protected]>,
Build-Depends: build-essential,
dpkg-dev,
findutils,
python2,
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-xiaomi-surya
Vcs-Git: https://github.com/droidian/linux-android-xiaomi-surya.git

Package: linux-image-4.14.180-perf-xiaomi-surya
Architecture: arm64
Depends: ${misc:Depends}
Description: Linux kernel for Xiaomi Poco X3
This package contains the Linux kernel for the Xiaomi Poco X3 device.
.
Note: This package only ships the kernel image and modules, you should probably
look at the linux-bootimage-4.14.180-perf-xiaomi-surya package for a bootimage suitable
for Android boot loaders.

Package: linux-bootimage-4.14.180-perf-xiaomi-surya
Architecture: arm64
Pre-Depends: flash-bootimage (>= 4)
Depends: ${misc:Depends},
linux-image-4.14.180-perf-xiaomi-surya (= ${binary:Version})
Description: Linux kernel for Xiaomi Poco X3 - Android Boot Image
This package contains the Linux kernel for the Xiaomi Poco X3 device.
.
Note: This package ships an Android Boot Image bundled with Halium's
initramfs.

Package: linux-headers-4.14.180-perf-xiaomi-surya
Architecture: arm64
Depends: ${misc:Depends},
linux-image-4.14.180-perf-xiaomi-surya (= ${binary:Version})
Description: Linux kernel for Xiaomi Poco X3 - Headers
This package contains the Linux kernel headers for the Xiaomi Poco X3 device.

Package: linux-image-xiaomi-surya
Architecture: arm64
Depends: linux-image-4.14.180-perf-xiaomi-surya (= ${binary:Version})
Description: Linux kernel for Xiaomi Poco X3 (latest)
This package depends to the latest kernel image available for the Xiaomi Poco X3.

Package: linux-bootimage-xiaomi-surya
Architecture: arm64
Depends: linux-bootimage-4.14.180-perf-xiaomi-surya (= ${binary:Version})
Description: Linux kernel for Xiaomi Poco X3 - Android Boot Image (latest)
This package depends to the latest kernel bootimage available for the Xiaomi Poco X3.

Package: linux-headers-xiaomi-surya
Architecture: arm64
Depends: linux-headers-4.14.180-perf-xiaomi-surya (= ${binary:Version})
Description: Linux kernel for Xiaomi Poco X3 - Headers (latest)
This package depends to the latest kernel headers available for the Xiaomi Poco X3.
24 changes: 24 additions & 0 deletions debian/deviceinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
deviceinfo_name="Xiaomi Poco X3 / X3 NFC"
deviceinfo_manufacturer="Xiaomi"
deviceinfo_codename="surya"
deviceinfo_arch="aarch64"
deviceinfo_kernel_source="https://gitlab.com/ubports/community-ports/android10/xiaomi-poco-x3/kernel-xiaomi-surya.git"
deviceinfo_kernel_source_branch="halium-10.0"
deviceinfo_kernel_defconfig="surya_defconfig"
deviceinfo_kernel_cmdline="console=ttyMSM0,115200n8 earlycon=msm_geni_serial,0x4a90000 androidboot.hardware=qcom androidboot.console=ttyMSM0 androidboot.memcg=1 lpm_levels.sleep_disabled=1 video=vfb:640x400,bpp=32,memsize=3072000 msm_rtb.filter=0x237 service_locator.enable=1 swiotlb=2048 loop.max_part=7 buildvariant=user console=tty0 systempart=/dev/mapper/system"
deviceinfo_kernel_clang_compile="true"
deviceinfo_flash_pagesize="4096"
deviceinfo_flash_offset_base="0x00000000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x01000000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x00000100"
deviceinfo_flash_offset_dtb="0x01f00000"
deviceinfo_bootimg_qcdt="false"
deviceinfo_bootimg_header_version="2"
deviceinfo_bootimg_os_version="10"
deviceinfo_bootimg_os_patch_level="2021-05"
deviceinfo_bootimg_partition_size="134217728"
deviceinfo_rootfs_image_sector_size="4096"
deviceinfo_dtb="qcom/sdmmagpie.dtb"
deviceinfo_dtbo="qcom/sdmmagpie-idp-overlay.dtbo"
163 changes: 163 additions & 0 deletions debian/kernel-info.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
########################################################################
# 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.14.180-perf

# The kernel cmdline to use
KERNEL_BOOTIMAGE_CMDLINE = console=ttyMSM0,115200n8 earlycon=msm_geni_serial,0x4a90000 androidboot.hardware=qcom androidboot.console=ttyMSM0 androidboot.memcg=1 lpm_levels.sleep_disabled=1 video=vfb:640x400,bpp=32,memsize=3072000 msm_rtb.filter=0x237 service_locator.enable=1 swiotlb=2048 loop.max_part=7 buildvariant=user console=tty0

# Slug for the device vendor. This is going to be used in the KERNELRELASE
# and package names.
DEVICE_VENDOR = xiaomi

# Slug for the device model. Like above.
DEVICE_MODEL = surya

# Marketing-friendly full-name. This will be used inside package descriptions
DEVICE_FULL_NAME = Xiaomi Poco X3

# Defconfig to use
KERNEL_DEFCONFIG = surya_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/sdmmagpie.dtb

# Whether to include a DTB Overlay. Use 0 (no) or 1.
KERNEL_IMAGE_WITH_DTB_OVERLAY = 1

# Path to the DTB overlay.
# If you leave this undefined, an attempt to find it automatically
KERNEL_IMAGE_DTB_OVERLAY = arch/arm64/boot/dts/qcom/sdmmagpie-idp-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

# 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

# Required for header version 2, ignore otherwise
KERNEL_BOOTIMAGE_DTB_OFFSET = 0x01f00000

# 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 = 2

########################################################################
# 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 = 1

# 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 = 1

# `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 = 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 = Xiaomi

# 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 = M2007J20CG

# 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 = SDMMAGPIE

########################################################################
# 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 = clang

# 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
Binary file added debian/path-override/python
Binary file not shown.
6 changes: 6 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/make -f

include /usr/share/linux-packaging-snippets/kernel-snippet.mk

%:
dh $@
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (native)

0 comments on commit a594e55

Please sign in to comment.