[OpenWrt-Devel] [PATCH v4 0/6] intel-microcode: load as early as possible

Tomasz Maciej Nowak tmn505 at gmail.com
Mon Nov 26 16:11:36 EST 2018


W dniu 26.11.2018 o 21:44, Lucian Cristian pisze:
> On 20.11.2018 18:20, Tomasz Maciej Nowak wrote:
>> This small series addresses current problem with late loading of Intel
>> microcode in OpenWrt. Following the commit messages [1] and later
>> discussion, late loading off the microcode can be ineffective for some
>> processors [2] and for others disabled [3]. Also it is discouraged for
>> any processor starting from Haswell and Silvermont.
>> Therefore this series converts the Intel microcode bundle to an initial
>> ram disk which is loaded with grub, so kernel has access to it as early
>> as possible.
>> Previous patch series:
>> https://patchwork.ozlabs.org/project/lede/list/?series=39372
>>
>> 1. https://lore.kernel.org/patchwork/cover/348236
>> 2. https://lore.kernel.org/patchwork/cover/348236/#508603
>> 3. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=723f2828a98c8ca19842042f418fb30dd8cfc0f7
>>
>> Changes in v4:
>>    - copy also hidden files:
>>      x86: add packages files to image bootfs
>>    - no changes:
>>      1) include/rootfs.mk: remove boot directory
>>      2) x86: mount writable bootfs
>>      3) intel-microcode: remove dependency on iucode-tool
>>      4) x86: add intel microcode entries to grub config
>>      5) intel-microcode: create early load microcode image
>>
>> Change suggested by Philip Prindeville.
>>
>> Changes in v3:
>>    - replaced "include/rootfs.mk: move boot directory for later use"
>>      with "include/rootfs.mk: remove boot directory"; the final rootfs is
>>      always created after targets rootfs, so there's no need to save
>>      files for later use, also there was side effect to this approach,
>>      it kept the old files if packages version changed and buildroot
>>      wasn't cleaned beforehand
>>    - reflect the changes in "include/rootfs.mk: remove boot directory":
>>      x86: add packages files to image bootfs
>>    - expand commit message, narrow down the test in grub config:
>>      x86: add intel microcode entries to grub config
>>    - no changes:
>>      1) x86: mount writable bootfs
>>      2) intel-microcode: remove dependency on iucode-tool
>>      3) intel-microcode: create early load microcode image
>>
>> Changes in v2:
>>    - three new commits allowing buildsystem to properly handle packages
>>      installing files to /boot directory, mainly for x86 target:
>>      1) include/rootfs.mk: move boot directory for later use
>>      2) x86: mount writable bootfs
>>      3) x86: add packages files to image bootfs
>>    - uncomplicate test for AMD processors in:
>>      x86: add intel microcode entries to grub config
>>    - remove package specific hook in x86 image Makefile, remove
>>      postinst/prerm scripts and install microcode directly to /boot:
>>      intel-microcode: create early load microcode image
>>    - no changes:
>>      intel-microcode: remove dependency on iucode-tool
>>
>> All changes in v2 suggested by Matthias Schiffer and Philip Prindeville.
>>
>> Tomasz Maciej Nowak (6):
>>    include/rootfs.mk: remove boot directory
>>    x86: mount writable bootfs
>>    x86: add packages files to image bootfs
>>    intel-microcode: remove dependency on iucode-tool
>>    x86: add intel microcode entries to grub config
>>    intel-microcode: create early load microcode image
>>
>>   include/rootfs.mk                                |  1 +
>>   package/firmware/intel-microcode/Makefile        | 16 +++++++++-------
>>   .../x86/base-files/lib/preinit/02_load_x86_ucode |  6 ++++--
>>   .../x86/base-files/lib/preinit/79_move_config    | 12 ++++--------
>>   target/linux/x86/image/Makefile                  |  6 ++++--
>>   target/linux/x86/image/grub-iso.cfg              |  3 +++
>>   target/linux/x86/image/grub.cfg                  |  3 +++
>>   7 files changed, 28 insertions(+), 19 deletions(-)
>>
>>
> 
> this series I think are braking the boot on Via CPU's
> 
> grub complains with
> 
> 
> error: can't find command '['.
> 
> error: file '/boot/amd-ucode.img' not found.
> 
> error: can't find command '['.
> 
> error: file '/boot/intel-ucode.img' not found.
> 
> 
> Press any key to continue...
> 
> 
> And you have to press any key..

Damn, one case I didn't test. To be sure is this after sysupgrade? If yes please revert these commits:

546fced2a23557e95dd34246744c3aa6cad92fe6 x86: add intel microcode entries to grub config
022ffb56b2491fd7d8051ac6e6c7622ecc313d8f intel-microcode: create early load microcode image
a822283c7e56bb3b409712e0eb9af5a91aac247d x86: add amd microcode entries to grub config
975019b3a755ec3b91864b60b45e5ee104075096 amd64-microcode: create early load microcode image

I'll try to come up with better transition.

> 
> 
> Regards
> 

-- 
TMN

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list