# Maintainer: 7Ji _desc="flippy's AArch64-focused fork aiming to increase usability" _pkgver_main=6.1.12 _pkgver_suffix=flippy _pkgver_uname="${_pkgver_main}-${_pkgver_suffix}" _flippy_repo='linux-6.1.y' _flippy_commit='29c263d9c3e5ce3c9099bd35d79dcb1eedbca99c' _srcname="${_flippy_repo}-${_flippy_commit}" pkgbase=linux-aarch64-flippy pkgname=( "${pkgbase}" "${pkgbase}-headers" "${pkgbase}-dtb-allwinner" "${pkgbase}-dtb-amlogic" "${pkgbase}-dtb-rockchip" ) pkgver="${_pkgver_main}" pkgrel=2 arch=('aarch64') url="https://github.com/unifreq/${_flippy_repo}" license=('GPL2') makedepends=( # Since we don't build the doc, most of the makedeps for other linux packages are not needed here 'kmod' 'bc' 'dtc' 'uboot-tools' ) options=(!strip) source=( "${_srcname}.tar.gz::${url}/archive/${_flippy_commit}.tar.gz" 'config' 'linux.preset' ) sha256sums=( '2b287393501be50f6574a43f6eb56b3e001b11ab2aa8d43219de6de3fec18e51' '9d71748237b52a5ac977fdfb7589224194dfc396fe5f13c5f32355ace5efde5c' 'bdcd6cbf19284b60fac6d6772f1e0ec2e2fe03ce7fe3d7d16844dd6d2b5711f3' ) prepare() { cd "${_srcname}" # echo "Patching kernel..." # git apply -v "../${source[3]}" echo "Setting version..." scripts/setlocalversion --save-scmversion echo "-$pkgrel" > localversion.10-pkgrel echo "${pkgbase#linux}" > localversion.20-pkgname # Prepare the configuration file cat "${srcdir}/config" > '.config' } build() { cd "${_srcname}" # get kernel version, which will be used later for modules make prepare make -s kernelrelease > version # Host LDFLAGS or other LDFLAGS set by makepkg/user is not helpful for building kernel: it should links nothing outside of itself unset LDFLAGS # Only need normal Image, as most Amlogic devices does not need/support Image.gz # Image and modules are built in the same run to make sure they're compatible with each other # -@ enables symbols in dtbs, so overlay is possible make ${MAKEFLAGS} DTC_FLAGS="-@" Image modules dtbs } _dtb_common_pkg="${pkgbase}-dtb" package_linux-aarch64-flippy() { pkgdesc="The Linux Kernel and module - ${_desc}" depends=( "${_dtb_common_pkg}" 'coreutils' 'initramfs' 'kmod' ) optdepends=( 'uboot-legacy-initrd-hooks: to generate uboot legacy initrd images' 'linux-firmware-amlogic-ophub: firmware for Amlogic SoCs' 'wireless-regdb: to set the correct wireless channels of your country' "${pkgbase}-dtb-allwinner: dtbs for Allwinner SoCs" "${pkgbase}-dtb-amlogic: dtbs for Amlogic SoCs" "${pkgbase}-dtb-rockchip: dtbs for Rockchip SoCs" ) backup=( "etc/mkinitcpio.d/${pkgbase}.preset" ) cd "${_srcname}" # Install modules echo "Installing modules..." make INSTALL_MOD_PATH="${pkgdir}/usr" INSTALL_MOD_STRIP=1 modules_install # Install DTBs, not to target pkg, but in srcdir, so the later package() routine could use them make INSTALL_DTBS_PATH="${srcdir}/dtbs" dtbs_install # Install pkgbase local _dir_module="${pkgdir}/usr/lib/modules/$(