简体   繁体   English

Yocto:如何在machine.conf文件中禁用IO-APIC?

[英]Yocto: howto disable IO-APIC in a machine.conf file?

I need to disable IO-APIC kernel option in a new custom-bsp-layer for a machine based on 'meta-intel' of the Yocto 'rocko' branch. 对于基于Yocto'rocko'分支的'meta-intel'的计算机,我需要在新的custom-bsp层中禁用IO-APIC内核选项。 To do that I need to add "noapic" option to the Linux kernel cmdline. 为此,我需要在Linux内核cmdline中添加“ noapic”选项。

I have tested adding different options to mymachine.conf file: 我已经测试过向mymachine.conf文件添加不同的选项:

Option a)
MACHINE_FEATURES += "noapic"

Option b)
APPEND += "noapic"

But none is working as expected. 但是没有一个能按预期工作。 When I dump the core-image-minimal-mymachine.wic image generated to my USB-pendrive (using dd ), grub.cfg file generated in the EFI partition doesn't include noapic option: 当我将生成的core-image-minimal-mymachine.wic映像转储到USB-pendrive中(使用dd )时,EFI分区中生成的grub.cfg文件不包含noapic选项:

$ cat efi/EFI/BOOT/grub.cfg

default=boot
timeout=5
menuentry 'boot'{
    linux /bzImage root=PARTUUID=b38fcded-b1fa-45bb-a037-cf8648a25e99 rootwait rootfstype=ext4 console=ttyS0,115200 console=tty0
}

How should be fixed this issue? 应该如何解决此问题? Thank you in advance! 先感谢您! :) :)

Finally I fixed this issue. 最后,我解决了这个问题。

To fix the issue, a file named mkefidisk.wks is created inside my custom-bsp-layer directory, replacing the version of this file in the poky layer. 为了解决该问题,在我的custom-bsp-layer目录中创建了一个名为mkefidisk.wks的文件,替换了poky层中该文件的版本。 So, basically, you need to create exactly the same path into your custom bsp layer: 因此,基本上,您需要在自定义bsp层中创建完全相同的路径:

custom-bsp-layer/scripts/lib/wic/canned-wks/mkefidisk.wks

That file has customized contents: 该文件具有定制的内容:

part /boot --source bootimg-efi --sourceparams="loader=grub-efi" --ondisk sda --label msdos --active --align 1024

part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 --use-uuid

part swap --ondisk sda --size 44 --label swap1 --fstype=swap

bootloader --ptable gpt --timeout=5 --append="rootfstype=ext4 console=ttyS0,115200 console=tty0 noapic"

As you can see, 'noapic' option is added at the end of "bootloader" line. 如您所见,在“ bootloader”行的末尾添加了“ noapic”选项。 After generating my core-image-minimal-mymachine.wic image (again), everything is working as expected! 再次生成我的core-image-minimal-mymachine.wic映像后,一切都按预期工作! Yeah! 是的 xD xD

More info on this can be found here: 可以在这里找到更多信息:

http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#wic-plug-ins-interface http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#wic-plug-ins-interface

Hope this helps somebody else! 希望这对其他人有帮助! :) :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM