Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
staging
rpms
kernel
Commits
a2a90e61
Commit
a2a90e61
authored
Apr 28, 2021
by
Rocky Automation
📺
Browse files
import kernel-4.18.0-80.el8
parent
e5f14e91
Changes
23
Expand all
Show whitespace changes
Inline
Side-by-side
SOURCES/mod-sign.sh
View file @
a2a90e61
...
@@ -11,22 +11,21 @@
...
@@ -11,22 +11,21 @@
MODSECKEY
=
$1
MODSECKEY
=
$1
MODPUBKEY
=
$2
MODPUBKEY
=
$2
moddir
=
$3
moddir
=
$3
modules
=
`
find
$moddir
-type
f
-name
'
*.ko
'
`
modules
=
`
find
$moddir
-name
*
.ko
`
NPROC
=
`
nproc
`
for
mod
in
$modules
[
-z
"
$NPROC
"
]
&&
NPROC
=
1
do
dir
=
`
dirname
$mod
`
file
=
`
basename
$mod
`
# NB: this loop runs 2000+ iterations. Try to be fast.
./scripts/sign-file sha256
${
MODSECKEY
}
${
MODPUBKEY
}
${
dir
}
/
${
file
}
echo
"
$modules
"
| xargs
-r
-n16
-P
$NPROC
sh
-c
"
rm
-f
${
dir
}
/
${
file
}
.
{
sig,dig
}
for mod; do
./scripts/sign-file sha256
$MODSECKEY
$MODPUBKEY
\$
mod
rm -f
\$
mod.sig
\$
mod.dig
done
done
"
DUMMYARG0
# xargs appends ARG1 ARG2..., which go into $mod in for loop.
RANDOMMOD
=
$(
echo
"
$modules
"
|
sort
-R
|
head
-n
1
)
RANDOMMOD
=
$(
find
$moddir
-type
f
-name
'*.ko'
|
sort
-R
|
head
-n
1
)
if
[
"~Module signature appended~"
!=
"
$(
tail
-c
28
$RANDOMMOD
)
"
]
;
then
if
[
"~Module signature appended~"
!=
"
$(
tail
-c
28
$RANDOMMOD
)
"
]
;
then
echo
"*****************************"
echo
"*****************************"
echo
"*** Modules are unsigned! ***"
echo
"*** Modules are unsigned! ***"
...
...
SOURCES/process_configs.sh
View file @
a2a90e61
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
usage
()
usage
()
{
{
echo
"process_configs.sh [ -n|-c|-t ] package_name kernel_version
[cross_opts]
"
echo
"process_configs.sh [ -n|-c|-t ] package_name kernel_version"
echo
" -n: error on unset config options"
echo
" -n: error on unset config options"
echo
" -c: error on mismatched config options"
echo
" -c: error on mismatched config options"
echo
" -t: test run, do not overwrite original config"
echo
" -t: test run, do not overwrite original config"
...
@@ -77,7 +77,7 @@ function process_configs()
...
@@ -77,7 +77,7 @@ function process_configs()
# assume we are in $source_tree/configs, need to get to top level
# assume we are in $source_tree/configs, need to get to top level
pushd
$(
switch_to_toplevel
)
&>/dev/null
pushd
$(
switch_to_toplevel
)
&>/dev/null
for
cfg
in
$SCRIPT_DIR
/
${
PACKAGE_NAME
}${
KVERREL
}*
.config
for
cfg
in
$SCRIPT_DIR
/
${
PACKAGE_NAME
}${
KVERREL
}
${
SUBARCH
}
*
.config
do
do
arch
=
$(
head
-1
$cfg
|
cut
-b
3-
)
arch
=
$(
head
-1
$cfg
|
cut
-b
3-
)
cfgtmp
=
"
${
cfg
}
.tmp"
cfgtmp
=
"
${
cfg
}
.tmp"
...
@@ -86,7 +86,7 @@ function process_configs()
...
@@ -86,7 +86,7 @@ function process_configs()
echo
-n
"Processing
$cfg
... "
echo
-n
"Processing
$cfg
... "
make
ARCH
=
$arch
${
CROSSOPTS
}
KCONFIG_CONFIG
=
$cfgorig
listnewconfig
>
& .listnewconfig
make
ARCH
=
$arch
KCONFIG_CONFIG
=
$cfgorig
listnewconfig
>
& .listnewconfig
grep
-E
'CONFIG_'
.listnewconfig
>
.newoptions
grep
-E
'CONFIG_'
.listnewconfig
>
.newoptions
if
test
-n
"
$NEWOPTIONS
"
&&
test
-s
.newoptions
if
test
-n
"
$NEWOPTIONS
"
&&
test
-s
.newoptions
then
then
...
@@ -109,7 +109,7 @@ function process_configs()
...
@@ -109,7 +109,7 @@ function process_configs()
rm
.listnewconfig
rm
.listnewconfig
make
ARCH
=
$arch
${
CROSSOPTS
}
KCONFIG_CONFIG
=
$cfgorig
oldnoconfig
>
/dev/null
||
exit
1
make
ARCH
=
$arch
KCONFIG_CONFIG
=
$cfgorig
oldnoconfig
>
/dev/null
||
exit
1
echo
"#
$arch
"
>
${
cfgtmp
}
echo
"#
$arch
"
>
${
cfgtmp
}
cat
"
${
cfgorig
}
"
>>
${
cfgtmp
}
cat
"
${
cfgorig
}
"
>>
${
cfgtmp
}
if
test
-n
"
$CHECKOPTIONS
"
if
test
-n
"
$CHECKOPTIONS
"
...
@@ -164,7 +164,7 @@ done
...
@@ -164,7 +164,7 @@ done
PACKAGE_NAME
=
"
${
1
:-
kernel
}
"
# defines the package name used
PACKAGE_NAME
=
"
${
1
:-
kernel
}
"
# defines the package name used
KVERREL
=
"
$(
test
-n
"
$2
"
&&
echo
"-
$2
"
||
echo
""
)
"
KVERREL
=
"
$(
test
-n
"
$2
"
&&
echo
"-
$2
"
||
echo
""
)
"
CROSSOPTS
=
"
$3
"
SUBARCH
=
"
$(
test
-n
"
$3
"
&&
echo
"-
$3
"
||
echo
""
)
"
SCRIPT
=
"
$(
readlink
-f
$0
)
"
SCRIPT
=
"
$(
readlink
-f
$0
)
"
OUTPUT_DIR
=
"
$PWD
"
OUTPUT_DIR
=
"
$PWD
"
SCRIPT_DIR
=
"
$(
dirname
$SCRIPT
)
"
SCRIPT_DIR
=
"
$(
dirname
$SCRIPT
)
"
...
...
SPECS/kernel.spec
View file @
a2a90e61
This diff is collapsed.
Click to expand it.
Prev
1
2
Next
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