diff options
author | ramon <ramongomez@us.es> | 2016-08-26 10:32:56 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2016-08-26 10:32:56 +0000 |
commit | 36919af0f19e74901c2916346171b7af98ebd4f4 (patch) | |
tree | 20617ed228bd0c5c319cde720211ce4868d7a5f1 | |
parent | 0d9c5e1131e21a27a5b64d63a57cf23af72ea612 (diff) |
#724: Adaptación de ogLive basado en Ubuntu 16.04:
* Actualizar lista de módulos de vídeo que no deben cargarse y cargar módulo de ratón USB.
* Mostrar resolución de pantalla y driver por defecto, si solo hay una opción disponible.
* Soportar resolución por defecto para módulo uvesafb ({{{video=uvesafb:D}}}).
git-svn-id: https://opengnsys.es/svn/branches/version1.1@4999 a21b9725-9963-47de-94b9-378ad31fedc9
4 files changed, 22 insertions, 19 deletions
diff --git a/client/boot-tools/includes/etc/initramfs-tools/modules b/client/boot-tools/includes/etc/initramfs-tools/modules index b3adada6..8300452a 100644 --- a/client/boot-tools/includes/etc/initramfs-tools/modules +++ b/client/boot-tools/includes/etc/initramfs-tools/modules @@ -22,4 +22,5 @@ usbcore uhci_hcd ehci_hcd usbhid +usbmouse mac-hid diff --git a/client/boot-tools/includes/etc/initramfs-tools/scripts/ogfunctions b/client/boot-tools/includes/etc/initramfs-tools/scripts/ogfunctions index 0c2ffb94..1175c7c3 100644 --- a/client/boot-tools/includes/etc/initramfs-tools/scripts/ogfunctions +++ b/client/boot-tools/includes/etc/initramfs-tools/scripts/ogfunctions @@ -82,26 +82,28 @@ ogChangeVideoResolution () { # Variables locales. local DRIVER MODE -# Obtener driver y resolución. -DRIVER="$(echo $video|cut -f1 -d:)" -MODE="$(echo $video|cut -f2 -d:)" -case "$DRIVER" in - # Cambiar resolución para driver "uvesafb". - uvesafb) - # Mantener resolución por defecto si solo hay una opción disponible. - if [ $(awk 'END {print NR}' /sys/class/graphics/fb0/modes) -eq 1 ]; then - echo "Default screen mode: $(awk -F"[:-]" '{print $2}' /sys/class/graphics/fb0/modes),$(cat /sys/class/graphics/fb0/bits_per_pixel)bpp." - else +# Mostrar resolución y driver por defecto si solo hay una opción disponible. +if [ $(grep -c "" /sys/class/graphics/fb0/modes) -eq 1 ]; then + echo "Default screen mode: $(cat /sys/class/graphics/fb0/modes),$(cat /sys/class/graphics/fb0/bits_per_pixel)bpp$(lsmod|awk '$1=="video" && $3>0 {printf " (%s)",$4}')." +else + # Obtener driver y resolución. + DRIVER="$(echo $video|cut -f1 -d:)" + MODE="$(echo $video|cut -f2 -d:)" + case "$DRIVER" in + # Cambiar resolución para driver "uvesafb". + uvesafb) + # Obtener modo por defecto si parámetro "video=uvesafb:D". + [ "$MODE" == "D" ] && MODE=$(awk -F: '$1=="D" {print $2; nextfile}' /sys/class/graphics/fb0/modes) # Cambiar resolución según valor del parámetro "video". - grep ":$(echo $MODE|cut -f1 -d-)p" /sys/class/graphics/fb0/modes | head -1 > /sys/class/graphics/fb0/mode 2>&1 || MODE="640x480-16" + grep ":$(echo ${MODE/p/}|cut -f1 -d-)p" /sys/class/graphics/fb0/modes | head -1 > /sys/class/graphics/fb0/mode 2>&1 echo "$(echo $MODE|cut -f2 -d-)" > /sys/class/graphics/fb0/bits_per_pixel 2>&1 echo "Screen mode: $(cat /sys/class/graphics/fb0/mode),$(cat /sys/class/graphics/fb0/bits_per_pixel)bpp." - fi - ;; - # Resolución por defecto para el resto de casos. - *) echo "Unknown video driver, using default mode." - ;; -esac + ;; + # Resolución por defecto para el resto de casos. + *) echo "Unknown video driver, using default mode." + ;; + esac +fi } diff --git a/client/boot-tools/includes/etc/modprobe.d/blacklist-framebuffer.conf b/client/boot-tools/includes/etc/modprobe.d/blacklist-framebuffer.conf index 8b047e4e..51a9ac64 100644 --- a/client/boot-tools/includes/etc/modprobe.d/blacklist-framebuffer.conf +++ b/client/boot-tools/includes/etc/modprobe.d/blacklist-framebuffer.conf @@ -10,6 +10,7 @@ blacklist cyblafb blacklist gx1fb blacklist hgafb blacklist i810fb +blacklist i915_bpo blacklist intelfb blacklist kyrofb blacklist lxfb @@ -17,6 +18,7 @@ blacklist matroxfb_base blacklist neofb blacklist nvidiafb blacklist pm2fb +blacklist radeon blacklist rivafb blacklist s1d13xxxfb blacklist savagefb @@ -24,7 +26,6 @@ blacklist sisfb blacklist sstfb blacklist tdfxfb blacklist tridentfb -#blacklist vesafb blacklist vfb blacklist viafb blacklist vt8623fb diff --git a/client/shared/etc/preinit/loadmodules.sh b/client/shared/etc/preinit/loadmodules.sh index c732f420..ded35393 100755 --- a/client/shared/etc/preinit/loadmodules.sh +++ b/client/shared/etc/preinit/loadmodules.sh @@ -15,7 +15,6 @@ echo "${MSG_LOADMODULES:-.}" # Módulo del ratón. modprobe psmouse 2>/dev/null -modprobe usbmouse 2>/dev/null # Cargar módulos específicos del kernel del cliente. for m in $OGLIB/modules/$(uname -r)/*.ko; do |