Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mkimage-profiles
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Anton Palgunov
mkimage-profiles
Commits
52083d8a
Commit
52083d8a
authored
Sep 30, 2021
by
Anton Midyukov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build-vm: create initrd from a special config
The config for generating a generic initrd can be interesting because it will allow you to return the initrd to its original generic state.
parent
1190de27
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
17-kernel
features.in/build-vm/image-scripts.d/17-kernel
+12
-11
No files found.
features.in/build-vm/image-scripts.d/17-kernel
View file @
52083d8a
...
@@ -19,24 +19,25 @@ done
...
@@ -19,24 +19,25 @@ done
cd
/boot
cd
/boot
VM_INITRDMODULES
=
"
$GLOBAL_VM_INITRDMODULES
"
# creating a special initrd.mk
VM_INITRDMODULES+
=
"
$(
grep
'^MODULES_TRY_ADD +='
/etc/initrd.mk |
cp
/etc/initrd.mk /etc/initrd.mk.oem
sed
's/MODULES_TRY_ADD +=//g'
|
tr
"
\n
"
" "
)
"
echo
'FEATURES += add-modules compress cleanup kbd rdshell rootfs'
\
>>
/etc/initrd.mk.oem
VM_INITRDFEATURES
=
"
$GLOBAL_VM_INITRDFEATURES
"
VM_INITRDFEATURES+
=
"
$(
grep
'^FEATURES +='
/etc/initrd.mk |
sed
's/FEATURES +=//g'
|
tr
"
\n
"
" "
)
"
if
[
-n
"
$GLOBAL_VM_INITRDFEATURES
"
]
;
then
if
[
-n
"
$GLOBAL_VM_INITRDFEATURES
"
]
;
then
for
INITRDFEATURE
in
$GLOBAL_VM_INITRDFEATURES
;
do
for
INITRDFEATURE
in
$GLOBAL_VM_INITRDFEATURES
;
do
echo
"FEATURES +=
$INITRDFEATURE
"
>>
/etc/initrd.mk
echo
"FEATURES +=
$INITRDFEATURE
"
>>
/etc/initrd.mk.oem
done
fi
if
[
-n
"
$GLOBAL_VM_INITRDMODULES
"
]
;
then
for
INITRDMODULE
in
$GLOBAL_VM_INITRDMODULES
;
do
echo
"MODULES_TRY_ADD +=
$INITRDMODULE
"
>>
/etc/initrd.mk.oem
done
done
fi
fi
for
KVER
in
$kver
;
do
for
KVER
in
$kver
;
do
make-initrd
-N
-v
-k
"
$KVER
"
AUTODETECT
=
\
make-initrd
-N
-v
-k
"
$KVER
"
AUTODETECT
=
-c
/etc/initrd.mk.oem
\
FEATURES+
=
"add-modules compress cleanup kbd rdshell rootfs
$VM_INITRDFEATURES
"
\
MODULES_TRY_ADD+
=
"
$VM_INITRDMODULES
"
\
||
{
echo
"** Error: make-initrd failed"
>
&2
;
exit
1
;
}
||
{
echo
"** Error: make-initrd failed"
>
&2
;
exit
1
;
}
done
done
...
...
Write
Preview
Markdown
is supported
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