Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: Obstinate on June 24, 2010, 06:46:13 AM

Title: Any easier way to compile?
Post by: Obstinate on June 24, 2010, 06:46:13 AM
I simply want to add the definition #define MAX_PHYS_SECTOR_SIZE 4096 to the iAudio X5 build, any of them, yet for some reason it won't allow me to compile. It says that certain definitions and makefiles are missing. I'm trying to make my MK1634GAL work, and apparently doing this worked for another person with an iPod-only hard drive. Anyone willing to lend a hand, or add the definition in and send me the compiled file by any chance? Thank you.
Title: Re: Any easier way to compile?
Post by: torne on June 24, 2010, 07:23:11 AM
You shouldn't need to do that. Some time ago, I fixed the ATA implementation so that it will work with large-sector drives without requiring a custom build. The only drive that should require a custom build is if you use the drive from the 80GB iPod Video in a player other than the iPod Video. Later models of the Toshiba drives, as far as I know, emulate small-sector accesses correctly and thus will work with current builds of Rockbox (or the 3.6 release).

However, I only released new versions of the bootloader for iPods. What happens when you try? Is it the bootloader which fails with the "unsupported physical sector size" message? If so, then I suspect the X5 needs to have a new bootloader released...
Title: Re: Any easier way to compile?
Post by: Obstinate on June 24, 2010, 02:24:36 PM
The drive I am using is essentially like using an iPod Video drive in anything but an iPod Video. The MK1634GAL is used in iPod Classics and has the iPod logo. I believe it needs a custom build to work, as it doesn't boot up natively, though a few users on here have gotten the iPod classic series drives to work.

I think the program cgwin didn't install correctly. It keeps saying that it is missing components. Then it isn't making the necessary components to build correctly.
Title: Re: Any easier way to compile?
Post by: torne on June 24, 2010, 02:33:04 PM
No, as far as I know the iPod video 80gb drive is unique. It's extremely unlikely that the drive you have has the same defect (inability to emulate small sector accesses). The MAX_PHYS_SECTOR_SIZE change used to be needed for some upgraded drives to be used on an iPod video, because the wokaround for the standard drive's defect stopped them working. This was never needed on any other player and has now been fixed in any case.

If the drive is larger than 128GiB, you will need an updated bootloader, as the existing bootloader for the iaudio does not support the LBA48 access method needed for larger drives. No changes to the code are required, since LBA48 has already been enabled, but an updated bootloader has not been released. The main Rockbox build for your player already supports it.

I don't have an iaudio so can't test and release a new bootloader for it.
Title: Re: Any easier way to compile?
Post by: Obstinate on June 24, 2010, 03:15:42 PM
I have the most updated bootloader on this. Just the drives with iPod icons have a strange firmware on it or something.

http://www.rapidrepair.com/phpbb/viewtopic.php?f=13&t=2186

No one knows for sure.
Title: Re: Any easier way to compile?
Post by: saratoga on June 24, 2010, 03:45:11 PM
I have the most updated bootloader on this.

Which is not going to work for the reasons Torne listed :)
Title: Re: Any easier way to compile?
Post by: Obstinate on June 24, 2010, 03:48:02 PM
Oh I understand now. So, what should I do now to make it work? Compile a new bootloader?
Title: Re: Any easier way to compile?
Post by: torne on June 24, 2010, 04:24:33 PM
You may need to compile a new bootloader, yes. What you should do first, though, is tell us what happens when you try and use the drive, which you still haven't mentioned. In the thread you linked, people report the classic drive working just fine. The classic drive would indeed not have worked with Rockbox until recently; perhaps that's why it's believed not to be compatible?
Title: Re: Any easier way to compile?
Post by: Obstinate on June 24, 2010, 04:28:57 PM
When I plug in the drive, I get an ATA -32 error I believe, an HDD error in the original iAudio firmware, and when I plug it into the computer, the drive fails to show up. I can hear the disk spin up perfectly fine, yet when Windows tries to initialize it, but it always fails to find the appropriate drivers.

I wish I had more detailed info, just that the drive doesn't register in Windows. I cannot format it or anything.
Title: Re: Any easier way to compile?
Post by: torne on June 24, 2010, 05:27:40 PM
Ah, hm; I forgot that it would need to work in the OF in order to install rockbox ;)

I can't find any information on what, allegedly, is different about this drive that makes it incompatible with anything; just lots of claims by people that it *is*. If it does have a similar defect to the ipodvideo drive, then you'll need more than a different build of Rockbox to use it, because you still won't be able to install it if the OF doesn't recognise it...
Title: Re: Any easier way to compile?
Post by: Obstinate on June 24, 2010, 05:42:59 PM
What else would i need? I believe it's a similar defect.
Title: Re: Any easier way to compile?
Post by: torne on June 24, 2010, 05:48:36 PM
It's *very unlikely* to be, because the original ipod video drive violates the ATA spec for large sectors in a quite dramatic and impressive way. The spec was barely complete at the time the drive was designed, though, so this is perhaps forgivable. There's little excuse for more recent drives to not emulate single-sector accesses; I would be surprised if it didn't. It's not difficult to do, and it doesn't cost anything to support it on every drive you make once you've implemented it for *any* drive.

You would need to be able to mount the drive somehow to install Rockbox; it doesn't matter whether Rockbox supports it or not if you have no way to put it on there. If the original firmware can't do it, then you would probably have to connect the drive to a PC directly, or put it in another MP3 player which can mount it...
Title: Re: Any easier way to compile?
Post by: Obstinate on June 24, 2010, 06:01:43 PM
Do 4th gen iPods with 20 GB drives support ATA? I think that can work perhaps in iTunes.
Title: Re: Any easier way to compile?
Post by: torne on June 25, 2010, 05:58:52 AM
ATA is the kind of hard disk, not a feature. I don't know if the original firmware of a 4th gen iPod can use drives with large sectors; ipodvideo can, but I don't know if any of the others do.

Without knowing more about the drive (I can't find any useful information about it) it's hard to say what will work and what won't.
Title: Re: Any easier way to compile?
Post by: Obstinate on June 25, 2010, 10:50:36 AM
This is too difficult. The drive isn't working in the iPod either. I'll just stick with the MK8025GAL.

Or is it possible to use any Samsung single-platter drives? I haven't heard anything about those.
Title: Re: Any easier way to compile?
Post by: torne on June 25, 2010, 11:54:35 AM
As far as we know any drive that physically has the right connector and physically fits in the player should work with Rockbox. :) Unless the OF has done something gratuitously stupid, the same should be true of the OF.

The MK8010GAH (from 80GB ipodvideo) is the only exception that we know of. I assume you already paid for the MK1634GAL.. in which case, you could perhaps lend it to one of the developers to investigate? We might be able to work out what's different/odd about it, and maybe work out a way to use it. If you're willing to post to the UK I'll do it ;)