[Q] pmid10c boot image help - Android Q&A, Help & Troubleshooting

I am looking to compile a new kernel for this device. I have pulled off the boot.img file from /dev/block/nandc and used split_bootimg.pl to pull apart the kernel and the boot ramdisk. I have used extract-ikconfig to get the kernel config and built my new 3.4 kernel (with modules). So far so good...
I have tried to build the new boot.img file with no avail. My concern is with the original kernel as the new one should be build the same (I think). It looks like it is not compressed as I run the command
file boot.img-kernel
It returns
boot.img-kernel: data
So it is not a Linux kernel ARM boot executable zImage
Is this correct? Can Android boot with this or is the split_bootimg.pl tool not creating the file correctly (it does pull the ramdisk as I have uncompressed it fine! and the file does contain the kernel config)
Ok So assuming I can create a proper boot.img with my built zImage and the old ramdisk, what do I need to do with the modules? Do I update the boot.img on the tablet and copy the modules over to the existing /system/lib/modules? (this appears to not work)
I did not find an exact guide on android kernel and the modules....
Domenic
link to the old (working) boot.img hxxps://docs.google.com/file/d/0B0c1jpaziDZ-NU5Sd18wbUVjN1E/edit?usp=sharing

some progress
domenictroilo said:
I am looking to compile a new kernel for this device. I have pulled off the boot.img file from /dev/block/nandc and used split_bootimg.pl to pull apart the kernel and the boot ramdisk. I have used extract-ikconfig to get the kernel config and built my new 3.4 kernel (with modules). So far so good...
I have tried to build the new boot.img file with no avail. My concern is with the original kernel as the new one should be build the same (I think). It looks like it is not compressed as I run the command
file boot.img-kernel
It returns
boot.img-kernel: data
So it is not a Linux kernel ARM boot executable zImage
Is this correct? Can Android boot with this or is the split_bootimg.pl tool not creating the file correctly (it does pull the ramdisk as I have uncompressed it fine! and the file does contain the kernel config)
Ok So assuming I can create a proper boot.img with my built zImage and the old ramdisk, what do I need to do with the modules? Do I update the boot.img on the tablet and copy the modules over to the existing /system/lib/modules? (this appears to not work)
I did not find an exact guide on android kernel and the modules....
Domenic
link to the old (working) boot.img hxxps://docs.google.com/file/d/0B0c1jpaziDZ-NU5Sd18wbUVjN1E/edit?usp=sharing
Click to expand...
Click to collapse
Ok so the mkimage command can be used to pull the uImage out of the Kernel Part of the file like this:
mkimage -A arm -O linux -T kernel -C none -a 0x40008000 -e 0x40008000 -n "Linux 3.0.8" -d uImage boot.img-kernel2
The only question is where in the boot process can I find the "Load Address" and "Entry Point" values that are required to create my uImage. I would think that these are going to be needed as options when I build my new kernel, and I will need to change the boot process or add a boot.scr file with my options. I have mounted the /dev/block/nanda partition (uBoot partition) but am not certain on where I would find the current environment values.
I did find this little snippet on the net that referes to the base address for this device xxx.tabletroms.com/forums/all-other-android-tablets-general-discussion/5791-full-specs-whatever-else-polaroid-pmid10c-tablet-2.htmlx
mkbootimg --kernel boot.img-kernel --ramdisk boot.img-ramdisk.cpio.gz --cmdline 'console=ttyS0,115200 rw init=/init loglevel=8' --board sun4i --base 0x40000000 -o boot.img
But he never discusses where he found the -base address. Is this the same as the Load Address and Entry Point?
Domenic

domenictroilo said:
Ok so the mkimage command can be used to pull the uImage out of the Kernel Part of the file like this:
mkimage -A arm -O linux -T kernel -C none -a 0x40008000 -e 0x40008000 -n "Linux 3.0.8" -d uImage boot.img-kernel2
The only question is where in the boot process can I find the "Load Address" and "Entry Point" values that are required to create my uImage. I would think that these are going to be needed as options when I build my new kernel, and I will need to change the boot process or add a boot.scr file with my options. I have mounted the /dev/block/nanda partition (uBoot partition) but am not certain on where I would find the current environment values.
I did find this little snippet on the net that referes to the base address for this device xxx.tabletroms.com/forums/all-other-android-tablets-general-discussion/5791-full-specs-whatever-else-polaroid-pmid10c-tablet-2.htmlx
mkbootimg --kernel boot.img-kernel --ramdisk boot.img-ramdisk.cpio.gz --cmdline 'console=ttyS0,115200 rw init=/init loglevel=8' --board sun4i --base 0x40000000 -o boot.img
But he never discusses where he found the -base address. Is this the same as the Load Address and Entry Point?
Domenic
Click to expand...
Click to collapse
So the base address is found in script.bin (converted to text file with bin2fex tool). This is the information found in it:
[dram_para]
dram_baseaddr = 0x40000000
Still how do I find the "Load Address" and "Entry Point" for the current kernel...

