Files
agnos-builder/userspace/root/etc/udev/scripts/bootdevice-by-name.sh
T
Adeeb Shihadeh e8e36e592d remove all armhf (#564)
* remove all armhf

* fix that

* Revert "build_system: stream build output directly into rootfs (#552)"

This reverts commit 71e7369174.

* fix up build

* wifi works

* fix graphics

* revert that

* add back
2026-04-30 17:56:53 -07:00

23 lines
544 B
Bash
Executable File

#!/bin/sh
set -e
dev="$1"
uevent="/sys/class/block/$dev/uevent"
[ -e "$uevent" ] || exit 0
boot_dev="$(sed -n 's/.*androidboot.bootdevice=\([^ ]*\).*/\1/p' /proc/cmdline | awk '{print $NF}')"
[ -n "$boot_dev" ] || exit 0
real_sysfs_path="$(realpath "/sys/class/block/$dev")"
case "$real_sysfs_path" in
*"$boot_dev"*) ;;
*) exit 0 ;;
esac
partition_name="$(sed -n 's/^PARTNAME=//p' "$uevent")"
[ -n "$partition_name" ] || exit 0
mkdir -p /dev/block/bootdevice/by-name
ln -sf "/dev/$dev" "/dev/block/bootdevice/by-name/$partition_name"