Added comments for kernel-extra

This commit is contained in:
2026-03-22 03:24:00 +08:00
parent 64970aa459
commit 0091b86cf5
7 changed files with 370 additions and 23 deletions

View File

@@ -1,3 +1,19 @@
#!/bin/bash
mkdir -p "$ROOTFS/var/cache/apk"
mkdir -p "$ROOTFS/build"
mount --bind /var/cache/apk "$ROOTFS/var/cache/apk"
mount --bind /dev "$ROOTFS/dev"
mount --bind /proc "$ROOTFS/proc"
mount --bind /sys "$ROOTFS/sys"
mount --bind /run "$ROOTFS/run"
cp /usr/bin/qemu-aarch64-static "$ROOTFS/usr/bin/"
cp /etc/resolv.conf "$ROOTFS/etc/resolv.conf"
cp /build/crio.tar.gz "$ROOTFS/build/"
chroot "$ROOTFS" /bin/sh -c "ln -s /var/cache/apk /etc/apk/cache"
# chroot "$ROOTFS" /bin/sh -c "apk update"
chroot "$ROOTFS" /bin/sh -c "apk add bash curl"
cp "/install-packages.sh" "$ROOTFS/install-packages.sh"
chroot "$ROOTFS" /bin/bash /install-packages.sh

33
alpine/install-packages.sh Executable file
View File

@@ -0,0 +1,33 @@
#!/bin/bash
cd /build
### CRI-O
tar zxf crio.tar.gz
cd cri-o
./install
crio --version
crio config 2>&1 > /dev/null
if [ $? -ne 0 ]; then
crio config
exit $?
fi
#grep -nE 'conmon|default_runtime|runtime_path|monitor-path|pinns_path' /etc/crio/crio.conf.d/10-crio.conf
#crio config | grep -E 'conmon|default_runtime|runtime_path|pinns_path|network_dir|plugin_dirs|cgroup_manager'
echo "--------------"
sed -i "s/default_runtime = \"crun\"/\0\ncgroup_manager = \"cgroupfs\"/g" /etc/crio/crio.conf.d/10-crio.conf
cat /etc/crio/crio.conf.d/10-crio.conf
mkdir -p /var/run/crio
mkdir -p /var/lib/containers/storage
mkdir -p /var/lib/cni
mkdir -p /etc/cni/net.d
mkdir -p /opt/cni/bin
mkdir -p /run/crun
mkdir -p /run/runc
crio --log-level debug

View File

@@ -1,16 +0,0 @@
#!/bin/bash
mkdir -p "$ROOTFS/var/cache/apk"
mount --bind /var/cache/apk "$ROOTFS/var/cache/apk"
mount --bind /dev "$ROOTFS/dev"
mount --bind /proc "$ROOTFS/proc"
mount --bind /sys "$ROOTFS/sys"
mount --bind /run "$ROOTFS/run"
cp /usr/bin/qemu-aarch64-static "$ROOTFS/usr/bin/"
cp /etc/resolv.conf "$ROOTFS/etc/resolv.conf"
chroot "$ROOTFS" /bin/sh -c "ln -s /var/cache/apk /etc/apk/cache"
chroot "$ROOTFS" /bin/sh -c "apk update; apk add bash curl"
cp "/build-rootfs.sh" "$ROOTFS/build-rootfs.sh"
chroot "$ROOTFS" /bin/bash /build-rootfs.sh