Android Tablets Forum banner
1 - 20 of 26 Posts

·
Registered
Joined
·
954 Posts
With the kernel source code released, it is now possible to compile kernel modules for any RK2808 device. I don't know how to get a working kernel.img because I'm not a programmer. However I got lowmemorykiller (from 2.6.25), and loaded in Android. lowmemorykiller.koMultiupload.com - upload your files to multiple file hosting sites!This enables the minfree memory killer that Android devices are supposed to have
Code:
cat /sys/module/lowmemorykiller/parameters/minfree1536,2048,4096,5120,5632,6144
Not sure if this is killing tasks yet. use insmodTo kill swap, use 'busybox swapoff /dev/block/mtdblock10'
 

·
Registered
Joined
·
954 Posts
G

·
Thanks for this xaueious. I wasn't aware that swap was usable on aPad (what with it not being root'ed).Does the kernel source do anything towards the device being rooted (not that I want it for anything other than swap)?
 

·
Registered
Joined
·
954 Posts
Discussion Starter · #6 ·
Swap was being used on the Apad, but it was a bad idea. It was some sort of workaround for the lowmemorykiller driver not being compiled. I'm not sure why Rockchip decided not to compiled it when it was a kernel config away. Maybe someone who understands Android better can tell me. Working aufs.ko: Multiupload.com - upload your files to multiple file hosting sites!
 

·
Registered
Joined
·
69 Posts
Hello, So why did you need the kernel sources to be able to compile these modules? Couldn't you have done this by loading modules you compiled for ARM9 from the normal linux repositories? OR are you just compiling the modules in the source that was released and not used on the rockchips apad builds we know and love? I've been wanting to contribute to porting etc but could never work out the format of the kernel.img. I think I asked you about it on your blog and over here a few times. I see you don't know either? Does Rogerbraun know this? When I first asked I was just going to compile up a newer kernel, throw it in and just see if I could get it to boot up and work from there.
 

·
Registered
Joined
·
954 Posts
We might not have needed the kernel source to compile those modules. I wasn't even thinking about it at all until the kernel sources got released, but the released kernel source for the A7HT probably matches the Apad kernel source, so anything compiled this way works without hassles. I just consider myself a ROM cook, not a developer. Basically it's because I'm a noob. I still don't know how to boot the kernel because the format for kernel.img is still a mystery. It's the kernel packed in Image format, and the wifi module is in there somewhere somehow as well. I'm not going to keep trying to compile modules. My Apad doesn't even recharge anymore because my charger is busted. These fixes make a huge difference. The tablet is actually usable now software-wise, but my hardware is busted :(With lowmemkiller, stability and performance become much improved. With aufs, system is 'writable' (onto /data) and can now be rooted after a ROM install (supposedly universalandroot is working, but I didn't confirm for myself). Anyways I dumped the files onto my Skydrive. The boot.img works for any batch. I am too lazy to repack the boot.img and reupload now.
 

·
Premium Member
Joined
·
664 Posts
Hello xaueiousI think if you have any Problems with the kernel and wlan.ko WiFi, and have a look here dumfuq it responds to MP[KERNELS] the kernel corner - xda-developerslittle help if he fairt magic with the kernel
 

·
Registered
Joined
·
69 Posts
OK. I see from the archos sources there is a mkkrnlimg program which appears to take a kernel image as (arg1) and outputs to outfile (arg2). It adds KRNL (length of kernel) to the front of kernel image you supply then some CRC or something on the end. i.e [[email protected] kernel]# od -c foo0000000 f o o n0000004[[email protected] kernel]# ./mkkrnlimg foo foobarCRC32=0xDD2465F3OK[[email protected] kernel]# od -c foobar0000000 K R N L 004 0 0 0 f o o n 363 e $ 3350000020OK so going back to apad kernel.img I see the length prefix added is much shorter than the actual size of kernel.img file for apad. So is this a ramdisk or something on the end?I will see if I can work out later. Regardless I guess I know enough now to replace the kernel in a kernel.img for apad
 

