From: notaz Date: Thu, 28 Jun 2012 21:24:32 +0000 (+0300) Subject: some launcher script tweaks X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=HEAD;p=android_pandora.git some launcher script tweaks --- diff --git a/pnd/gingerbread.pxml b/pnd/gingerbread.pxml index 462f595..6cb6759 100644 --- a/pnd/gingerbread.pxml +++ b/pnd/gingerbread.pxml @@ -4,7 +4,7 @@ Android Gingerbread - + @@ -23,7 +23,7 @@ - + diff --git a/pnd/run_gingerbread.sh b/pnd/run_gingerbread.sh index 9d78fae..a8979e7 100755 --- a/pnd/run_gingerbread.sh +++ b/pnd/run_gingerbread.sh @@ -73,6 +73,12 @@ onexit() fi done + if ! pidof udevd > /dev/null; then + # don't use /etc/init.d/udev, it remounts /dev blindly + /sbin/udevd -d + /sbin/udevadm trigger + fi + if ! pidof X > /dev/null; then # need to restore SGX, X and friends rmmod bufferclass_ti omaplfb pvrsrvkm @@ -116,6 +122,10 @@ if ! test -e /dev/ashmem; then modprobe ashmem delay=0.5 fi +if ! test -e /sys/module/lowmemorykiller; then + # this one is optional + modprobe lowmemorykiller || true +fi sleep $delay if test ! -e /dev/log_events -o ! -e /dev/binder -o ! -e /dev/ashmem; then err "could not load required Android modules,\n\ @@ -172,9 +182,8 @@ mkdir -p $root/vendor/ # handle SGX mkdir -p $root/vendor/pvr echo "0 0 android" > $root/vendor/pvr/egl.cfg - -sgx_kernel_loaded=false rm -f $root/vendor/pvr/gralloc.omap3.so +sgx_kernel_loaded=false # load the right SGX driver if ! grep -q '1.5.15.2766' /proc/pvr/version 2> /dev/null; then @@ -249,18 +258,25 @@ chvt 2 & # may hang.. sleep 1 killall chvt 2> /dev/null || true ifconfig wlan0 down -set -e +killall udevd || true -cp -v /etc/pointercal $root/vendor/ cp -v /lib/modules/$kernel_ver/kernel/drivers/net/wireless/wl1251/wl1251_sdio.ko $root/vendor/ mkdir -p $root/vendor/firmware cp -v /lib/firmware/brf6300.bin $root/vendor/firmware/ +set -e +cp -v /etc/pointercal $root/vendor/ + # some cleanup rm -rf $root/acct/uid/* chroot $root /init & +# revive udev when /init is done with uevents, +# we'll need it to load firmwares and stuff +sleep 10 +/sbin/udevd -d + # wait for a message while true; do sleep 1