unmkbootimg
domenictroilo said:
So the base address is found in script.bin (converted to text file with bin2fex tool). This is the information found in it:
[dram_para]
dram_baseaddr = 0x40000000
Still how do I find the "Load Address" and "Entry Point" for the current kernel...
Click to expand...
Click to collapse
Well more reading leads me to use unmkbootimg but on my linux 32bit system all I get is:
# strace ./unmkbootimg
execve("./unmkbootimg", ["./unmkbootimg"], [/* 20 vars */]) = 0
--- SIGILL (Illegal instruction) @ 0 (0) ---
+++ killed by SIGILL +++
Illegal instruction
Too bad I can see the souce code to find out what this program is doing or compile it for myself.....

split_bootimg.pl should give you the parameters i listed on tabletroms.
What source are you using? Polaroid never coughed any up and i last harassed them in February.

bigsupersquid said:
split_bootimg.pl should give you the parameters i listed on tabletroms.
What source are you using? Polaroid never coughed any up and i last harassed them in February.
Click to expand...
Click to collapse
Here is the split:
letourneau:~/tmp# ../split_bootimg.pl /root/boot.img
Page size: 2048 (0x00000800)
Kernel size: 8112836 (0x007bcac4)
Ramdisk size: 210343 (0x000335a7)
Second size: 0 (0x00000000)
Board name:
Command line: console=ttyS0,115200 rw init=/init loglevel=8
Writing boot.img-kernel ... complete.
Writing boot.img-ramdisk.gz ... complete.
I am using the linux--sunxi kernel for now with an additional patch for dmard06.ko (which I do not expect to work!) I emailed them for the kernel source but just received a form email saying they will get back to me..... oh well I will as again.
Just playing around for now to see if a newer kernel will tweek up the speed on this device as it is very laggy.
Domenic
I may be using an older version of split_bootimg.pl?

On another note, I was able to execute unmkbootimg on a different linux server. I was attempting to run it on a PIII 800 so it needs something > a pentium (I guess).
./unmkbootimg boot.img
unmkbootimg version 1.2 - Mikael Q Kuisma <[email protected]>
Kernel size 8112836
Kernel address 0x40008000
Ramdisk size 210343
Ramdisk address 0x41000000
Secondary size 0
Secondary address 0x40f00000
Kernel tags address 0x40000100
Flash page size 2048
Board name is ""
Command line "console=ttyS0,115200 rw init=/init loglevel=8"
This image is built using standard mkbootimg
Extracting kernel to file zImage ...
Extracting root filesystem to file initramfs.cpio.gz ...
All done.
---------------
To recompile this image, use:
mkbootimg --kernel zImage --ramdisk initramfs.cpio.gz --base 0x40000000 --cmdline 'console=ttyS0,115200 rw init=/init loglevel=8' -o new_boot.img
---------------
Domenic

think the parameters you're searching for are specific for building the new kernel without proper source code to extract them from?
maybe you could get them from dmesg while the tablet is running?
else think there might be a way to grep the variable names in the existing kernel binary or headers?
i also would like a fresh kernel.
maybe useful stuff here:
https://vilimpoc.org/research/sh3dev/kernel-hacking.html

http://forum.xda-developers.com/showpost.php?p=46668556&postcount=31
thanks jjchico
i haven't checked this out yet, but may be useful.

Well I have build a new kernel and copied the modules over, but I does not boot. It appears that it never mounts the ramdisk as it never gets to the second splash screen, but I am flying blind as there is no serial port to debug with. I suspect that I do not quite understand the boot process for this tablet.... here is what is on the nanda vfat partition: (good information here http://rhombus-tech.net/allwinner_a10/a10_boot_process/)
since this is in my linux.ini
cat linux.ini
[segment]
img_name = c:\linux\u-boot.bin
img_size = 0x80000
img_base = 0x4A000000
[script_info]
script_base = 0x43000000
script_size = 0x10000
[logo_info]
logo_name = c:\linux\linux.bmp
logo_show = 1
Not quite certain how to setup img_base on my compile I guess.
I have tried the linix.ini from the link above but the tablet booted to livesuite image... that is a fail.

Not being a kernel developer.... I am wondering if the option to setup SUNXI_NAND_COMPAT_DEV is creating /dev/block/nandX or /dev/nandX as this will definatly impact the init.sun4i.rc file as it is mounting /dev/block/nandX This could be my first issue.... but then does /init first display the initlogo.rle or start processing init.sun4i.rc. Well if the first thing it does in load initlogo.rle then I am not even getting this far....below is the description of SUNXI_NAND_COMPAT_DEV
Symbol: SUNXI_NAND_COMPAT_DEV [=y] │
│ Type : boolean │
│ Prompt: Create old nand device names (nanda-nandz) │
│ Defined at drivers/block/Kconfig:564 │
│ Depends on: BLK_DEV [=y] && SUNXI_NAND [=y] │
│ Location: │
│ -> Device Drivers │
│ -> Block devices (BLK_DEV [=y]) │
│ -> SUNXI Nandflash Driver (SUNXI_NAND [=y]) │

well a little more reading leads me to this page on the CarbonRom http://www.slatedroid.com/topic/64378-rom-carbonrom-422/ turns out that if you want to run a 3.4 kernel you MUST update u-boot (http://www.mediafire...4ro667xcfkd2dv7).... so I have flashed the CarbonRom and it does boot with the u-boot update. Not to worry the new u-boot will still boot the old kernel. The only issue I have with the CarbonRom kernel is the missing dmard06 driver so no touch screen..... I may get a new kernel working yet!

domenictroilo said:
well a little more reading leads me to this page on the CarbonRom http://www.slatedroid.com/topic/64378-rom-carbonrom-422/ turns out that if you want to run a 3.4 kernel you MUST update u-boot (http://www.mediafire...4ro667xcfkd2dv7).... so I have flashed the CarbonRom and it does boot with the u-boot update. Not to worry the new u-boot will still boot the old kernel. The only issue I have with the CarbonRom kernel is the missing dmard06 driver so no touch screen..... I may get a new kernel working yet!
Click to expand...
Click to collapse
https://github.com/fsebentley/linux_allwinner_drivers_input_touchscreen_mods
https://groups.google.com/forum/#!topic/linux-sunxi/D0n8dyaVA34
?

bigsupersquid said:
https://github.com/fsebentley/linux_allwinner_drivers_input_touchscreen_mods
https://groups.google.com/forum/#!topic/linux-sunxi/D0n8dyaVA34
?
Click to expand...
Click to collapse
the patch compiles,you need to comment out #include <linux/earlysuspend.h> as it is not supported on the newer kernel and not required by the driver anyway. I just need to get the kernel to actually load lol..... I have at least gotten past the boot screen now, but it hangs.... I will try a different arm tool chain and see what happens next.....

So close but yet so far..... well I have the new kernel installed and booted with adb shell available but it turns out the new mma7660.ko is not compatable with my device I get this error from dmesg over and over and over....
<4>[ 3254.934675] incomplete xfer (0x20)
<3>[ 3254.938093] Assertion failed! drivers/hwmon/mma7660.c,196,mma7660_read_xyz,result>=0
Will rename the driver and see if I can get past init further in the boot....
Edit
Well more issues with drivers the dmard06 is not compatible either, I had more success with the Carbon Kernel I will see if I can find the source git, should be around....
dmesg | busybox grep dmard
<4>[ 5.408528] dmard06: init
<3>[ 5.447835] dmard06gsensor_fetch_sysconfig_para: after: gsensor_twi_addr is 0x4c, dirty_addr_buf: 0x4c. dirty_addr_buf[1]: 0xfffe
<4>[ 5.488546] dmard06_init: after fetch_sysconfig_para: normal_i2c: 0x4c. normal_i2c[1]: 0xfffe
<6>[ 5.508612] gsensor_detect: Detected chip dmard06 at adapter 1, address 0x4c
<4>[ 5.601533] dmard06 gsensor I2C err = 0!
<4>[ 5.613430] dmard06 probe failed
<4>[ 5.624926] dmard06: probe of 1-004c failed with error -1
This all makes some sense as Polaroid has not get gotten me the kernel and the drivers they load (their kernel have very unique names:
Module Size Used by Not tainted
8192cu 575431 0
rtl8150 8910 0
mcs7830 6557 0
qf9700 8513 0
asix 22500 0
usbnet 23745 3 mcs7830,qf9700,asix
dmard06_gl 8202 2
mma7660 6541 0
mali 130177 14
ump 42178 19 mali
gt811_ts_828 19947 0
sun4i_csi0 27946 0
nt99250 14254 1
gc0308 12848 1
videobuf_dma_contig 5659 1 sun4i_csi0
videobuf_core 18067 2 sun4i_csi0,videobuf_dma_contig

Well more issues with drivers the dmard06 is not compatible either, I had more success with the Carbon Kernel I will see if I can find the kernel source git, should be around....
dmesg | busybox grep dmard
<4>[ 5.408528] dmard06: init
<3>[ 5.447835] dmard06gsensor_fetch_sysconfig_para: after: gsensor_twi_addr is 0x4c, dirty_addr_buf: 0x4c. dirty_addr_buf[1]: 0xfffe
<4>[ 5.488546] dmard06_init: after fetch_sysconfig_para: normal_i2c: 0x4c. normal_i2c[1]: 0xfffe
<6>[ 5.508612] gsensor_detect: Detected chip dmard06 at adapter 1, address 0x4c
<4>[ 5.601533] dmard06 gsensor I2C err = 0!
<4>[ 5.613430] dmard06 probe failed
<4>[ 5.624926] dmard06: probe of 1-004c failed with error -1
This all makes some sense as Polaroid has not provided me the kernel they used and the drivers they load have unique names see below from the original stock rom:
Module Size Used by Not tainted
8192cu 575431 0
rtl8150 8910 0
mcs7830 6557 0
qf9700 8513 0
asix 22500 0
usbnet 23745 3 mcs7830,qf9700,asix
dmard06_gl 8202 2
mma7660 6541 0
mali 130177 14
ump 42178 19 mali
gt811_ts_828 19947 0
sun4i_csi0 27946 0
nt99250 14254 1
gc0308 12848 1
videobuf_dma_contig 5659 1 sun4i_csi0
videobuf_core 18067 2 sun4i_csi0,videobuf_dma_contig

I suspect after all the trouble I had with LG source that there are device-specific bits in the drivers.
Polaroid will most likely have to cough up source to get it all working.
Have you considered trying punchmod to use the old drivers? I dunno if that'd work considering the stock kernel is a lower version... but it might be worth a try.

bigsupersquid said:
I suspect after all the trouble I had with LG source that there are device-specific bits in the drivers.
Polaroid will most likely have to cough up source to get it all working.
Have you considered trying punchmod to use the old drivers? I dunno if that'd work considering the stock kernel is a lower version... but it might be worth a try.
Click to expand...
Click to collapse
I have changed the vermagic on the old modules and tried with the newer kernel but no go.... the latest 3.0 sunxi kernel is at 3.0.96 so I will build this one and see if I can get the special 3.0.8 polaroid modules to load.
I have a ticket open with Polaroid lol I guess we will see if the cough up a kernel or not.... I would not put money on it...

domenictroilo said:
I have changed the vermagic on the old modules and tried with the newer kernel but no go.... the latest 3.0 sunxi kernel is at 3.0.96 so I will build this one and see if I can get the special 3.0.8 polaroid modules to load.
I have a ticket open with Polaroid lol I guess we will see if the cough up a kernel or not.... I would not put money on it...
Click to expand...
Click to collapse
I've had an open ticket since November from talking on the phone after email did nothing.
nothing but autoresponder.

bigsupersquid said:
I've had an open ticket since November from talking on the phone after email did nothing.
nothing but autoresponder.
Click to expand...
Click to collapse
Do you believe that something like this http://gpl-violations.org/faq/violation-faq.html could force them to provide the source code? I could try to get the group at "FreakTab" to make the same requests for the kernel sources. Maybe with enough requests the gpl-violations group could take it on?
(K I am getting off topic here sorry anyone out there......)
I have attempted to build the 3.0.96 kernel but it did not boot.... back to hacking at the .config to see what I have missed (I need to move my build environment off this old p3 800 lol)

Related

Guide for compiling the kernel and modules

I'm throwing together this little guide to help jumpstart people who are new to linux/android/kernel development.
This guide is for Linux. If you are running Windows or Mac and get this working please show us your ways. I'll update the guide with info for those platforms.
Do yourself a favor and go through all the steps at least once. Having a properly setup kernel source is worth waiting the five minutes to compile a kernel once, even if all you want to do is compile a module.
I put all my downloads in "~/Downloads" and my working stuff in "~/code". You'll have to adapt the paths used to your own needs.
Also, you'll notice I put "-j8" after most of my make commands. You will want to adjust this to how many cpu's your computer has. So if you have a dual core then "-j2" or a quad core then "-j4". If you have a cpu that supports hyperthreading you can double the number of cores. I have 4 cores that support hyperthreading so i do "-j8".
Get the B&N source.
I couldn't get modules loaded that were compiled with Google's ndk. A "cat /proc/version" and a quick google search had me getting the Sourcery compiler which is what B&N used apparently.
Download the Sourcery compiler here. I chose the "advanced" linux version.
Now we need to unzip our compiler and B&N sources.
Code:
$ cd ~/code
$ tar -xjf ~/Downloads/arm-2010q1-202-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
$ tar -xzf ~/Downloads/nook_tablet_1-4.tar.gz
Now to get things built. Thanks to nookdevs for getting me pointed in the right direction
First we need to build u-boot, this will allow us to make the uImage flavor of the kernel.
Code:
$ cd distro/u-boot
$ make -j8 ARCH=arm CROSS_COMPILE=~/code/arm-2010q1/bin/arm-none-linux-gnueabi- omap4430sdp_config
$ make -j8 ARCH=arm CROSS_COMPILE=~/code/arm-2010q1/bin/arm-none-linux-gnueabi-
$ make -j8 tools
Add the tools to the path so the kernel build has access to mkimage.
Code:
$ PATH=$PATH:~/code/distro/u-boot/tools/
Now we build the kernel.
Code:
$ cd ../kernel/android-2.6.35
$ make -j8 ARCH=arm android_4430BN_defconfig
$ make -j8 ARCH=arm CROSS_COMPILE=~/code/arm-2010q1/bin/arm-none-linux-gnueabi- uImage
And finally build a module. I've attached the source for a simple one just to test things out. Cribbed from tldp.org
Unzip the attachment in a directory of your choice. I used ~/code.
Code:
$ cd ~/code/hellokmod
$ make ARCH=arm CROSS_COMPILE=~/code/arm-2010q1/bin/arm-none-linux-gnueabi- KDIR=~/code/distro/kernel/android-2.6.35
And test it out!
Code:
$ adb push hello-1.ko /data/local/
$ adb shell
$ su
# insmod /data/local/hello-1.ko
# dmesg
If you have a "hello world" at the end of your dmesg output, then it worked! grats on your module.
P.S. rmmod doesn't work, anyone know what is wrong with the module code that won't allow it to unload?
P.P.S If you want to build a customized kernel, you can replace the "make -j8 ARCH=arm android_4430BN_defconfig" line with a "make menuconfig" to fine tune things. This won't do us much good though until we get kexec or something similar working thoug.
Very nice guide, but I always thought that the -j# option on make should be: number of cores + 1.
For anyone wanting to give this guide a try, but are unwilling or unable to sacrifice Windows drive space to dual boot into Linux, I highly recommend VirtualBox from Oracle. With it, you can create a virtual Linux installation. You can see (some of) the different distro's at Distrowatch. There are several Virtualbox installation guides available specifically for Ubuntu that can be adapted for any distro you like.
Sources are invalid
Code:
Texas Instruments X-Loader 1.41 (Oct 21 2011 - 14:00:05)
Start not on PWRON, skipping power button check.
mmc read: Invalid size
Starting OS Bootloader from MMC/SD1 ...
U-Boot 1.1.4-acclaim1.4_1.4.0.1029^{} (Nov 11 2011 - 12:34:20)
Load address: 0x80e80000
DRAM: 1024 MB
Using default environment
In: serial
Out: serial
Err: serial
hw_status 0x2b vbus_status 0x84
Detection done: USB2PHYCORE 0x00a06260
MAX17042+UBOOT: battery type=LG
MAX17042+UBOOT: gas gauge detected (0x0002)
MAX17042_STATUS (00h) is 0x0002
MAX17042+UBOOT: BATTERY Detected!
MAX17042+UBOOT:POR detected!
No valid max17042 init data found, assume no battery history
MAX17042_Version (21h) is 0x0092
MAX17042_DesignCap (18h) is 0x07d0
MAX17042_OCV (fbh) is 0xfeab
MAX17042_FSTAT (fdh) is 0x3950
MAX17042_SOCvf (ffh) is 0xd692
uboot verify: 1d CONFIG is 2210 ; should be 2210 & 0xFDFB
uboot verify: 2a RELAXCFG is 083b ; should be 083b
uboot verify: 29 FILTERCFG is 87a4 ; should be 87a4
uboot verify: 28 LEARNCFG is 2406 ; should be 2406 & 0xFF0F
uboot verify: 18 DesignCap is 07d0 ; should be 205c
max17042_write_custom_para: use hardcoded values
ICHGTerm = 0x0140
use hardcoded Capacity 0x205c
VFSOC = 0xcb7a
fullcap0=0x2067 VFSOC=0xcb7a remcap=0x41ee
MAX17042_STATUS (00h) is 0x0002
STATUS = 0x0002 -- clearing POR
MAX17042_STATUS (00h) is 0x0000
Max17042 init is done
SOC 203%, booting.
Board revision PVT
Booting from sd
Autobooting in 0 seconds, press <SPACE> to stop...
mmc read: Invalid size
2682712 bytes read
booti: bad boot image magic
OMAP44XX SDP #

Galaxy S2 Compile a Kernel Module

I'm having an issue insmoding a kernel I built for my rooted galaxy s2. My end game is to get USB-ethernet working by building the asix module but I cant even get a ko from the default build to insmod.
I compiled a kernel based on what I downloaded from samsungs website "GT-I9100_OpenSource_Update3.zip" and followed the instructions included (basically run make with defconfig) I chose scsi_wait_scan.ko as a test because it was built with the default config and currently wasn't loaded on my phone.
Here's some info that's pertinent. Any help would be appreciated. I'm running Ubuntu 11.
# lsmod
lsmod
dhd 242604 0 - Live 0xbf02e000
j4fs 65002 1 - Live 0xbf018000 (P)
Si4709_driver 17347 0 - Live 0xbf00d000
bthid 3384 0 - Live 0xbf007000
vibrator 6724 2 - Live 0xbf000000
# insmod scsi_wait_scan.ko
insmod scsi_wait_scan.ko
insmod: init_module 'scsi_wait_scan.ko' failed (Exec format error)
# dmesg
...
<4>[19668.986907] scsi_wait_scan: disagrees about version of symbol module_layout
# modinfo scsi_wait_scan.ko
modinfo scsi_wait_scan.ko
modinfo: can't open '/2.6.35.7-I9100XWKI4-CL575468/': No such file or directory
# pwd
/mnt/sdcard
# ls -l
...
-rwxrwxr-x system sdcard_rw 32484 2012-01-12 10:21 scsi_wait_scan.ko
$ file scsi_wait_scan.ko
scsi_wait_scan.ko: ELF 32-bit LSB relocatable, ARM, version 1 (SYSV), not stripped
Solved:
I actually got this working after I met another developer through work. You need a ramdisk to compile into the kernel.
I can't post links yet but you can search for the thread on the google forms by googling: 'Tal Alon kernel' and it should give you a pretty good description of what to do.
unpack a boot.img from a backup with unpack-bootimg.pl and uncpio the bootdisk.
The geist of what i learned is that there is a line in the .config file that should read CONFIG_INITRAMFS_SOURCE="/path/to/bootimg/boot.img-ramdisk"
After you build the kernel, copy your .ko's to the ram disk folder in boot.img-ramdisk/system/lib/modules
compile the kernel again then tar the zImage and load with odin.
njdevi11 said:
I actually got this working after I met another developer through work. You need a ramdisk to compile into the kernel.
I can't post links yet but you can search for the thread on the google forms by googling: 'Tal Alon kernel' and it should give you a pretty good description of what to do.
unpack a boot.img from a backup with unpack-bootimg.pl and uncpio the bootdisk.
The geist of what i learned is that there is a line in the .config file that should read CONFIG_INITRAMFS_SOURCE="/path/to/bootimg/boot.img-ramdisk"
After you build the kernel, copy your .ko's to the ram disk folder in boot.img-ramdisk/system/lib/modules
compile the kernel again then tar the zImage and load with odin.
Click to expand...
Click to collapse
Hi, did you get your asix.ko to work? I'm trying the same thing, got the module to compile and load, even eth0 showed up but now I'm stuck. I'm unable to get any communication going, i get "invalid rx length" errors in dmesg for the eth0 interface.
Thanks

[Q] Why won't my Allwinner A10 Kernel Boot?

Hello All,
So here's the situation: I am trying to use my cheap virtually unbrickable tablet to learn more about kernel development and eventually ROM building.
I have extracted the manufacturers (WoPad) LiveSuit image and used split_bootimg.pl to break up the boot image.
I extracted the config file from the kernel image using extract-ikconfig and it created a config file. I didn't see the config in /proc.
So, I have the factory ramdisk and the factory kernel config.
I have downloaded several kernel sources (lichee-3.0.8, ChritianTroy's 3.0.36, and another one from linux-sunxi 3.0.72). I can successfully compile all of them without errors and they all generate zImages, uImages, etc using the factory config as well as the sun4i_crane configs they come with.
When I repack the boot.img with the newly created kernel and install it on nandc it wont' boot past the android icon (u-boot). I was hoping someone could shed light where I'm messing up. When I compare my boot.img to the factory one, they both have the same offset where the kernel starts (0x00000800). I have also ensured I'm replacing the kernel modules when I'm changing kernel versions.
Here is the line I'm using to repack the boot.img
Code:
mkbootimg --base 0x40000000 --pagesize 2048 --kernel zImage --ramdisk ramdisk-repack.cpio.gz --board sun4i --cmdline \"console=ttyS0,115200 rw init=/init loglevel=8\" -o boot.img
OR
mkbootimg --base 0x40000000 --pagesize 2048 --kernel bImage --ramdisk ramdisk-repack.cpio.gz --board sun4i --cmdline \"console=ttyS0,115200 rw init=/init loglevel=8\" -o boot.img
OR
mkbootimg --base 0x40000000 --pagesize 2048 --kernel uImage --ramdisk ramdisk-repack.cpio.gz --board sun4i --cmdline \"console=ttyS0,115200 rw init=/init loglevel=8\" -o boot.img
Any help will be appreciated. Also, I'm building on Ubuntu 13.04 with Google GCC 4.6 from the ndk. I have built kernels for other devices without issues. This one has me stumped.
Thanks
Here is an output from UART
Code:
CPU: SUNXI Family
Board: A10-EVB
DRAM: 512 MiB
NAND: 3800 MiB
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
--------fastboot partitions--------
-total partitions:9-
-name- -start- -size-
bootloader : 100000 1000000
env : 1100000 200000
boot : 1300000 2000000
system : 3300000 10000000
data : 13300000 40000000
misc : 53300000 100000
recovery : 53400000 2000000
cache : 55400000 8000000
UDISK : 5d400000 90400000
-----------------------------------
Hit any key to stop autoboot: 0
NAND read: device 0 offset 0x1300000, size 0x2000000
33554432 bytes read: OK
Starting kernel ...
Since I posted my question, I have managed to work my way through some errors but I'm stuck again. Now I'm having issues getting past init. It is stuck in a loop because of this:
Code:
<4>ft5x_ts: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)
[ 8.740000] ft5x_ts: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)
<6>init: command 'insmod' r=-1
[ 8.780000] init: command 'insmod' r=-1
<4>hv2605: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)
[ 8.840000] hv2605: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)
<6>init: command 'insmod' r=-1
[ 8.850000] init: command 'insmod' r=-1
<4>ump: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)
[ 9.000000] ump: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)
<6>init: command 'insmod' r=-1
Again, if any kernel devs out there are reading this your assistance is appreciated.
I was able to solve this on my own too. Ended up being the tool chain I was using. I used 4.4.3 and all is well. Only bug I'm having is a WiFi driver issue now.
Sent from my YP-G70 using xda premium
rjwil1086 said:
I was able to solve this on my own too. Ended up being the tool chain I was using. I used 4.4.3 and all is well. Only bug I'm having is a WiFi driver issue now.
Sent from my YP-G70 using xda premium
Click to expand...
Click to collapse
dude i know its a bit late but can you walk me through your entire kernel compilation procedure starting by sharing the source and the tricks of booting the newly created kernel ?

