December 01, 2010, 11:53:22 pm
News:
Pages: [1]
Print
Author Topic: Looking for a particular file in the OSD firmware...  (Read 93 times)
pfft2001
Sr. Member
****
Posts: 277



View Profile
« on: November 28, 2010, 03:43:35 pm »

About a month (or so) ago, I stumbled upon a file on the OSD that contained the startups for (many of) the various daemons that get run at startup time.  I actually found this file by accident by finding a ".TXT" file somewhere on one of the writable areas (I think mount_NAND) that contained the "output" (actually, just a log of commands run) from this script.

However, now I can't find either the script or the output TXT file.  Can anyone help me?

A couple of notes:
1) I mentioned this file in a note that I posted to "heyrick"; maybe he can recall it.  I did a search, of course, but couldn't find it (my previous post on the subject).  Rick had asked something like "Where should I start looking in terms of figuring out what gets run on startup on the OSD?" and I had replied to the effect of "hey, start by looking at this file..."

2) It is possible that the file disappeared when I switched to the OSDng firmware (2.52).  Maybe that's why I can't find it.
Logged
heyrick
Full Member
***
Posts: 158



View Profile WWW
« Reply #1 on: November 29, 2010, 11:55:40 pm »

However, now I can't find either the script or the output TXT file.  Can anyone help me?

Sure!


Tell you what - follow my instructions (at http://www.heyrick.co.uk/blog/index.php?diary=20100508 ) to get lighttpd to serve up the filesystem. It's a lot easier than typing.


Then a few clicks around ('cos I never learned how to use grep, don't even know if the OSD has it) found:
  http://192.168.0.12/mnt/tmpfs/startup.txt

which contains:
  Ran script  /etc/rcS.d/S01_fssetup
  Ran script  /etc/rcS.d/S01_initsecurity
  Ran script  /etc/rcS.d/S02_chkqtlib
  Ran script  /etc/rcS.d/S03_ldgen
  Ran script  /etc/rcS.d/S04_networking
  Ran script  /etc/rcS.d/S05_syslogd
  Ran script  /etc/rcS.d/S06_fuse
  Ran script  /etc/rcS.d/S10_mainsetup
  Ran script  /etc/rcS.d/S10_splashscreen
  Ran script  /etc/rc5.d/S10_nmsd
  Ran script  /etc/rc5.d/S10_telnetd
  Ran script  /etc/rc5.d/S10_xmms2d
  Ran script  /etc/rc5.d/S50_lighttpd
  Ran script  /etc/rc5.d/S98_djmount
  Ran script  /etc/rc5.d/S99_deskmon
  Ran script  /etc/rc5.d/S99_extrasetup


Which leads us to:

/mnt/tmpfs/startup.txt - the text file listing stuff run at startup

and:

/etc/init.d/ - get going stuff, plus loads of /etc/rc-something folders.

In fact, poke around /etc, it's all in there somewhere! Wink


Quote
1) I mentioned this file in a note that I posted to "heyrick"; maybe he can recall it.

You'll be lucky. I prefer to liken my brain to Emmental. Hard, slightly smelly, and full of holes.


Quote
Rick had asked something like "Where should I start looking in terms of figuring out what gets run on startup on the OSD?"

Let me know if you have any luck finding how the OSDng inits itself. I'd love to know the blinky-LED mechanism, and how it's possible to select Arizona or OSDng. Is it the same kernel in flash, or does it load a kernel specific to Arizona or OSDng? If it loads a specific kernel for OSDng, it might imply that it loaded it, somehow, after the Arizona kernel started up enough to run the blinky-LED program? It's all kinda clever.... I wanna know how!


Quote
2) It is possible that the file disappeared when I switched to the OSDng firmware (2.52).  Maybe that's why I can't find it.

Probably not disappeared so much as moved. I think it's best to think of your mount_NAND in much the same way I think of /media/CF-card... Don't. Not unless you're specifically looking to see how stuff is arranged. If it's "important", it'll be symlinked into the correct place (i.e. /etc and so on).
[aside]
OSDng, for example, looks like this:
   /media/CF-card/OSDng/
   root-ro   2009-Jun-12 15:16:00   19.3M   text/plain
   root-rw   1970-Jan-01 00:00:12   10.0M   text/plain
   settings   1970-Jan-01 00:00:13   1.0M   text/plain
   swap   2010-Oct-23 23:31:26   8.0M   text/plain
[/aside]
Not terribly useful. Wink


Hope this helps. It's 6am, I've just watched more of Higurashi no Naku Koro ni and my head hurts!  Night!


Best wishes,

Rick.
Logged
pfft2001
Sr. Member
****
Posts: 277



View Profile
« Reply #2 on: November 30, 2010, 07:33:49 am »

Hey Rick!  Thanks for the reply.  BTW, what is Emmental?  A kind of cheese? Or do I not want to know? 

Anyway, quoting Maxwell Smart, missed it by that much!  I knew it (startup.txt) was somewhere under /mnt/tmpfs, but didn't think to look in the "root" of /mnt/tmpfs.  But, yes, it is there!  Backtracking from that, I figured out that the file is created by (are you ready now?): /etc/init.d/rc

Re: your suggestion about lighttpd: It sounds interesting, but I've never quite gotten around to it.  I'm quite comfortable using the command line and grep and friends.  As with all such things, the real question is "Does it really get you anything (that you can't/don't get from the command line) ?"  In your original text, you say:

Quote
Which leads us to:

/mnt/tmpfs/startup.txt - the text file listing stuff run at startup

and:

/etc/init.d/ - get going stuff, plus loads of /etc/rc-something folders.

Those comments at the end ("the text file listing stuff run at startup") - do they somehow magically appear when you use lightttpd - or did you just compose them yourself?

Re: your question about how the OSD inits itself.  I think I'm as confused as you.  Basically, I think what it boils down to is that one of us is going to have to really sit down and figure it all out - how to build the firmware.  I assume that once you've done that, it all becomes clear (and not until then!).  The guy who did OSDng somehow figured it all out and did it - then he disappeared.  And that's what's really strange.  Why go to all the trouble to figure it all out, put out a "version 0.10" of it, then drop all the development and go running back into your cave?

It makes me think that even when you know how to do it, the process is still so hard (and painful!) that you don't want to do it any more often than you absolutely have to.  It probably involves a lot of manual steps (that can't be automated).

But anyway, I can't see that there's any alternative path for us to take...
Logged
heyrick
Full Member
***
Posts: 158



View Profile WWW
« Reply #3 on: November 30, 2010, 08:13:21 pm »

Hey Rick!  Thanks for the reply.  BTW, what is Emmental?  A kind of cheese? Or do I not want to know?

Very popular French cheese (yes, I know it is Swiss...) which is hard and full of holes.
http://en.wikipedia.org/wiki/Emmental_cheese

Between you and me, for a country famed for its selection of cheeses, I fail to understand why they habitually cook with such a damn awful cheese. It doesn't so much melt as go a little bit softer. Try to eat it, it goes into a stringy mess. Try to mix it in with soup, you'll need a food processor on "ultimate speed" to be able to mix it in (otherwise it will turn into a gloop that looks like cheese vermiccelli). This explains why so many French cheese toppings seem to be a sort of generic creamy gunk (gratin dauphinois, for example). It's because of the need to beat the cheese into submission.

Really, these people... they need to discover the loveliness that is Cheddar. Now THERE is a cheese you can cook with. And put on pizzas. And grate over beans. And put into a spud. But no, it's NOT a French cheese, so there's no interest.

<nelson> Ha! Ha! </nelson> Neither's Emmental, it's Swiss. Wink


Quote
the file is created by (are you ready now?): /etc/init.d/rc

Is this the initial "get us going" script?

Quote
As with all such things, the real question is "Does it really get you anything (that you can't/don't get from the command line) ?"

Yeah, it does. <clicky><clicky> No beatin' on the keyboard like a chimpanzee (bonus points if you can name the song I've misquoted), no doing "ls" to work out what directories are available at the current location... Just click'n'go.


Quote
Those comments at the end ("the text file listing stuff run at startup")

My annotations. Jeez, pfft, you ought to know Unix isn't THAT user friendly. Hell, "umount" returns silence. You need to then try "df" to see if the device was actually unmounted!


Quote
Basically, I think what it boils down to is that one of us is going to have to really sit down and figure it all out

<cry!>


Quote
how to build the firmware.

I am useless at Wikis (never done any Wiki'ing), but if it should be me, I'll document it all on my website. Really the Neuros OSD wiki needs to be beaten into submission. That whole "how to build firmware/software" is, if you will excuse the phrasing, "confusing bollocks". It is quite upsetting that there is no click'n'go solution for Windows-based machines, so perhaps it would be better to just say this, instead of describing a non-working method with a little note at the top saying so.

Can Neuros please provide a copy of the real schematic? The one I have says "Recorder III". Is this the same (as in "identical") as the original OSD? How do things differ between my CF-card OSD and your NAND-flash CF-less one? And what sort of firmware is in the little MCU that looks after the IR/RTC? And... is the interfacing to the Ingenient codecs documented anywhere? Which .so file does what? There's a shedload of information that ought to be there, but isn't...


Quote
The guy who did OSDng somehow figured it all out and did it - then he disappeared.  And that's what's really strange.

Yeah, we can't even go all GPL on him ("where's the source, dude?") as he seems to have vanished. A crying shame, as any further versions of the firmware will need to dupe his work.


Quote
the process is still so hard (and painful!) that you don't want to do it any more often than you absolutely have to.

As you might have guessed, I have a fairly dim view of Linux. I guess my first introduction on the first paragraph of the first chapter saying "First, compile your kernel" wasn't a lot of help. [it was a Slackware book from the early '90s]. This, in addition, to me wondering what exactly a server-class operating system is doing in an essentially single-user embedded device... I think what we really need is a small targettable single-user system that is easily extensible but light on resources. This could be Android's place in the world? Whatever...

Plus, the idea of a CaSe SeNsItIvE filing system annoys the hell out of me. It's the 21st century, why are we stuck with so many hangovers from dumb teletypes and such?


Quote
But anyway, I can't see that there's any alternative path for us to take...

I did buy an SD card to install Debian upon to try getting the toolchain running. But somewhere between inserting the SD card and installing Debian, a bunch of episodes of "Kamichu!" turned up. And "Higurashi no Naku Koro ni", and "Ore No Imouto Ga Konna Ni Kawaii Wake Ga Nai", and "Twin Peaks" (OMG, one that isn't animated! Wink).

I guess I'll need to get another card, but don't hold your breath, I can imagine me trying to install a toolchain into an OS I've barely used before will be riddled with pitfalls. Hell, if I can type "make" and have it actually do something, that'll be an epic leap forward!


Best wishes,

Rick.
« Last Edit: November 30, 2010, 08:19:33 pm by heyrick » Logged
Pages: [1]
Print
Jump to: