# hook addon for thin clients with chip VIA make_launcher() { cat << EOF > ${DESTDIR}/scripts/tcos-bottom/15via_openchrome #!/bin/sh # # new header not using prereqs if [ "\$1" = "prereqs" ]; then echo "" exit 0 fi quiet=n . /scripts/functions . /conf/tcos.conf . /conf/tcos-run-functions test1=0 test1=\$(get_vga_vendor 1106) if [ "\$test1" != "1" ]; then # not in client with chip VIA unichrome exit 0 fi log_begin_msg "Loading Via Openchrome drivers" modprobe drm modprobe via [ "\$TCOS_XORG_VIDEO_DRIVER" = "fullauto" ] && exit 0 if [ -f /usr/lib/xorg/modules/drivers/openchrome_drv.so ]; then configurexorg --newsettings --xdriver=openchrome --outputfile=/etc/X11/xorg.conf 2>> /tmp/initramfs.debug else configurexorg --newsettings --xdriver=via --outputfile=/etc/X11/xorg.conf 2>> /tmp/initramfs.debug fi log_end_msg \$? EOF chmod +x ${DESTDIR}/scripts/tcos-bottom/15via_openchrome } if [ $TCOS_ETC_GENERIC ]; then stat_before manual_add_modules drm manual_add_modules via-agp manual_add_modules via manual_add_modules i2c-viapro manual_add_modules i2c-via stat_after "Generic VIA modules support" fi if [ ! -z $TCOS_XORG_DRIVER_OPENCHROME ] || [ ! -e /usr/lib/xorg/modules/drivers/via_drv.so ];then TCOS_XORG_DRIVER_OPENCHROME=1 test_driver1=$(strings /usr/lib/xorg/modules/drivers/via_drv.so 2> /dev/null| grep -c openchrome) test_driver2=$(strings /usr/lib/xorg/modules/drivers/openchrome_drv.so 2> /dev/null | grep -c openchrome) if [ -z $TCOS_ETC_GENERIC ];then manual_add_modules drm manual_add_modules via-agp manual_add_modules via manual_add_modules i2c-viapro manual_add_modules i2c-via fi if [ $TCOS_XORG_DRIVER_OPENCHROME ] && [ "$test_driver1" != 0 ] ; then stat_before cpifexists /usr/lib/libviaXvMC.so /usr/lib cpifexists /usr/lib/libviaXvMCPro.so /usr/lib [ -e /etc/X11/XvMCConfig ] && cpifexists /etc/X11/XvMCConfig /etc/X11 mkdir -p ${DESTDIR}/usr/lib/dri cpifexists /usr/lib/dri/unichrome_dri.so /usr/lib/dri make_launcher stat_after "VIA Openchrome driver support" elif [ $TCOS_XORG_DRIVER_OPENCHROME ] && [ "$test_driver2" != 0 ] ; then stat_before manual_add_modules via_chrome9 cpifexists /usr/lib/libchromeXvMC.so /usr/lib cpifexists /usr/lib/libchromeXvMCPro.so /usr/lib [ -e /etc/X11/XvMCConfig ] && cpifexists /etc/X11/XvMCConfig /etc/X11 mkdir -p ${DESTDIR}/usr/lib/dri [ ! -e ${DESTDIR}/usr/lib/dri/unichrome_dri.so ] && cpifexists /usr/lib/dri/unichrome_dri.so /usr/lib/dri make_launcher stat_after "Openchrome driver support" elif [ $TCOS_XORG_DRIVER_OPENCHROME ] && [ "$test_driver1" = 0 ] && [ "$test_driver2" = 0 ]; then echo "" echo " WARNING: Use Openchrome drivers enabled but don't have installed via/openchrome package" echo "" echo " Please install openchrome VIA drivers package" echo "" fi fi