Active Topics

 


Reply
Thread Tools
Posts: 7 | Thanked: 0 times | Joined on Sep 2008
#1
Hi there.

I don't yet own an N810 but hope to sometime in the future. I've seen screenshots of the Maemo UI (that screen has a *really* high resolution from what I can see in photos, since screenshots are SO big!) but don't really like its layout. I'd far prefer a UI that I write myself, but predominantly want a desktop based on something like Openbox or similar. If that's even possible.

You may have guessed already, but I've never owned an embedded device like this before, so I have a few questions: I know nothing about how to flash, update or otherwise copy firmware, custom or otherwise, onto a device like the N810. Well, I have a router/modem, but it runs proprietary firmware, and updating it was just a few clicks in a winfailure application.

So I just wanted to know:

* I assume the N810 somehow "boots" the firmware, so how do you flash this firmware onto the device? And if anyone can share how an ARM CPU boots, that'd be interesting to learn.
* If I flash corrupt or improperly "built" firmware onto an N810, is there a magic trick I can perform that I can use to tell tell the CPU to wait for a new flash image to be written to the device (like plugging in a special cable or flicking a switch inside the case), in order to fix it? Or is the device dead?
* Can you dual-boot two different types of firmware? Is something like this stable (dual-booting in a situation like this sounds a little on the unstable side, but I don't know)?

That said, I want to get uArch (Launchpad page, Google Code page), a subset of Arch Linux for resource constrained/non-x86 architectures such as the ARM CPU, working on an N810 when I finally get one. Arch Linux focuses on simplicity, and since uArch is more or less Arch Linux, if I installed it, I'd have a lot of options such as choice of windowmanager and the like. At the moment uArch takes up around 300MB for a base install but that size is being worked on.

Thing is, since I've never done something like this before, I've no idea where to start. So any help, tips, advice etc will be welcomed.

-dav7

Last edited by dav7; 2008-09-15 at 02:55.
 
Johnx's Avatar
Posts: 643 | Thanked: 628 times | Joined on Mar 2007 @ Seattle (or thereabouts)
#2
Basically, the boot loader will load the kernel and the kernel will mount initfs and run some setup stuff, then mount the root fs and launch init. What people do to "dual boot" is have the linux kernel run a script in initfs that lets the user pick which rootfs to mount from a menu. That allows them to have the rootfs on an sd card. This is a great way to test out new things and always leave your device in a bootable state. Ask more questions if you have them.

Also check out the deblet debian-on-n8x0, at least for ideas on how people got other distros booting. Have fun and tell us how it goes!

-John
 

The Following User Says Thank You to Johnx For This Useful Post:
Posts: 7 | Thanked: 0 times | Joined on Sep 2008
#3
Thanks a heap. That sure has cleared up quite a few issues... I have some more though. I'm not likely to own an N810 too soon, but preparation never hurt anybody, so that's what I'm doing now. So here we go:

* How does X work? Does it work much like X on a desktop would, except it outputs to the integrated screen?
* From a software perspective, if I push the architecture difference(s) aside, can I see the N810 pretty much like a PC in that if I write an app that uses the GNOME libraries (for example) will it run on the N810 (if I put uArch on it)? What toolkits compile for ARM?
* Can I stuff both Arch Linux and OS 2008 into the internal memory, once I have everything sorted?
* The Linux kernel is open source, but are Nokia's changes also open source? Specifically, can I recompile the kernel if I want to, or am I locked into using Nokia kernels with closed-source changes?

Leaning more toward the N810's hardware side now:
* If I considered an application (a situational type of application) that has the N810 as a kind of "status device" that sits in my pocket and tells me of updates to different things, is there any way the N810 can notify me without me seeing it? For example, I've heard that it doesn't have a vibrator. Is there anything else it might be able to do to get my attention?
* Does the system fire events or modify a file in /proc or /sys if I slide out the keyboard or slide it back in? Can I `cat' a number or string to a file somewhere to turn the LED on or off, or make it change color? Or are these locked down by complex API calls?

Thanks for answering all this.

-dav7

Last edited by dav7; 2008-09-15 at 11:20.
 
Posts: 5,795 | Thanked: 3,151 times | Joined on Feb 2007 @ Agoura Hills Calif
#4
There's a wealth of information on this sort of topic over at the Maemo site, of course, and if you click Wiki at the top of the main page here you can find a lot more.
 
Posts: 7 | Thanked: 0 times | Joined on Sep 2008
#5
Okay, thanks for that, I'll be sure to check out that site and the wiki for info.

And I look forward to getting a N810 someday too I can't wait to play with one

-dav7
 
Posts: 7 | Thanked: 0 times | Joined on Sep 2008
#6
Okay, here's a question I couldn't get answered by googling around.

Since I want to try stuff out, is it possible to either:

* Compile the entire Maemo platform for x86 and run it in an appropriately sized Xnest or Xvnc window

* Use an emulator (qemu-system-arm?) to run the entire software stack (I have an old computer so this is NOT preferred)

...?

I have a fairly decent amount of diskspace so even if I have to download and compile lots and lots of stuff to make it all work, I don't mind.

-dav7
 
Benson's Avatar
Posts: 4,930 | Thanked: 2,272 times | Joined on Oct 2007
#7
Originally Posted by dav7 View Post
Okay, here's a question I couldn't get answered by googling around.

Since I want to try stuff out, is it possible to either:

* Compile the entire Maemo platform for x86 and run it in an appropriately sized Xnest or Xvnc window
You could do this, but compiling everything is way too much work; just use the prebuilt packages in the SDK.

AFAIK, this is the normal way of trying software under development in the SDK, with actual ARM compilation and testing (emulated or on-device) reserved for things that should be architecture dependent, and for testing of those that shouldn't (but might be buggy).

I think installing the SDK should get you what you want.
 
Posts: 1,213 | Thanked: 356 times | Joined on Jan 2008 @ California and Virginia
#8
Wow, lots of complicated questions with some mediocre responses!

Ok, I will answer your unanswered question to the best of my ability:


* If I flash corrupt or improperly "built" firmware onto an N810, is there a magic trick I can perform that I can use to tell tell the CPU to wait for a new flash image to be written to the device (like plugging in a special cable or flicking a switch inside the case), in order to fix it? Or is the device dead?
Ok, Im assuming you only made changes to the kernel, right? In this case, I am 95% sure you could just reflash the kernel.


* I assume the N810 somehow "boots" the firmware, so how do you flash this firmware onto the device? And if anyone can share how an ARM CPU boots, that'd be interesting to learn.
There is a flasher tool for linux (and mac?) that can flash kerne; images and such. I'm sure you can do whatever you want.


* If I considered an application (a situational type of application) that has the N810 as a kind of "status device" that sits in my pocket and tells me of updates to different things, is there any way the N810 can notify me without me seeing it? For example, I've heard that it doesn't have a vibrator. Is there anything else it might be able to do to get my attention?
Yes. There is a programmable status LED, and built in speakers. Physically, Sound = Vibration. So a low pitch, loud sound would cause the vibration you are looking for. Or just some high pitch chirps or something....

* Does the system fire events or modify a file in /proc or /sys if I slide out the keyboard or slide it back in? Can I `cat' a number or string to a file somewhere to turn the LED on or off, or make it change color? Or are these locked down by complex API calls?
I don't know HOW it works, but yes. Every single button, slider, light sensor, temperature sensor, blah blah blah, can be used by 3rd party programs. I know this because apps such as autolock and sliderotate use these. And mail and chat programs frequently use the LED. Red, Green, and Blue are the colors on the n810 I think.


* How does X work? Does it work much like X on a desktop would, except it outputs to the integrated screen?
From my experience, yes. Its a full X server. So things like SSH X forwarding work and XVNC work, and there are experimental USB->VGA adapters that work.

* From a software perspective, if I push the architecture difference(s) aside, can I see the N810 pretty much like a PC in that if I write an app that uses the GNOME libraries (for example) will it run on the N810 (if I put uArch on it)? What toolkits compile for ARM?
Can't really help much on this one. I think apps have to be rewritten a little to cohere to Hildon standards. Otherwise it does not fit into the "Theme" of the tablet. Alternatively, you could use another window manager such as KDE, Openbox, ICEWM, etc...

If you are developing for the tablet (opposed to porting), I think there is a lot of good documentation and libraries available.

* Can I stuff both Arch Linux and OS 2008 into the internal memory, once I have everything sorted?
Nope. Don't try. Its pointless. The internal ROM on the N810 is pitiful. A MUCH better option would be to install it on a SD card, and boot from it, much like Debian and Android work on the tablets. Or a chroot, or something.

* The Linux kernel is open source, but are Nokia's changes also open source? Specifically, can I recompile the kernel if I want to, or am I locked into using Nokia kernels with closed-source changes?
You can change the kernel and still use the closed source binaries if you want. I think only a few things are closed (because of NDA) like WiFi and Bluetooth, GPS, etc... Remember, these things all have Open Source API so you can fully interact with them, but the drivers are closed...

This is also one reason why we don't have graphics drivers.
 

The Following User Says Thank You to Thesandlord For This Useful Post:
Posts: 7 | Thanked: 0 times | Joined on Sep 2008
#9
A new question:

If I quit X, will I be presented with a text console just like on an x86 PC? Or is the hardware designed such that the displays requires an appropriate X video driver to "go"? Alternatively, is there a framebuffer driver I can use to get console output? If none of those methods work, I'm happy with a fullscreen terminal in X, if I need to get an interface like that - that works fine.



Benson

A couple of questions:

Is this SDK you speak of called Scratchbox? If it is, please help me find a way to install it on Arch Linux. I don't want to install or switch distros just to make developing for a device which I'll note I don't even have one of yet a bit easier.

I've already tried to install it but that was a while ago... some issue about an XML parser not existing in the kernel ()

Alternatively, if precompiled binaries that produce the Maemo/Hildon "desktop"/UI can simply be lifted from some package, I'd be happy to download such a package and try it out.



Thesandlord:

Thanks a heap for your responses! Now to clear a few things up:

Originally Posted by Thesandlord
Originally Posted by dav7
* If I flash corrupt or improperly "built" firmware onto an N810, is there a magic trick I can perform that I can use to tell tell the CPU to wait for a new flash image to be written to the device (like plugging in a special cable or flicking a switch inside the case), in order to fix it? Or is the device dead?
Ok, Im assuming you only made changes to the kernel, right? In this case, I am 95% sure you could just reflash the kernel.
I haven't flashed a lot of devices in my lifetime. I could probably count them on half of a hand. So, with what knowledge I have of this topic, I come from the perspective of "write the firmware incorrectly, and you have a brick". Kinda like reflashing a BIOS wrong: to reflash the BIOS on a PC one inserts a bootable DOS floppy or flash drive which contains a flasher utility which is then run that puts the new firmware code in the BIOS.

Newer PCs have a jumper switch that lets you bypass the contents of a corrupted BIOS, but when older systems start up, the CPU is invariably "aligned" to an area of memory that is mapped to the BIOS, so the BIOS is actually the first thing an older PC's CPU executes. If the BIOS is corrupt, the CPU can't execute anything, so is... effectively... bricked, because the CPU needs to be able to execute the BIOS which after some checks transfers control to the FDD boot block which then boots and finally runs the BIOS flasher. The only way out of such a situation is to replace the BIOS if it's removable, hope you're really good with a soldering iron, or replace the motherboard.

What I'm asking is, is the N810 like that older PC architecture, or does it have some kind of failsafe mechanism like more modern systems? Like, if I wrote something to its internal memory (however small this memory is), and the write failed, or I SERIOUSLY botched something up, is the N810 dead? Or can I press a magic keycombo to tell the N810 to ignore the contents of its EEPROM and accept a new image? Is that actually how it works?

Let me put it another way. Does the N810 require you to have a successfully working OS already in memory and loadable before it "knows" how to communicate with a computer to flash a new OS?

Originally Posted by Thesandlord
Originally Posted by dav7
* I assume the N810 somehow "boots" the firmware, so how do you flash this firmware onto the device? And if anyone can share how an ARM CPU boots, that'd be interesting to learn.
There is a flasher tool for linux (and mac?) that can flash kerne; images and such. I'm sure you can do whatever you want.
Ok, cool. That's good to know. I don't run OS X, Linux is the *only* OS in this house (including on Mum's PC ) so...

Originally Posted by Thesandlord
Originally Posted by dav7
* If I considered an application (a situational type of application) that has the N810 as a kind of "status device" that sits in my pocket and tells me of updates to different things, is there any way the N810 can notify me without me seeing it? For example, I've heard that it doesn't have a vibrator. Is there anything else it might be able to do to get my attention?
Yes. There is a programmable status LED, and built in speakers. Physically, Sound = Vibration. So a low pitch, loud sound would cause the vibration you are looking for. Or just some high pitch chirps or something....
Well, I want to be able to notice the vibration even if I'm in a loud environment, such as a noisy crowd. In case anyone's wondering, I'm not trying to do anything... "else" with it just, seriously, trying to use it to notify me when things I need to know about are happening.

Originally Posted by Thesandlord
Originally Posted by dav7
* Does the system fire events or modify a file in /proc or /sys if I slide out the keyboard or slide it back in? Can I `cat' a number or string to a file somewhere to turn the LED on or off, or make it change color? Or are these locked down by complex API calls?
I don't know HOW it works, but yes. Every single button, slider, light sensor, temperature sensor, blah blah blah, can be used by 3rd party programs. I know this because apps such as autolock and sliderotate use these. And mail and chat programs frequently use the LED. Red, Green, and Blue are the colors on the n810 I think.
Awesome! Now I can go about my planning...

Originally Posted by Thesandlord
Originally Posted by dav7
How does X work? Does it work much like X on a desktop would, except it outputs to the integrated screen?
From my experience, yes. Its a full X server. So things like SSH X forwarding work and XVNC work, and there are experimental USB->VGA adapters that work.
Nice to know... and wow, USB->VGA! That's nice to know too

Originally Posted by Thesandlord
Originally Posted by dav7
From a software perspective, if I push the architecture difference(s) aside, can I see the N810 pretty much like a PC in that if I write an app that uses the GNOME libraries (for example) will it run on the N810 (if I put uArch on it)? What toolkits compile for ARM?
Can't really help much on this one. I think apps have to be rewritten a little to cohere to Hildon standards. Otherwise it does not fit into the "Theme" of the tablet. Alternatively, you could use another window manager such as KDE, Openbox, ICEWM, etc...

If you are developing for the tablet (opposed to porting), I think there is a lot of good documentation and libraries available.
That's fine, I don't plan to write stuff for Hildon, although I *might* use it... although I might not.

How does Hildon "run"? Like a session manager? Can I killall the right processes to have apps, sidebar thingy, task manager, panel, etc, quit? Then, assuming that method works, with my N810 just running the terminal I used to killall everything, I can just run openbox from there.

Also, I might do a little porting, but mostly plan to develop my own apps. Whether they'll run for Hildon (my programming strengths are generally with PHP and bash, which have almost no working desktop frameworks available - there is PHP-GTK, but that breaks PHP's apache module here, and PHP-QT, but that won't compile here) would remain to be seen.

Originally Posted by Thesandlord
Originally Posted by dav7
Can I stuff both Arch Linux and OS 2008 into the internal memory, once I have everything sorted?
Nope. Don't try. Its pointless. The internal ROM on the N810 is pitiful. A MUCH better option would be to install it on a SD card, and boot from it, much like Debian and Android work on the tablets. Or a chroot, or something.
New tactic. Can I stuff Arch Linux inside the ROM which I'm assuming is an EEPROM, and put OS2008 on an SD? Or do you really think I should just leave it all on SD cards? If I do, how do I get stuff in and out of the N810 if I can't/don't want to use Wifi or Bluetooth?

Also, how does booting from the SD card work? Is the SD card akin to a PC's hard disks, in that the N810 will first poke its internal ROM for a valid boot block, then the SD card, etc?

Or does it just jump straight to ROM, in which is a script that picks up from there and loads from the SD card?

Originally Posted by Thesandlord
Originally Posted by dav7
The Linux kernel is open source, but are Nokia's changes also open source? Specifically, can I recompile the kernel if I want to, or am I locked into using Nokia kernels with closed-source changes?
You can change the kernel and still use the closed source binaries if you want. I think only a few things are closed (because of NDA) like WiFi and Bluetooth, GPS, etc... Remember, these things all have Open Source API so you can fully interact with them, but the drivers are closed...

This is also one reason why we don't have graphics drivers.
NDAs make sense and I won't knock those.

The GPS. Thanks for mentioning that. I was wondering if I could access that myself, thanks for clearing that up :P

But... *you don't have graphics drivers?* You mean you don't have the *sourcecode*, or are you using the VESA driver with this thing?!

-dav7

Last edited by dav7; 2008-09-26 at 06:18.
 
GeneralAntilles's Avatar
Posts: 5,478 | Thanked: 5,222 times | Joined on Jan 2006 @ St. Petersburg, FL
#10
Just, fyi, the N810 is neither a router nor a desktop computer. You seem to be approaching it like it's one or the other, but it's neither.
__________________
Ryan Abel
 
Reply


 
Forum Jump


All times are GMT. The time now is 17:51.