mirror of
https://github.com/RROrg/rr.git
synced 2025-06-21 05:51:05 +08:00
Merge pull request #480 from fbelavenuto/kexec
Changing to execute kexec on poweroff
This commit is contained in:
commit
2c1a45f356
@ -47,6 +47,7 @@ function compile-module {
|
|||||||
echo "Platform ${1} not found."
|
echo "Platform ${1} not found."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
unset VALID
|
||||||
echo -e "Compiling module for \033[7m${PLATFORM}-${KVER}\033[0m..."
|
echo -e "Compiling module for \033[7m${PLATFORM}-${KVER}\033[0m..."
|
||||||
cp -R /input /tmp
|
cp -R /input /tmp
|
||||||
export-vars ${PLATFORM}
|
export-vars ${PLATFORM}
|
||||||
|
@ -17,8 +17,10 @@ CONFIG_CGROUP_SCHED=y
|
|||||||
CONFIG_CGROUP_FREEZER=y
|
CONFIG_CGROUP_FREEZER=y
|
||||||
CONFIG_CPUSETS=y
|
CONFIG_CPUSETS=y
|
||||||
CONFIG_CGROUP_CPUACCT=y
|
CONFIG_CGROUP_CPUACCT=y
|
||||||
|
CONFIG_NAMESPACES=y
|
||||||
CONFIG_BLK_DEV_INITRD=y
|
CONFIG_BLK_DEV_INITRD=y
|
||||||
CONFIG_KALLSYMS_ALL=y
|
CONFIG_KALLSYMS_ALL=y
|
||||||
|
CONFIG_EMBEDDED=y
|
||||||
# CONFIG_COMPAT_BRK is not set
|
# CONFIG_COMPAT_BRK is not set
|
||||||
CONFIG_PROFILING=y
|
CONFIG_PROFILING=y
|
||||||
CONFIG_SMP=y
|
CONFIG_SMP=y
|
||||||
@ -31,8 +33,6 @@ CONFIG_NUMA=y
|
|||||||
CONFIG_X86_CHECK_BIOS_CORRUPTION=y
|
CONFIG_X86_CHECK_BIOS_CORRUPTION=y
|
||||||
# CONFIG_MTRR_SANITIZER is not set
|
# CONFIG_MTRR_SANITIZER is not set
|
||||||
CONFIG_EFI=y
|
CONFIG_EFI=y
|
||||||
CONFIG_EFI_STUB=y
|
|
||||||
CONFIG_EFI_MIXED=y
|
|
||||||
CONFIG_HZ_1000=y
|
CONFIG_HZ_1000=y
|
||||||
CONFIG_KEXEC=y
|
CONFIG_KEXEC=y
|
||||||
CONFIG_CRASH_DUMP=y
|
CONFIG_CRASH_DUMP=y
|
||||||
@ -362,15 +362,27 @@ CONFIG_AGP_INTEL=y
|
|||||||
CONFIG_DRM=y
|
CONFIG_DRM=y
|
||||||
CONFIG_FB=y
|
CONFIG_FB=y
|
||||||
CONFIG_FIRMWARE_EDID=y
|
CONFIG_FIRMWARE_EDID=y
|
||||||
CONFIG_FB_TILEBLITTING=y
|
CONFIG_FB_MODE_HELPERS=y
|
||||||
CONFIG_FB_VGA16=m
|
|
||||||
CONFIG_FB_UVESA=m
|
|
||||||
CONFIG_FB_VESA=y
|
CONFIG_FB_VESA=y
|
||||||
CONFIG_FB_EFI=y
|
CONFIG_FB_EFI=y
|
||||||
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
||||||
|
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||||
CONFIG_HIDRAW=y
|
CONFIG_HIDRAW=y
|
||||||
|
CONFIG_HID_A4TECH=y
|
||||||
|
CONFIG_HID_APPLE=y
|
||||||
|
CONFIG_HID_BELKIN=y
|
||||||
|
CONFIG_HID_CHERRY=y
|
||||||
|
CONFIG_HID_CHICONY=y
|
||||||
|
CONFIG_HID_CYPRESS=y
|
||||||
|
CONFIG_HID_EZKEY=y
|
||||||
CONFIG_HID_GYRATION=y
|
CONFIG_HID_GYRATION=y
|
||||||
|
CONFIG_HID_ITE=y
|
||||||
|
CONFIG_HID_KENSINGTON=y
|
||||||
|
CONFIG_HID_LOGITECH=y
|
||||||
CONFIG_LOGITECH_FF=y
|
CONFIG_LOGITECH_FF=y
|
||||||
|
CONFIG_HID_REDRAGON=y
|
||||||
|
CONFIG_HID_MICROSOFT=y
|
||||||
|
CONFIG_HID_MONTEREY=y
|
||||||
CONFIG_HID_NTRIG=y
|
CONFIG_HID_NTRIG=y
|
||||||
CONFIG_HID_PANTHERLORD=y
|
CONFIG_HID_PANTHERLORD=y
|
||||||
CONFIG_PANTHERLORD_FF=y
|
CONFIG_PANTHERLORD_FF=y
|
||||||
@ -473,7 +485,6 @@ CONFIG_SYSTEM_TRUSTED_KEYRING=y
|
|||||||
CONFIG_CRC_CCITT=y
|
CONFIG_CRC_CCITT=y
|
||||||
CONFIG_PRINTK_TIME=y
|
CONFIG_PRINTK_TIME=y
|
||||||
CONFIG_MAGIC_SYSRQ=y
|
CONFIG_MAGIC_SYSRQ=y
|
||||||
CONFIG_DEBUG_KERNEL=y
|
|
||||||
CONFIG_DEBUG_STACK_USAGE=y
|
CONFIG_DEBUG_STACK_USAGE=y
|
||||||
# CONFIG_SCHED_DEBUG is not set
|
# CONFIG_SCHED_DEBUG is not set
|
||||||
CONFIG_SCHEDSTATS=y
|
CONFIG_SCHEDSTATS=y
|
||||||
|
@ -43,3 +43,4 @@ ttyS0::askfirst:/sbin/agetty -a root ttyS0 115200 linux
|
|||||||
::shutdown:/etc/init.d/rcK
|
::shutdown:/etc/init.d/rcK
|
||||||
::shutdown:/sbin/swapoff -a
|
::shutdown:/sbin/swapoff -a
|
||||||
::shutdown:/bin/umount -a -r
|
::shutdown:/bin/umount -a -r
|
||||||
|
::shutdown:/usr/sbin/kexec -e -a
|
||||||
|
@ -154,7 +154,6 @@ if [ "${EFI_BUG}" = "yes" -a ${EFI} -eq 1 ]; then
|
|||||||
else
|
else
|
||||||
kexec -l "${MOD_ZIMAGE_FILE}" --initrd "${MOD_RDGZ_FILE}" --command-line="${CMDLINE_LINE}" >"${LOG_FILE}" 2>&1 || dieLog
|
kexec -l "${MOD_ZIMAGE_FILE}" --initrd "${MOD_RDGZ_FILE}" --command-line="${CMDLINE_LINE}" >"${LOG_FILE}" 2>&1 || dieLog
|
||||||
fi
|
fi
|
||||||
/sbin/swapoff -a >/dev/null 2>&1 || true
|
|
||||||
/bin/umount -a -r >/dev/null 2>&1 || true
|
|
||||||
echo -e "\033[1;37mBooting...\033[0m"
|
echo -e "\033[1;37mBooting...\033[0m"
|
||||||
kexec -e -a >"${LOG_FILE}" 2>&1 || dieLog
|
poweroff
|
||||||
|
while true; do sleep 1; done # infinity loop
|
||||||
|
BIN
files/board/arpl/p1/grub/fonts/unicode.pf2
Normal file
BIN
files/board/arpl/p1/grub/fonts/unicode.pf2
Normal file
Binary file not shown.
@ -1,15 +1,50 @@
|
|||||||
|
insmod search
|
||||||
insmod echo
|
insmod echo
|
||||||
insmod terminal
|
insmod terminal
|
||||||
insmod test
|
insmod test
|
||||||
|
insmod font
|
||||||
terminal_input console
|
insmod loadenv
|
||||||
terminal_output console
|
insmod serial
|
||||||
|
insmod usb_keyboard
|
||||||
|
insmod linux
|
||||||
|
insmod gzio
|
||||||
|
insmod fat
|
||||||
|
insmod ext2
|
||||||
|
|
||||||
set default="boot"
|
set default="boot"
|
||||||
set timeout="5"
|
set timeout="5"
|
||||||
set timeout_style="menu"
|
set timeout_style="menu"
|
||||||
|
|
||||||
insmod loadenv
|
function load_video {
|
||||||
|
if [ x$feature_all_video_module = xy ]; then
|
||||||
|
insmod all_video
|
||||||
|
else
|
||||||
|
insmod efi_gop
|
||||||
|
insmod efi_uga
|
||||||
|
insmod ieee1275_fb
|
||||||
|
insmod vbe
|
||||||
|
insmod vga
|
||||||
|
insmod video_bochs
|
||||||
|
insmod video_cirrus
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
if loadfont unicode ; then
|
||||||
|
set gfxmode=auto
|
||||||
|
load_video
|
||||||
|
insmod gfxterm
|
||||||
|
#set gfxpayload=800x600
|
||||||
|
fi
|
||||||
|
terminal_output gfxterm
|
||||||
|
|
||||||
|
#set menu_color_normal=cyan/blue
|
||||||
|
#set menu_color_highlight=white/blue
|
||||||
|
|
||||||
|
if serial --unit=0 --speed=115200; then
|
||||||
|
terminal_input --append serial_com0
|
||||||
|
terminal_output --append serial_com0
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -s $prefix/grubenv ]; then
|
if [ -s $prefix/grubenv ]; then
|
||||||
load_env
|
load_env
|
||||||
fi
|
fi
|
||||||
@ -22,34 +57,18 @@ if [ "${next_entry}" ]; then
|
|||||||
save_env next_entry
|
save_env next_entry
|
||||||
fi
|
fi
|
||||||
|
|
||||||
insmod usb_keyboard
|
|
||||||
insmod part_msdos
|
|
||||||
insmod ext2
|
|
||||||
insmod fat
|
|
||||||
insmod linux
|
|
||||||
insmod gzio
|
|
||||||
|
|
||||||
set gfxmode=auto
|
|
||||||
if [ "${grub_platform}" = "efi" ]; then
|
|
||||||
insmod efi_gop
|
|
||||||
insmod efi_uga
|
|
||||||
else
|
|
||||||
insmod vbe
|
|
||||||
insmod vga
|
|
||||||
fi
|
|
||||||
|
|
||||||
insmod serial
|
|
||||||
if serial --unit=0 --speed=115200; then
|
if serial --unit=0 --speed=115200; then
|
||||||
terminal_input --append serial_com0
|
terminal_input --append serial_com0
|
||||||
terminal_output --append serial_com0
|
terminal_output --append serial_com0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
insmod search
|
set TERM=tty2
|
||||||
search --set=root --label "ARPL3"
|
search --set=root --label "ARPL3"
|
||||||
if [ -s /zImage-dsm -a -s /initrd-dsm ]; then
|
if [ -s /zImage-dsm -a -s /initrd-dsm ]; then
|
||||||
if [ "${default}" = "direct" ]; then
|
if [ "${default}" = "direct" ]; then
|
||||||
set timeout="1"
|
set timeout="1"
|
||||||
menuentry 'Boot DSM kernel directly' --id direct {
|
menuentry 'Boot DSM kernel directly' --id direct {
|
||||||
|
load_video
|
||||||
echo "Loading DSM kernel..."
|
echo "Loading DSM kernel..."
|
||||||
linux /zImage-dsm console=ttyS0,115200n8 earlyprintk log_buf_len=32M earlycon=uart8250,io,0x3f8,115200n8 root=/dev/md0 loglevel=15 ${dsm_cmdline}
|
linux /zImage-dsm console=ttyS0,115200n8 earlyprintk log_buf_len=32M earlycon=uart8250,io,0x3f8,115200n8 root=/dev/md0 loglevel=15 ${dsm_cmdline}
|
||||||
echo "Loading DSM initramfs..."
|
echo "Loading DSM initramfs..."
|
||||||
@ -58,15 +77,17 @@ if [ -s /zImage-dsm -a -s /initrd-dsm ]; then
|
|||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
menuentry 'Boot DSM' --id boot {
|
menuentry 'Boot DSM' --id boot {
|
||||||
|
load_video
|
||||||
echo "Loading kernel..."
|
echo "Loading kernel..."
|
||||||
linux /bzImage-arpl console=tty2 net.ifnames=0 biosdevname=0
|
linux /bzImage-arpl console=${TERM} net.ifnames=0
|
||||||
echo "Loading initramfs..."
|
echo "Loading initramfs..."
|
||||||
initrd /initrd-arpl
|
initrd /initrd-arpl
|
||||||
echo "Booting..."
|
echo "Booting..."
|
||||||
}
|
}
|
||||||
menuentry 'Force re-install DSM' --id junior {
|
menuentry 'Force re-install DSM' --id junior {
|
||||||
|
load_video
|
||||||
echo "Loading kernel..."
|
echo "Loading kernel..."
|
||||||
linux /bzImage-arpl console=tty2 net.ifnames=0 biosdevname=0 force_junior
|
linux /bzImage-arpl console=${TERM} net.ifnames=0 force_junior
|
||||||
echo "Loading initramfs..."
|
echo "Loading initramfs..."
|
||||||
initrd /initrd-arpl
|
initrd /initrd-arpl
|
||||||
echo "Booting..."
|
echo "Booting..."
|
||||||
@ -76,8 +97,9 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
menuentry 'Configure loader' --id config {
|
menuentry 'Configure loader' --id config {
|
||||||
|
load_video
|
||||||
echo "Loading kernel..."
|
echo "Loading kernel..."
|
||||||
linux /bzImage-arpl console=tty2 net.ifnames=0 biosdevname=0 IWANTTOCHANGETHECONFIG
|
linux /bzImage-arpl console=${TERM} net.ifnames=0 IWANTTOCHANGETHECONFIG
|
||||||
echo "Loading initramfs..."
|
echo "Loading initramfs..."
|
||||||
initrd /initrd-arpl
|
initrd /initrd-arpl
|
||||||
echo "Booting..."
|
echo "Booting..."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user