check_partitions() { grep mtdblock4 /proc/partitions >/dev/null if [ $? = 0 ] ; then mtd_found=1 else mtd_found=0 fi grep sda1 /proc/partitions >/dev/null if [ $? = 0 ] ; then sda_found=1 else sda_found=0 fi grep mmc /proc/partitions >/dev/null if [ $? = 0 ] ; then mmc_found=1 else mmc_found=0 fi } wait_for_device() { complained=0 while [ true ]; do grep $root_dev /proc/partitions > /dev/null if [ $? = 0 ]; then break; fi if [ $complained -ne 1 ]; then echo -n "Waiting for $root_dev_name to become available... " complained=1 fi sleep 1 done if [ $complained -eq 1 ]; then echo "found it." fi } show_roots() { echo "Choose bootup option:" if [ $mtd_found -eq 1 ]; then echo " 1) Flash" fi if [ $mmc_found -eq 1 ]; then echo " 2) MMC" fi if [ $sda_found -eq 1 ]; then echo " 3) USB Mass Storage Device" fi echo " 9) Start a shell" echo "" }