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
aports
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
651
Issues
651
List
Boards
Labels
Service Desk
Milestones
Merge Requests
168
Merge Requests
168
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpine
aports
Commits
b6a253b9
Commit
b6a253b9
authored
Sep 23, 2009
by
Natanael Copa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
main/mkinitfs: use trigger to create kernel links
parent
780930c5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
3 deletions
+27
-3
main/mkinitfs/APKBUILD
main/mkinitfs/APKBUILD
+2
-1
main/mkinitfs/mkinitfs.trigger
main/mkinitfs/mkinitfs.trigger
+25
-2
No files found.
main/mkinitfs/APKBUILD
View file @
b6a253b9
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname
=
mkinitfs
pkgver
=
2.0_rc5
pkgrel
=
0
pkgrel
=
1
pkgdesc
=
"Tool to generate initramfs images for Alpine"
url
=
http://git.alpinelinux.org/cgit/mkinitfs
depends
=
"busybox"
triggers
=
"
$pkgname
.trigger:/usr/share/kernel/*"
source
=
"http://git.alpinelinux.org/cgit/
$pkgname
/snapshot/
$pkgname
-
$pkgver
.tar.bz2
"
license
=
"GPL-2"
...
...
main/mkinitfs/mkinitfs.trigger
View file @
b6a253b9
...
...
@@ -2,7 +2,30 @@
for
i
in
"
$@
"
;
do
# get last element in path
kver
=
${
i
##*/
}
mkinitfs
$kver
flavor
=
${
i
##*/
}
abi_release
=
$(
cat
"
$i
"
/kernel.release
)
initfs
=
initramfs-
$abi_release
mkinitfs
-o
/boot/
$initfs
$abi_release
ln
-sf
$initfs
/boot/initramfs-
$flavor
ln
-sf
vmlinuz-
$abi_release
/boot/vmlinuz-
$flavor
# extlinux will use path relative partition, so if /boot is on a
# separate partition we want /boot/<kernel> resolve to /<kernel>
ln
-sf
/ /boot/boot
#this is for compat. to be removed eventually...
ln
-sf
vmlinuz-
$flavor
/boot/
$flavor
ln
-sf
initramfs-
$flavor
/boot/
$flavor
.gz
ln
-sf
/boot/vmlinuz-
$flavor
/
$flavor
ln
-sf
/boot/initramfs-
$flavor
/
$flavor
.gz
# Update the /boot/extlinux.conf to point to correct kernel
f
=
/boot/extlinux.conf
if
[
-f
$f
]
&&
grep
-q
--
"kernel /
$flavor
"
$f
;
then
sed
-i
-e
"s:kernel /
$flavor
:kernel /boot/vmlinuz-
$flavor
:"
\
-e
"s:initrd=/
$flavor
.gz:initrd=/boot/initramfs-
$flavor
:"
\
-e
"s:initrd /
$flavor
.gz:initrd /boot/initramfs-
$flavor
:"
\
$f
fi
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