·
Registered
Joined
·
954 Posts
Discussion Starter · #13 ·
LFD this isn't what we were talking about... I think you nailed it, crowdeycMight be some sort of ramdisk at the end. I think the wifi modules end up in there somehow... I'll let someone else do this hard lifting. My Apad is pretty much busted at this point
 

·
Registered
Joined
·
69 Posts
Wrote (well hacked) a quick script which may be of use to others playing with apad Firmwares... bash-4.0$ cat splitapadkernel.sh #!/bin/sh# Usage: splitapadkernel.sh kernel.img part1.img part2.img# Split the Apad kernel.img file into two parts# part1 = 8 byte header + kernel + 4 byte CRC - as constructed by mkknrlimg# 8 byte header = KNRL(4bytes) + length of kernel(4bytes)# part2 = ram disk or other...not sure. if [ $# -ne 3 ] ; then echo "Usage: splitapadkernel.sh kernel.img part1.img part2.img" exit 1;fi let klen=`od -x -N4 -j4 kernel.img | head -1 | awk '{print "0x"$3$2}'`let len="8 + $klen + 4"echo "Apad kernel length is: $klen"dd if=$1 of=$2 bs=1 count=$lendd if=$1 of=$3 bs=1 skip=$len exit 0bash-4.0$ ./splitapadkernel.sh kernel.img part1.img part2.imgApad kernel length is: 42739924274004+0 records in4274004+0 records out4274004 bytes (4.3 MB) copied, 18.7556 s, 228 kB/s796875+0 records in796875+0 records out796875 bytes (797 kB) copied, 3.51318 s, 227 kB/sbash-4.0$ dd if=part1.img bs=1 skip=8 count=4273992 of=kern.img4273992+0 records in4273992+0 records out4273992 bytes (4.3 MB) copied, 18.5794 s, 230 kB/sbash-4.0$ /tmp/Archos7HT_GPL/external/ kernel/ prebuilt/ toolchain/ bash-4.0$ /tmp/Archos7HT_GPL/kernel/mkkrnlimg kern.img part1validate.imgCRC32=0x147BD857OKbash-4.0$ diff part1validate.img part1.imgbash-4.0$ cat part1validate.img part2.img > validatescript.imgbash-4.0$ diff validatescript.img kernel.imgbash-4.0$ pwd/Downloads/wcdma/wcdma/rockdev/Image
 

·
Registered
Joined
·
69 Posts
Just looking at part2.img now. It's looks like it's a straight ascii text file. Some sort of index into functions. Now I've got a feeling it's probably not even required. I think it would be a good test to get rid of part2.img from kernel.img and see if you can still boot the apad fine. I bet it can run without it. This makes things really easy and also removes the need for the script I included earlier. Sorry about going off topic here.
 

·
Registered
Joined
·
1 Posts
[quote name='crowdeyc;53103]Just looking at part2.img now. It's looks like it's a straight ascii text file. Some sort of index into functions.[/QUOTE]it can be initramfs in cpio format' date=' see [URL=http://jootamam.net/howto-initramfs-image.htm']Jootamam - Howto create an initramfs image[/URL]
 

·
Registered
Joined
·
69 Posts
fanoush;53111]it can be initramfs in cpio format said:
Jootamam - Howto create an initramfs image[/url]
Yeah it can be, but in this case it's not. As I mentioned it's all ascii text and looks like a table of some sort with symbols/file names. There is nothing after it, and what's more it's very small/not large at all.Edit 2: OK I worked out what it is. It's a system map. LOL, yep it was a table of symbols after all
http://en.wikipedia.org/wiki/System.mapNothing interesting before it (except the kernel), and nothing interesting after it.Edit 3: It all makes sense now. It's used for debugging and everytime you build a kernel the map is different. So it makes sense to bundle it on the end of kernel.img like this (even if the apad doesn't need it there to run), especially if you're changing the other firmware images all the time and you want to still be able to use it in kernel debugging. The packager could even take it off the end automatically and place it where it belongs in the root filesystem image so klogd can use it. Who has the source for RKAndroidDM.exe? Anybody know? I want to learn some more.
 
1 - 20 of 26 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top