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
c8822784
Commit
c8822784
authored
Jul 13, 2023
by
Anton Midyukov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initrd-bootchain: save more reproducible command in mkinitrd
Needed make-initrd-bootchain >= 0.1.5-alt18
parent
40b5dcfd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
13 deletions
+8
-13
generate.mk
features.in/initrd-bootchain/generate.mk
+1
-1
bootchain
features.in/initrd-bootchain/stage1/files/.disk/bootchain
+0
-0
80-make-initrd-for-bootchain
...d-bootchain/stage1/scripts.d/80-make-initrd-for-bootchain
+7
-12
No files found.
features.in/initrd-bootchain/generate.mk
View file @
c8822784
...
@@ -4,7 +4,7 @@ ifneq (,$(BUILDDIR))
...
@@ -4,7 +4,7 @@ ifneq (,$(BUILDDIR))
include $(BUILDDIR)/distcfg.mk
include $(BUILDDIR)/distcfg.mk
BOOTCHAIN_CFG := $(BUILDDIR)/stage1/files/bootchain
BOOTCHAIN_CFG := $(BUILDDIR)/stage1/files/
.disk/
bootchain
all: debug
all: debug
@[ -s "$(BOOTCHAIN_CFG)" ] || exit 1; \
@[ -s "$(BOOTCHAIN_CFG)" ] || exit 1; \
...
...
features.in/initrd-bootchain/stage1/files/bootchain
→
features.in/initrd-bootchain/stage1/files/
.disk/
bootchain
View file @
c8822784
File moved
features.in/initrd-bootchain/stage1/scripts.d/80-make-initrd-for-bootchain
View file @
c8822784
...
@@ -17,7 +17,10 @@ done
...
@@ -17,7 +17,10 @@ done
[
-s
/.in/modules
]
||
[
-s
/.in/modules
]
||
fatal
"kernel modules set not found"
fatal
"kernel modules set not found"
cat
>>
/etc/initrd.mk
<<
EOF
cd
/.image
cp
/etc/initrd.mk .disk/
cat
>>
.disk/initrd.mk
<<
EOF
FEATURES += add-modules compress cleanup rdshell kbd
FEATURES += add-modules compress cleanup rdshell kbd
FEATURES += bootchain-localdev
FEATURES += bootchain-localdev
FEATURES += bootchain-liverw
FEATURES += bootchain-liverw
...
@@ -28,7 +31,7 @@ FEATURES += bootchain-cifs
...
@@ -28,7 +31,7 @@ FEATURES += bootchain-cifs
EOF
EOF
for
module
in
$(
grep
-v
^# /.in/modules |
sort
-u
|
tr
-s
'\n'
' '
)
;
do
for
module
in
$(
grep
-v
^# /.in/modules |
sort
-u
|
tr
-s
'\n'
' '
)
;
do
echo
"MODULES_TRY_ADD +=
$module
"
>>
/etc
/initrd.mk
echo
"MODULES_TRY_ADD +=
$module
"
>>
.disk
/initrd.mk
done
done
if
[
!
-f
/etc/dialogrc.error
]
;
then
if
[
!
-f
/etc/dialogrc.error
]
;
then
...
@@ -41,33 +44,25 @@ if [ ! -f /etc/dialogrc.error ]; then
...
@@ -41,33 +44,25 @@ if [ ! -f /etc/dialogrc.error ]; then
rm
/tmp/dialogrc.tmp
rm
/tmp/dialogrc.tmp
fi
fi
# replace generated config bootchain to stage1 chroot
mv
/.image/bootchain /etc/sysconfig/
# FIXME: large storage systems can get that tmpfs filled up
# FIXME: large storage systems can get that tmpfs filled up
# with debug data as of make-initrd 2.2.12
# with debug data as of make-initrd 2.2.12
rm
-vf
/usr/share/make-initrd/data/etc/udev/rules.d/00-debug.rules
\
rm
-vf
/usr/share/make-initrd/data/etc/udev/rules.d/00-debug.rules
\
/usr/share/make-initrd/data/lib/uevent/filters/debug
/usr/share/make-initrd/data/lib/uevent/filters/debug
MAKE_INITRD_OPTS
=
"--no-checks AUTODETECT="
MAKE_INITRD_OPTS
=
"--no-checks AUTODETECT=
-c .disk/initrd.mk BOOTCHAIN_PATH=.disk
"
MAKE_INITRD_VER
=
"
`
make-initrd
-V
\
MAKE_INITRD_VER
=
"
`
make-initrd
-V
\
|
sed
-rn
's/^make-initrd version ([0-9.]+)/\1/p'
`
"
|
sed
-rn
's/^make-initrd version ([0-9.]+)/\1/p'
`
"
[
-z
"
$GLOBAL_VERBOSE
"
]
||
[
-z
"
$GLOBAL_VERBOSE
"
]
||
MAKE_INITRD_OPTS
=
"
$MAKE_INITRD_OPTS
-v"
MAKE_INITRD_OPTS
=
"
$MAKE_INITRD_OPTS
-v"
# copy initrd.mk to image
mkdir
-p
/.image/.disk
cp
/etc/initrd.mk /.image/.disk
cp
/etc/sysconfig/bootchain /.image/.disk
cd
/boot
for
KVER
in
$kver
;
do
for
KVER
in
$kver
;
do
echo
make-initrd
$MAKE_INITRD_OPTS
-k
"
$KVER
"
>>
/.image/.disk/mkinitrd
echo
make-initrd
$MAKE_INITRD_OPTS
-k
"
$KVER
"
>>
/.image/.disk/mkinitrd
make-initrd
$MAKE_INITRD_OPTS
-k
"
$KVER
"
||
make-initrd
$MAKE_INITRD_OPTS
-k
"
$KVER
"
||
fatal
"make-initrd failed"
fatal
"make-initrd failed"
done
done
cd
/boot
case
`
arch
`
in
case
`
arch
`
in
e2k
)
e2k
)
kname
=
image
;;
kname
=
image
;;
...
...
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