Author Topic: Calling all Linux Kernel developers!  (Read 399707 times)

0 Members and 4 Guests are viewing this topic.

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #615 on: January 24, 2013, 10:46:03 am »
Quote
I hate you so much :p
And I love google so much :P
(Actually, I hate them, but this is great xD )

Edit: Nice find, Vogtinator, someone should save that before they realize their mistake.
Guess what I'm doing right now ;-)
« Last Edit: January 24, 2013, 10:47:30 am by Vogtinator »

Offline excale

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 103
  • Rating: +19/-1
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #616 on: January 24, 2013, 10:48:00 am »
You have to set up a few things before being able to read from files. I haven't looked precisely into it though, so I don't know how hard it would be.

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #617 on: January 24, 2013, 10:49:54 am »
Quote
You have to set up a few things before being able to read from files. I haven't looked precisely into it though, so I don't know how hard it would be.
I don't know it, either.
I'm just making some suggestions hoping they're not too dumb ;)

Offline tangrs

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 229
  • Rating: +98/-0
    • View Profile
    • tangrs blog
Re: Calling all Linux Kernel developers!
« Reply #618 on: January 24, 2013, 07:09:32 pm »
Quote
nobody really knows how to interface with the NAND controller.
Isn't the nspire_emu source enough to start from?

Yep, it's helpful for a starting point but all my attempts at a NAND driver still ended up freezing the calculator :( I might have to go disassemble the OS code to try and see exactly how they do it :S

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: Calling all Linux Kernel developers!
« Reply #619 on: January 25, 2013, 02:46:50 am »
Being smaller (not cluttered with document handing, UI and CAS code) and containing filesystem debugging / testing code, the boot2 1.4.1571 would probably be a better target for reverse-engineering, IMO :)
The fact that it might be a slightly older version of FlashFX / Datalight Reliance doesn't matter much for the first approach: once the functions are identified in a small, clean code base (through e.g. the magic numbers used at several places), chances are that heuristics will make it possible to identify said functions in the larger OS code base.
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #620 on: January 25, 2013, 03:50:42 am »
Why should we need to reverse-engineer it?
We have the source code! (And it works, could confirm it with an hexeditor)
« Last Edit: January 25, 2013, 03:52:22 am by Vogtinator »

Offline tangrs

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 229
  • Rating: +98/-0
    • View Profile
    • tangrs blog
Re: Calling all Linux Kernel developers!
« Reply #621 on: January 25, 2013, 03:55:58 am »
Why should we need to reverse-engineer it?
We have the source code! (And it works, could confirm it with an hexeditor)

Most of the code is obfuscated though and I'm still unsure about the copyright issues involved. It could be possible that the filesystem is patented.

Anyhow, I was talking about reversing the OS for the NAND driver.

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #622 on: January 25, 2013, 04:07:31 am »
FlashFX is patented, only the wear-leveling, so we can use it read-only?

FlashFX has drivers for NAND controllers itself, maybe you can find the correct one, if TI didn't have to implement it themselves.
« Last Edit: January 25, 2013, 04:09:02 am by Vogtinator »

Offline tangrs

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 229
  • Rating: +98/-0
    • View Profile
    • tangrs blog
Re: Calling all Linux Kernel developers!
« Reply #623 on: January 25, 2013, 04:08:57 am »
FlashFX is patented, only the wear-leveling, so we can use it read-only?

Hmmm, I'm not sure. I'll look into it a lot deeper once I can actually get something working with the NAND.

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: Calling all Linux Kernel developers!
« Reply #624 on: January 25, 2013, 04:29:39 am »
Quote
Anyhow, I was talking about reversing the OS for the NAND driver.
NAND-related code underlying filesystem code will be easier to find in a 2- MB boot2 than in a 10+ MB OS containing lots of irrelevant clutter :)
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #625 on: January 25, 2013, 04:52:39 am »
Finding anything, even in a 2MB file, isn't even that easy. I have been searching through a 2 MB SNES rom and didn't find the SNES mouse BIOS for over a week. Wasn't what I was looking for. I still haven't found all of that.

Offline tangrs

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 229
  • Rating: +98/-0
    • View Profile
    • tangrs blog
Re: Calling all Linux Kernel developers!
« Reply #626 on: January 25, 2013, 04:59:08 am »
Finding anything, even in a 2MB file, isn't even that easy. I have been searching through a 2 MB SNES rom and didn't find the SNES mouse BIOS for over a week. Wasn't what I was looking for. I still haven't found all of that.

There's a few tricks I use to narrow the search down. First is to do a string search and sniff around places that look right. Second is to hack nspire_emu to break into the debugger when certain IO ports are written to.

I'm pretty sure there're better ways but it works :P

Edit: Managed to get a manufacturer ID from the NAND without crashing but it doesn't work if I peek and poke manually :S
« Last Edit: January 25, 2013, 05:06:00 am by tangrs »

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #627 on: January 25, 2013, 07:08:31 am »
maybe it has some kind of unlock sequence.....

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #628 on: January 25, 2013, 07:08:32 am »
Is partitioning possible at all?
I think the size is hardcoded in boot2 and we can't change it?
Maybe boot2 just checks the filesystem and we format it manually :/

Quote
maybe it has some kind of unlock sequence
That'd be visible in nspire_emu's code

Found three patents: (wikipedia)
^ United States Patent 5860082: "Method and apparatus for allocating storage in a flash memory."
^ United States Patent 6260156: "Method and system for managing bad areas in flash memory."
^ United States Patent 7284101: "Reliable file system and method of providing the same."
Hmm.. Read only support would be possible..
« Last Edit: January 25, 2013, 07:12:19 am by Vogtinator »

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: Calling all Linux Kernel developers!
« Reply #629 on: January 25, 2013, 07:28:23 am »
Yup, the size of several memory areas is hard-coded by the boot2 and OS. However, the boot2's code can format a filesystem, as it can straighten out a NAND Flash corruption triggered by e.g. overclocking the AHB.
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.