Project

General

Profile

Actions

Feature #1089

closed

Switch S99zzreboot to use kexec

Added by Hammel 12 months ago. Updated 10 months ago.

Status:
Rejected
Priority:
Immediate
Assignee:
Category:
04 - Root File System
Target version:
Start date:
24 Nov 2023
Due date:
% Done:

0%

Estimated time:
Severity:
02 - High

Description

Instead of calling reboot which will take the hardware back to the bootloader, it would be faster (and probably cleaner appearing) to use kexec.

To do this:
  1. Enable kexec in Buildroot: Target Packages->Debugging, Profiling and Benchmarking
  2. Have S99zzreboot call rcK to shutdown everything
    1. Don't umount the squashfs however - it provides access to the kexec command. This might be possible to copy to a tmpfs before unmounting everything and then running it from the tmpfs.
  3. Setup and run kexec

This would prevent the RPi 7" touchscreen from going into it's weird reboot mode (I think) and, more importantly, would be useful to Xeon to not have to hold down the volume down button on firstboot. Note that this will need to be manually migrated to Xeon after testing on PiBox builds.

Actions #1

Updated by Hammel 12 months ago

  • Description updated (diff)
Actions #2

Updated by Hammel 10 months ago

  • Status changed from New to Rejected

This turns out to be hardware than originally expected because the kernel needs a special system call added via CONFIG_KEXEC and some other options enabled. So it's not just adding the kexec tool to userspace, it's an updated kernel.

If you run menuconfig on the rpi3 kernel (which is 32bit) you don't get access to the CONFIG_KEXEC option (see arch/arm/Kconfig) because CONFIG_SMP=y is set in the default kernel. According to the above link you can just disable this and it should work - that blog worked on a Pi Zero but suggests it would work on any board.

We can disable SMP but that will mean the board will only get to use one CPU on the RPI3, which is a serious downgrade just to be able to reboot faster.

So I'm not going to do this after all.

Actions

Also available in: Atom PDF