From: notaz Date: Thu, 14 Jun 2012 23:39:50 +0000 (+0300) Subject: recreate rootfs on ver change, link gralloc X-Git-Tag: r5~5 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4fdefb0f30ad9b8d8c5b17ff4e7185430ade419c;p=android_pandora.git recreate rootfs on ver change, link gralloc gralloc linking is for an attempt to boot when SGX load fails.. --- diff --git a/pnd/run_gingerbread.sh b/pnd/run_gingerbread.sh index 521dc97..9d78fae 100755 --- a/pnd/run_gingerbread.sh +++ b/pnd/run_gingerbread.sh @@ -13,6 +13,8 @@ fi root=/mnt/android mpoint_main=`pwd` kernel_ver=`uname -r` +pnd_version=4 +last_pnd_version=`cat $mpoint_main/last_pnd_version || true` exitcode=1 trap onexit INT QUIT TERM EXIT @@ -121,6 +123,12 @@ perhaps you are running unsupported\nfirmware/kernel." exit 1 fi +if test "x$last_pnd_version" != "x$pnd_version"; then + echo "version changed from $last_pnd_version to $pnd_version" + rm -f rootfs.ext2 + echo "$pnd_version" > $mpoint_main/last_pnd_version +fi + if ! test -e rootfs.ext2; then if ! cp -v pandora/default_rootfs.ext2 rootfs.ext2; then err "file copy failed, not enough space?" @@ -165,8 +173,10 @@ mkdir -p $root/vendor/ mkdir -p $root/vendor/pvr echo "0 0 android" > $root/vendor/pvr/egl.cfg -# load the right SGX driver sgx_kernel_loaded=false +rm -f $root/vendor/pvr/gralloc.omap3.so + +# load the right SGX driver if ! grep -q '1.5.15.2766' /proc/pvr/version 2> /dev/null; then echo have to change SGX kernel driver /etc/init.d/pvr-init stop || true @@ -206,6 +216,7 @@ if $sgx_kernel_loaded; then ln -fs /system/lib/$es/libGLESv1_CM_POWERVR_SGX530_121.so $root/vendor/pvr/ fi ln -fs /system/bin/$es/pvrsrvinit $root/vendor/pvr/ + ln -fs /system/lib/hw/gralloc.omap3.so.1 $root/vendor/pvr/gralloc.omap3.so ln -fs /system/lib/$es/libPVRScopeServices.so $root/vendor/pvr/ ln -fs /system/lib/$es/libglslcompiler.so $root/vendor/pvr/ ln -fs /system/lib/$es/libsrv_um.so $root/vendor/pvr/ diff --git a/scripts/sgx.sh b/scripts/sgx.sh index effbb1f..6ecbed0 100755 --- a/scripts/sgx.sh +++ b/scripts/sgx.sh @@ -28,7 +28,7 @@ mkdir -p $d/system/lib/hw mkdir -p $d/system/lib/$es cp -v $s/eglinfo $d/system/bin/ -cp -v $s/gralloc.omap3.so $d/system/lib/hw/ +cp -v $s/gralloc.omap3.so $d/system/lib/hw/gralloc.omap3.so.1 cp -v $s/libEGL_POWERVR_SGX530_12*.so $d/system/lib/egl/libEGL_POWERVR_SGX530_125.so cp -v $s/libpvr2d.so $d/system/lib/ cp -v $s/libsfutil.so $d/system/lib/ @@ -50,6 +50,7 @@ cp -v $s/libsrv_um.so $d/system/lib/$es/ cp -v $s/libIMGegl.so $d/system/lib/$es/ ln -fs /vendor/pvr/pvrsrvinit $d/system/bin/ +ln -fs /vendor/pvr/gralloc.omap3.so $d/system/lib/hw/gralloc.omap3.so ln -fs /vendor/pvr/libGLESv2_POWERVR_SGX530_121.so $d/system/lib/egl/ ln -fs /vendor/pvr/libGLESv1_CM_POWERVR_SGX530_121.so $d/system/lib/egl/ ln -fs /vendor/pvr/libPVRScopeServices.so $d/system/lib/