mirror of
https://github.com/commaai/agnos-builder.git
synced 2026-07-18 13:22:04 +08:00
e8e36e592d
* 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
23 lines
544 B
Bash
Executable File
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"
|