The Solutor
2006-06-23, 10:11
Hi to everybody.
I was looking around the 770's configuration files when I seen the file
/mnt/initfs/linuxrc
Seems interesting:
Just a piece of the script
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 ""
}
The my idea is that there is some kind of switch that allow to choose the boot partition, but I don't know how to trigger the boot menu.
Anyone has some ideas ?
I was looking around the 770's configuration files when I seen the file
/mnt/initfs/linuxrc
Seems interesting:
Just a piece of the script
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 ""
}
The my idea is that there is some kind of switch that allow to choose the boot partition, but I don't know how to trigger the boot menu.
Anyone has some ideas ?