Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
translations translations
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Install rockbox.ipod to OSS on ipodvideo (disable dualboot)
« previous next »
  • Print
Pages: [1]

Author Topic: Install rockbox.ipod to OSS on ipodvideo (disable dualboot)  (Read 3055 times)

Offline rockbox_dev123

  • Member
  • *
  • Posts: 161
Install rockbox.ipod to OSS on ipodvideo (disable dualboot)
« on: May 06, 2024, 05:40:26 AM »
I'm reasonably familiar with the boot process having read http://www.ipodlinux.org/Firmware.html and https://www.rockbox.org/wiki/IpodPatcher.html#Overview_of_the_ipod_firmware_partition.

I have an ipodvideo and while its great that the OFW can see all of the 512G disk, I will never use the official firmare.

I came up with a clever way to prevent the OFW from booting after reading the bootloader source:
Code: [Select]
* So, once the bootloader has control:
 *
 * 1) If the hold switch is on, or the menu button is being held,
 *    try to boot the Apple firmware.
 *   1a) First, it looks for apple_os.ipod on the FAT32 partition,
 *       in .rockbox or the root directory. If found it loads that
 *       without further checking and runs it.
 *   1b) Next, it checks to see if the OSOS image already loaded
 *       into RAM is in fact the Apple firmware with the bootloader
 *       appended. It looks at DRAM_START+0x20 for the string
 *       "portalplayer", and if it's there, just jumps back to
 *       DRAM_START where the entry point was before the bootloader
 *       was appended.
 *   1c) If neither of those worked, it displays an error and dies.

So I copied .rockbox/rockbox.ipod to .rockbox/apple_os.ipod and now if I boot my ipodvideo with the hold switch on it will boot rockbox instead of the OFW. Booting is much faster as a result!

I am interested in the comments further down:

Code: [Select]
* Loading from OSOS is somewhat faster than loading from FAT32,
 * because the Apple ROM doesn't have to deal with filesystems or
 * fragmentation, and is already loading from OSOS anyway. Thus,
 * the fastest boot configuration that still allows dual booting
 * is to install Rockbox into OSOS with the bootloader appended
 * (and delete/rename rockbox.ipod from the FAT32 partition).
 *
 * It is of course faster to just install Rockbox to OSOS alone,
 * but then it's impossible to boot the Apple firmware.

Quote
It is of course faster to just install Rockbox to OSOS alone, but then it's impossible to boot the Apple firmware.
Has installing Rockbox to OSOS been documented anywhere? I realise I would probably have to rewrite the OSOS each time I update rockbox but that doesn't seem too tedious.
« Last Edit: May 06, 2024, 05:43:43 AM by rockbox_dev123 »
Logged

Offline chris_s

  • Developer
  • Member
  • *
  • Posts: 299
Re: Install rockbox.ipod to OSS on ipodvideo (disable dualboot)
« Reply #1 on: May 06, 2024, 06:22:35 AM »
That would be method 4 ("OSOS contains only Rockbox") that is documented on the page you linked to (see the very  bottom)

https://www.rockbox.org/wiki/IpodPatcher.html#A_4_41_OSOS_contains_only_Rockbox

It's my favorite method of using Rockbox on iPods... boots up lightning-fast :)

Code: [Select]
Install your copy of Rockbox to the OSOS image with ipodpatcher -wf rockbox.ipod
Logged

Offline rockbox_dev123

  • Member
  • *
  • Posts: 161
Re: Install rockbox.ipod to OSS on ipodvideo (disable dualboot)
« Reply #2 on: May 06, 2024, 04:30:17 PM »
Quote from: chris_s on May 06, 2024, 06:22:35 AM
That would be method 4 ("OSOS contains only Rockbox") that is documented on the page you linked to (see the very  bottom)

I'm clearly not reading very well today. Thanks for replying, worked a charm!

***
For anyone else on macOS it seems that "Sending SCSI Command failed." can be safely ignored.

Also make sure you pass a path to the boot file from a location outside of the mounted iPod. Part of the write process includes a step to unmount the disk and you will get the following:
Code: [Select]
[INFO] Volume IPOD on disk5s2 unmounted
[ERR]  Couldn't open input file /Volumes/IPOD/.rockbox/rockbox.ipod
[ERR]  --write-firmware failed.

Working output:
Code: [Select]
$ sudo ./ipodpatcher -wf ~/rockbox.ipod
ipodpatcher efcea66280-240506
(C) Dave Chapman 2006-2009
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[INFO] Scanning disk devices...
[ERR]  Sending SCSI Command failed.
[INFO] Ipod found - Video (aka 5th Generation) ("winpod") - /dev/disk5
[INFO] Reading partition table from /dev/disk5
[INFO] Sector size is 2048 bytes
[INFO] Part    Start Sector    End Sector   Size (MB)   Type
[INFO]    0              63         64259       125.4   Empty (0x00)
[INFO]    1           64260     249935870    488030.5   W95 FAT32 (0x0b)
[ERR]  Sending SCSI Command failed.
[INFO] Ipod model: Video (aka 5th Generation) ("winpod")
[INFO] Volume IPOD on disk5s2 unmounted
[INFO] Padding input file from 0x000b65e4 to 0x000b6800 bytes
[INFO] Reading input file...
[INFO] Checksum OK in /Users/foo/rockbox.ipod
[INFO]  Wrote 747520 bytes to firmware partition
[INFO] Firmware /Users/foo/rockbox.ipod written to device.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Install rockbox.ipod to OSS on ipodvideo (disable dualboot)
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.129 seconds with 21 queries.