Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pmaports
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
postmarketOS
pmaports
Commits
43a87e5c
Commit
43a87e5c
authored
7 years ago
by
Attila Szöllősi
Committed by
Oliver Smith
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add kernel updater script (
#625
)
parent
8d927d43
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
main/postmarketos-update-kernel/APKBUILD
+15
-0
15 additions, 0 deletions
main/postmarketos-update-kernel/APKBUILD
main/postmarketos-update-kernel/update-kernel.sh
+41
-0
41 additions, 0 deletions
main/postmarketos-update-kernel/update-kernel.sh
with
56 additions
and
0 deletions
main/postmarketos-update-kernel/APKBUILD
0 → 100644
+
15
−
0
View file @
43a87e5c
pkgname
=
postmarketos-update-kernel
pkgver
=
0.0.1
pkgrel
=
0
pkgdesc
=
"kernel updater script for postmarketOS"
url
=
"https://github.com/postmarketOS"
depends
=
"util-linux"
source
=
"update-kernel.sh"
arch
=
"noarch"
license
=
"GPL3"
package
()
{
install
-Dm755
"
$srcdir
/update-kernel.sh"
\
"
$pkgdir
/sbin/pmos-update-kernel"
}
sha512sums
=
"7d2f3031b1a468accff5a3584bd51d3607141b01e1d2a93d611852476bdeecc3edd7b80f8e3b034012d9b5f09de907af1de02f48586d82d06ee4b5746d4fd286 update-kernel.sh"
This diff is collapsed.
Click to expand it.
main/postmarketos-update-kernel/update-kernel.sh
0 → 100755
+
41
−
0
View file @
43a87e5c
#!/bin/ash
# shellcheck shell=dash
set
-e
case
$1
in
--help
|
-h
|
''
)
echo
"Usage: pmos-update-kernel [flavor]"
exit
1
;;
esac
# shellcheck disable=SC1091
.
/etc/deviceinfo
FLAVOR
=
$1
METHOD
=
${
deviceinfo_flash_methods
:?
}
case
$METHOD
in
fastboot|heimdall-bootimg
)
BOOT_PARTITION
=
$(
findfs
PARTLABEL
=
"boot"
)
echo
"Flashing boot.img..."
dd
if
=
/boot/boot.img-
"
$FLAVOR
"
of
=
"
$BOOT_PARTITION
"
bs
=
1M
;;
heimdall-isorec
)
KERNEL_PARTITION
=
$(
findfs
PARTLABEL
=
"
${
deviceinfo_flash_heimdall_partition_kernel
:?
}
"
)
INITFS_PARTITION
=
$(
findfs
PARTLABEL
=
"
${
deviceinfo_flash_heimdall_partition_initfs
:?
}
"
)
echo
"Flashing kernel..."
dd
if
=
/boot/vmlinuz-
"
$FLAVOR
"
of
=
"
$KERNEL_PARTITION
"
bs
=
1M
echo
"Flashing initramfs..."
gunzip
-c
/boot/initramfs-
"
$FLAVOR
"
| lzop |
dd
of
=
"
$INITFS_PARTITION
"
bs
=
1M
;;
0xFFFF
)
echo
-n
"No need to use this utility, since uboot loads the kernel directly from"
echo
" the boot partition. Your kernel should be updated already."
exit
1
;;
*
)
echo
"Devices with flash method:
$METHOD
are not supported."
exit
1
;;
esac
echo
"Done."
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment