Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Thomas Liske
aports
Commits
59a4f9a6
Commit
59a4f9a6
authored
May 03, 2020
by
Thomas Liske
Committed by
Natanael Copa
Dec 21, 2020
Browse files
scripts/mkimage: add support for CPU ucode updates using early initrd
parent
29b3656c
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/mkimg.base.sh
View file @
59a4f9a6
build_kernel
()
{
local
_flavor
=
"
$2
"
_modloopsign
=
local
_flavor
=
"
$2
"
_modloopsign
=
_add
shift
3
local
_pkgs
=
"
$@
"
[
"
$modloop_sign
"
=
"yes"
]
&&
_modloopsign
=
"--modloopsign"
...
...
@@ -15,6 +15,11 @@ build_kernel() {
--modloopfw
"
$modloopfw
"
\
--repositories-file
"
$APKROOT
/etc/apk/repositories"
\
"
$DESTDIR
"
if
[
-n
"
$boot_addons
"
]
;
then
for
_add
in
$boot_addons
;
do
apk fetch
--quiet
--stdout
$_add
|
tar
-C
"
${
DESTDIR
}
"
-zx
boot/
done
fi
}
section_kernels
()
{
...
...
@@ -95,15 +100,22 @@ syslinux_gen_config() {
echo
"PROMPT
${
syslinux_prompt
:-
1
}
"
echo
"DEFAULT
${
kernel_flavors
%% *
}
"
local
_f
local
_f
_p _initrd
for
_f
in
$kernel_flavors
;
do
if
[
-z
"
${
xen_params
+set
}
"
]
;
then
_initrd
=
"/boot/initramfs-
$_f
"
if
[
-n
"
$initrd_ucode
"
]
;
then
for
_p
in
$initrd_ucode
;
do
_initrd
=
"
$_p
,
$_initrd
"
done
fi
cat
<<-
EOF
LABEL
$_f
MENU LABEL Linux
$_f
KERNEL /boot/vmlinuz-
$_f
INITRD
/boot/initramfs-
$_f
INITRD
$_initrd
FDTDIR /boot/dtbs-
$_f
APPEND
$initfs_cmdline
$kernel_cmdline
EOF
...
...
@@ -120,15 +132,22 @@ syslinux_gen_config() {
}
grub_gen_config
()
{
local
_f
local
_f
_p _initrd
echo
"set timeout=2"
for
_f
in
$kernel_flavors
;
do
if
[
-z
"
${
xen_params
+set
}
"
]
;
then
_initrd
=
"/boot/initramfs-
$_f
"
if
[
-n
"
$initrd_ucode
"
]
;
then
for
_p
in
$initrd_ucode
;
do
_initrd
=
"
$_p
$_initrd
"
done
fi
cat
<<-
EOF
menuentry "Linux
$_f
" {
linux /boot/vmlinuz-
$_f
$initfs_cmdline
$kernel_cmdline
initrd
/boot/initramfs-
$_f
initrd
$_initrd
}
EOF
else
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment