--- trunk/installer/include/hwdetection.sh 2010/05/30 17:49:14 1027 +++ trunk/installer/include/hwdetection.sh 2010/05/31 22:03:51 1065 @@ -75,22 +75,8 @@ { local item="$1" local modules - - # being little tricky here :) - # does following: - # grep: - # -> 'Driver Modules: "via82cxxx", "ide_cd"' - # cut: - # -> ' "via82cxxx", "ide_cd"' - # sed1: - # -> ' modules="via82cxxx", "ide_cd"' - # sed2: - # -> ' modules="via82cxxx ide_cd"' - # then evaluate -> eval modules="via82cxxx ide_cd" - # and we get a variable $modules with all mods - #eval $(hwinfo --"${item}" | grep "Driver Modules:" | cut -d: -f2 | sed -e "s:\":modules=\":" -e "s:\",\ \":\ :") - local i + for i in $(hwinfo --"${item}" | grep "Driver Modules:" | cut -d: -f2 ) do eval $(echo "${i}" | sed -e "s:\":modules=\"\${modules}\ :" -e "s:,:\ :") @@ -248,7 +234,6 @@ for i in $* do case $1 in - #--root|-r) shift; root="$1" ;; --initrd|-i) shift; initrd="$1" ;; --config|-c) shift; config="$1" ;; --kernelversion|-v) shift; kernel="$1" ;; @@ -298,8 +283,15 @@ # http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/fb/uvesafb.txt # EOF - # default config 1024x768 and 60 HZ - echo "options uvesafb mode_option=1024x768-32@60 scroll=ywrap" >> ${uvesafb_config} + # fix a issues with virtualbox and 'ywrap' + if [[ ! -z $(hwinfo --bios | grep -i virtualbox) ]] + then + # use redraw on virtualbox + echo "options uvesafb mode_option=1024x768-32@60 scroll=redraw" >> ${uvesafb_config} + else + # default config 1024x768 and 60 HZ + echo "options uvesafb mode_option=1024x768-32@60 scroll=ywrap" >> ${uvesafb_config} + fi fi # remove all duplicate modules @@ -327,49 +319,3 @@ umount ${INSTALL_ROOT}/proc umount ${INSTALL_ROOT}/sys } - -# special: memory (size), floppy (modprobe floppy), smp (support y/n) -# sound (which module? -> eval $(hwinfo --sound | grep "Driver Modules:" | cut -d: -f2 | sed s:\":a=\":) ) -# - -# for i in cdrom cpu disk floppy gfxcard keyboard memory monitor mouse -# netcard pppoe scsi smp \ -# sound wlan -# do -# echo -------- ${i} -# get_hwinfo ${i} -# echo ------------------------------------------------- -# echo -# done - -# get_driver_modules sound -# get_driver_modules wlan -# get_driver_modules cdrom -# get_driver_modules disk -# get_driver_modules gfxcard -# get_x11_driver_modules - -# # get a modules list -# for i in sound wlan cdrom disk gfxcard -# do -# ALL_MODULES="${ALL_MODULES} $(get_driver_modules ${i})" -# done -# ALL_MODULES="${ALL_MODULES} $(get_x11_driver_modules)" -# # show a clean list -# for i in $(remove_duplicates ${ALL_MODULES}) -# do -# echo ${i} -# done - -#create_initrd /root/TEST/initrd -#get_driver_modules cdrom -#get_driver_modules disk -#get_driver_modules scsi -#get_driver_modules all - -# network -#get_hwinfo --with-description netcard -#get_driver_modules netcard - -#get_hwinfo disk -#get_hwinfo partition | grep /dev/hda