Is it possible to ship linux on my old samsung mobile? [closed] - mobile

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have an old touch mobile phone Samsung Corby S3653, and it runs on Java right now.
I want to change the OS to some embedded linux (any thing other than what's already in it).
It is possible to change the OS? How do I go about doing it? What complications would arise if I do that?

TL;DR: No.
First, it doesn't actually run on Java: it is capable of running Java apps, but as you see in the link, it says "OS: proprietary".
Second, it could - very, very, very theoretically - be possible to create a stripped down version of Linux on it, but you'd need to invest a humongous lot of programming work into it - possibly making a whole new custom port for the architecture, and then wrestling with creating exactly the right drivers for the device.
Third, the memory and CPU limits would also be severe - I'm certain that the current OS of the system is built to cope specifically with the exact limits of this device; that can't be said of a general-purpose OS.
In general, mobile phones are a very different animal than desktop computers: you can't just throw out one system and replace it with another, because there is in most cases nothing to replace it with (on smartphones, it is possible to replace one version of the OS with another version of the same OS, but even that is problematic).
In other words: it's very theoretically within the realm of possibility, but not worth it except for the novelty value. You'd need to spend (tens of) thousands of hours deep in the bowels of the phone's system, hunting for proprietary or nonexistent phone specs, and building your own Linux port - and even then, success is not guaranteed.
If you really insist, buy one of the actually shipped Linux smartphones (or Android, even - it's a fork of Linux and has various developer-friendly versions). That would be much faster, much cheaper (seriously), much easier and more likely to work.

Related

Can Python ever be faster than C in C based OS? Why? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
If Python was coded(based) on C then can Python ever surpass the C?
I know that the next stages be assembly, binaries when they communicate with OS and hardware. I have two assumptions that since most of the Operating Systems were coded in C then if the any code works on top of that OS, it is not possible that Python can be faster.
All things being equal, code running in an interpreter will execute more slowly than code running natively. However, things are rarely equal, and while I can't think of an example offhand, I would not be surprised if there were circumstances where a Python solution could execute faster than a C-based one (it'd probably be pretty esoteric, though).
Beyond that, raw execution speed is only one metric, and it's not the most important. It doesn't matter how fast your code is if it does the wrong thing, or nukes a server if someone sneezes, or exposes your system to malware, or it takes you a year to deliver a solution.
Python provides a bunch of high-level abstractions and tools that C doesn't, leading to faster development time (which is where the expense really is). You don't have to worry (as much) about memory leaks, buffer overruns, etc.
There is no such thing as a silver bullet, and no language is best at all things. There are times when a C-based solution is the right answer, and there are times when a Python-based solution is the right answer.

Would an ARM Processor be the way to go? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I was making a little device that would have three buttons (like the ones at radioshack) and each preform its own action. These buttons and their actions would be controlled by a very small real time operating system that I would put on this device.
Would I need an ARM Processor in any way?
How would I put the real time operating system on the device?
What OS would I have to compile this on (ex. Ubuntu? Mac OS X? Windows 7?)?
Are there any examples of anyone doing this?
P.S. No prebuilt boards (ex. arduino). I would build the board myself.
Any feedback would be greatly appreciated!
Even if you don't want to use a prebuilt board in the finished product, I'd recommend getting a prebuilt board (like the Arduino), build your product, program it, test it, etc. while on the breadboard, and then simply rebuild it however you want, using the same hardware as you've been using.
That helps you out especially the next time you're building something, because you already have the prototype board and the toolchain ready to go.
Compiling your files can be done on any OS.
Enumerated version:
No, and I wouldn't even recommend using an ARM processor; but rather an Atmega328 or similar.
Using a programmer.
Any.
Probably millions, or at least hundreds of thousands of examples, yes.

LInux vs BSD for kernel development [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I recently updated my rusty C skills, and I've been trying to find a project to try them out on, so I picked kernel development (after all, C is a systems language). So, I was wondering which would be easier to start out with, Linux or one of the BSDs? Linux has a larger userbase (so I would probably have more support), but it also has a humongous codebase (9 million lines last time I checked), would the BSDs be easier to start out with because they combine the userbase and kernel into one large codebase? Also, is it best to just start reading the kernel source code? And, are they trying to implement new features aside from SMP and new drivers?
Unfortunately, I can only speak of Linux kernel hacking for myself. Currently I'm in an internship where I am working on a kernel, and I never did this before. But I was able to learn a lot of stuff in a quite short time, due to several reasons (again, I want to point out that I don't know how much of this is covered withint he BSD community):
Tutorials. The Linux Community is quite big and therefore you will find a lot of beginners information on kernel hacking. I feel like the standard to begin with was this guide. If you read it you will see, that even kernel hacking starts with hello world ;)
Linux Cross Reference. A great tool. It covers the complete Vanilla source code and shows you where each function/struct/define/whatever was defined and implemented, so no long searching for some stuff
The modular build of linux (I assume the same goes for BSD) Clearly you won't be able to look through 9 mio lines of code. But you can start easy with a little loadable kernel module and then go deeper. Maybe look at other modules first, hack them, and finally dig into the directly compiled stuff
The sheer community size. Not only kernel mailing lists, but also a huge number of forums or Q&A sites like this one where you can be sure to get help if you don't know what to do ;)
Just my 2 cents ;)
I am using and developing for Linux for many years, but am lacking any real experience with BSD to recommend either way.
You sound lacking experience for kernel hacking. Just reading kernel source might be insightful, but won't really teach you much. There is a lot going on in Linux kernel besides drivers. For example, latest 2.6.38 was focused on desktop responsiveness. DRM stack is ever changing and could use more man power.
I'd suggest start easy, small fixes for beta drivers, etc.

