Visitar URL original
Support early microcode update directly · Issue #40 · anatol/booster · GitHub
Skip to content

Support early microcode update directly #40

Closed

Description

@medhefgo

Currently, early microcode updates are supported by booting the kernel with two initrds: a microcode unage followed by booster's image.
But with 3.5M, the intel-ucode.img image is quite large. When not creating a universal image, booster could create its own early image with unneeded microcode code stripped. For my system, the stripped image is just 104k in size.

This can be done by running something equivalent to this command:
bsdtar -Oxf /boot/intel-ucode.img | iucode_tool -tb --scan-system --write-earlyfw=/tmp/iucode-stripped.img -

The final booster image that's created now just has to be appended as is to create a final bootable image.
Since the AMD ucode image is just 40K, stripping shouldn't be necessary and the image can just be prepended as-is.

Activity

  1. anatol commented on Feb 26, 2021

    @anatol
    Owner

    I wonder if better place for such improvement would be intel-ucode post install hook that generates /boot/intel-ucode-stripped.img out of /boot/intel-ucode.img.

    Actually the full intel-ucode.img does not have to be under /boot. It can stay at /usr/share/intel-ucode/.. and the hook generates slim platform-specific /boot/intel-ucode.img.

    The same idea applies to AMD ucode.

  2. anatol commented on Feb 26, 2021

    @anatol
    Owner
  3. nl6720 commented on Mar 2, 2021

    @nl6720

    The correct place would be /usr/lib/firmware/intel-ucode/. See FS#59841 (the rationale for that feature request is different, though).

  4. dkwo commented on Jan 10, 2024

    @dkwo

    so, supposing microcode is at /usr/lib/firmware/intel-ucode (stripped or not), but not necessarily at /boot, how do i tell booster to append it to its initram image?

  5. anatol commented on Jan 10, 2024

    @anatol
    Owner

    The best way to handle the microcode is to decouple it from the initramfs completely. All modern bootloaders support loading multiple images so one image can be used for microcode, and another image comes from booster.

    To generate the ucode image you can use tools like this one https://github.com/anatol/ucode-image-gen

  6. oech3 commented on Feb 17, 2025

    @oech3
    Contributor

    extra_files: /kernel/x86/microcode/GenuineIntel.bin in /etc/booster.yaml and hook to bash -c 'mkdir -p /kernel/x86/microcode;iucode_tool -S /usr/lib/firmware/intel-ucode -w /kernel/x86/microcode/GenuineIntel.bin --overwrite' work. This hack leave dirty file /kernel/x86/microcode/GenuineIntel.bin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions