I'm trying to understand the difference between a rom and a kernel. I read a post a while back that explained it but I forgot the answer and can't find it with search.
Am I understanding this? A kernel is like under the hood, ie the engine. The rom is how it looks and feels. Like putting a 400ci engine in a corvette or put the same engine into a impala. Kinda sorta same engine but different car. The corvette is built for speed and the impala is more for cruising and a lot heavier a car. Do I have this all wrong?
A ROM is a complete collection of the operating system (containing the kernel), support software, libraries, drivers, and any additional software. It's like a disk image, except that it is written to a device's flash memory.
A kernel is the operating system's core. It is what allows an operating system to provide core hardware services to software programs. Without this, software would need to be compiled for boostrapping and direct machine execution, and thus only one program could literally run at the same time. A kernel has hardware support as well as management for the CPU stacks and contexts, allowing multiple software components to operate concurrently. Modifying a kernel can often allow the modder to incorporate new features in terms of core driver support, the management of software, and other features. Primarily, it will be about driver/hardware support.
u got it right... its something like that, but same kernel can have a different effect in different ROMs.
Related
Hi folks
Recenty I got the Windows XP Embedded kit, and I was really satisfied and surprised with the performance of the directly built system on an old machine like a P1 @ 200 MHz with 64 MB of RAM, without a hard disk.
The main goal would be to run truly win32 apps on mobile devices, to give better functionality and compatibility.
Yet the builder supports x86 architecture only, but cannot be a big problem to port it to ARM pocessors.
What might be difficult are these things:
-Getting win32 drivers for built-in devices (ex. integrated SDIO/USB WLAN, BT adapter, touchscreen, and sound devices, and apps for them!)
-Saving user data on turning off (Ebmedded systems are designed for a workstation, like a cash register: prebuilt apps, and nothing more comfort ) like WM200x
If anybody has any suggestion are to get a warm welcome
bye
Yet the builder supports x86 architecture only, but cannot be a big problem to port it to ARM pocessors.
Click to expand...
Click to collapse
Are you kidding me?
This would mean reverse engineering and recompiling every binary in the OS.
Do you have any idea how many hours something like that would take?
yup, you're right, but in theory it's possibe. I've seen a running DOS on a Microchip micro-controller, or for example the Atmel STK 1000 is Linux based, also seen an mPlayer app operational on the demo board at the college.
as you see, i'm not an experienced programmer, but i'm not afraid to ask
Yeah, the basic low-level binaries must be recompiled, and once it's ok, it might be usable with regular win32 apps, until you run an old DOS app, wich directly access the hardware.
A few years ago i was able to port Z80 software to 8086, and it wasn't easy.
I don't really know these things, just want to see opinions, possibilities, and suggestions.
exe files are binarys which are instructions directly for the cpu
it's not parsed by the operating system
so compiling the os is not enough every application needs to be recompiled too
The programs you mentioned have source available in one way or another (since DOS is very old there are clones, like freeDOS).
If you have the full source for an app and the right compiler, porting it to another CPU is feasible.
But, this is not the case with embedded XP. Getting the full source is impossible which means most of the system will have to be rewritten from scratch.
Just look at the Wine project to see what it takes, and they "have it easy" - they are just trying to simulate the APIs not change processor architecture. (Lets make it clear - ARM instruction set is very different from x86).
And as Rudegar said it will not let you run any program that has not been specially compiled for ARM CPU.
I know it sounds like we are trying to kill you idea here but its nothing personal, unfortunately it just isn't feasible. We would all like to be able to run desktop apps on our devices, but simply having embedded XP on them would not accomplish that. Also while many old DOS apps can be run using various emulators like pocketDOS, almost all Win32 apps take more resources than our little gadgets can offer.
I am fairly sure though that in 5 -10 years that problem will be fixed.
<_< man hours or not, reveng'ing this will have a bigger impact than just winDOS Mobile devices. Desktops have a use for this, definitely (because the Vista-Only crap is starting to hit the market). Too bad they don't provide assembly in programming classes anymore, obviously because they don't want anyone else to reverse engineer anything and spoil their foisting fun. <_<
In any case, IIRC XP Embedded is missing the install/uninstall engine, so you can't customize it after it's flashed onto the board. This isn't quite a good start - XPLite or 98Lite are better for reverse engineering from scratch (but they're too powerful for mobile devices).
The other alternative is porting ReactOS, which is a reimplementation of W2K. Those guys are "having a lot of fun" getting things to work, tho. <_<
Maybye Windows CE6 yes, but Windows XP Embedded no, because they must run at 686-AT/X platform IMB. Sorry of my English
linux would be a path
with most linux programs you can compile them yourself
using good old
./configure
make
make install
of cause gui programs could have issues displaying correct
on such a small screen
You MIGHT be able to pull it off by installing a minimal (very!) WinMo firmware and then have it autorun Bochs, which is known to be able to run the PC version of XP.. A customised, thinned-down XPe image should run fine under Bochs.
--W5i2
Hello all,
I'm now the proud owner of an android phone (htc desire) and as a hobbiest programmer i'm of course intrested in making (free) apps for it. I come from a linux based devices background (like gp2x, wiz, dingoo a320) etc. So i'm used to the gcc toolchains and libs and I read a bit around about android programming. Am i correct in saying that is not possible to just use a gcc toolchain for programming android apps since android uses some sort of java virtual machine ?
Or is this possible after all, just like one woud make apps for linux based devices. I think the Answer will be NO but i still ask since i wasn't certain and did not find that much information about it.
Suppose it is not possible, my only option for porting linux based games / apps would be to use the NDK and split up the main functions of a game and make a shared lib out of it, which could be called using JNI from java right ?
But i have a question if this is the case...
I can't really imagine that all phone manufactures use the same hardware in their phone or even the same architecture, so suppose i would use the NDK to create a shared lib with basic functions of a game i wish to port, wouldn't this lib need to be build for the specific architecture of a certain phone and thus could only work on that phone ? or are all android phones arm based ?
So you could say my question basically comes down to this :
Will Using the ndk and apps created with it, be less compatible then a java only app for all the droid phones out there ?
thanks
hmm seems i can answer my own questions now, i hadn't looked at the official ndk site itselve yet and did not know it would have all the info i needed.
So using gcc toolchains only does not work,
android uses a (modified ?)java virtual machine called dalvik
de libraries do have to be build for a specific architecture, and all droid's (phones) do seem to run on arm, but in the future the x86 architecture will be supported as well.
HOWEVER,
one can target ARMv5TE or ARMv7-A (and in the future x86) and include the needed libs (per architecture) in the apk file, the droid system will do the rest by checking if a lib for the specific architecture is availible or not.
also it's worth to note that ARMv5TE libs should work on any arm based droid phone, BUT without hardware fpu support. Since all the (linux based) devices i programmed for had no hardware fpu either and weren't as near as powerfull as my desire is, i don't think using software floating point would be a problem for my needs and if it i do need it i can always use fixed point math.
Just thought i should write a small excerpt of that page here, since there might be other people looking for it eventually
I wanted to share my answer to a question I got by mail:
Well this might clear you up a bit. Every operating system has a kernel + drivers in order to work - that is the operating system.
Here is the definition from wikipedia:
In computing, the kernel is the central component of most computer operating systems; it is a bridge between applications and the actual data processing done at the hardware level. The kernel's responsibilities include managing the system's resources (the communication between hardware and software components).[1] Usually as a basic component of an operating system, a kernel can provide the lowest-level abstraction layer for the resources (especially processors and I/O devices) that application software must control to perform its function. It typically makes these facilities available to application processes through inter-process communication mechanisms and system calls.
Operating system tasks are done differently by different kernels, depending on their design and implementation. While monolithic kernels execute all the operating system code in the same address space to increase the performance of the system, microkernels run most of the operating system services in user space as servers, aiming to improve maintainability and modularity of the operating system.[2] A range of possibilities exists between these two extremes.
----
Me: The different kernels come from different adaptations to the kernel and each "chef" makes what he thinks works best... You just need to try. on the HD2 all you do is change the kernel zImage file and some directories in the Android directory.
In advance, please excuse my own ignorance..
I've been an avid Android user since my HTC hero when it was first released, but haven't really gotten into the "meat and potatoes" of Linux...just some minor dabbling in UNIX as required in a few college classes.
I was wondering if anyone can explain exactly what the 'kernel' does, and how it's replacement can change the user experience and general functionality of a device. Down the road I'd love to be able to help the community, but I think a 'vocabulary lesson' would first be in order; amongst other things in due time.
Thanks in advance,
Chlballi
OK; this will be a bit simplified over reality, but here we go.
You've got the hardware that makes up your machine.
You've got the software you install on your machine (angry birds, whatever)
The kernel is kind of the bit in the middle that lets the two talk to each other. The kernel contains drivers that let your software interpret the touchscreen input, or talk to the graphics chip, or mount a filesystem (on your USB stick or on the internal memory).
A different kernel (or additional modules to the current kernel) will change how this operates. For example, it might allow the software to instruct your CPU to run at different frequencies than it would otherwise (overclocking/underclocking). It might support different filesystems (NTFS for example). It might have a different way of scheduling what tasks get sent to the CPU and in what order. Or it might just be better coded and have less random freezeups and so on.
I hope that helps!
EDIT: Incidentally, kernel isn't a uniquely linux term. All OS'es (that I am aware of) have a kernel of various types. Windows uses a proprietary MS kernel, Mac OS X uses a modified BSD kernel, etc etc.
You can also try here!
Very good Thanks all. I just needed a little refresher.
Chlballi
HTC HD2 might not be the fastest running device out there but it is undoubtedly the most popular Hardware platform vis-a-vis the no of OSes (Winmo,WP7,Android,meamo/meego(partially) and several desktop linux distros) supported. The basic aim of using one OS or the other is to optimize the utilization of system resources or in other words, to get maximum performance/usability from the given hardware in this case the HD2.Now to find the best performing custom ROM (why do we still call it a ROM, its not read only anymore )we can resort to certain benchmarks and tests to come up with the best performing ROM of a certain platform. But If I were to find out based on a certain basic parameters what is the OS that best utilises my HD2 (or any other phone for that matter) sadly I'd be at a loss. To my mind a good way of getting there would be a cross platform benchmark which could test all the platforms based on some basic parameters (suggested below) and give out the result, as to which OS performs the best on a given phone. I suggested HD2 because it can test most of the platforms supported by XDA (and I happen to own one)
Parameters
call connection delay
call Audio quality
SMS/MMS sending/recieving efficiency
UI fps
WIFI reception/connection reliability
camera/camcorder result and performance
audio/ video playback quality
RAW CPU/GPU performance
battery life for a diverse set of tasks
(the list might need expansion but these I think are the basics)
Now a seasoned dev can approach the problem in any way possible but here are my suggestions for a means to get there.
1. One option would be to base this benchmark/tests on a cross platform emulator which works on a wide variety of OSes.
2. Java is said to be platform independent so in theory it can be used.
3. Make all the tests to run in the Browser.
Another advantage of this would be that devs would know the limits of a particular hardware and can develop accordingly. As an example, when devs found out that the HD2 can capture 720p video on WP7 they started porting this ability to android as well.
Need expert and non expert opinion on the practicality of this.
s8isfi said:
HTC HD2 might not be the fastest running device out there but it is undoubtedly the most popular Hardware platform vis-a-vis the no of OSes (Winmo,WP7,Android,meamo/meego(partially) and several desktop linux distros) supported. The basic aim of using one OS or the other is to optimize the utilization of system resources or in other words, to get maximum performance/usability from the given hardware in this case the HD2.Now to find the best performing custom ROM (why do we still call it a ROM, its not read only anymore )we can resort to certain benchmarks and tests to come up with the best performing ROM of a certain platform. But If I were to find out based on a certain basic parameters what is the OS that best utilises my HD2 (or any other phone for that matter) sadly I'd be at a loss. To my mind a good way of getting there would be a cross platform benchmark which could test all the platforms based on some basic parameters (suggested below) and give out the result, as to which OS performs the best on a given phone. I suggested HD2 because it can test most of the platforms supported by XDA (and I happen to own one)
Parameters
call connection delay
call Audio quality
SMS/MMS sending/recieving efficiency
UI fps
WIFI reception/connection reliability
camera/camcorder result and performance
audio/ video playback quality
RAW CPU/GPU performance
battery life for a diverse set of tasks
(the list might need expansion but these I think are the basics)
Now a seasoned dev can approach the problem in any way possible but here are my suggestions for a means to get there.
1. One option would be to base this benchmark/tests on a cross platform emulator which works on a wide variety of OSes.
2. Java is said to be platform independent so in theory it can be used.
3. Make all the tests to run in the Browser.
Another advantage of this would be that devs would know the limits of a particular hardware and can develop accordingly. As an example, when devs found out that the HD2 can capture 720p video on WP7 they started porting this ability to android as well.
Need expert and non expert opinion on the practicality of this.
Click to expand...
Click to collapse
This idea has quite a few major flaws,
1) All platforms are designed a certain way (atleast in embedded systems where resources are scarce) and hence even though one platform might outperform the other, it might not have the features necessary or required by the user, ie. I "LOVE" WP7, the UI is fluid and the design is awesome, it works wonderfully however it being a recent addition to the market means that there aren't many apps and also due to the restrictive nature of wp which forces me to either dualboot or stay with android, Dualbooting has it's own flaws as battery is still very bad in sd android and WP7 so that leaves me no choice but to either go to WM6.5 or Android since the Linux Distros aren't targeted for a phone, even though they might work, there are flaws such as having to open terminal and executing scripts for smallest of the work like switching bluetooth on/off, and absence of audio even after ALSA modules for evo based msm kernel were out.
2) Raw performance means nothing, you aren't going to crunch numbers or perform scientific calculations on your phone, it doesn't matter if it's of no use, what you should be looking for instead is "Productivity"
3) Windows Mobile was an awesome platform with countless apps and functionality but it was just too old for the market, ie. Look at the difference in UI of WP7/Android to WM6.5
4) Java is NOT platform independent, it is just ported to enough places that the code you write will work on most of the machines, ie. Try executing java code on windows phone, also it is not the same libraries of java used through out, microsoft uses their inhouse developed java version while android interprets java code into dalvik byte code before execution, Linux favors opensource libraries which are known to be much slower than the ones provided by Sun. Neither is the browser same in all, you also have choice of browsers in platforms themselves and all of them are generally specialized for different tasks such as firefox for android can run html5 code and is said to be the most compliant browser but is way slower than the stock one or the Dolphin HD where as the stock browser or Dolphin are incapable of CSS3 transitions and most of the html5 content.
*you cannot measure "fps" in UI, everything is not rendered the way you are thinking it is, try switching on forced screen refresh through development tools on an android phone and see, most of the time you'll notice that most of the parts on the screen remain static and it's only the new components that are blit over the older parts in framebuffer.
There are a few more flaws but since i'm running out of time, ill stop here.
As for me, nand android (cyanogenmod nightlies) are the best, Doesn't lag in normal use, enough eye candy, good enough battery life and is quite stable and soon with the new DSP code we will have 720p recording on Android too.
Thanks for the detailed reply. What I understand is that there is way too much diversification for a the same code to run.