fixed network issue, fixed docker start issue
This commit is contained in:
26
board/qemu/x86_64/post-build.sh
Normal file → Executable file
26
board/qemu/x86_64/post-build.sh
Normal file → Executable file
@@ -1,11 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -u
|
||||
set -e
|
||||
|
||||
# Add a console on tty1
|
||||
if [ -e ${TARGET_DIR}/etc/inittab ]; then
|
||||
grep -qE '^tty1::' ${TARGET_DIR}/etc/inittab || \
|
||||
sed -i '/GENERIC_SERIAL/a\
|
||||
tty1::respawn:/sbin/getty -L tty1 0 vt100 # QEMU graphical window' ${TARGET_DIR}/etc/inittab
|
||||
fi
|
||||
# echo "[nimux] Enabling getty on tty1 (graphical) and ttyS0 (serial)..."
|
||||
|
||||
# # Ensure target directories exist
|
||||
# mkdir -p "${TARGET_DIR}/etc/systemd/system/getty.target.wants"
|
||||
|
||||
# # Create or refresh symlinks for tty1 and ttyS0 getty services
|
||||
# ln -sf /usr/lib/systemd/system/getty@.service \
|
||||
# "${TARGET_DIR}/etc/systemd/system/getty.target.wants/getty@tty1.service"
|
||||
|
||||
# ln -sf /usr/lib/systemd/system/getty@.service \
|
||||
# "${TARGET_DIR}/etc/systemd/system/getty.target.wants/getty@ttyS0.service"
|
||||
|
||||
# # Optional: also ensure getty.target is enabled (some minimal setups need this)
|
||||
# mkdir -p "${TARGET_DIR}/etc/systemd/system/multi-user.target.wants"
|
||||
# ln -sf /usr/lib/systemd/system/getty.target \
|
||||
# "${TARGET_DIR}/etc/systemd/system/multi-user.target.wants/getty.target"
|
||||
|
||||
# echo "[nimux] Getty services linked successfully."
|
||||
Reference in New Issue
Block a user