Skip to content

Commit

Permalink
MBa8MPxL: cleanup board configs
Browse files Browse the repository at this point in the history
- remove unused group periphery
- fix desktop related X11 settings
- harmonize BOARD_NAME

Signed-off-by: Martin Schmiedel <[email protected]>
  • Loading branch information
schmiedelm authored and igorpecovnik committed Jan 27, 2025
1 parent 12d6d07 commit cba2963
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 25 deletions.
37 changes: 20 additions & 17 deletions config/boards/mba8mpxl-ras314.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# MBa8MPxL-RAS314 with TQMa8MPxL
BOARD_NAME="TQ8MP-RAS314"
# MBa8MP-RAS314 with TQMa8MPxL
BOARD_NAME="MBa8MP-RAS314"
BOARDFAMILY="imx8m"
BOARD_MAINTAINER="schmiedelm"
HAS_VIDEO_OUTPUT="yes"
Expand Down Expand Up @@ -27,20 +27,23 @@ function post_family_tweaks_bsp__mba8mpxl-ras314() {
KERNEL=="mlan*", ACTION=="add", RUN+="/sbin/modprobe btnxpuart"
EOF

# Define a function to be run board-side during postinst of the BSP
display_alert "Adding to bsp-cli" "${BOARD}: postinst for periferial access" "info"
postinst_functions+=("board_side_imx8m_bsp_cli_postinst") # add to the postinst function list
function board_side_imx8mpxl_bsp_cli_postinst() {
# Peripheral access for specific groups
addgroup --system --quiet periphery
}
if [[ "${BUILD_DESKTOP}" == "yes" ]]; then
# fix X11 config
mkdir -p "$destination"/etc/X11/xorg.conf.d
cat <<- XORG_HDMI_CONF > "$destination"/etc/X11/xorg.conf.d/10-hdmi.conf
Section "Device"
Identifier "etnaviv"
Driver "modesetting"
Option "kmsdev" "/dev/dri/card1"
Option "AccelMethod" "none" ### "glamor" to enable 3D acceleration, "none" to disable.
Option "Atomic" "On"
EndSection

Section "ServerFlags"
Option "AutoAddGPU" "false"
Option "DRI" "3"
EndSection
XORG_HDMI_CONF
fi

mkdir -p "$destination"/etc/X11/xorg.conf.d
cat <<- EOF > "$destination"/etc/X11/xorg.conf.d/02-driver.conf
Section "Device"
Identifier "main"
driver "fbdev"
Option "fbdev" "/dev/fb0"
EndSection
EOF
}
27 changes: 19 additions & 8 deletions config/boards/mba8mpxl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,23 @@ BOOT_FDT_FILE="freescale/imx8mp-tqma8mpql-mba8mpxl.dtb"
ASOUND_STATE="asound.state.tqma"

function post_family_tweaks_bsp__mba8mpxl() {
mkdir -p "$destination"/etc/X11/xorg.conf.d
cat <<- EOF > "$destination"/etc/X11/xorg.conf.d/02-driver.conf
Section "Device"
Identifier "main"
driver "fbdev"
Option "fbdev" "/dev/fb0"
EndSection
EOF

if [[ "${BUILD_DESKTOP}" == "yes" ]]; then
# fix X11 config
mkdir -p "$destination"/etc/X11/xorg.conf.d
cat <<- XORG_HDMI_CONF > "$destination"/etc/X11/xorg.conf.d/10-hdmi.conf
Section "Device"
Identifier "etnaviv"
Driver "modesetting"
Option "kmsdev" "/dev/dri/card1"
Option "AccelMethod" "none" ### "glamor" to enable 3D acceleration, "none" to disable.
Option "Atomic" "On"
EndSection

Section "ServerFlags"
Option "AutoAddGPU" "false"
Option "DRI" "3"
EndSection
XORG_HDMI_CONF
fi
}

0 comments on commit cba2963

Please sign in to comment.