[initcpiocfg] rework is_intel_cpu
This commit is contained in:
parent
df256b608a
commit
5da736466c
@ -127,6 +127,7 @@ def modify_mkinitcpio_conf(partitions, root_mount_point):
|
|||||||
encrypt_hook = False
|
encrypt_hook = False
|
||||||
openswap_hook = False
|
openswap_hook = False
|
||||||
unencrypted_separate_boot = False
|
unencrypted_separate_boot = False
|
||||||
|
is_cpu_intel = cpu["proc0"]["vendor_id"].lower() == "genuineintel"
|
||||||
|
|
||||||
# It is important that the plymouth hook comes before any encrypt hook
|
# It is important that the plymouth hook comes before any encrypt hook
|
||||||
if detect_plymouth():
|
if detect_plymouth():
|
||||||
@ -179,12 +180,13 @@ def modify_mkinitcpio_conf(partitions, root_mount_point):
|
|||||||
else:
|
else:
|
||||||
hooks.extend(["filesystems"])
|
hooks.extend(["filesystems"])
|
||||||
|
|
||||||
cpu_intel = "genuineintel"
|
if btrfs and not is_cpu_intel:
|
||||||
if btrfs and cpu["proc0"]["vendor_id"].lower() != cpu_intel:
|
|
||||||
modules.append("crc32c")
|
modules.append("crc32c")
|
||||||
elif (btrfs and cpu["proc0"]["vendor_id"].lower() == cpu_intel):
|
|
||||||
|
elif btrfs and is_cpu_intel:
|
||||||
modules.append("crc32c-intel")
|
modules.append("crc32c-intel")
|
||||||
else:
|
|
||||||
|
elif not btrfs:
|
||||||
hooks.append("fsck")
|
hooks.append("fsck")
|
||||||
|
|
||||||
write_mkinitcpio_lines(hooks, modules, files, root_mount_point)
|
write_mkinitcpio_lines(hooks, modules, files, root_mount_point)
|
||||||
|
Loading…
Reference in New Issue
Block a user