* [PATCH 2/3] dracut: Do not create early_cpio if no suitable microcode exist in hostonly case
[not found] ` <1380042177-66221-1-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org>
@ 2013-09-24 17:02 ` Thomas Renninger
2013-09-24 17:02 ` [PATCH 3/3] dracut: Implement ACPI table overriding Thomas Renninger
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Thomas Renninger @ 2013-09-24 17:02 UTC (permalink / raw)
To: harald-H+wXaHxf7aLQT0dZR+AlfA
Cc: initramfs-u79uwXL29TY76Z2rM5mHXA, yinghai-DgEjT+Ai2ygdnm+yROfE0A,
hpa-YMNOUZJC4hwAvxtiuMwx3w, rjw-KKrjLPT3xs0,
linux-acpi-u79uwXL29TY76Z2rM5mHXA, Thomas Renninger
Intel microcodes only exist for very specific family/model/stepping CPUs.
If no microcode gets added, there is no need to create an empty
(only directories) cpio later that gets glued to the initrd.
This also fixes:
*** Constructing GenuineIntel.bin ****
cat: /lib/firmware/intel-ucode/06-3c-03: No such file or directory
in hostonly mode if there is no suitable microcode for the CPU.
Signed-off-by: Thomas Renninger <trenn-l3A5Bk7waGM@public.gmane.org>
---
dracut.sh | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/dracut.sh b/dracut.sh
index 0dd1e8b..671f53f 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -1316,12 +1316,15 @@ if [[ $early_microcode = yes ]]; then
dinfo "*** Constructing ${ucode_dest[$idx]} ****"
if [[ $hostonly ]]; then
_src=$(get_ucode_file)
+ if ! [[ -r $_fwdir/$_fw/$_src ]];then
+ break;
+ fi
fi
cat $_fwdir/$_fw/$_src > $_dest_dir/${ucode_dest[$idx]}
+ create_early_cpio="yes"
fi
done
done
- create_early_cpio="yes"
fi
rm -f -- "$outfile"
--
1.7.6.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 3/3] dracut: Implement ACPI table overriding
[not found] ` <1380042177-66221-1-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org>
2013-09-24 17:02 ` [PATCH 2/3] dracut: Do not create early_cpio if no suitable microcode exist in hostonly case Thomas Renninger
@ 2013-09-24 17:02 ` Thomas Renninger
2013-09-24 17:44 ` Implement ACPI table overriding via initramfs Konrad Rzeszutek Wilk
2013-10-02 10:58 ` Harald Hoyer
3 siblings, 0 replies; 6+ messages in thread
From: Thomas Renninger @ 2013-09-24 17:02 UTC (permalink / raw)
To: harald-H+wXaHxf7aLQT0dZR+AlfA
Cc: initramfs-u79uwXL29TY76Z2rM5mHXA, yinghai-DgEjT+Ai2ygdnm+yROfE0A,
hpa-YMNOUZJC4hwAvxtiuMwx3w, rjw-KKrjLPT3xs0,
linux-acpi-u79uwXL29TY76Z2rM5mHXA, Thomas Renninger
An example config file for this feature could be:
/etc/dracut.conf.d/03-acpi-override.conf
with this content:
acpi_override="yes"
acpi_table_dir="/etc/dracut.conf.d/acpi_tables"
Then all files ending with *.aml will be put into the early cpio
(kernel/firmware/acpi) and will be used to replace the BIOS provided tables
if the kernel supports this feature.
Signed-off-by: Thomas Renninger <trenn-l3A5Bk7waGM@public.gmane.org>
---
dracut.sh | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/dracut.sh b/dracut.sh
index 671f53f..352b546 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -1327,6 +1327,17 @@ if [[ $early_microcode = yes ]]; then
done
fi
+if [[ $acpi_override = yes ]] && [[ -d $acpi_table_dir ]]; then
+ dinfo "*** Packaging ACPI tables to override BIOS provided ones ***"
+ _dest_dir="$early_cpio_dir/d/kernel/firmware/acpi"
+ mkdir -p $_dest_dir
+ for table in $acpi_table_dir/*.aml; do
+ dinfo " Adding ACPI table: $table"
+ cp $table $_dest_dir
+ create_early_cpio="yes"
+ done
+fi
+
rm -f -- "$outfile"
dinfo "*** Creating image file ***"
if [[ $create_early_cpio = yes ]]; then
--
1.7.6.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: Implement ACPI table overriding via initramfs
[not found] ` <1380042177-66221-1-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org>
2013-09-24 17:02 ` [PATCH 2/3] dracut: Do not create early_cpio if no suitable microcode exist in hostonly case Thomas Renninger
2013-09-24 17:02 ` [PATCH 3/3] dracut: Implement ACPI table overriding Thomas Renninger
@ 2013-09-24 17:44 ` Konrad Rzeszutek Wilk
2013-10-02 10:58 ` Harald Hoyer
3 siblings, 0 replies; 6+ messages in thread
From: Konrad Rzeszutek Wilk @ 2013-09-24 17:44 UTC (permalink / raw)
To: Thomas Renninger
Cc: harald-H+wXaHxf7aLQT0dZR+AlfA, initramfs-u79uwXL29TY76Z2rM5mHXA,
yinghai-DgEjT+Ai2ygdnm+yROfE0A, hpa-YMNOUZJC4hwAvxtiuMwx3w,
rjw-KKrjLPT3xs0, linux-acpi-u79uwXL29TY76Z2rM5mHXA
On Tue, Sep 24, 2013 at 07:02:54PM +0200, Thomas Renninger wrote:
> This code generalizes the early_cpio parts of the early microcode
> implementation.
> Then the acpi table overriding parts are added in the last patch.
>
> Successfully tested.
>
> Please consider to apply if people agree with the code.
They look good to me (aka Reviewed-by..). Thought I would say
you should also add a patch to document this in the manual and
the docs.
>
> Thanks,
>
> Thomas
>
> [PATCH 1/3] dracut: Generlize microcode early cpio usage
> [PATCH 2/3] dracut: Do not create early_cpio if no suitable
> [PATCH 3/3] dracut: Implement ACPI table overriding
> --
> To unsubscribe from this list: send the line "unsubscribe initramfs" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: Implement ACPI table overriding via initramfs
[not found] ` <1380042177-66221-1-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org>
` (2 preceding siblings ...)
2013-09-24 17:44 ` Implement ACPI table overriding via initramfs Konrad Rzeszutek Wilk
@ 2013-10-02 10:58 ` Harald Hoyer
3 siblings, 0 replies; 6+ messages in thread
From: Harald Hoyer @ 2013-10-02 10:58 UTC (permalink / raw)
To: Thomas Renninger
Cc: initramfs-u79uwXL29TY76Z2rM5mHXA, yinghai-DgEjT+Ai2ygdnm+yROfE0A,
hpa-YMNOUZJC4hwAvxtiuMwx3w, rjw-KKrjLPT3xs0,
linux-acpi-u79uwXL29TY76Z2rM5mHXA
On 09/24/2013 07:02 PM, Thomas Renninger wrote:
> This code generalizes the early_cpio parts of the early microcode
> implementation.
> Then the acpi table overriding parts are added in the last patch.
>
> Successfully tested.
>
> Please consider to apply if people agree with the code.
>
> Thanks,
>
> Thomas
>
> [PATCH 1/3] dracut: Generlize microcode early cpio usage
> [PATCH 2/3] dracut: Do not create early_cpio if no suitable
> [PATCH 3/3] dracut: Implement ACPI table overriding
>
pushed! Thanks!
^ permalink raw reply [flat|nested] 6+ messages in thread