U-Boot: Difference between revisions

From freemyipod
Jump to navigation Jump to search
No edit summary
add nano 2nd instructions
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
== U-Boot Port ==
== U-Boot Port ==


An experimental U-Boot port for the iPod Nano 5G lives at https://github.com/freemyipod/u-boot/tree/n5g-wip .
An experimental U-Boot port for the [[Nano 2G]], [[Nano 3G]], [[Nano 5G]] and [[Nano 7G]] lives at https://github.com/freemyipod/u-boot/tree/s5l87xx .


It can be started using [[wInd3x]] and will start up a CDC-ACM serial console over USB for debugging purposes. Currently it has no storage driver.
It can be started using [[wInd3x]] and will start up a CDC-ACM serial console over USB for debugging purposes. Currently it has no storage driver.


The current port expects to be loaded in place of [[OSOS]], eg. by packaging it into an IMG1 and sending it to [[WTF]]. This is what wInd3x does. This way, U-Boot does not have to do any of the 'annoying' early boot stuff like bringing up DRAM.
The current port expects to be loaded in place of [[OSOS]], eg. by packaging it into an IMG1 and sending it to [[WTF]]. This is what wInd3x does. This way, U-Boot does not have to do any of the 'annoying' early boot stuff like bringing up DRAM.
=== Configuring ===
$ make apple_n36_defconfig # iPod nano (2nd generation)
$ make apple_n46_defconfig # iPod nano (3rd generation)
$ make apple_n33_defconfig # iPod nano (5th generation)
$ make apple_n31_defconfig # iPod nano (7th generation)


=== Building ===
=== Building ===


  make nano5g_defconfig
  $ make CROSS_COMPILE=arm-none-eabi-
make CROSS_COMPILE=arm-none-eabi-
 
On macOS, you need to install openssl using homebrew. If the build system does not find it, append the following to the build command:
 
HOSTCFLAGS="-I/opt/homebrew/Cellar/openssl@3/3.6.1/include" HOSTLDFLAGS="-L/opt/homebrew/Cellar/openssl@3/3.6.1/lib"
 
substituting your OpenSSL version/path as needed.


=== Running ===
=== Running ===


After building, connect your iPod Nano 5G in [[Modes|DFU Mode]] and use [[wInd3x]] to start U-Boot:
==== [[Nano 2G]] ====
 
Install Rockbox. Create an u-boot.ipod file by using the following tool from the Rockbox source code:
$ ./rockbox/tools/scramble -add=nn2g u-boot.bin u-boot.ipod
Upload the file to your iPod. Run Rockbox, go to File Manager, find the u-boot.ipod file and select it.
 
==== [[Nano 3G]], [[Nano 5G]] and [[Nano 7G]] ====
 
Connect your iPod in [[Modes|DFU Mode]] and use [[wInd3x]] to start U-Boot:
 
$ ./wInd3x cfw run u-boot.bin


./wInd3x cfw run u-boot.bin
=== Pushing an image to U-boot ===


When successfully started, U-Boot will then enumerate as yet another DFU device, this time ready to receive an U-Boot compatible image. You can load an image using dfu-util:
When successfully started, U-Boot will then enumerate as yet another DFU device, this time ready to receive an U-Boot compatible image. You can load an image using dfu-util:


  dfu-util -d 05ac:2137 -D foo -R
  $ dfu-util --device 05ac:8007 --download foo
$ dfu-util --device 05ac:8007 --detach


Note the <code>-R</code>: this is needed to get U-Boot to exit DFU mode and actually execute the image.
Note the <code>--detach</code> command: this is needed to get U-Boot to exit DFU mode and actually execute the image.

Latest revision as of 23:32, 25 July 2026

U-Boot Port

An experimental U-Boot port for the iPod nano (2nd generation), iPod nano (3rd generation), iPod nano (5th generation) and iPod nano (7th generation) lives at https://github.com/freemyipod/u-boot/tree/s5l87xx .

It can be started using wInd3x and will start up a CDC-ACM serial console over USB for debugging purposes. Currently it has no storage driver.

The current port expects to be loaded in place of retailOS, eg. by packaging it into an IMG1 and sending it to WTF. This is what wInd3x does. This way, U-Boot does not have to do any of the 'annoying' early boot stuff like bringing up DRAM.

Configuring

$ make apple_n36_defconfig # iPod nano (2nd generation)
$ make apple_n46_defconfig # iPod nano (3rd generation)
$ make apple_n33_defconfig # iPod nano (5th generation)
$ make apple_n31_defconfig # iPod nano (7th generation)

Building

$ make CROSS_COMPILE=arm-none-eabi-

On macOS, you need to install openssl using homebrew. If the build system does not find it, append the following to the build command:

HOSTCFLAGS="-I/opt/homebrew/Cellar/openssl@3/3.6.1/include" HOSTLDFLAGS="-L/opt/homebrew/Cellar/openssl@3/3.6.1/lib"

substituting your OpenSSL version/path as needed.

Running

Install Rockbox. Create an u-boot.ipod file by using the following tool from the Rockbox source code:

$ ./rockbox/tools/scramble -add=nn2g u-boot.bin u-boot.ipod

Upload the file to your iPod. Run Rockbox, go to File Manager, find the u-boot.ipod file and select it.

Connect your iPod in DFU Mode and use wInd3x to start U-Boot:

$ ./wInd3x cfw run u-boot.bin

Pushing an image to U-boot

When successfully started, U-Boot will then enumerate as yet another DFU device, this time ready to receive an U-Boot compatible image. You can load an image using dfu-util:

$ dfu-util --device 05ac:8007 --download foo
$ dfu-util --device 05ac:8007 --detach

Note the --detach command: this is needed to get U-Boot to exit DFU mode and actually execute the image.