Howto pass pointer to char parameter to kernel via copy_to_user()

by Danke Xie » Wed, 21 Jul 2010 04:25:56 GMT

Sponsored Links
 Hi Dwi,

I couldn't really figure out what is being done in the code. But I
think I noticed a reason why the call might fail (though not 100%
sure). You allocated one byte with kmalloc, which is sizeof(char), but
you would be copying 4 bytes into the area, that is sizeof(tmp). I
think that's why you got a seg fault. Do you think so?



Other Threads

1. Is BOOT_COMPLETED prioritized?

I want to do some initialization for a widget, as soon as the phone
boots and before the first update on the widget happens. Would a
BroadcastReceiver on BOOT_COMPLETED ensure that this initialization is
done prior to the widgets' first onUpdate() call?

Is there a priority or is it completely random, meaning I'd have to
add a check to make sure it's done prior to the update?


2. Very basic questions about porting and my linux based phone.

WOW ! That's really one of the very few emails I have seen where someone did
all the background work ! :)

I have been working with phones for sometime now and that is actually a lot
of useful information !!

first you should figure out if someone has already ported android to PXA270,
since its an intel architecture, it might involve some work. If no one has
ported ( or is working on)  this to PXA270, you would have to start looking
around for a tool chain that can compile for this processor.

The source code is available openly, so once you have the toolchain sorted
out, you would start by looking at compiling both the user space android and
the kernel.

Another important aspect would be to look at the bootloader you have and if
it expects some of specific images to be at some specific location(it
probably does) and then look at the possibility of replacing it with a
bootloader that you can use with android.
flashing of images, this might be good or bad, but we don't know yet. We
need to figure out if the bin files that you flash in have to have any
specific header/format as well. For this you might want to search online for
people putting custom linux images on this phone. Since the signatures are
not validated, I am pretty sure someone would be doing that, you just need
to find who that person is and get this information. ( simple enough, right?
;) )

Also, I did a quick search and found
porting android to PXA270 that might help as well with the basic
compiling portion. :)

Since you do seem to have all the images with you, it should be safe enough
to experiment...have fun! :)


3. capturing images

4. ambiguous column name: _id when querying the contacts list

5. help with scale animation

6. setting wallpaper..plz help.

7. How to get key events in keylock state.