summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2020-01-21 13:27:06 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2020-01-21 13:27:06 +0000
commitcad3153a7e6cdd647cb8eaeba8687bc1f99db055 (patch)
tree7c19026cdef677392969db8b1916a85cceb2728b
parent49286864729e2362868c91009183163a267db781 (diff)
downloadlh-bootstrap-cad3153a7e6cdd647cb8eaeba8687bc1f99db055.tar.xz
Small incremental build fixes (10)
-rw-r--r--sub/kernel/Makefile7
-rw-r--r--sub/kernel/Makefile.ncurses38
-rw-r--r--sub/kmod/Makefile2
3 files changed, 44 insertions, 3 deletions
diff --git a/sub/kernel/Makefile b/sub/kernel/Makefile
index 9b99073..16163a4 100644
--- a/sub/kernel/Makefile
+++ b/sub/kernel/Makefile
@@ -1,3 +1,4 @@
+include sub/kernel/Makefile.ncurses
KERNEL_VERSION ?= 5.4.13
KERNEL_MAJOR := $(firstword $(subst ., ,$(KERNEL_VERSION)))
@@ -27,9 +28,13 @@ $(OUTPUT)/build-host/kernel/.lh_unpacked: $(OUTPUT)/sources/linux-$(KERNEL_VERSI
$(OUTPUT)/build-host/kernel/.lh_configured: $(OUTPUT)/build-host/kernel/.lh_unpacked $(KERNEL_CONFIG) | $(OUTPUT)/build-build/.lh_skarnet_installed
exec setuidgid $(NORMALUSER) cp -f $(KERNEL_CONFIG) $(OUTPUT)/build-host/kernel/linux-$(KERNEL_VERSION)/.config
exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host/kernel/linux-$(KERNEL_VERSION) $(MAKE) olddefconfig $(KERNEL_ENV)
- exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host/kernel/linux-$(KERNEL_VERSION) $(MAKE) menuconfig $(KERNEL_ENV)
exec setuidgid $(NORMALUSER) s6-touch $@
+kernel-menuconfig: $(OUTPUT)/build-host/kernel/.lh_configured $(OUTPUT)/build-build/.lh_$(NCURSES_NAME)_installed | $(OUTPUT)/build-build/.lh_skarnet_installed
+ exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host/kernel/linux-$(KERNEL_VERSION) $(MAKE) menuconfig $(KERNEL_ENV) \
+ HOST_EXTRACFLAGS="-I$(OUTPUT)/build-build/opt/$(NCURSES_NAME)/include -DKBUILD_NO_NLS -DCURSES_LOC=\"<ncurses/ncurses.h>\"" \
+ HOST_LOADLIBES="-L$(OUTPUT)/build-build/opt/$(NCURSES_NAME)/ncurses/lib -static -lncurses"
+
$(OUTPUT)/build-host/kernel/.lh_prepared: | $(OUTPUT)/tmp/.lh_prepared $(OUTPUT)/build-build/.lh_skarnet_installed
exec s6-mkdir -p $(OUTPUT)/rootfs/opt/linux-kernel-headers-$(KERNEL_VERSION)
exec makenamelink $(OUTPUT)/rootfs/opt linux-kernel-headers linux-kernel-headers-$(KERNEL_VERSION) $(OUTPUT)/tmp
diff --git a/sub/kernel/Makefile.ncurses b/sub/kernel/Makefile.ncurses
new file mode 100644
index 0000000..6541803
--- /dev/null
+++ b/sub/kernel/Makefile.ncurses
@@ -0,0 +1,38 @@
+
+NCURSES_NAME := ncurses
+NCURSES_VERSION := 6.1-20200118
+NCURSES_URLDIR := https://invisible-mirror.net/archives/$(NCURSES_NAME)/current
+NCURSES_TAREXT := tgz
+NCURSES_TARLETTER := z
+
+NCURSES_CONFIGURE_OPTIONS := --without-ada --without-cxx-binding --without-manpages --without-progs --without-tack --without-tests --without-curses-h --disable-pc-files --without-shared --without-debug --without-profile --enable-rpath --disable-home-terminfo --enable-widec --with-pthread --enable-weak-symbols --without-develop --enable-reentrant --enable-symlinks
+NCURSES_CFLAGS := ""
+NCURSES_LDFLAGS := ""
+
+
+$(OUTPUT)/sources/$(NCURSES_NAME)-$(NCURSES_VERSION).$(NCURSES_TAREXT): | $(OUTPUT)/tmp/.lh_prepared $(OUTPUT)/build-build/.lh_skarnet_installed
+ exec setuidgid $(NORMALUSER) cd $(OUTPUT)/sources wget $(NCURSES_URLDIR)/$(NCURSES_NAME)-$(NCURSES_VERSION).$(NCURSES_TAREXT)
+
+$(OUTPUT)/sources/.lh_$(NCURSES_NAME)_dled: $(OUTPUT)/sources/$(NCURSES_NAME)-$(NCURSES_VERSION).$(NCURSES_TAREXT) | $(OUTPUT)/build-build/.lh_skarnet_installed
+ exec setuidgid $(NORMALUSER) s6-touch $@
+
+
+$(OUTPUT)/build-build/.lh_$(NCURSES_NAME)_copied: $(OUTPUT)/sources/.lh_$(NCURSES_NAME)_dled | $(OUTPUT)/build-build/.lh_skarnet_installed
+ exec setuidgid $(NORMALUSER) s6-rmrf $(OUTPUT)/build-build/opt/$(NCURSES_NAME)-$(NCURSES_VERSION)
+ exec setuidgid $(NORMALUSER) s6-mkdir -p $(OUTPUT)/build-build/opt/$(NCURSES_NAME)-$(NCURSES_VERSION)
+ exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-build/opt/$(NCURSES_NAME)-$(NCURSES_VERSION) tar $(NCURSES_TARLETTER)xpvf $(OUTPUT)/sources/$(NCURSES_NAME)-$(NCURSES_VERSION).$(NCURSES_TAREXT)
+ exec setuidgid $(NORMALUSER) s6-rename $(OUTPUT)/build-build/opt/$(NCURSES_NAME)-$(NCURSES_VERSION)/$(NCURSES_NAME)-$(NCURSES_VERSION) $(OUTPUT)/build-build/opt/$(NCURSES_NAME)-$(NCURSES_VERSION)/src
+ exec setuidgid $(NORMALUSER) s6-touch $@
+
+$(OUTPUT)/build-build/.lh_$(NCURSES_NAME)_configured: $(OUTPUT)/build-build/.lh_$(NCURSES_NAME)_copied | $(OUTPUT)/build-build/.lh_skarnet_installed
+ exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-build/opt/$(NCURSES_NAME)-$(NCURSES_VERSION)/src export CC "$(BUILD_BUILD_CC)" export CFLAGS $(NCURSES_CFLAGS) export LDFLAGS $(NCURSES_LDFLAGS) ./configure --prefix=$(OUTPUT)/build-build/opt/$(NCURSES_NAME)-$(NCURSES_VERSION) $(NCURSES_CONFIGURE_OPTIONS)
+ exec setuidgid $(NORMALUSER) s6-touch $@
+
+$(OUTPUT)/build-build/.lh_$(NCURSES_NAME)_built: $(OUTPUT)/build-build/.lh_$(NCURSES_NAME)_configured | $(OUTPUT)/build-build/.lh_skarnet_installed
+ exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-build/opt/$(NCURSES_NAME)-$(NCURSES_VERSION)/src $(MAKE)
+ exec setuidgid $(NORMALUSER) s6-touch $@
+
+$(OUTPUT)/build-build/.lh_$(NCURSES_NAME)_installed: $(OUTPUT)/build-build/.lh_$(NCURSES_NAME)_built | $(OUTPUT)/tmp/.lh_prepared $(OUTPUT)/build-build/.lh_skarnet_installed
+ exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-build/opt/$(NCURSES_NAME)-$(NCURSES_VERSION)/src $(MAKE) install
+ exec setuidgid $(NORMALUSER) makenamelink $(OUTPUT)/build-build/opt $(NCURSES_NAME) $(NCURSES_NAME)-$(NCURSES_VERSION) $(OUTPUT)/tmp
+ exec setuidgid $(NORMALUSER) s6-touch $@
diff --git a/sub/kmod/Makefile b/sub/kmod/Makefile
index 104981f..63737a9 100644
--- a/sub/kmod/Makefile
+++ b/sub/kmod/Makefile
@@ -1,5 +1,3 @@
-# TODO: the goal of all this seems to just have depmod available
-
KMOD_NAME := kmod
KMOD_VERSION := 26