Fixes for wifi and gui
This commit is contained in:
parent
85902f76fc
commit
14143cfe60
@ -1,5 +1,5 @@
|
||||
[Match]
|
||||
Name=wlp2s0
|
||||
Name=wlp*
|
||||
|
||||
[Network]
|
||||
DHCP=no
|
||||
|
||||
@ -17,13 +17,32 @@ do_install() {
|
||||
install -d ${D}${sysconfdir}/wpa_supplicant
|
||||
install -m 0600 ${WORKDIR}/wpa_supplicant-wlp2s0.conf ${D}${sysconfdir}/wpa_supplicant/
|
||||
|
||||
# Create systemd service symlinks for auto-start
|
||||
# Create systemd service for generic WiFi interface discovery
|
||||
install -d ${D}${sysconfdir}/systemd/system
|
||||
cat > ${D}${sysconfdir}/systemd/system/wifi-connect.service << EOF
|
||||
[Unit]
|
||||
Description=WiFi Auto-Connect Service
|
||||
After=network.target
|
||||
Wants=network.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/bin/sh -c 'for iface in /sys/class/net/wlp*; do [ -e "\$iface" ] && systemctl start wpa_supplicant@\$(basename \$iface).service; done'
|
||||
ExecStop=/bin/sh -c 'for iface in /sys/class/net/wlp*; do [ -e "\$iface" ] && systemctl stop wpa_supplicant@\$(basename \$iface).service; done'
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
# Enable the generic WiFi service
|
||||
install -d ${D}${sysconfdir}/systemd/system/multi-user.target.wants
|
||||
ln -sf ${systemd_system_unitdir}/wpa_supplicant@.service ${D}${sysconfdir}/systemd/system/multi-user.target.wants/wpa_supplicant@wlp2s0.service
|
||||
ln -sf ${sysconfdir}/systemd/system/wifi-connect.service ${D}${sysconfdir}/systemd/system/multi-user.target.wants/wifi-connect.service
|
||||
}
|
||||
|
||||
FILES:${PN} = "${sysconfdir}/systemd/network/* \
|
||||
${sysconfdir}/wpa_supplicant/* \
|
||||
${sysconfdir}/systemd/system/wifi-connect.service \
|
||||
${sysconfdir}/systemd/system/multi-user.target.wants/*"
|
||||
|
||||
RDEPENDS:${PN} = "systemd wpa-supplicant"
|
||||
@ -6,8 +6,19 @@ do_install:append() {
|
||||
# Use kiosk shell for single-app embedded system
|
||||
sed -i '/^\[core\]/a shell=kiosk-shell.so' ${D}${sysconfdir}/xdg/weston/weston.ini
|
||||
|
||||
# Disable desktop shell features
|
||||
# Add fallback backend configuration for hardware compatibility
|
||||
echo "" >> ${D}${sysconfdir}/xdg/weston/weston.ini
|
||||
echo "# Try DRM first, fallback to headless if no graphics" >> ${D}${sysconfdir}/xdg/weston/weston.ini
|
||||
echo "backend=drm-backend.so" >> ${D}${sysconfdir}/xdg/weston/weston.ini
|
||||
echo "" >> ${D}${sysconfdir}/xdg/weston/weston.ini
|
||||
|
||||
# DRM backend configuration
|
||||
echo "[output]" >> ${D}${sysconfdir}/xdg/weston/weston.ini
|
||||
echo "name=HDMI-A-1" >> ${D}${sysconfdir}/xdg/weston/weston.ini
|
||||
echo "mode=1920x1080" >> ${D}${sysconfdir}/xdg/weston/weston.ini
|
||||
echo "" >> ${D}${sysconfdir}/xdg/weston/weston.ini
|
||||
|
||||
# Disable desktop shell features
|
||||
echo "[shell]" >> ${D}${sysconfdir}/xdg/weston/weston.ini
|
||||
echo "panel-position=none" >> ${D}${sysconfdir}/xdg/weston/weston.ini
|
||||
echo "locking=false" >> ${D}${sysconfdir}/xdg/weston/weston.ini
|
||||
|
||||
@ -16,7 +16,8 @@ export KVM_GID=$(getent group kvm | cut -d: -f3)
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "Usage: $0 <service> [additional args...]"
|
||||
echo "Available services:"
|
||||
echo " yocto - Interactive Yocto development environment"
|
||||
echo " disk-image - Yocto build environment, builds disk-image if no other arguments are provided"
|
||||
echo " qemu-server - Starts the qemu VNC server"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user