refactor(steps-guix): align linux64 handover with upstream jump flow and end with shared after

This commit is contained in:
vxtls 2026-02-23 14:54:36 -05:00
parent 6c2fd501ed
commit 0b53827ca7
4 changed files with 5 additions and 6 deletions

View file

@ -0,0 +1,4 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-3.0-or-later
exec /steps/improve/after.sh

View file

@ -1,32 +0,0 @@
#!/bin/bash
#
# SPDX-FileCopyrightText: 2026 Luo Yanpan
#
# SPDX-License-Identifier: GPL-3.0-or-later
set -e
new_kernel="/boot/vmlinuz-linux64"
current_kernel="/boot/vmlinuz"
backup_kernel="/boot/vmlinuz-32bit.backup"
if [ ! -f "${new_kernel}" ]; then
echo "Missing new kernel image: ${new_kernel}" >&2
exit 1
fi
if [ -f "${current_kernel}" ]; then
cp -af "${current_kernel}" "${backup_kernel}"
fi
cp -af "${new_kernel}" "${current_kernel}"
sync
mkdir -p /etc
if [ "${BARE_METAL}" = True ]; then
kexec -l "${current_kernel}" \
--append="root=/dev/sda1 init=/init rw rootwait"
else
kexec -l "${current_kernel}" --console-serial \
--append="console=ttyS0 root=/dev/sda1 init=/init rw rootwait"
fi
kexec -e