Moved kernel build out of world and into kernel subdir
Target for kernel build is once again buildkernel
This commit is contained in:
parent
f188741759
commit
3bc654a914
23
Makefile
23
Makefile
@ -59,11 +59,25 @@ toolsclean:
|
|||||||
|
|
||||||
.PHONY: toolsclean
|
.PHONY: toolsclean
|
||||||
|
|
||||||
buildworld: $(build)/.built $(plists)
|
buildworld: $(build)/.built
|
||||||
$(info $(grn)=== World build complete ===$(reset))
|
$(info $(grn)=== World build complete ===$(reset))
|
||||||
|
|
||||||
.PHONY: buildworld
|
.PHONY: buildworld
|
||||||
|
|
||||||
|
$(build)/.built: $(tooldir)/.built $(build)/.skeleton.built
|
||||||
|
$(MAKE) -C world
|
||||||
|
find $(build)/lib $(build)/usr/lib $(build)/usr/lib64 -name '*.la' -delete
|
||||||
|
touch $@
|
||||||
|
|
||||||
|
buildkernel: $(build)/.kernel.built
|
||||||
|
$(info $(grn)=== Kernel build complete ===$(reset))
|
||||||
|
|
||||||
|
.PHONY: buildkernel
|
||||||
|
|
||||||
|
$(build)/.kernel.built:
|
||||||
|
$(MAKE) -C kernel
|
||||||
|
touch $@
|
||||||
|
|
||||||
strip: $(build)/.stripped
|
strip: $(build)/.stripped
|
||||||
|
|
||||||
.PHONY: strip
|
.PHONY: strip
|
||||||
@ -74,11 +88,6 @@ $(build)/.stripped:
|
|||||||
/dev/null 2>&1 || true ; done
|
/dev/null 2>&1 || true ; done
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
$(build)/.built: $(tooldir)/.built $(build)/.skeleton.built
|
|
||||||
$(MAKE) -C world
|
|
||||||
find $(build)/lib $(build)/usr/lib $(build)/usr/lib64 -name '*.la' -delete
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
$(build)/.skeleton.built: | $(dirs)
|
$(build)/.skeleton.built: | $(dirs)
|
||||||
install -d -m 0750 $(build)/root
|
install -d -m 0750 $(build)/root
|
||||||
install -dv -m 1777 $(build)/tmp $(build)/var/tmp
|
install -dv -m 1777 $(build)/tmp $(build)/var/tmp
|
||||||
@ -87,7 +96,7 @@ $(build)/.skeleton.built: | $(dirs)
|
|||||||
#su -c "mknod -m 600 $(build)/dev/console c 5 1 && mknod -m 666 $(build)/dev/null c 1 3"
|
#su -c "mknod -m 600 $(build)/dev/console c 5 1 && mknod -m 666 $(build)/dev/null c 1 3"
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
$(plists): $(build)/.built
|
$(plists): $(build)/.built $(build)/.kernel.built
|
||||||
$(info $(grn)=== Creating plist ===$(reset))
|
$(info $(grn)=== Creating plist ===$(reset))
|
||||||
pkgname=base $(MAKE) -C $(build) -f $(include_dir)/create-plist.mk install
|
pkgname=base $(MAKE) -C $(build) -f $(include_dir)/create-plist.mk install
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ logdir ?= $(localstatedir)/log
|
|||||||
|
|
||||||
default_goal ?= install
|
default_goal ?= install
|
||||||
|
|
||||||
global_srcdir = $(basedir)/build/src-toolchain
|
global_srcdir = $(basedir)/build/src-toolchain-$(arch)
|
||||||
global_objdir = $(basedir)/build/obj-toolchain
|
global_objdir = $(basedir)/build/obj-toolchain-$(arch)
|
||||||
|
|
||||||
include src-config.mk
|
include src-config.mk
|
||||||
|
@ -20,7 +20,7 @@ else
|
|||||||
default_goal ?= finish
|
default_goal ?= finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
global_srcdir = $(basedir)/build/src-world
|
global_srcdir = $(basedir)/build/src-world-$(arch)
|
||||||
global_objdir = $(basedir)/build/obj-world
|
global_objdir = $(basedir)/build/obj-world-$(arch)
|
||||||
|
|
||||||
include src-config.mk
|
include src-config.mk
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
distname = linux
|
distname = linux
|
||||||
default_goal = installkernel
|
default_goal = installkernel
|
||||||
include world.mk
|
include world.mk
|
||||||
srcdir = $(basedir)/build/src-world/linux-$(linux_version)
|
srcdir = $(basedir)/build/src-world-$(arch)/linux-$(linux_version)
|
||||||
objdir = $(basedir)/build/obj-world/linux-$(linux_version)
|
objdir = $(basedir)/build/obj-world-$(arch)/linux-$(linux_version)
|
||||||
|
|
||||||
config ?= $(wkgdir)/config-$(arch)-$(linux_version).config
|
config ?= $(wkgdir)/config-$(arch)-$(linux_version).config
|
||||||
|
|
@ -5,12 +5,6 @@
|
|||||||
default_goal = all
|
default_goal = all
|
||||||
include src-config.mk
|
include src-config.mk
|
||||||
|
|
||||||
ifeq (${rpi},true)
|
|
||||||
kernel = linux-rpi
|
|
||||||
else
|
|
||||||
kernel = linux-mainline
|
|
||||||
endif
|
|
||||||
|
|
||||||
subdirs += fs_skeleton
|
subdirs += fs_skeleton
|
||||||
subdirs += man-pages
|
subdirs += man-pages
|
||||||
subdirs += iana-etc
|
subdirs += iana-etc
|
||||||
@ -88,7 +82,6 @@ subdirs += bin
|
|||||||
subdirs += sbin
|
subdirs += sbin
|
||||||
subdirs += usr.bin
|
subdirs += usr.bin
|
||||||
subdirs += usr.sbin
|
subdirs += usr.sbin
|
||||||
subdirs += $(kernel)
|
|
||||||
|
|
||||||
ifeq ($(arch),x86_64)
|
ifeq ($(arch),x86_64)
|
||||||
subdirs += grub
|
subdirs += grub
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
# Makefile - hhl - /usr/src/world/linux-headers
|
|
||||||
# Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com>
|
|
||||||
#
|
|
||||||
distname = linux
|
|
||||||
config_tgt = ${objdir}/Makefile
|
|
||||||
include world.mk
|
|
||||||
config_cmd = $(MAKE) -C ${srcdir} mrproper
|
|
||||||
build_cmd = KBUILD_OUTPUT=${objdir} $(MAKE) -C ${srcdir} headers
|
|
||||||
define post_build
|
|
||||||
find ${objdir}/usr/include -name '.*' -delete
|
|
||||||
rm -rf ${objdir}/usr/include/Makefile || true
|
|
||||||
endef
|
|
||||||
install_cmd = cp -r ${objdir}/usr/include/* /usr/include
|
|
||||||
|
|
||||||
include targets.mk
|
|
@ -1,51 +0,0 @@
|
|||||||
# 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
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user