View Single Post
Posts: 165 | Thanked: 78 times | Joined on Jun 2010
#132
Originally Posted by RobbieThe1st View Post
Well, I'm not opposed; If someone who knows Multiboot code wants to try to figure it out, I'll do my best to help out.

I have a feeling though that, without changing Multiboot's code, there are two options:
1. run it via console mode or,
2. set up an item that loads the Maemo OS, but somehow launches BackupMenu in the boot process. (with boot options?)
Reading multiboot's code (v0.2.5) there are some options that could provide a way to execute BackupMenu.item script.

Code:
main()
{
	local sel i

	init_hw
	init_fs
	init_pm

	if [ -f ${BOOT_FAST} ]
	then
		FAST_BOOT=YES
		rm -f ${BOOT_FAST}
	fi
	
	if [ -f ${BOOT_ITEM} ]
	then
		load_config 99 ${BOOT_ITEM}
	fi

	if is_fast_boot || ! is_slide_open
	then
		boot_item 99
	fi

	init_screen
	init_backlight
	read_config
	
	while :
	do
		print_menu
		
		sel=$(wait_keypress)
	
		echo -e -n '\r'

		case $sel in

			# Timeout
			D)   sel=99 ;;

			# Enter
		        28)  sel=99 ;;

			# 0-9
			16)  sel=1 ;;
			17)  sel=2 ;;
			18)  sel=3 ;;
			19)  sel=4 ;;
			20)  sel=5 ;;
			21)  sel=6 ;;
			22)  sel=7 ;;
			23)  sel=8 ;;
			24)  sel=9 ;;
			25)  sel=0 ;;
		        
			# S - shell
			31)  boot_shell ;;

		        # Backscape - reboot
		        14)  safe_reboot ;;

			# X - poweroff
                        45)  safe_poweroff ;;

		        # B - Fallback if everything else fails
		        48)  boot_script /sbin/preinit_real  ;;
		    
			# D -  Debugging another script
			32)  boot_script /sbin/multiboot_debug  ;;

		esac

		if [ -n "$(array NAME $sel)" ]
		then
			wait_screen $sel
			boot_item $sel
		fi
	done
}


main

# End
The " # S - shell 31) boot_shell ;; " option should open a shell but unfortunately in my system that just doesn't work. The screen goes black and powers off after some time.

The " # D - Debugging another script 32) boot_script /sbin/multiboot_debug ;; " seams like some testing script for debug proposes but i couldn't find any sbin/multiboot_debug in my system.
So perhaps it could be changed to:

Code:
# D -  Debugging another script
32)  boot_script /sbin/BackupMenu.item  ;;
Now it would only be necessary to move BackupMenu.item script to /sbin.

I haven't tested it yet as i am on holidays and away from my pc to reflash if anything goes wrong.

If there is anyone brave enough to do it them please report back.