summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/init-eth0/down1
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/init-eth0/up2
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/init-lo/dependencies1
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/init-lo/down1
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/init-lo/up1
-rw-r--r--sub/kernel/qemu-system-aarch64-config2
-rw-r--r--sub/kernel/qemu-system-arm-config2
-rw-r--r--sub/kernel/qemu-system-x86_64-config2
-rw-r--r--sub/skarnet.org/Makefile21
9 files changed, 28 insertions, 5 deletions
diff --git a/layout/rootfs/etc/s6-rc/source-base/init-eth0/down b/layout/rootfs/etc/s6-rc/source-base/init-eth0/down
index 5404b98..6733be4 100644
--- a/layout/rootfs/etc/s6-rc/source-base/init-eth0/down
+++ b/layout/rootfs/etc/s6-rc/source-base/init-eth0/down
@@ -1,2 +1,3 @@
foreground { ip link set dev eth0 down }
+foreground { bcnm-waitif -d 2 eth0 }
exit 0
diff --git a/layout/rootfs/etc/s6-rc/source-base/init-eth0/up b/layout/rootfs/etc/s6-rc/source-base/init-eth0/up
index 871558f..987a4af 100644
--- a/layout/rootfs/etc/s6-rc/source-base/init-eth0/up
+++ b/layout/rootfs/etc/s6-rc/source-base/init-eth0/up
@@ -1,3 +1,3 @@
-if { sleep 3 } # delay to load virtio-net
+if { bcnm-waitif 1 eth0 }
if { ip addr add 10.0.2.1/24 dev eth0 }
ip link set dev eth0 up
diff --git a/layout/rootfs/etc/s6-rc/source-base/init-lo/dependencies b/layout/rootfs/etc/s6-rc/source-base/init-lo/dependencies
index f4c707c..97749cc 100644
--- a/layout/rootfs/etc/s6-rc/source-base/init-lo/dependencies
+++ b/layout/rootfs/etc/s6-rc/source-base/init-lo/dependencies
@@ -1 +1,2 @@
init-sysctl
+init-coldplug
diff --git a/layout/rootfs/etc/s6-rc/source-base/init-lo/down b/layout/rootfs/etc/s6-rc/source-base/init-lo/down
index 06de595..5a85d32 100644
--- a/layout/rootfs/etc/s6-rc/source-base/init-lo/down
+++ b/layout/rootfs/etc/s6-rc/source-base/init-lo/down
@@ -1,2 +1,3 @@
foreground { ip link set dev lo down }
+foreground { bcnm-waitif -d 2 lo }
exit 0
diff --git a/layout/rootfs/etc/s6-rc/source-base/init-lo/up b/layout/rootfs/etc/s6-rc/source-base/init-lo/up
index 1a1beea..aa19a67 100644
--- a/layout/rootfs/etc/s6-rc/source-base/init-lo/up
+++ b/layout/rootfs/etc/s6-rc/source-base/init-lo/up
@@ -1,2 +1,3 @@
+if { bcnm-waitif 1 lo }
if { ip addr add 127.0.0.1/8 dev lo }
ip link set dev lo up
diff --git a/sub/kernel/qemu-system-aarch64-config b/sub/kernel/qemu-system-aarch64-config
index f05d1fb..9cb137c 100644
--- a/sub/kernel/qemu-system-aarch64-config
+++ b/sub/kernel/qemu-system-aarch64-config
@@ -1243,7 +1243,7 @@ CONFIG_VIRTIO_NET=m
#
# CONFIG_WAN is not set
# CONFIG_VMXNET3 is not set
-CONFIG_NET_FAILOVER=y
+CONFIG_NET_FAILOVER=m
# CONFIG_ISDN is not set
# CONFIG_NVM is not set
diff --git a/sub/kernel/qemu-system-arm-config b/sub/kernel/qemu-system-arm-config
index 9260a21..76af7fd 100644
--- a/sub/kernel/qemu-system-arm-config
+++ b/sub/kernel/qemu-system-arm-config
@@ -1200,7 +1200,7 @@ CONFIG_VIRTIO_NET=m
#
# CONFIG_WAN is not set
# CONFIG_VMXNET3 is not set
-CONFIG_NET_FAILOVER=y
+CONFIG_NET_FAILOVER=m
# CONFIG_ISDN is not set
# CONFIG_NVM is not set
diff --git a/sub/kernel/qemu-system-x86_64-config b/sub/kernel/qemu-system-x86_64-config
index 19a9c45..aa504a4 100644
--- a/sub/kernel/qemu-system-x86_64-config
+++ b/sub/kernel/qemu-system-x86_64-config
@@ -1204,7 +1204,7 @@ CONFIG_VIRTIO_NET=m
#
# CONFIG_WAN is not set
# CONFIG_VMXNET3 is not set
-CONFIG_NET_FAILOVER=y
+CONFIG_NET_FAILOVER=m
# CONFIG_ISDN is not set
# CONFIG_NVM is not set
diff --git a/sub/skarnet.org/Makefile b/sub/skarnet.org/Makefile
index 4430514..843fee5 100644
--- a/sub/skarnet.org/Makefile
+++ b/sub/skarnet.org/Makefile
@@ -14,6 +14,7 @@ S6_VERSION := 4ad28c83818e3b7b351ac328e3753d8dab8b2804
S6_RC_VERSION := 40939adadfae8f06835f202aca7d243210c25226
S6_LINUX_INIT_VERSION := 4e6634208509f5c67b4d5ad449db696b8e4b6c3d
MDEVD_VERSION := 7430c9be1d379ae1eb0626ec67968b6edcfbf7d6
+BCNM_VERSION := 55bc8fead207fcb2aafe414ce84073f147ebce39
SKARNET_CONF_STATIC := $(if $(filter true,$(BUILD_HOST_STATIC)),--disable-shared --enable-static-libc,--enable-shared --disable-allstatic)
SKARNET_ENV := $(if $(filter true,$(BUILD_HOST_STATIC)),,env LDFLAGS=-Wl,-rpath-link,$(OUTPUT)/rootfs/library.so)
@@ -401,5 +402,23 @@ $(OUTPUT)/build-host/.lh_mdevd_installed: $(OUTPUT)/build-host/.lh_mdevd_built |
exec setuidgid $(NORMALUSER) s6-touch $@
-$(OUTPUT)/build-host/.lh_skarnet_installed: $(OUTPUT)/build-host/.lh_skalibs_installed $(OUTPUT)/build-host/.lh_execline_installed $(OUTPUT)/build-host/.lh_s6dns_installed $(OUTPUT)/build-host/.lh_s6net_installed $(OUTPUT)/build-host/.lh_s6_installed $(OUTPUT)/build-host/.lh_s6rc_installed $(OUTPUT)/build-host/.lh_s6li_laidout $(OUTPUT)/build-host/.lh_s6lu_installed $(OUTPUT)/build-host/.lh_mdevd_installed | $(OUTPUT)/build-build/.lh_skarnet_installed
+$(OUTPUT)/build-host/.lh_bcnm_copied: $(OUTPUT)/sources/.lh_bcnm_cloned | $(OUTPUT)/build-build/.lh_skarnet_installed
+ exec setuidgid $(NORMALUSER) s6-rmrf $(OUTPUT)/build-host/bcnm
+ exec setuidgid $(NORMALUSER) s6-hiercopy $(OUTPUT)/sources/bcnm $(OUTPUT)/build-host/bcnm
+ exec setuidgid $(NORMALUSER) s6-touch $@
+
+$(OUTPUT)/build-host/.lh_bcnm_configured: $(OUTPUT)/build-host/.lh_bcnm_copied $(OUTPUT)/build-host/.lh_skalibs_installed | $(OUTPUT)/build-build/.lh_skarnet_installed
+ exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host/bcnm $(SKARNET_ENV) ./configure --host=$(TRIPLE) --enable-slashpackage $(SKARNET_CONF_STATIC) $(SKALIBS_FIND_OPTIONS)
+ exec setuidgid $(NORMALUSER) touch $@
+
+$(OUTPUT)/build-host/.lh_bcnm_built: $(OUTPUT)/build-host/.lh_bcnm_configured $(OUTPUT)/build-host/.lh_skalibs_installed | $(OUTPUT)/build-build/.lh_skarnet_installed
+ exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host/bcnm $(MAKE) all strip
+ exec setuidgid $(NORMALUSER) s6-touch $@
+
+$(OUTPUT)/build-host/.lh_bcnm_installed: $(OUTPUT)/build-host/.lh_bcnm_built | $(OUTPUT)/tmp/.lh_prepared $(OUTPUT)/build-build/.lh_skarnet_installed
+ exec cd $(OUTPUT)/build-host/bcnm $(MAKE) install update global-links DESTDIR=$(OUTPUT)/rootfs
+ exec setuidgid $(NORMALUSER) s6-touch $@
+
+
+$(OUTPUT)/build-host/.lh_skarnet_installed: $(OUTPUT)/build-host/.lh_skalibs_installed $(OUTPUT)/build-host/.lh_execline_installed $(OUTPUT)/build-host/.lh_s6dns_installed $(OUTPUT)/build-host/.lh_s6net_installed $(OUTPUT)/build-host/.lh_s6_installed $(OUTPUT)/build-host/.lh_s6rc_installed $(OUTPUT)/build-host/.lh_s6li_laidout $(OUTPUT)/build-host/.lh_s6lu_installed $(OUTPUT)/build-host/.lh_mdevd_installed $(OUTPUT)/build-host/.lh_bcnm_installed | $(OUTPUT)/build-build/.lh_skarnet_installed
exec setuidgid $(NORMALUSER) s6-touch $@