Compare commits
11
Commits
clang
...
bootimg-modules
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e8aa17ab53 | ||
|
|
b3160693f4 | ||
|
|
9a59740886 | ||
|
|
a038eb7316 | ||
|
|
5ec6b0bb38 | ||
|
|
05676d6c75 | ||
|
|
0e4c6271a4 | ||
|
|
f9dc29175b | ||
|
|
29482ba162 | ||
|
|
225bb5b313 | ||
|
|
df876eff36 |
No files matched your search
@@ -0,0 +1,26 @@
|
||||
# Maintainer: Caleb Connolly <caleb@connolly.tech>
|
||||
pkgname=bootrr
|
||||
pkgver=0.1
|
||||
_commit="6ac3e34d3471785621429ce39c3c3403a2da9820"
|
||||
pkgrel=0
|
||||
pkgdesc="A sanity checker for boards under automated test"
|
||||
url="https://github.com/andersson/bootrr"
|
||||
arch="noarch"
|
||||
license="BSD-3-Clause"
|
||||
source="
|
||||
bootrr-$_commit.tar.gz::https://github.com/andersson/bootrr/archive/$_commit.tar.gz
|
||||
"
|
||||
builddir="$srcdir/bootrr-$_commit"
|
||||
options="!check"
|
||||
|
||||
build() {
|
||||
make prefix=/usr all
|
||||
}
|
||||
|
||||
package() {
|
||||
make prefix=/usr DESTDIR="$pkgdir" install
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
65872ca5875439dd165648a9f2711f9d557ef1058be9f90c927c8364d732f06d98d302eb5d6d2c3c222005f6d4f39e0e85d31711149ac4e1b972a56f71cec8f2 bootrr-6ac3e34d3471785621429ce39c3c3403a2da9820.tar.gz
|
||||
"
|
||||
@@ -4,6 +4,7 @@
|
||||
/etc
|
||||
/lib
|
||||
/proc
|
||||
/run
|
||||
/sbin
|
||||
/sys
|
||||
/sysroot
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
/bin/busybox-extras
|
||||
/bin/sh
|
||||
/etc/deviceinfo
|
||||
/etc/mdev.conf
|
||||
/etc/group
|
||||
/etc/passwd
|
||||
/lib/mdev/persistent-storage
|
||||
/sbin/blkid
|
||||
/usr/share/misc/source_deviceinfo
|
||||
/usr/bin/unudhcpd
|
||||
/usr/sbin/kpartx
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
/sbin/btrfs
|
||||
/sbin/dmsetup
|
||||
/sbin/e2fsck
|
||||
/sbin/switch_root
|
||||
/usr/sbin/parted
|
||||
/usr/sbin/resize2fs
|
||||
/usr/sbin/resize.f2fs
|
||||
@@ -1,10 +1,11 @@
|
||||
# Maintainer: Oliver Smith <ollieparanoid@postmarketos.org>
|
||||
# Co-Maintainer: Clayton Craft <clayton@craftyguy.net>
|
||||
pkgname=postmarketos-initramfs
|
||||
pkgver=1.2.0
|
||||
pkgver=1.4.2
|
||||
pkgrel=0
|
||||
pkgdesc="Base files for the postmarketOS initramfs / initramfs-extra"
|
||||
url="https://postmarketos.org"
|
||||
options="!check" # no tests
|
||||
depends="
|
||||
btrfs-progs
|
||||
busybox-extras
|
||||
@@ -21,6 +22,7 @@ depends="
|
||||
postmarketos-fde-unlocker
|
||||
postmarketos-mkinitfs
|
||||
unudhcpd
|
||||
util-linux-misc
|
||||
xz
|
||||
"
|
||||
source="
|
||||
@@ -65,9 +67,9 @@ package() {
|
||||
|
||||
sha512sums="
|
||||
bed319179bcd0b894d6267c7e73f2890db07bc07df71542936947dfb3bdb17fade8a7b4e7b577f278af4472464427bba07f75aff0a1e454a4167052c088f3b6a 00-default.modules
|
||||
399da6e61993f48c8a62c956bb15d294cac10bf003d84257efdf4a213ebc87bb51cdcd75c4675f51c3be832146b8f21a7c769bf3e94f574a5067f001662632a1 00-initramfs-base.dirs
|
||||
3bc73f3a0d1de210444d9c45fab51fd4520e38b43ffbb76368f8ff854b990aa2f21c6356840c5a48eb9808e834eb885a6d581639a60707c26abf66fc20b70db9 00-initramfs-base.files
|
||||
e984cd3033ce8752ebc71127828b964b46259a5263c2ebfab32c1394b674bcff464862ff00b8e920d3d31386c54ca0b94f84bc77580d275ecfeea33e76c07ef4 00-initramfs-extra-base.files
|
||||
5a6252a02f46a4649a5aa7731a3f1bffd6eeca26b36bfd7ba1920dd6c72cceecfe0101da20d2f53850f1394a23f2dc1a61bfcfcf9c99ecdd26aec26df9a72d4e init.sh
|
||||
a6358ca43f36d84d64da063db456fa7520eeb7bbdb457082e6959995166156245b08d9e7c1098b6f2f52974e7cbcc0b7719e4a0d3400a1d989c9e7b831303bb4 init_functions.sh
|
||||
5b364300f31c91fd0591eb0715f67cbf5383f45246a5fb9f34b79f7cb2e3b15768b2130e5f32f816cc169950f988c1beabc879ba31645c58ce131a288dbc071d 00-initramfs-base.dirs
|
||||
77ee384c6b4a74f5c8cc901cebcfca1a60c98885354582ad18d932ae2736376ccd408a0e711f6ac5f043f63194d17b01119e736b8dddec96034cf4ec9e93c341 00-initramfs-base.files
|
||||
8a4adad3785af474b36a09a05f6a3b2c4b4f43aac331a53b903abfa51ea12be1e3d1d807b7a6e66a1346815f3b0044daf8cd62e21e2dc75d2db13ee265a72985 00-initramfs-extra-base.files
|
||||
40a061b240d9e2d0668e559c74c5386ba7f021b342fccda377bff6bf5754b6ad740816dc997cc8307298890e22cfd8ddec9854fb5376b4835ba9efa226495fa6 init.sh
|
||||
405c049d5bb1a09152c786036e9d755772ec376683d09c53b35f4f5ca36990518b86f7791e84801a2ce2166774092f46faf2129eb4e0d377785c22447fc43e45 init_functions.sh
|
||||
"
|
||||
@@ -12,7 +12,6 @@ export PATH=/usr/bin:/bin:/usr/sbin:/sbin
|
||||
|
||||
# Mount everything, set up logging, modules, mdev
|
||||
mount_proc_sys_dev
|
||||
create_device_nodes
|
||||
setup_log
|
||||
setup_firmware_path
|
||||
# shellcheck disable=SC2154
|
||||
@@ -42,6 +41,7 @@ resize_root_partition
|
||||
unlock_root_partition
|
||||
resize_root_filesystem
|
||||
mount_root_partition
|
||||
run_hooks /hooks/sysroot
|
||||
|
||||
# Mount boot partition into sysroot, so OpenRC doesn't need to do it (#664)
|
||||
umount /boot
|
||||
@@ -52,10 +52,7 @@ setup_bootchart2
|
||||
|
||||
# Switch root
|
||||
killall telnetd mdev udevd msm-fb-refresher 2>/dev/null
|
||||
umount /proc
|
||||
umount /sys
|
||||
umount /dev/pts
|
||||
umount /dev
|
||||
reconfigure_logging ""
|
||||
|
||||
# shellcheck disable=SC2093
|
||||
exec switch_root /sysroot "$init"
|
||||
|
||||
@@ -3,29 +3,45 @@
|
||||
IP=172.16.42.1
|
||||
ROOT_PARTITION_UNLOCKED=0
|
||||
ROOT_PARTITION_RESIZED=0
|
||||
PMOS_BOOT=""
|
||||
PMOS_ROOT=""
|
||||
|
||||
# Redirect stdout and stderr to logfile
|
||||
setup_log() {
|
||||
# Bail out if PMOS_NO_OUTPUT_REDIRECT is set
|
||||
echo "### postmarketOS initramfs ###"
|
||||
grep -q PMOS_NO_OUTPUT_REDIRECT /proc/cmdline && return
|
||||
# Save stdout/stderr for later
|
||||
exec 6>&1
|
||||
exec 7>&2
|
||||
# Redirects all output to a subshell which prepends "PMOS: " to each line
|
||||
# and then pipes to the logfile and the kernel logbuffer.
|
||||
# shellcheck disable=SC3001
|
||||
exec > >(awk '$0="PMOS: "$0' - | tee -a /pmOS_init.log /dev/kmsg >/dev/null)
|
||||
exec 2>&1
|
||||
|
||||
# Print a message about what is going on to the normal output
|
||||
echo "NOTE: All output from the initramfs gets redirected to:"
|
||||
echo "/pmOS_init.log"
|
||||
echo "If you want to disable this behavior (e.g. because you're"
|
||||
echo "debugging over serial), please add this to your kernel"
|
||||
echo "command line: PMOS_NO_OUTPUT_REDIRECT"
|
||||
|
||||
# Start redirect, print the first line again
|
||||
exec >/pmOS_init.log 2>&1
|
||||
echo "### postmarketOS initramfs ###"
|
||||
echo "NOTE: All output from the initramfs gets redirected to"
|
||||
echo "the kernel log buffer (dmesg) and /pmOS_init.log in the ramdisk"
|
||||
}
|
||||
|
||||
# Reconfigure logging before switch_root
|
||||
reconfigure_logging() {
|
||||
echo "Reconfiguring stdout/stderr $1"
|
||||
# For debugging, allow logging to the console
|
||||
if [ -n "$1" ] || grep -q PMOS_NO_OUTPUT_REDIRECT /proc/cmdline; then
|
||||
exec 1>&6 6>&-
|
||||
exec 2>&7 7>&-
|
||||
return
|
||||
fi
|
||||
|
||||
# Pipe to /dev/null and delete the original stdout/stderr
|
||||
exec >/dev/null 6>&-
|
||||
exec 2>/dev/null 7>&-
|
||||
}
|
||||
|
||||
mount_proc_sys_dev() {
|
||||
# mdev
|
||||
mount -t proc -o nodev,noexec,nosuid proc /proc || echo "Couldn't mount /proc"
|
||||
mount -t sysfs -o nodev,noexec,nosuid sysfs /sys || echo "Couldn't mount /sys"
|
||||
mount -t devtmpfs -o mode=0755,nosuid dev /dev || echo "Couldn't mount /dev"
|
||||
mount -t tmpfs -o nosuid,nodev,mode=0755 run /run || echo "Couldn't mount /run"
|
||||
|
||||
mkdir /config
|
||||
mount -t configfs -o nodev,noexec,nosuid configfs /config
|
||||
@@ -34,14 +50,11 @@ mount_proc_sys_dev() {
|
||||
mkdir -p /dev/pts
|
||||
mount -t devpts devpts /dev/pts
|
||||
|
||||
# /run (needed for cryptsetup)
|
||||
mkdir /run
|
||||
}
|
||||
|
||||
create_device_nodes() {
|
||||
mknod -m 666 /dev/null c 1 3
|
||||
mknod -m 644 /dev/random c 1 8
|
||||
mknod -m 644 /dev/urandom c 1 9
|
||||
# Set up fd symlinks for I/O redirects
|
||||
ln -s /proc/self/fd /dev/fd
|
||||
ln -sf /proc/self/fd/0 /dev/stdin
|
||||
ln -sf /proc/self/fd/1 /dev/stdout
|
||||
ln -sf /proc/self/fd/2 /dev/stderr
|
||||
}
|
||||
|
||||
setup_firmware_path() {
|
||||
@@ -112,16 +125,19 @@ setup_dynamic_partitions() {
|
||||
}
|
||||
|
||||
mount_subpartitions() {
|
||||
# Do not create subpartition mappings if pmOS_boot
|
||||
# already exists (e.g. installed on an sdcard)
|
||||
[ -n "$(find_boot_partition)" ] && return
|
||||
try_parts="/dev/disk/by-partlabel/userdata /dev/disk/by-partlabel/system* /dev/mapper/system*"
|
||||
android_parts=""
|
||||
for x in $try_parts; do
|
||||
[ -e "$x" ] && android_parts="$android_parts $x"
|
||||
done
|
||||
|
||||
attempt_start=$(get_uptime_seconds)
|
||||
wait_seconds=10
|
||||
echo "Trying to mount subpartitions for $wait_seconds seconds..."
|
||||
while [ -z "$(find_boot_partition)" ]; do
|
||||
partitions="$(grep -v "loop\|ram" < /proc/diskstats |\
|
||||
partitions="$android_parts $(grep -v "loop\|ram" < /proc/diskstats |\
|
||||
sed 's/\(\s\+[0-9]\+\)\+\s\+//;s/ .*//;s/^/\/dev\//')"
|
||||
echo "$partitions" | while read -r partition; do
|
||||
for partition in $partitions; do
|
||||
case "$(kpartx -l "$partition" 2>/dev/null | wc -l)" in
|
||||
2)
|
||||
echo "Mount subpartitions of $partition"
|
||||
@@ -148,7 +164,22 @@ mount_subpartitions() {
|
||||
done
|
||||
}
|
||||
|
||||
# Rewrite /dev/dm-X paths to /dev/mapper/...
|
||||
pretty_dm_path() {
|
||||
dm="$1"
|
||||
n="${dm#/dev/dm-}"
|
||||
|
||||
# If the substitution didn't do anything, then we're done
|
||||
[ "$n" = "$dm" ] && echo "$dm" && return
|
||||
|
||||
# Get the name of the device mapper device
|
||||
name="/dev/mapper/$(cat "/sys/class/block/dm-${n}/dm/name")"
|
||||
echo "$name"
|
||||
}
|
||||
|
||||
find_root_partition() {
|
||||
[ -n "$PMOS_ROOT" ] && echo "$PMOS_ROOT" && return
|
||||
|
||||
# The partition layout is one of the following:
|
||||
# a) boot, root partitions on sdcard
|
||||
# b) boot, root partition on the "system" partition (which has its
|
||||
@@ -162,13 +193,14 @@ find_root_partition() {
|
||||
# shellcheck disable=SC2013
|
||||
if [ "$ROOT_PARTITION_UNLOCKED" = 0 ]; then
|
||||
for x in $(cat /proc/cmdline); do
|
||||
[ "$x" = "${x#pmos_root_uuid=}" ] && continue
|
||||
DEVICE="$(findfs UUID="${x#pmos_root_uuid=}")"
|
||||
done
|
||||
|
||||
for x in $(cat /proc/cmdline); do
|
||||
[ "$x" = "${x#pmos_root=}" ] && continue
|
||||
DEVICE="${x#pmos_root=}"
|
||||
if ! [ "$x" = "${x#pmos_root_uuid=}" ]; then
|
||||
PMOS_ROOT="$(findfs UUID="${x#pmos_root_uuid=}")"
|
||||
break
|
||||
fi
|
||||
if ! [ "$x" = "${x#pmos_root=}" ]; then
|
||||
PMOS_ROOT="${x#pmos_root=}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# On-device installer: before postmarketOS is installed,
|
||||
@@ -179,61 +211,61 @@ find_root_partition() {
|
||||
# p2: (reserved space) <--- pmos_root
|
||||
# p3: pmOS_install
|
||||
# Details: https://postmarketos.org/on-device-installer
|
||||
if [ -n "$DEVICE" ]; then
|
||||
next="$(echo "$DEVICE" | sed 's/2$/3/')"
|
||||
if [ -n "$PMOS_ROOT" ]; then
|
||||
next="$(echo "$PMOS_ROOT" | sed 's/2$/3/')"
|
||||
|
||||
# If the next partition is labeled pmOS_install (and
|
||||
# not pmOS_deleteme), then postmarketOS is not
|
||||
# installed yet.
|
||||
if blkid | grep "$next" | grep -q pmOS_install; then
|
||||
DEVICE="$next"
|
||||
PMOS_ROOT="$next"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Try partitions in /dev/mapper and /dev/dm-* first
|
||||
if [ -z "$DEVICE" ]; then
|
||||
for id in pmOS_install pmOS_root crypto_LUKS; do
|
||||
for path in /dev/mapper /dev/dm; do
|
||||
DEVICE="$(blkid | grep "$path" | grep "$id" \
|
||||
| cut -d ":" -f 1 | head -n 1)"
|
||||
[ -z "$DEVICE" ] || break 2
|
||||
done
|
||||
done
|
||||
fi
|
||||
[ -n "$PMOS_ROOT" ] && echo "$PMOS_ROOT" && return
|
||||
|
||||
# Then try all devices
|
||||
if [ -z "$DEVICE" ]; then
|
||||
for id in pmOS_install pmOS_root crypto_LUKS; do
|
||||
DEVICE="$(blkid | grep "$id" | cut -d ":" -f 1 \
|
||||
| head -n 1)"
|
||||
[ -z "$DEVICE" ] || break
|
||||
done
|
||||
fi
|
||||
echo "$DEVICE"
|
||||
for id in pmOS_install pmOS_root crypto_LUKS; do
|
||||
PMOS_ROOT="$(findfs LABEL="$id")"
|
||||
[ -n "$PMOS_ROOT" ] && break
|
||||
done
|
||||
|
||||
PMOS_ROOT=$(pretty_dm_path "$PMOS_ROOT")
|
||||
echo "$PMOS_ROOT"
|
||||
}
|
||||
|
||||
find_boot_partition() {
|
||||
[ -n "$PMOS_BOOT" ] && echo "$PMOS_BOOT" && return
|
||||
|
||||
# shellcheck disable=SC2013
|
||||
for x in $(cat /proc/cmdline); do
|
||||
[ "$x" = "${x#pmos_boot_uuid=}" ] && continue
|
||||
findfs UUID="${x#pmos_boot_uuid=}"
|
||||
path="/dev/disk/by-uuid/${x#pmos_boot_uuid=}"
|
||||
[ -e "$path" ] && PMOS_BOOT="$path" && echo "$path"
|
||||
return
|
||||
done
|
||||
|
||||
# shellcheck disable=SC2013
|
||||
for x in $(cat /proc/cmdline); do
|
||||
[ "$x" = "${x#pmos_boot=}" ] && continue
|
||||
echo "${x#pmos_boot=}"
|
||||
path="${x#pmos_boot=}"
|
||||
[ -e "$path" ] && PMOS_BOOT="$path" && echo "$path"
|
||||
return
|
||||
done
|
||||
|
||||
# * "pmOS_i_boot" installer boot partition (fits 11 chars for fat32)
|
||||
# * "pmOS_inst_boot" old installer boot partition (backwards compat)
|
||||
# * "pmOS_boot" boot partition after installation
|
||||
findfs LABEL="pmOS_i_boot" \
|
||||
|| findfs LABEL="pmOS_inst_boot" \
|
||||
|| findfs LABEL="pmOS_boot"
|
||||
for p in pmOS_i_boot pmOS_inst_boot pmOS_boot; do
|
||||
PMOS_BOOT="$(findfs LABEL="$p")"
|
||||
[ -n "$PMOS_BOOT" ] && break
|
||||
done
|
||||
|
||||
# If we didn't find it, then we're done
|
||||
[ -z "$PMOS_BOOT" ] && return
|
||||
|
||||
PMOS_BOOT=$(pretty_dm_path "$PMOS_BOOT")
|
||||
echo "$PMOS_BOOT"
|
||||
}
|
||||
|
||||
get_partition_type() {
|
||||
@@ -352,22 +384,24 @@ resize_root_partition() {
|
||||
parted -f -s "$partition_dev" resizepart 2 100%
|
||||
kpartx -afs "$partition_dev"
|
||||
ROOT_PARTITION_RESIZED=1
|
||||
else
|
||||
echo "Not resizing root partition ($partition): no free space left"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Resize the root partition (non-subpartitions). Usually we do not want
|
||||
# this, except for QEMU devices and non-android devices (e.g.
|
||||
# PinePhone). For them, it is fine to use the whole storage device and
|
||||
# so we pass PMOS_FORCE_PARTITION_RESIZE as kernel parameter.
|
||||
if grep -q PMOS_FORCE_PARTITION_RESIZE /proc/cmdline; then
|
||||
elif grep -q PMOS_FORCE_PARTITION_RESIZE /proc/cmdline; then
|
||||
partition_dev="$(echo "$partition" | sed -E 's/p?2$//')"
|
||||
if has_unallocated_space "$partition_dev"; then
|
||||
echo "Resize root partition ($partition)"
|
||||
parted -f -s "$partition_dev" resizepart 2 100%
|
||||
partprobe
|
||||
ROOT_PARTITION_RESIZED=1
|
||||
else
|
||||
echo "Not resizing root partition ($partition): no free space left"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Resize the root partition (non-subpartitions) on Chrome OS devices.
|
||||
# Match $deviceinfo_cgpt_kpart not being empty instead of cmdline
|
||||
@@ -375,14 +409,19 @@ resize_root_partition() {
|
||||
# partitioning methods. This also resizes third partition instead of
|
||||
# second, because these devices have an additional kernel partition
|
||||
# at the start.
|
||||
if [ -n "$deviceinfo_cgpt_kpart" ]; then
|
||||
elif [ -n "$deviceinfo_cgpt_kpart" ]; then
|
||||
partition_dev="$(echo "$partition" | sed -E 's/p?3$//')"
|
||||
if has_unallocated_space "$partition_dev"; then
|
||||
echo "Resize root partition ($partition)"
|
||||
parted -f -s "$partition_dev" resizepart 3 100%
|
||||
partprobe
|
||||
ROOT_PARTITION_RESIZED=1
|
||||
else
|
||||
echo "Not resizing root partition ($partition): no free space left"
|
||||
fi
|
||||
|
||||
else
|
||||
echo "Unable to resize root partition: failed to find qualifying partition"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -626,7 +665,7 @@ show_splash() {
|
||||
# shellcheck disable=SC2154,SC2059
|
||||
/usr/bin/pbsplash -s /usr/share/pbsplash/pmos-logo-text.svg \
|
||||
-b "Linux $(uname -r) | $deviceinfo_codename" \
|
||||
-m "$(printf "$1")" &
|
||||
-m "$(printf "$1")" >/dev/null &
|
||||
}
|
||||
|
||||
set_framebuffer_mode() {
|
||||
|
||||
@@ -57,6 +57,8 @@ echo "This is a security hole! Only use it for debugging, and"
|
||||
echo "uninstall the debug-shell hook afterwards!"
|
||||
echo "---"
|
||||
|
||||
reconfigure_logging "for debug-shell"
|
||||
|
||||
if tty -s; then
|
||||
echo "Exit the shell to continue booting:"
|
||||
pmos_shell
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
pkgname=postmarketos-mkinitfs-hook-debug-shell
|
||||
pkgver=0.4.5
|
||||
pkgver=0.4.6
|
||||
pkgrel=0
|
||||
pkgdesc="Root shell in the initramfs (security hole, for debugging only)"
|
||||
url="https://postmarketos.org"
|
||||
@@ -17,6 +17,6 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
90829cc17d62932730720d6a4d205c9e0093303f6d09865a4d4e83e08677cf4005cf38b02cde546082d60cf97264ddf60b4d76893d0f87e3bda4729bc04a171a 20-debug-shell.sh
|
||||
c4042dd9d9f9d7d604bfd39016e626e22af898e3ba48beed9d5a50aa62571412c510aec90b16b218938f85df1f09caf7d955c6b9c8e893959242fd9007c9264b 20-debug-shell.sh
|
||||
845d2eb6ab72c5c1472d65305241ca21dbc26784684e9ae99a180a255f8f7f62123b363d73c642df1f9687106340078311a68a76c123f16829b941bff9151735 20-debug-shell.files
|
||||
"
|
||||
@@ -0,0 +1,26 @@
|
||||
# Maintainer: Caleb Connolly <caleb@connolly.tech>
|
||||
pkgname=postmarketos-mkinitfs-hook-kernelmodules
|
||||
pkgver=1.0.0
|
||||
pkgrel=0
|
||||
pkgdesc="Includes all kernel modules in the initramfs and bind-mounts /lib/modules during boot"
|
||||
url="https://postmarketos.org"
|
||||
arch="noarch"
|
||||
license="GPL-2.0-or-later"
|
||||
options="!check" # No tests
|
||||
source="
|
||||
install_kernel.sh
|
||||
lib_modules.files
|
||||
"
|
||||
builddir="$srcdir/"
|
||||
|
||||
package() {
|
||||
install -Dm644 "$srcdir"/install_kernel.sh \
|
||||
"$pkgdir"/usr/share/mkinitfs/hooks/sysroot/10-install_kernel.sh
|
||||
install -Dm644 "$srcdir"/lib_modules.files \
|
||||
"$pkgdir"/usr/share/mkinitfs/files/lib_modules.files
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
97d3e08415b3ee1425555d5fd11e123e4cbe9afff1624a1c28caa74c6592f9d29bb209693a3f42fef1a8f60d4373be0f9350ce8951ef462cea1faa3afcaac352 install_kernel.sh
|
||||
36d7a7e727a41c4dc6390a77a0ef7a08b5d3d34d605881d7128e1bdd34c6704dc4fa7b7d03e3646fc2c569afc9ef16a2da3671ca995be3835620338ae3f5e882 lib_modules.files
|
||||
"
|
||||
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "Remounting /sysroot RW"
|
||||
mount -o remount,rw /sysroot
|
||||
echo "Installing kernel modules to sysroot"
|
||||
cp -af /lib/modules/* /sysroot/lib/modules/
|
||||
echo "All done!"
|
||||
mount -o remount,ro /sysroot
|
||||
@@ -0,0 +1,2 @@
|
||||
/lib/modules/*
|
||||
/usr/share/mkinitfs/hooks/sysroot/10-install_kernel.sh:/hooks/sysroot/10-install_kernel.sh
|
||||
Reference in new issue
Block a user