Jump to content

[DEVS]CyanogenMod For The Andypad.


Guest Sami Beck

Recommended Posts

(it's not related to 33mb system file, sorry!)

for someone who want to build CM7, please clone following repos on your build machine,

https://github.com/naobsd/cm_device_rockchip_rk2918

https://github.com/naobsd/cm_packages_apps_TSCalibration (if you need TS calibration)

and please cherry-pick following patches,

https://github.com/naobsd/cm_frameworks_base/compare/gingerbread-naobsd (do not clone this repo)

"Add touchscreen calibration" (if you need TS calibration)

"Add input devices rotation"

"Add accelerometer rotation"

Link to comment
Share on other sites

Guest Sami Beck

(it's not related to 33mb system file, sorry!)

for someone who want to build CM7, please clone following repos on your build machine,

https://github.com/n...rockchip_rk2918

https://github.com/n...s_TSCalibration (if you need TS calibration)

and please cherry-pick following patches,

https://github.com/n...gerbread-naobsd (do not clone this repo)

"Add touchscreen calibration" (if you need TS calibration)

"Add input devices rotation"

"Add accelerometer rotation"

Can you give me the generic RK2918 cm but not in a .img format? So I can edit the files?

Link to comment
Share on other sites

Can you give me the generic RK2918 cm but not in a .img format? So I can edit the files?

boot.img is RK header + cpio.gz + CRC. cpio.gz can be extracted with my rkunpack.

system.img is ext3 image. please do "mount -o loop system.img /mnt".

Link to comment
Share on other sites

Guest Sami Beck

boot.img is RK header + cpio.gz + CRC. cpio.gz can be extracted with my rkunpack.

system.img is ext3 image. please do "mount -o loop system.img /mnt".

Im running windows 7 how do I extract on windows?

Link to comment
Share on other sites

Im running windows 7 how do I extract on windows?

oh, sorry. mmm. do you have cygwin? probably my programs can be compiled on cygwin.

or probably binary editor can be used. header is 8 bytes and trailing CRC is 4 bytes.

or how about install Linux on VM?

Link to comment
Share on other sites

Guest Csharpe

After pushing complete firmware folder to system/etc, the tablet doesn't want to boot anymore (I get adb access, but no shell), so dmesg is impossible. I did this to try WLAN.

I'll experiment some more. Axis bug was fixed in build.prop

Could it be that system partition is too small to contain it?

EDIT: After recompiling myself,adding gapps, newest WLAN drivers etc, I get a bootloop after CM7 screen (but adb access this time)

logcat: http://pastebin.com/LetDH777

Edited by Csharpe
Link to comment
Share on other sites

After pushing complete firmware folder to system/etc, the tablet doesn't want to boot anymore (I get adb access, but no shell), so dmesg is impossible. I did this to try WLAN.

I guess "adb shell" returns error like "can't exec /system/bin/sh" immediately, right? then system partition is corrupted and could not be mounted.

anyway you can get dmesg with stock rom.

I'll experiment some more. Axis bug was fixed in build.prop

which properties did you set? it can be shared among Andypad Pro users.

EDIT: After recompiling myself,adding gapps, newest WLAN drivers etc, I get a bootloop after CM7 screen (but adb access this time)

logcat: http://pastebin.com/LetDH777

can you explain what you changed/added?

did you try recompiled but not changed image?

--

btw I also want to see at least "ls /dev" "find /sys" "getevent -p" too.

Link to comment
Share on other sites

I've managed to get it working. Not sure that I am using exactly the same kernel as Csharpe but for the axis fix I had to do:

accelerometer.flip_xy=1

accelerometer.invert_x=1

in build.prop.

I also edited boot.img to mount system in read/write mode when that happens it fails on a reboot. My dmesg is exactly the same as Csharpe's when that happens. The easy fix for now is to not mount system in rw mode :)

But now it's running, I must say, I am very impressed. Great work so far fun_!

Link to comment
Share on other sites

I've managed to get it working. Not sure that I am using exactly the same kernel as Csharpe but for the axis fix I had to do:

accelerometer.flip_xy=1

accelerometer.invert_x=1

in build.prop.

congrat! so bootloader 2.x is the key? I'll compare your 2.06 and old N50DT one. if it's same, latest 2.08 should work too :)

btw did you check Z axis? my N50DT has inverted Z axis.

I also edited boot.img to mount system in read/write mode when that happens it fails on a reboot.

I checked difference between boot.img and boot-rooted.img in your rar. but sorry, the line you changed is commented out (begin with #) so it doesn't have effect.

for now I set /system r/w for some reason, it's initial stage of dev work (will be r/o after some amount of work), and I got some error while remounting...

I can add files to /system and rebooting doesn't corrupt system on my N50DT. but probably system corruption may happen on some cases. probably "reboot" and "poweroff" service should be added like as stock rom.

My dmesg is exactly the same as Csharpe's when that happens.

well, I missed Csharpe's dmesg?

if you have no time to restore stock rom, please show me dmesg just after "wifi on" w/o wifi firmware on CM7. kernel should say some error about loading firmware.

But now it's running, I must say, I am very impressed. Great work so far fun_!

thank you for your report!

Link to comment
Share on other sites

Guest Csharpe

I did a complete rebuild with all the files in /etc/firmware included. The tablet keeps bootlooping.

Here's dmesg:

http://pastebin.com/T31Eh4eF

Logcat:

http://pastebin.com/qZgb8DPt

The script I've used to make system.img: (not sure about the bs, but I've used the kernel's pagesize just to make sure)

dd if=/dev/zero of=system_ext3.img bs=16k count=9600

mke2fs -j system_ext3.img

mkdir system_ext3_mounted

sudo mount -t ext3 -o loop system_ext3.img system_ext3_mounted
Copied yaffs2 content into there. For boot.img, I did:
./rkcrc -k ramdisk.img boot.img

EDIT: bootloops were caused by invalid dbus.conf permissions, kernel wasn't able to read them! when adb shell during bootloop & chmod, it works. How to I make this persistent?

Most is working now, including WLAN. Camera's last one to fix. (I see hdmi as optional)

I'll release my build soon.

Edited by Csharpe
Link to comment
Share on other sites

congrat! so bootloader 2.x is the key? I'll compare your 2.06 and old N50DT one. if it's same, latest 2.08 should work too :)

Yes, Confirmed that the bootloader is the key. I will try with 2.08 as soon as I can.

btw did you check Z axis? my N50DT has inverted Z axis.

Not specifically but it seems ok.

I checked difference between boot.img and boot-rooted.img in your rar. but sorry, the line you changed is commented out (begin with #) so it doesn't have effect.

for now I set /system r/w for some reason, it's initial stage of dev work (will be r/o after some amount of work), and I got some error while remounting...

I can add files to /system and rebooting doesn't corrupt system on my N50DT. but probably system corruption may happen on some cases. probably "reboot" and "poweroff" service should be added like as stock rom.

Hmmm, I think I might have flashed the wrong boot-img, I line I have edited in the file on my linux box is clearly not commented out.

And I can add some files, but after about 4mb of data it corrupts the system partition... or at least seems to lose access to it, but it seems I can actually dump and mount it in loopback, so I have no idea whats up there yet.

well, I missed Csharpe's dmesg?

if you have no time to restore stock rom, please show me dmesg just after "wifi on" w/o wifi firmware on CM7. kernel should say some error about loading firmware.

I meant logcat. I will try and re-flash stock rom soon, but in the meantime here is dmesg from boot up http://pastebin.com/g0sdm0Sy

and one from just trying to turn wifi on:


[  593.381313] rk29_cpufreq_do_target: pre change


<7>[  593.381666] rk29_cpufreq_do_target: post change


<7>[  593.381678] rk29_cpufreq_do_target: ok, got 1008000 kHz


<4>[  593.382700] =======================================================


<4>[  593.388973] ==== Launching Wi-Fi driver! (Powered by Rockchip) ====


<4>[  593.397219] =======================================================


<4>[  593.403592] wifi_set_power = 1


<6>[  593.406643] rk29sdk_wifi_power: 1


<6>[  593.547910] wifi turn on power


<4>[  593.550980] wifi_set_carddetect = 1


<6>[  593.580648] rk29sdk_wifi_set_carddetect:1


<6>[  593.590073] mmc1, card_present 1


<6>[  593.600586] mmc1: slot status change detected(0-1)


<4>[  593.609588] 


<4>[  593.609593] Dongle Host Driver, version 4.218.248.18


<7>[  593.661079] rk29_cpufreq_do_target: 388800 Hz r 0(L) selected 408000 Hz (1200000 uV)


<7>[  593.661098] rk29_cpufreq_do_target: pre change


<7>[  593.661436] rk29_cpufreq_do_target: post change


<7>[  593.671553] rk29_cpufreq_do_target: ok, got 408000 kHz


<4>[  593.801094] 


<4>[  593.801102] drivers/mmc/core/core.c...1112..  ===== mmc_rescan Begin....======xbw[mmc1]=====


<4>[  593.855526] 


<4>[  593.855534] mmc_rescan..1143..  ===== Begin to identify card as SDIO-card===xbw[mmc1]===


<7>[  593.888009] mmc1: queuing CIS tuple 0x80 length 50


<7>[  593.897961] mmc1: queuing CIS tuple 0x80 length 7


<7>[  593.932605] mmc1: queuing CIS tuple 0x80 length 3


<4>[  593.933034] rk29_sdmmc_change_clk_div..1468..  newDiv=0, newCLK=24000Khz====xbw[sdio]=====


<6>[  593.945372] mmc1: new SDIO card at address 0001


<4>[  593.959459] DHD: dongle ram size is set to 294912(orig 294912)


<4>[  593.967393] _dhdsdio_download_firmware: dongle image file download failed


<7>[  593.974297] rk29_cpufreq_do_target: 1008000 Hz r 1(H) selected 1008000 Hz (1300000 uV)


<4>[  593.974594] dhd_bus_start: dhdsdio_probe_download failed. firmware = /system/etc/firmware/fw_bcm4329.bin nvram = /system/etc/firmware/nvram_B23.txt


<7>[  593.987903] rk29_cpufreq_do_target: pre change


<7>[  593.988251] rk29_cpufreq_do_target: post change


<7>[  593.988262] rk29_cpufreq_do_target: ok, got 1008000 kHz


<4>[  593.988279] dhdsdio_probe: failed


<4>[  593.993489] mmc_rescan..1154..  ===== Initialize SDIO successfully. ===xbw[mmc1]===

Edited by tumby
Link to comment
Share on other sites

I did a complete rebuild with all the files in /etc/firmware included. The tablet keeps bootlooping.

Here's dmesg:

http://pastebin.com/T31Eh4eF

Logcat:

http://pastebin.com/qZgb8DPt

The script I've used to make system.img: (not sure about the bs, but I've used the kernel's pagesize just to make sure)

dd if=/dev/zero of=system_ext3.img bs=16k count=9600

mke2fs -j system_ext3.img

mkdir system_ext3_mounted

sudo mount -t ext3 -o loop system_ext3.img system_ext3_mounted
Copied yaffs2 content into there. For boot.img, I did:
./rkcrc -k ramdisk.img boot.img

EDIT: bootloops were caused by invalid dbus.conf permissions, kernel wasn't able to read them! when adb shell during bootloop & chmod, it works. How to I make this persistent?

Flashed both like I did previously, which worked with fun_'s ROM. I really hope I can fix the bootloop!

Can you not add the chmod to the init.rc? There are already a load in there.

Link to comment
Share on other sites

Yes, Confirmed that the bootloader is the key. I will try with 2.08 as soon as I can.

I compared your 2.06 and my old 2.06. both are same. so probably you can use 2.08 too.

but please don't think bootloader is compatible on all cases. on RK2818, some tablets are compatible, but some other tablets are not compatible. if incompatible bootloader is flashed, tablet will be bricked. it can't enter flash mode, so Windows flash tool can't reflash it on that case.

Hmmm, I think I might have flashed the wrong boot-img, I line I have edited in the file on my linux box is clearly not commented out.

And I can add some files, but after about 4mb of data it corrupts the system partition... or at least seems to lose access to it, but it seems I can actually dump and mount it in loopback, so I have no idea whats up there yet.

I see. I believe your issue can happen. I think reboot/poweroff service in stock init.rc is not normal. there is the reason why they were added.

<4>[  593.967393] _dhdsdio_download_firmware: dongle image file download failed

<4>[  593.974594] dhd_bus_start: dhdsdio_probe_download failed. firmware = /system/etc/firmware/fw_bcm4329.bin nvram = /system/etc/firmware/nvram_B23.txt

thanks. now I understand Andypad Pro has Broadcom SDIO wifi, and at least fw_bcm4329.bin and nvram_B23.txt is needed. I'll add them in next image.

(and thanks for entire dmesg. I'll check it later)

--

btw wlan.ko module is just a wrapper. actual wifi driver is in kernel.

proprietary files currently I'm using is taken from N50DT ROM, but all of them should work on other RK2918 tablets. I also tried files from T760 ROM on my N50DT. it works fine of course.

Link to comment
Share on other sites

Guest Sami Beck

I compared your 2.06 and my old 2.06. both are same. so probably you can use 2.08 too.

but please don't think bootloader is compatible on all cases. on RK2818, some tablets are compatible, but some other tablets are not compatible. if incompatible bootloader is flashed, tablet will be bricked. it can't enter flash mode, so Windows flash tool can't reflash it on that case.

I see. I believe your issue can happen. I think reboot/poweroff service in stock init.rc is not normal. there is the reason why they were added.

thanks. now I understand Andypad Pro has Broadcom SDIO wifi, and at least fw_bcm4329.bin and nvram_B23.txt is needed. I'll add them in next image.

(and thanks for entire dmesg. I'll check it later)

--

btw wlan.ko module is just a wrapper. actual wifi driver is in kernel.

proprietary files currently I'm using is taken from N50DT ROM, but all of them should work on other RK2918 tablets. I also tried files from T760 ROM on my N50DT. it works fine of course.

Will you be uploading it to the source of the generic RK2918 image?

Link to comment
Share on other sites

Will you be uploading it to the source of the generic RK2918 image?

really sorry, my English is not well. I could not understand "it" and "the source of the generic RK2918 image", what is it?

Link to comment
Share on other sites

Thank you for your great working, fun_.

I have red your thread in XDA. I have N50 like you. Few day ago, i make a CM7 img base on your system.img and booting.img. It is perfect, but still have some problem with 3G, TS and when connect with computer, it has only SD card, no internal memory ( in SDK 2.0, as connect to Computer, has 2 memory: SD and internal ). I have calib TS but then it wrong in left-bottom screen and it's still in " haptic feedback' condition as in lock screen. I have a question: how can i turn haptic feedback as i touch screen.

Hope you have final CM7 mod for N50.

TY

Link to comment
Share on other sites

Guest Csharpe

I compared your 2.06 and my old 2.06. both are same. so probably you can use 2.08 too.

but please don't think bootloader is compatible on all cases. on RK2818, some tablets are compatible, but some other tablets are not compatible. if incompatible bootloader is flashed, tablet will be bricked. it can't enter flash mode, so Windows flash tool can't reflash it on that case.

I see. I believe your issue can happen. I think reboot/poweroff service in stock init.rc is not normal. there is the reason why they were added.

thanks. now I understand Andypad Pro has Broadcom SDIO wifi, and at least fw_bcm4329.bin and nvram_B23.txt is needed. I'll add them in next image.

(and thanks for entire dmesg. I'll check it later)

--

btw wlan.ko module is just a wrapper. actual wifi driver is in kernel.

proprietary files currently I'm using is taken from N50DT ROM, but all of them should work on other RK2918 tablets. I also tried files from T760 ROM on my N50DT. it works fine of course.

I got WLAN working already, just make sure they're correctly referenced in the BoardConfig. Same chip as HTC Incredible etc.

Any idea on camera? I see in my dmesg that they're correctly initialized, but maybe I have to add the old camera.so to the build? I'm not so sure if that will work since CM7 requires other format, or the camera apk is just incompatible with dual cameras?

Logcat warns me about missing keylayout files too, maybe they should be included in vendor, although, most of it works.

unyaffs: do you unpack it right away to the mounted ext3 image? I'm not sure but I think I'm losing permissions somewhere. Step by step would be helpfull.

Great job so far!

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.