Compare commits
8
Commits
zenfone3
...
deck-kernel
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7595cdbcb1 | ||
|
|
db18bf5de3 | ||
|
|
f71ef9f787 | ||
|
|
a7d92d9f8b | ||
|
|
468cbbe102 | ||
|
|
416b90dc61 | ||
|
|
590d339717 | ||
|
|
4b84be3d62 |
No files matched your search
@@ -0,0 +1,68 @@
|
||||
# Maintainer: Caleb Connolly <caleb@connolly.tech>
|
||||
# Kernel config based on: arch/x86/configs/neptune_defconfig and jupiter.config
|
||||
|
||||
_flavor="valve-jupiter"
|
||||
pkgname=linux-$_flavor
|
||||
pkgver=6.4.0
|
||||
pkgrel=0
|
||||
pkgdesc="Mainline Kernel fork for SDM845 devices"
|
||||
arch="x86_64"
|
||||
_carch="x86_64"
|
||||
url="https://gitlab.com/calebccff/linux-jupiter"
|
||||
license="GPL-2.0-only"
|
||||
options="!check !tracedeps
|
||||
pmb:cross-native
|
||||
pmb:kconfigcheck-community"
|
||||
makedepends="
|
||||
bash
|
||||
bison
|
||||
diffutils
|
||||
python3
|
||||
elfutils-dev
|
||||
linux-headers
|
||||
findutils
|
||||
flex
|
||||
installkernel
|
||||
openssl-dev
|
||||
pahole
|
||||
perl
|
||||
"
|
||||
|
||||
_config="config-$_flavor.$arch"
|
||||
_tag="jupiter-6.4.0"
|
||||
|
||||
# Source
|
||||
source="
|
||||
linux-$_tag.tar.gz::https://gitlab.com/calebccff/linux-jupiter/-/archive/$_tag/linux-$_tag.tar.gz
|
||||
$_config
|
||||
"
|
||||
builddir="$srcdir/linux-$_tag"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
cp "$srcdir/config-$_flavor.$arch" .config
|
||||
}
|
||||
|
||||
build() {
|
||||
unset LDFLAGS
|
||||
make ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-$_flavor"
|
||||
}
|
||||
|
||||
package() {
|
||||
make modules_install install \
|
||||
ARCH="$_carch" \
|
||||
INSTALL_PATH="$pkgdir"/boot/ \
|
||||
INSTALL_MOD_PATH="$pkgdir" \
|
||||
INSTALL_MOD_STRIP=1 \
|
||||
INSTALL_DTBS_PATH="$pkgdir"/boot/dtbs
|
||||
rm -f "$pkgdir"/lib/modules/*/build "$pkgdir"/lib/modules/*/source
|
||||
|
||||
install -D "$builddir"/include/config/kernel.release \
|
||||
"$pkgdir"/usr/share/kernel/$_flavor/kernel.release
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
3dde18598e08ec2dc40aaa97470808ea7d0b685bc180b304144b798126c3c7a47534afea1a1787498990fc7412558f1e98fb8f956565760990e0d11cacbdf9fe linux-sdm845-6.3.4.tar.gz
|
||||
1942c3a25c72cdf1ae2789c25879398561db2c396ac7b5e8e27d7c075ce743c64827d519c04ddb57f0d42fa1b21950433a841541bef185d2e4a8fdc47029b182 config-valve-jupiter.aarch64
|
||||
"
|
||||
File diff suppressed because it is too large.
Load diff
@@ -4,6 +4,7 @@
|
||||
/etc
|
||||
/lib
|
||||
/proc
|
||||
/run
|
||||
/sbin
|
||||
/sys
|
||||
/sysroot
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
/bin/busybox-extras
|
||||
/bin/sh
|
||||
/etc/deviceinfo
|
||||
/etc/mdev.conf
|
||||
/etc/group
|
||||
/etc/passwd
|
||||
/lib/mdev/persistent-storage
|
||||
/sbin/blkid
|
||||
/sbin/switch_root
|
||||
/usr/share/misc/source_deviceinfo
|
||||
/usr/bin/unudhcpd
|
||||
/usr/sbin/kpartx
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
# Maintainer: Oliver Smith <ollieparanoid@postmarketos.org>
|
||||
# Co-Maintainer: Clayton Craft <clayton@craftyguy.net>
|
||||
pkgname=postmarketos-initramfs
|
||||
pkgver=1.1.1
|
||||
pkgver=1.3.0
|
||||
pkgrel=0
|
||||
pkgdesc="Base files for the postmarketOS initramfs / initramfs-extra"
|
||||
url="https://postmarketos.org"
|
||||
options="!check" # no tests
|
||||
depends="
|
||||
btrfs-progs
|
||||
busybox-extras
|
||||
@@ -22,6 +23,7 @@ depends="
|
||||
postmarketos-mkinitfs
|
||||
unudhcpd
|
||||
xz
|
||||
util-linux-misc
|
||||
"
|
||||
source="
|
||||
00-default.modules
|
||||
@@ -65,9 +67,9 @@ package() {
|
||||
|
||||
sha512sums="
|
||||
bed319179bcd0b894d6267c7e73f2890db07bc07df71542936947dfb3bdb17fade8a7b4e7b577f278af4472464427bba07f75aff0a1e454a4167052c088f3b6a 00-default.modules
|
||||
399da6e61993f48c8a62c956bb15d294cac10bf003d84257efdf4a213ebc87bb51cdcd75c4675f51c3be832146b8f21a7c769bf3e94f574a5067f001662632a1 00-initramfs-base.dirs
|
||||
18ccd73fe772a51c266a1812900e599f7a6c1453dc8f2f3adf542c64523cae9f13859ada17ec88d17d53dbff585228701418d6d302fa6d7cefbeb2de1565d7bc 00-initramfs-base.files
|
||||
5b364300f31c91fd0591eb0715f67cbf5383f45246a5fb9f34b79f7cb2e3b15768b2130e5f32f816cc169950f988c1beabc879ba31645c58ce131a288dbc071d 00-initramfs-base.dirs
|
||||
5a9b9ea7cbcad11683a110eec6d892ad64e30f5b811bd9e1570191e132e9ecdfe11c1b4110dc95a9a2855f256345d5ac209590e531620e76b140765114b17ff0 00-initramfs-base.files
|
||||
e984cd3033ce8752ebc71127828b964b46259a5263c2ebfab32c1394b674bcff464862ff00b8e920d3d31386c54ca0b94f84bc77580d275ecfeea33e76c07ef4 00-initramfs-extra-base.files
|
||||
7742722dcad144eaa2af154711ba06afba9686a3d7b7ff80329d3e989f72d6105029aac8f32649888e2faafd970f286cbdcf467b6b4c1e12aa0fefdb5929a196 init.sh
|
||||
0325b91829a45d76c5606fec3af610ac0b138a81586ae3836058a773c10a6ed7c8b9090861cc8554c228956baa27dfe4b9edb5f7104673961649f65a878eb9dc init_functions.sh
|
||||
6b59179d479e64dbe081ba96811de94ff29eaa7e877d3359b8c10c4df69cc16d0508544629c1b6608f3a480b1b1592a246b380039acdcf76ba4637cdf881e682 init.sh
|
||||
9b3e54b5cf9fb972f543518f33efa209105e4327968a1b3e9a1e6fd29c4d47095d1db02acff6812e6d7cc29934749fb9363dcdc8938bcf0a3108c15180d74f90 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,SC2086
|
||||
@@ -52,10 +51,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,44 @@
|
||||
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.
|
||||
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 dev /dev -o mode=0755,nosuid || echo "Couldn't mount /dev"
|
||||
mount -t tmpfs run /run -o nosuid,nodev,mode=0755 || echo "Couldn't mount /run"
|
||||
|
||||
mkdir /config
|
||||
mount -t configfs -o nodev,noexec,nosuid configfs /config
|
||||
@@ -34,14 +49,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() {
|
||||
@@ -103,16 +115,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"
|
||||
@@ -139,7 +154,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
|
||||
@@ -153,13 +183,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,
|
||||
@@ -170,61 +201,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() {
|
||||
@@ -617,7 +648,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
|
||||
|
||||
@@ -17,6 +17,6 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
90829cc17d62932730720d6a4d205c9e0093303f6d09865a4d4e83e08677cf4005cf38b02cde546082d60cf97264ddf60b4d76893d0f87e3bda4729bc04a171a 20-debug-shell.sh
|
||||
c4042dd9d9f9d7d604bfd39016e626e22af898e3ba48beed9d5a50aa62571412c510aec90b16b218938f85df1f09caf7d955c6b9c8e893959242fd9007c9264b 20-debug-shell.sh
|
||||
ca37f761c23c7fe7a351a13f535531580e740a14bb627cd65963287200a616d41c76185bed6aff3abeafe6b0ca9c61f15ee9343f1492dfdba0fe3b6d38e1d3e4 20-debug-shell.files
|
||||
"
|
||||
Reference in new issue
Block a user