Reply
Thread Tools
Posts: 3 | Thanked: 0 times | Joined on May 2006
#1
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
Code:
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 ?

Last edited by The Solutor; 2006-06-23 at 10:16.
 
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#2
this was already discussed in maemo-developers mailing list
http://www.gossamer-threads.com/list...ot%20mmc;#6042

You need either linux flasher to set boot device (flasher --set-root-device mmc) or set it directly on N770. Try as root 'chroot /mnt/initfs cal-tool'.
 
Posts: 3 | Thanked: 0 times | Joined on May 2006
#3
Originally Posted by fanoush
this was already discussed in maemo-developers mailing list
http://www.gossamer-threads.com/list...ot%20mmc;#6042

You need either linux flasher to set boot device (flasher --set-root-device mmc) or set it directly on N770. Try as root 'chroot /mnt/initfs cal-tool'.
Thanks for the reply.

My hope is to start with the boot menu rather than switch the boot device "permanently"

BTW there is an other problem I'm with the 2006 OS, but I think that the binarys in the /initfs directory are "old style" binarys and they doesen't work from the command line of a booted system.

P.S. apologies for the poor english
 
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#4
Originally Posted by The Solutor
My hope is to start with the boot menu rather than switch the boot device "permanently"
yes, you may hope But how do you expect to answer the menu?
The menu is useful only for serial console (special cable needed)
Originally Posted by The Solutor
BTW there is an other problem I'm with the 2006 OS, but I think that the binarys in the /initfs directory are "old style" binarys and they doesen't work from the command line of a booted system.
these are uclibc binaries, use chroot like I suggested, they cannot be executed directly
 
Posts: 3 | Thanked: 0 times | Joined on May 2006
#5
Originally Posted by fanoush
yes, you may hope But how do you expect to answer the menu?
The menu is useful only for serial console (special cable needed)

Er... You are (obviously) right , a script that ask what to do in the next reboot can be a better choice, isn't it ? ( maybe an hard button driven menu too)
 
Reply


 
Forum Jump


All times are GMT. The time now is 09:43.