How should I get started on writing device drivers? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I would like to learn how to write device drivers because I think it would be fun. I use a Mac OS X Macbook, but I also have an Ubuntu machine (running on a Mac Min). I am pretty familiar with C and currently am reading this book. I have found some links online such as Mac Dev Center. I am doing this because it would be fun. I think there would be real gratification to see hardware operate because of software I wrote.
I guess what I would like is some tips or advice and guidance, and does anyone know of a list of devices that don't have drivers or can I write a driver for something that's already supported (would prefer the former so I'm actually providing value). What's a good device to get started with? Am I biting off more than I can chew? I'm not afraid of low level programming or assembly or whatever amount of effort is required. I'd like a challenge really!
For Linux, you might look into picking up the O'Reilly Linux Device Drivers book or reading PDFs online. In my opinion, it is one of the better texts around on the subject.
The Linux Kernel Module Programming Guide is another good resource.
You may also want to pick up a book specifically on the Linux Kernel. I picked up a copy of Robert Love's Linux Kernel Development (2nd Edition) for this purpose (3rd Edition on the way).
Writing a device driver can be pretty simple, or it can be almost arbitrarily complicated. For instance, I've been involved in a project where it took six of us almost three years to solve ONE bug in a device driver. Of course, we cleared out dozens of other bugs while looking for it... the code improved immensely. The fix turned out to be an eight line patch, that cost, conservatively, about a million dollars.
But, as a side project to that, I wrote an ethernet driver from the chip data sheet in a week, and took another week to debug it. Haven't needed to touch it since.
There's no way to say in general how much work a driver will be; a GPU driver could cost hundreds of millions, a driver for a single LED costs a couple of hours work at the most.
If you want to go for Linux device driver development, the freely available O'Reilly book Linux Device Drivers, Third Edition is a must read.
In order to find unsupported hardware pieces for which you could write a driver, ask on the Linux mailing lists. Maybe some USB 3.0 device? ;)
For Mac you might want to take a look at Mac OS X Internals book. It's think and heavy but fun to read. It is mostly about PowerPC-based Macs but has an appendix about Intel-based ones. For Linux take a look at Linux Device Drivers, 3rd Edition - it's lighter (free PDFs online :) and is really device driver-oriented, might be a better start.

What alternatives to Hans Boehm GC are out there for small devices? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I'd like to use a virtual machine like NekoVM into a small device but to build it, it requires Boehm GC, however there is no port of that GC to that small device so I was wondering if there is any alternative to it, something that could be done exclusively with C code?
I'd say your best option would be to port the GC to your platform, for which there are instructions (libgc porting instructions).
Additionally, it should be possible to swap out the GC implementation (NekoVM FAQ), see vm/alloc.c file.
EDIT:
Hopefully useful additional links: (untested)
Smieciuch Garbage Collector
libgcroots (based on libgc 7, abstracts architecture dependant bits)
Squirrel programming language
Perhaps you'd be better off with Lua, which has a very small but powerful virtual machine, has its own garbage collector built in, and runs on any platform that supports ANSI Standard C. With just a little effort you can even build Lua on a machine that lacks standard input and standard output. I have seen Lua running on an embedded device that was a small LCD touch screen with an embedded CPU stuck on the back. Neko is good work, but I think you'll find Lua every bit as satisfying.
I could suggest TinyGC (tinygc.sf.net) - an independent lightweight implementation of the BoehmGC targeting small devices. It is fully API-compatible (even more, binary compatible) with BoehmGC v7+ but only a small subset of the API is implemented (but sufficient for Java/GCJ-like memory management) and there is no automatic threads and static data roots registration. The latter, however, may require some efforts to make NekoVM work with it (i.e., call GC_register_my_thread() and GC_add_roots()).

Resources