Need help analyzing a boot.img

Hi there!
Currently I am trying to extract and modify a boot.img from my car stereo (to set ro.secure=0 in default.prop - its a AV7) from MIC. ( http://www.shop.mic-deutschland.de/shop/article_W005/AV7.html?shop_param=cid=6&aid=W005& )
I did my exercises by studying the specs of a normal boot.img and learned that there should be a 2k header, followed by the gzipped kernel. I should be able to identify the kernel starting after those 2k of header and ending with some zeros finished with 1F 8B. The rest should be the ramdisk, gzipped and cpioed.
So far the theory - but apparently, I am not able to extract the kernel. I also tried some different scripts floating around - none of them ended up with an extractable kernel.
Example:
/unpackbootimg -i ../boot.img -o .
BOARD_KERNEL_CMDLINE
BOARD_KERNEL_BASE e3e0ff00
BOARD_PAGE_SIZE 1768697202
-> Kernel size 0, pretty everything ends up in the ramdisk which is NOT a gzip file.
This is the boot.img: http://ul.to/ivggomon
So you see me pretty clueless at the moment - any suggestion is highly appreciated!
Noone any idea?
unmkbootimg output:
Code:
unmkbootimg version 1.2 - Mikael Q Kuisma <[email protected]>
File ../boot.img not a plain boot image, seeking for embedded image ... not found.
boot_info (from bootimg_Toolset):
.
Code:
/boot_info ../boot.img
Android Magic not found in ../boot.img. Giving up.
The hread may be deleted. It was a uImage multi file with a gzipped cpio in it...

Packing boot image for Desire 610 A3UL

I am following this tutorial on my desire 610: http://http://whiteboard.ping.se/Android/Debian
All has gone well so far, the system works in chroot, etc etc etc, thats not the problem. My problem is that i cant seem to pack a boot image that works for the phone. I know the problem is with my boot image, because if the init script had been initalised, I had a line at the start which would start a log file, and the system would bootloop. Instead it takes me to the fastboot menu when i power on.
I have used the tool to unpack the boot image, found at http://whiteboard.ping.se/Android/Unmkbootimg , and its output was this:
Code:
unmkbootimg version 1.2 - Mikael Q Kuisma <[email protected]>
Kernel size 6004624
Kernel address 0x8000
Ramdisk size 1017204
Ramdisk address 0x2008000
Secondary size 0
Secondary address 0xf00000
Kernel tags address 0x1e00000
Flash page size 2048
Board name is ""
Command line "console=ttyHSL0,115200,n8 androidboot.hardware=qcom user_debug=31 ehci-hcd.park=3"
*** WARNING ****
This image is built using NON-standard mkbootimg!
OFF_KERNEL_ADDR is 0xFE208100
OFF_RAMDISK_ADDR is 0x00208100
OFF_SECOND_ADDR is 0xFF100100
Please modify mkbootimg.c using the above values to build your image.
****************
Extracting kernel to file zImage ...
Extracting root filesystem to file initramfs.cpio.gz ...
All done.
---------------
To recompile this image, use:
mkbootimg --kernel zImage --ramdisk initramfs.cpio.gz --base 0x1dfff00 --cmdline 'console=ttyHSL0,115200,n8 androidboot.hardware=qcom user_debug=31 ehci-hcd.park=3' -o new_boot.img
---------------
I have tried doing as it says and compiling mkbootimg with those settings, however it still does not work. Could anyone possibly see what im doing wrong? And if not, does anyone have a copy of mkbootimg that works for the Desire 610?
Thanks in advance
falseascension said:
I am following this tutorial on my desire 610: http://http://whiteboard.ping.se/Android/Debian
All has gone well so far, the system works in chroot, etc etc etc, thats not the problem. My problem is that i cant seem to pack a boot image that works for the phone. I know the problem is with my boot image, because if the init script had been initalised, I had a line at the start which would start a log file, and the system would bootloop. Instead it takes me to the fastboot menu when i power on.
I have used the tool to unpack the boot image, found at http://whiteboard.ping.se/Android/Unmkbootimg , and its output was this:
Code:
unmkbootimg version 1.2 - Mikael Q Kuisma <[email protected]>
Kernel size 6004624
Kernel address 0x8000
Ramdisk size 1017204
Ramdisk address 0x2008000
Secondary size 0
Secondary address 0xf00000
Kernel tags address 0x1e00000
Flash page size 2048
Board name is ""
Command line "console=ttyHSL0,115200,n8 androidboot.hardware=qcom user_debug=31 ehci-hcd.park=3"
*** WARNING ****
This image is built using NON-standard mkbootimg!
OFF_KERNEL_ADDR is 0xFE208100
OFF_RAMDISK_ADDR is 0x00208100
OFF_SECOND_ADDR is 0xFF100100
Please modify mkbootimg.c using the above values to build your image.
****************
Extracting kernel to file zImage ...
Extracting root filesystem to file initramfs.cpio.gz ...
All done.
---------------
To recompile this image, use:
mkbootimg --kernel zImage --ramdisk initramfs.cpio.gz --base 0x1dfff00 --cmdline 'console=ttyHSL0,115200,n8 androidboot.hardware=qcom user_debug=31 ehci-hcd.park=3' -o new_boot.img
---------------
I have tried doing as it says and compiling mkbootimg with those settings, however it still does not work. Could anyone possibly see what im doing wrong? And if not, does anyone have a copy of mkbootimg that works for the Desire 610?
Thanks in advance
Click to expand...
Click to collapse
I just use Blobtools and linux's standard abootimg. I'll find some links and do a quick Howto when I get home tonight.
MiniBlu
MiniBlu said:
I just use Blobtools and linux's standard abootimg. I'll find some links and do a quick Howto when I get home tonight.
MiniBlu
Click to expand...
Click to collapse
Cheers! looking forward to getting this thing actually working
Aha! Using abootimg made it work. Wish i knew about that earlier...
There's still a few errors though, need to fix that. Thanks for your help, you literally saved probably hours and hours more work if I hadnt known about this. Much appreciated

Categories

Resources