Please note that User Registration has been temporarily disabled due to a recent increase in automated registrations. If anyone needs an account, please request one here: RequestAccount. Thanks for your patience!--Wmat (talk)
Please email User:Wmat if you experience any issues with the Request Account form.

Difference between revisions of "Leapster Explorer: USB Boot settings"

From eLinux.org
Jump to: navigation, search
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
== Summary ==
 
This is a short tutorial to explain how to setup the explorer so that you can use the USB Boot method to test a kernel running a 'stock' bootup rcS script. This shouldn't damage your explorer but should you mess up your OS you won't be able to automatically start the recovery process. as long as you have console access you should be able to manually start the recovery process. You have been warned.  
 
This is a short tutorial to explain how to setup the explorer so that you can use the USB Boot method to test a kernel running a 'stock' bootup rcS script. This shouldn't damage your explorer but should you mess up your OS you won't be able to automatically start the recovery process. as long as you have console access you should be able to manually start the recovery process. You have been warned.  
  
 +
== Hardware Needed ==
 +
[[LeapFrog_Pollux_Platform:_Console_Access| Console Access]]
  
Usually when you boot the leapfrog explorer in USB Boot mode you are setting off a chain of actions that are supposed to lead to updating a new kernel and rootfs or recovering a broken OS, whatever the boot method, the explorer runs /etc/init.d/rcS and reads the boot image type on line 32 of /etc/init.d/rcS :
+
== Editing rcS ==
 +
Usually when you boot the LeapFrog Explorer in USB Boot mode you are setting off a chain of actions that are supposed to lead to updating a new kernel and rootfs or recovering a broken OS, whatever the boot method, the Explorer runs /etc/init.d/rcS and reads the boot image type on line 32 of /etc/init.d/rcS :
  
 
  if [ `cat /sys/devices/platform/lf1000-gpio/boot_image` = "RECOVERY" ]; then
 
  if [ `cat /sys/devices/platform/lf1000-gpio/boot_image` = "RECOVERY" ]; then
Line 13: Line 17:
  
  
the elif copes with the different types of boot mode that could be expected, this is fine if you want to update or fix your explorer but if you want to use USB Boot to test a kernel with the normal file system and boot settings then then you're out of luck. This is where this tutorial comes in. for the time being I have created a quick and dirty hack to overcome this issue.
+
The elif copes with the different types of boot mode that could be expected, this is fine if you want to update or fix your Explorer but if you want to use USB Boot to test a kernel with the normal file system and boot settings then you're out of luck. This is where this tutorial comes in. For the time being I have created a quick and dirty hack to overcome this issue.
  
in rcS edit lines 32 and 38 and make them look like this:
+
In rcS edit lines 32 and 38 and make them look like this:
  
  
Line 22: Line 26:
  
  
on the explorer when you want to boot 'normally' from USB boot run the following command:
+
On the explorer when you want to boot 'normally' from USB boot run the following command:
 
+
 
+
 
  touch /flags/usbdev
 
  touch /flags/usbdev
  
  
and to reverse the process to allow an automatic recovery:
+
And to reverse the process to allow an automatic recovery:
 
+
 
+
 
  rm /flags/usbdev
 
  rm /flags/usbdev
  
 
+
== Notes ==
 
+
whilst this method works and allows you to test a custom kernel booting it from USB using the 'normal' boot options as if you were booting the kernel from the explorer normally, its probably not the absolute best way to do things.  At the moment if you have usbdev set if something goes wrong with the OS it won't kick start recovery mode, however, as long as you've got serial access then you will be able to start dftpdevice manually and start the recovery process via pager.sh or LFConnect or simply remove /flags/usbdev and reboot.  Using USB Boot will also set you into a loop where after a reboot it will try and do another usb boot, this can be desirable if you are testing kernels/software but if you want it to stop simply power off the unit by holding down the power button.
notes
+
----
+
 
