Announcement

Collapse
No announcement yet.

Linux 5.19 Frowns On x86/x86_64 Late Microcode Loading - "It's Just Lottery & Broken"

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    Originally posted by sinepgib View Post

    I'm not sure if you mean having a single file or having a generic build that works everywhere, but in the first case I think you can bundle the initrd in your regular kernel, and for UEFI you can make a PE that includes both the kernel and initrd, there's a guide in Lennart's blog (he promotes it for systemd-boot, but should work regardless).
    If you build your own kernel, then you can put the initramfs directly into the kernel in `make menuconfig`.

    The real challenge here lies on how you compile libc for your initramfs, as it depends on kernel headers generated by the compilation of the kernel.
    So you would have to compile your kernel first, then build your initramfs, then compile your kernel again with the updated initramfs.

    Comment


    • #12
      Originally posted by NobodyXu View Post

      If you build your own kernel, then you can put the initramfs directly into the kernel in `make menuconfig`.

      The real challenge here lies on how you compile libc for your initramfs, as it depends on kernel headers generated by the compilation of the kernel.
      So you would have to compile your kernel first, then build your initramfs, then compile your kernel again with the updated initramfs.
      Shouln't the "don't break userspace" rule be enough as long as you keep the same .config?
      Then it's not as much compiling as it is buildintg the image AFAICT.

      Comment


      • #13
        Originally posted by sinepgib View Post

        I'm not sure if you mean having a single file or having a generic build that works everywhere, but in the first case I think you can bundle the initrd in your regular kernel, and for UEFI you can make a PE that includes both the kernel and initrd, there's a guide in Lennart's blog (he promotes it for systemd-boot, but should work regardless).
        I meant a single image file. It is easier to test things that way, but also forces you to make sure you have all the right modules integrated into the image. If you want something that works everywhere initrd is much easier.

        Comment


        • #14
          Originally posted by sinepgib View Post

          Shouln't the "don't break userspace" rule be enough as long as you keep the same .config?
          Then it's not as much compiling as it is buildintg the image AFAICT.
          Yeah, but on the first run, you would have to build the kernel twice, so it indeed makes thing a bit harder.

          Comment


          • #15
            Originally posted by NobodyXu View Post

            Yeah, but on the first run, you would have to build the kernel twice, so it indeed makes thing a bit harder.
            If the initramfs just needs the headers, you don't need to do a full compile the first time.

            Comment


            • #16
              Originally posted by gigaplex View Post

              If the initramfs just needs the headers, you don't need to do a full compile the first time.
              How do I only generate and install the headers? Is there a special target in the linux Makefile just for this?

              Comment


              • #17
                Originally posted by NobodyXu View Post

                How do I only generate and install the headers? Is there a special target in the linux Makefile just for this?
                I think it's
                Code:
                make headers_install

                Comment


                • #18
                  Originally posted by gigaplex View Post

                  I think it's
                  Code:
                  make headers_install
                  Thanks

                  Comment


                  • #19
                    Originally posted by bug77 View Post
                    I can't imagine why you'd want to load the proper microcode after your CPU starts doing stuff...
                    Well, load microcode to make the cpu work better? Surely, the cpu is not so broken that it cannot boot without microcode - because then it couldn't even boot up and get to the microcode loading.

                    If I get new improved microcode, why should I need to boot the thing? Just load the code. Perhaps the cpu needs to go single-core for a while - but just do that then?

                    Comment

                    Working...
                    X