Hitchhiker Linux source tree
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

51 lines
1.7 KiB

# Makefile - hhl - /usr/src/world/linux-rpi
# Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com>
distname = linux_rpi
default_goal = installkernel
include world.mk
srcdir = /src/linux_rpi-${linux_rpi_version}
objdir = /obj/linux_rpi-${linux_rpi_version}
config ?= ${wkgdir}/config-rpi4-5.4.45.config
installkernel: ${objdir}/.installed
buildkernel: ${objdir}/.built
${objdir}/.mrproper: ${srcdir}/.dirstamp ${objdir}/.dirstamp
$(MAKE) -C ${srcdir} mrproper
touch $@
${objdir}/.config: ${objdir}/.mrproper
$(info === Applying default kernel config ===)
cat ${config} > ${objdir}/.config
KBUILD_OUTPUT=${objdir} $(MAKE) -C ${srcdir} olddefconfig
${objdir}/.built: ${objdir}/.config
$(info === Building Linux kernel ===)
KBUILD_OUTPUT=${objdir} $(MAKE) ${makeflags} -C ${srcdir}
touch $@
${objdir}/.installed: ${objdir}/.built
$(info === Installing kernel modules ===)
KBUILD_OUTPUT=${objdir} $(MAKE) -C ${srcdir} modules_install
$(info === Installing kernel modules ===)
KBUILD_OUTPUT=${objdir} $(MAKE) -C ${srcdir} modules_install
$(info === Installing kernel ===)
install -m644 ${objdir}/arch/arm/boot/zImage /boot/vmlinuz-${linux_version}-${os_abbrev}-${os_version}
install -m644 ${objdir}/System.map /boot/System.map-${linux_version}
install -m644 ${objdir}/.config /boot/config-${linux_version}
$(info === Installing kernel documentation ===)
install -d ${docdir}/linux-${linux_rpi_version}
cp -r ${srcdir}/Documentation/* ${docdir}/linux-${linux_rpi_version}
touch $@
${objdir}/.dirstamp:
install -d ${objdir}
touch $@
${srcdir}/.dirstamp:
$(info === Extracting ${distlocal} ===)
tar -xJf ${distlocal} -C /src
touch $@
.PHONY: buildkernel installkernel