+
whilst this method works and allows you to test a custom kernel booting it from usb using the 'normal' boot options as if you were booting the kernel from the explorer normally, its probably not the absolute best way to do things.  At the moment if you have usbdev set if something goes wrong with the OS it won't kick start recovery mode, however, as long as you've got serial access then you will be able to start dftpdevice manually and start the recovery process via pager.sh or LFConnect or simply remove /flags/usbdev and reboot.  Using USB Boot will also set you into a loop where after a reboot it will try and do another usb boot, this can be desirable if you are testing kernels/software but if you want it to stop simply power off the unit by holding down the power button.
+
  
 
Files to note:
 
Files to note:
Line 46: Line 42:
 
/usr/bin/short-circuit
 
/usr/bin/short-circuit
  
the latter 3 being scripts called via rcS depending on what type of boot the system expects to perform.
+
The latter 3 being scripts called via rcS depending on what type of boot the system expects to perform.
  
 +
I believe there is a better method using the LeapFrog's internal flagging system, using the /sys/devices/platform/lf1000-gpio/ subsystem:
  
I believe there is a better method using the leapfrogs internal flagging system, using the /sys/devices/platform/lf1000-gpio/ subsystem:
+
request
  
request
 
 
boot_image
 
boot_image
 +
 
boot_source
 
boot_source
  
but this will require further investigation as some of this will be tied to emerald boot and messing with that could be dangerous.
+
power
 +
 
 +
But this will require further investigation as some of this will be tied to Emerald-Boot and messing with that could be dangerous.
 +
 
 +
[[Category:Leapster Explorer]]

Latest revision as of 09:58, 27 October 2011

Summary

This is a short tutorial to explain how to setup the explorer so that you can use the USB Boot method to test a kernel running a 'stock' bootup rcS script. This shouldn't damage your explorer but should you mess up your OS you won't be able to automatically start the recovery process. as long as you have console access you should be able to manually start the recovery process. You have been warned.

Hardware Needed

Console Access

Editing rcS

Usually when you boot the LeapFrog Explorer in USB Boot mode you are setting off a chain of actions that are supposed to lead to updating a new kernel and rootfs or recovering a broken OS, whatever the boot method, the Explorer runs /etc/init.d/rcS and reads the boot image type on line 32 of /etc/init.d/rcS :

if [ `cat /sys/devices/platform/lf1000-gpio/boot_image` = "RECOVERY" ]; then
   # Recovery boot
   echo "Recovery Mode"
   # Launch in background; it will "poweroff" when done
   /usr/bin/recovery &
   exit 0
elif


The elif copes with the different types of boot mode that could be expected, this is fine if you want to update or fix your Explorer but if you want to use USB Boot to test a kernel with the normal file system and boot settings then you're out of luck. This is where this tutorial comes in. For the time being I have created a quick and dirty hack to overcome this issue.

In rcS edit lines 32 and 38 and make them look like this:


if [ `cat /sys/devices/platform/lf1000-gpio/boot_image` = "RECOVERY" ] && [ !-e /flags/usbdev ]; then
elif [ `cat /sys/devices/platform/lf1000-gpio/request` = "TRAPDOOR" ] && [ !-e /flags/usbdev ]; then


On the explorer when you want to boot 'normally' from USB boot run the following command:

touch /flags/usbdev


And to reverse the process to allow an automatic recovery:

rm /flags/usbdev

Notes

whilst this method works and allows you to test a custom kernel booting it from USB using the 'normal' boot options as if you were booting the kernel from the explorer normally, its probably not the absolute best way to do things. At the moment if you have usbdev set if something goes wrong with the OS it won't kick start recovery mode, however, as long as you've got serial access then you will be able to start dftpdevice manually and start the recovery process via pager.sh or LFConnect or simply remove /flags/usbdev and reboot. Using USB Boot will also set you into a loop where after a reboot it will try and do another usb boot, this can be desirable if you are testing kernels/software but if you want it to stop simply power off the unit by holding down the power button.

Files to note: /etc/init.d/rcS /usr/bin/recovery /usr/bin/trapdoor /usr/bin/short-circuit

The latter 3 being scripts called via rcS depending on what type of boot the system expects to perform.

I believe there is a better method using the LeapFrog's internal flagging system, using the /sys/devices/platform/lf1000-gpio/ subsystem:

request

boot_image

boot_source

power

But this will require further investigation as some of this will be tied to Emerald-Boot and messing with that could be dangerous.