Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
alpine-conf
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
18
Issues
18
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpine
alpine-conf
Commits
78c5156f
Commit
78c5156f
authored
Oct 29, 2014
by
Kaarle Ritvanen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update-kernel: direct installation with kernel build system
parent
ef798bbd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
6 deletions
+22
-6
update-kernel.in
update-kernel.in
+22
-6
No files found.
update-kernel.in
View file @
78c5156f
...
...
@@ -12,6 +12,7 @@
SCRIPT
=
update-kernel
VIRTUAL
=
.tmp-
$SCRIPT
BUILDDIR
=
FLAVOR
=
MNTDIR
=
PACKAGES
=
...
...
@@ -19,10 +20,14 @@ SIGNALS="HUP INT TERM"
TMPDIR
=
features
=
OPTS
=
$(
getopt
-l
flavor:,feature:,package:
-n
$SCRIPT
-o
f:F:p:
--
"
$@
"
)
OPTS
=
$(
getopt
-l
build-dir:,flavor:,feature:,package:
-n
$SCRIPT
-o
b:f:F:p:
\
--
"
$@
"
)
eval set
--
"
$OPTS
"
while
:
;
do
case
"
$1
"
in
-b
|
--build-dir
)
BUILDDIR
=
$2
;;
-f
|
--flavor
)
FLAVOR
=
$2
;;
...
...
@@ -47,6 +52,9 @@ error() {
exit
1
}
[
"
$BUILDDIR
"
-a
"
$FLAVOR
"
]
&&
\
error
"Cannot specify both build directory and flavor"
if
[
-z
"
$DESTDIR
"
]
;
then
[
"
$FLAVOR
"
]
&&
error
"Cannot specify flavor when updating the current kernel"
...
...
@@ -94,6 +102,7 @@ fi
TMPDIR
=
$(
mktemp
-dt
$SCRIPT
.XXXXXX
)
ROOT
=
$TMPDIR
/root
BOOT
=
$ROOT
/boot
_apk
()
{
local
cmd
=
$1
...
...
@@ -113,10 +122,17 @@ extra_pkgs() {
fi
}
add_pkgs
-U
--initdb
alpine-base
"linux-
$FLAVOR
"
linux-firmware
$PACKAGES
if
[
-z
"
$PACKAGES
"
]
;
then
extra_pkgs
"dahdi-linux-
$FLAVOR
"
dahdi-linux
extra_pkgs
"xtables-addons-
$FLAVOR
"
add_pkgs
-U
--initdb
alpine-base
$PACKAGES
if
[
"
$BUILDDIR
"
]
;
then
mkdir
-p
"
$BOOT
"
make
-C
"
$BUILDDIR
"
firmware_install
install
modules_install
\
INSTALL_MOD_PATH
=
"
$ROOT
"
INSTALL_PATH
=
"
$BOOT
"
else
add_pkgs
"linux-
$FLAVOR
"
linux-firmware
if
[
-z
"
$PACKAGES
"
]
;
then
extra_pkgs
"dahdi-linux-
$FLAVOR
"
dahdi-linux
extra_pkgs
"xtables-addons-
$FLAVOR
"
fi
fi
...
...
@@ -137,7 +153,7 @@ mksquashfs "$MODLOOP" "$STAGING/$MODIMG" -comp xz
mkinitfs
-q
-b
"
$ROOT
"
-F
"
$features
base squashfs"
-o
"
$STAGING
/
$FLAVOR
.gz"
\
"
$KVER
"
cp
"
$
ROOT
/boot
/vmlinuz
$KVER_FLAVOR
"
"
$STAGING
/
$FLAVOR
"
cp
"
$
BOOT
/vmlinuz
$KVER_FLAVOR
"
"
$STAGING
/
$FLAVOR
"
if
[
"
$MNTDIR
"
]
;
then
...
...
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