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
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?"
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
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/
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/
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/