Difference between revisions of "Leapster Explorer: Testing Kernels via USB Boot"

From eLinux.org
Jump to: navigation, search
m
Line 1: Line 1:
==Background==
+
== Summary ==
The Leapster Explorer (LX) differs from Didj in many ways. Among the most siginificant is the USB recovery function, designed to be used in conjunction with LFConnect to recover the LX to a known-working state.
+
The Leapster Explorer includes a USB recovery function, designed to be used in conjunction with LFConnect to recover the Leapster Explorer to a known-working state. We can leverage this USB recovery function to transfer kernels we want to test to the Leapster Explorer without having to do a destructive write of the new kernel to the LX nand (which can be dangerous). The result is an ability to test kernels on Leapster Explorer using USB booting, just like we test kernels using UART or SD kernel booting on the Didj.
  
We can leverage this USB recovery function to transfer kernels we want to test to the LX without having to do a destructive write of the new kernel to the LX nand (which can be dangerous). The result is an ability to test kernels on LX using USB booting, just like we test kernels using UART or SD kernel booting on the Didj.
+
== Prerequisites ==
 +
[[Leapster_Explorer:_USB_Boot| USB Booting]]
  
==Implementation==
+
== Kernel Configuration ==
 
+
1. Modify lines 999-1008 of linux2.6/drivers/mtd/nand/lf1000.c as follows to enable mounting of the onboard partitions:
+
<code>
+
  
 +
Modify lines 999-1008 of linux2.6/drivers/mtd/nand/lf1000.c as follows to enable mounting of the onboard partitions:
 
  //if (gpio_get_boot_source_config() == SCRATCH_BOOT_SOURCE_USB)
 
  //if (gpio_get_boot_source_config() == SCRATCH_BOOT_SOURCE_USB)
 
  //{
 
  //{
Line 19: Line 18:
 
     base_parts_nb = ARRAY_SIZE(partition_info);
 
     base_parts_nb = ARRAY_SIZE(partition_info);
 
  //}
 
  //}
</code>
 
2. Once you have made this modification, go to the linux2.6 directory and build the kernel:
 
 
$'''make'''
 
  
3. Create the 'cbf' file that can be used for usb boot. in the scripts directory, type:
+
You can then build your kernel as you normally would.  
  
$'''make_cbf.py'''
+
The bootloader expects the kernel to be in the Common Boot Format (cbf) LeapFrog included a script in their sources. To create the 'cbf' in the scripts directory, type:
  
4. Put the LX into recovery mode via powering up while pressing LS-RS-Hint.  
+
$ make_cbf.py
  
5. Use pager.sh to transfer the kernel (more info on [[Leapster_Explorer:_USB_Boot|pager.sh]]).
+
You now have a kernel ready for USB Booting.

Revision as of 09:33, 23 July 2011

Summary

The Leapster Explorer includes a USB recovery function, designed to be used in conjunction with LFConnect to recover the Leapster Explorer to a known-working state. We can leverage this USB recovery function to transfer kernels we want to test to the Leapster Explorer without having to do a destructive write of the new kernel to the LX nand (which can be dangerous). The result is an ability to test kernels on Leapster Explorer using USB booting, just like we test kernels using UART or SD kernel booting on the Didj.

Prerequisites

USB Booting

Kernel Configuration

Modify lines 999-1008 of linux2.6/drivers/mtd/nand/lf1000.c as follows to enable mounting of the onboard partitions:

//if (gpio_get_boot_source_config() == SCRATCH_BOOT_SOURCE_USB)
//{
//	base_parts = partition_info_recovery;
//	base_parts_nb = ARRAY_SIZE(partition_info_recovery);
//}
//else
//{
    base_parts = partition_info;
    base_parts_nb = ARRAY_SIZE(partition_info);
//}

You can then build your kernel as you normally would.

The bootloader expects the kernel to be in the Common Boot Format (cbf) LeapFrog included a script in their sources. To create the 'cbf' in the scripts directory, type:

$ make_cbf.py

You now have a kernel ready for USB Booting.