Fix module dependency resolution for clean builds
- Use container modules from kernel_modules stage for dependency resolution - Remove dependency on initramfs modules that haven't been copied yet - Fixes regression where clean builds had empty stage1.list - Dependency resolution now works correctly in clean build scenarios
This commit is contained in:
2
config/zinit.old/cgroup.yaml
Normal file
2
config/zinit.old/cgroup.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
exec: sh /etc/zinit/init/cgroup.sh
|
||||
oneshot: true
|
||||
1
config/zinit.old/depmod.yaml
Normal file
1
config/zinit.old/depmod.yaml
Normal file
@@ -0,0 +1 @@
|
||||
exec: depmod -a
|
||||
2
config/zinit.old/getty.yaml
Normal file
2
config/zinit.old/getty.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
exec: /sbin/getty -L 115200 ttyS0 vt100
|
||||
restart: always
|
||||
2
config/zinit.old/gettyconsole.yaml
Normal file
2
config/zinit.old/gettyconsole.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
exec: /sbin/getty console linux
|
||||
restart: always
|
||||
2
config/zinit.old/haveged.yaml
Normal file
2
config/zinit.old/haveged.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
exec: haveged -w 1024 -d 32 -i 32 -v 1
|
||||
oneshot: true
|
||||
6
config/zinit.old/init/ashloging.sh
Executable file
6
config/zinit.old/init/ashloging.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "start ash terminal"
|
||||
while true; do
|
||||
getty -l /bin/ash -n 19200 tty2
|
||||
done
|
||||
10
config/zinit.old/init/cgroup.sh
Executable file
10
config/zinit.old/init/cgroup.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
set -x
|
||||
|
||||
mount -t tmpfs cgroup_root /sys/fs/cgroup
|
||||
|
||||
subsys="pids cpuset cpu cpuacct blkio memory devices freezer net_cls perf_event net_prio hugetlb"
|
||||
|
||||
for sys in $subsys; do
|
||||
mkdir -p /sys/fs/cgroup/$sys
|
||||
mount -t cgroup $sys -o $sys /sys/fs/cgroup/$sys/
|
||||
done
|
||||
10
config/zinit.old/init/modprobe.sh
Executable file
10
config/zinit.old/init/modprobe.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
modprobe fuse
|
||||
modprobe btrfs
|
||||
modprobe tun
|
||||
modprobe br_netfilter
|
||||
|
||||
echo never > /sys/kernel/mm/transparent_hugepage/enabled
|
||||
|
||||
ulimit -n 524288
|
||||
10
config/zinit.old/init/ntpd.sh
Executable file
10
config/zinit.old/init/ntpd.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
ntp_flags=$(grep -o 'ntp=.*' /proc/cmdline | sed 's/^ntp=//')
|
||||
|
||||
params=""
|
||||
if [ -n "$ntp_flags" ]; then
|
||||
params=$(echo "-p $ntp_flags" | sed s/,/' -p '/g)
|
||||
fi
|
||||
|
||||
exec ntpd -n $params
|
||||
4
config/zinit.old/init/routing.sh
Executable file
4
config/zinit.old/init/routing.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Enable ip forwarding"
|
||||
echo 1 > /proc/sys/net/ipv4/ip_forward
|
||||
3
config/zinit.old/init/shm.sh
Executable file
3
config/zinit.old/init/shm.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
mkdir /dev/shm
|
||||
mount -t tmpfs shm /dev/shm
|
||||
15
config/zinit.old/init/sshd-setup.sh
Executable file
15
config/zinit.old/init/sshd-setup.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/ash
|
||||
if [ -f /etc/ssh/ssh_host_rsa_key ]; then
|
||||
# ensure existing file permissions
|
||||
chown root:root /etc/ssh/ssh_host_*
|
||||
chmod 600 /etc/ssh/ssh_host_*
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Setting up sshd"
|
||||
mkdir -p /run/sshd
|
||||
|
||||
ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa
|
||||
ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa
|
||||
ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t ecdsa -b 521
|
||||
ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t ed25519
|
||||
4
config/zinit.old/init/udev.sh
Executable file
4
config/zinit.old/init/udev.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
udevadm trigger --action=add
|
||||
udevadm settle
|
||||
2
config/zinit.old/lo.yaml
Normal file
2
config/zinit.old/lo.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
exec: ip l set lo up
|
||||
oneshot: true
|
||||
2
config/zinit.old/local-modprobe.yaml
Normal file
2
config/zinit.old/local-modprobe.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
exec: sh /etc/zinit/init/modprobe.sh
|
||||
oneshot: true
|
||||
6
config/zinit.old/mycelium.yaml
Normal file
6
config/zinit.old/mycelium.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
exec: /usr/bin/mycelium --key-file /tmp/mycelium_priv_key.bin
|
||||
--tun-name my0 --silent --peers tcp://188.40.132.242:9651 tcp://136.243.47.186:9651
|
||||
tcp://185.69.166.7:9651 tcp://185.69.166.8:9651 tcp://65.21.231.58:9651 tcp://65.109.18.113:9651
|
||||
tcp://209.159.146.190:9651 tcp://5.78.122.16:9651 tcp://5.223.43.251:9651 tcp://142.93.217.194:9651
|
||||
after:
|
||||
- network
|
||||
5
config/zinit.old/network.yaml
Normal file
5
config/zinit.old/network.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
exec: dhcpcd eth0
|
||||
after:
|
||||
- depmod
|
||||
- udevd
|
||||
- udev-trigger
|
||||
3
config/zinit.old/ntp.yaml
Normal file
3
config/zinit.old/ntp.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
exec: sh /etc/zinit/init/ntpd.sh
|
||||
after:
|
||||
- network
|
||||
2
config/zinit.old/routing.yaml
Normal file
2
config/zinit.old/routing.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
exec: sh /etc/zinit/init/routing.sh
|
||||
oneshot: true
|
||||
2
config/zinit.old/shm.yaml
Normal file
2
config/zinit.old/shm.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
exec: /etc/zinit/init/shm.sh
|
||||
oneshot: true
|
||||
2
config/zinit.old/sshd-setup.yaml
Normal file
2
config/zinit.old/sshd-setup.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
exec: sh /etc/zinit/init/sshd-setup.sh
|
||||
oneshot: true
|
||||
3
config/zinit.old/sshd.yaml
Normal file
3
config/zinit.old/sshd.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
exec: /usr/sbin/sshd -D -e
|
||||
after:
|
||||
- sshd-setup
|
||||
6
config/zinit.old/udev-trigger.yaml
Normal file
6
config/zinit.old/udev-trigger.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
exec: sh /etc/zinit/init/udev.sh
|
||||
oneshot: true
|
||||
after:
|
||||
- depmod
|
||||
- udevmon
|
||||
- udevd
|
||||
1
config/zinit.old/udevd.yaml
Normal file
1
config/zinit.old/udevd.yaml
Normal file
@@ -0,0 +1 @@
|
||||
exec: udevd
|
||||
1
config/zinit.old/udevmon.yaml
Normal file
1
config/zinit.old/udevmon.yaml
Normal file
@@ -0,0 +1 @@
|
||||
exec: udevadm monitor
|
||||
33
config/zinit.old/zinit.conf
Normal file
33
config/zinit.old/zinit.conf
Normal file
@@ -0,0 +1,33 @@
|
||||
# Main zinit configuration for Zero OS Alpine
|
||||
# This replaces OpenRC completely
|
||||
|
||||
# Logging configuration
|
||||
log_level: debug
|
||||
log_file: /var/log/zinit/zinit.log
|
||||
|
||||
# Initialization phases
|
||||
init:
|
||||
# Phase 1: Critical system setup
|
||||
- stage1-modules
|
||||
- udevd
|
||||
- depmod
|
||||
|
||||
# Phase 2: Extended hardware and networking
|
||||
- stage2-modules
|
||||
- network
|
||||
- lo
|
||||
|
||||
# Phase 3: System services
|
||||
- routing
|
||||
- ntp
|
||||
- haveged
|
||||
|
||||
# Phase 4: User services
|
||||
- sshd-setup
|
||||
- sshd
|
||||
- getty
|
||||
- console
|
||||
- gettyconsole
|
||||
|
||||
# Service dependencies and ordering managed by individual service files
|
||||
# All services are defined in the services/ subdirectory
|
||||
Reference in New Issue
Block a user