# Maintainer: 7Ji _desc="flippy's AArch64-focused fork aiming to increase usability" _pkgver_main=6.1.59 _pkgver_suffix=flippy _pkgver_uname="${_pkgver_main}-${_pkgver_suffix}" _flippy_repo='linux-6.1.y' _flippy_commit='e71978b8105e40e6f9db9aecf1c89546874ad150' _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=1 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=( '1c2fd2977c2764adf2cdb6f323b24f9b7ead4c007351f5f3ef47d6dc2f965e57' 'fec686b999bc6924248da94b205755031df799030e09c48e26ce34f243aeb211' 'bdcd6cbf19284b60fac6d6772f1e0ec2e2fe03ce7fe3d7d16844dd6d2b5711f3' ) prepare() { cd "${_srcname}" 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: firmware images needed for some devices' 'linux-firmware-amlogic-ophub: complete firmware set for devices with 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/$(