rockchip,rk322x: fix gpio,i2c group creation (#6023)

This commit is contained in:
Paolo 2023-12-09 07:55:30 +01:00 committed by GitHub
parent 67e0bb2fbb
commit 5599e234ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 5 deletions

View File

@ -131,7 +131,12 @@ uboot_custom_postprocess() {
family_tweaks() {
true
# Create gpio and i2c groups on the build rootfs; they are matched against
# udev rules to allow non-root user access to these resources
chroot_sdcard addgroup --system --quiet --gid 900 gpio
chroot_sdcard addgroup --system --quiet --gid 901 i2c
return 0
}
@ -148,8 +153,6 @@ family_tweaks_bsp() {
install -m 755 $SRC/packages/bsp/rockchip/hdmi-hotplug $destination/usr/local/bin
# Peripheral access for specific groups
addgroup --system --quiet --gid 997 gpio
addgroup --system --quiet --gid 998 i2c
cp $SRC/packages/bsp/rockchip/70-gpio.rules $destination/etc/udev/rules.d
cp $SRC/packages/bsp/rockchip/71-i2c.rules $destination/etc/udev/rules.d

View File

@ -77,6 +77,12 @@ family_tweaks() {
display_alert "Can't find pulseaudio config" "${BOARD} - family_tweaks" "warn"
fi
fi
# Create gpio and i2c groups on the build rootfs; they are matched against
# udev rules to allow non-root user access to these resources
chroot_sdcard addgroup --system --quiet --gid 900 gpio
chroot_sdcard addgroup --system --quiet --gid 901 i2c
return 0
}
@ -92,8 +98,6 @@ family_tweaks_bsp() {
install -m 755 $SRC/packages/bsp/rockchip/hdmi-hotplug $destination/usr/local/bin
# Peripheral access for specific groups
addgroup --system --quiet --gid 997 gpio || display_alert "Failed to create 997 group gid" "gpio" "warn"
addgroup --system --quiet --gid 998 i2c || display_alert "Failed to create 997 group gid" "gpio" "warn"
cp $SRC/packages/bsp/rockchip/70-gpio.rules $destination/etc/udev/rules.d
cp $SRC/packages/bsp/rockchip/71-i2c.rules $destination/etc/udev/rules.d