Android 4.2 and Linux 3.4 source building

Started by dave-at-axon, January 30, 2014, 03:17:03 PM

Previous topic - Next topic



Try to change screen output type to hdmi and add this lines to sys_config.fex in section [disp_init]:
fb0_width = 1280
fb0_height = 720
fb1_width = 1280
fb1_height = 720
For me it worked. But ignored is option: screen output mode. The displayed resolution is always 720p even if you change fb0,1 width and height....


I've posted my findings and fixes to the build even though it does not work.


Hi Dave
you are right, Dimitar forgot to include the pack files, now I add them to the package:

please pack the image you build with these files and let us know the result!



Thanks Tsvetan,

No luck. I still get the error when Android starts. I suspect that the Android image has a configuration issue somewhere. I get the ALLWINNER A20 log and then the Allwinner logo when the system boots but then I get the untracked PID xxx exited and Logcat shows the surfaceflinger has crashed.

Doing a search on Google throws up no real hits on this issue. :(

I've tried a complete clean and rebuild but it still does not work.

I'll be interested to see if anyone else can build and run it (kbro on the forum for instance) now that we have all the files.


I may have tracked this down but still looking for the solution.

I added some debug to the hardware.c file to show which modules where being loaded and looked up. This is what happened with the display module prior to the hw_get display module Failed!! error.

W/HAL     ( 1160): ****Loading module : display
W/HAL     ( 1160): ****Loading module : path = /vendor/lib/hw/
W/HAL     ( 1160): ****Loading module : path = /system/lib/hw/
W/HAL     ( 1160): ****Loading module : path = /vendor/lib/hw/
W/HAL     ( 1160): ****Loading module : path = /system/lib/hw/
W/HAL     ( 1160): ****Loading module : path = /vendor/lib/hw/
W/HAL     ( 1160): ****Loading module : path = /system/lib/hw/
W/HAL     ( 1160): ****Loading module : path = /system/lib/hw/
W/SurfaceFlinger( 1160): hw_get display module Failed! (display)

I then checked in the system and vendor directories and there is no display.x.x files found.

More debugging to be done.


Confirming what I found so far, is in the working system in /system/lib/hw/ as expected.

Now working through the build to find out why this is missing.


I've cracked.!  ;D

There is a configuration issue with one of the files and it prevents the display.cpp (hence being missing)

It's still not perfect as it load into Chinese etc but that is just a configuration issue. The main thing is we can build and run it now. I'll update the blog shortly.

Locate this file


and edit the 2 lines below to add the # to them (comment out the lines)

#ifneq ($(filter wing%,$(TARGET_DEVICE)),)
include $(call all-makefiles-under,$(LOCAL_PATH))

Save and make -j4 as before and now it will run on the board.

Now to sort out the Chinese stuff :)


Hello Dave,

Your solution works for me.
Did you try to change resolution in hdmi mode? When I change screen output mode I'll always get 1280x720p60...


Hi there,

I have not yet tested the HDMI output as I am using the 7" LCD. I have a project to use both so I will see what I can do today to test it. I'll see if I can get it to run at FULLHD.

Where did you make the changes?

By the way, although Olimex claim that this source is the one used to build the images on their website, this is certainly not the case as far as configuration goes. For starters, this is configured for Chinese language and the touch screen does not work on my build. TSCalibration does not appear in the apps list and nothing happens when I touch the screen.

I am working on this today as we are a lot closer now that it boots. Just need to sort out configuration etc.

I now have 3 additional serial ports added. Still to test them but they do appear in the list now. :)

Everything will be documented with any needed files on my blog.



A bit OT but I saw this in above in the thread.  What should the memory speed be?  Will reducing it to 384MHz inhibit cpu performance any?

Thanks guys!


Hi Kyle,

Some settings have it at over 400 but I found it rather unstable on my A20 so the 384 that is in most configurations seems to be stable for me. I have not yet tried it faster as right now I am getting good speed when running the OS from NAND.




If you use pack script from olimex, you need to change dram clock to 384. If you've got more then it's unstable, i've check this.

Dave, I try this setting for hdmi:
a) screen type 1 (lcd), output mode 4 then the resolution is 1280x720 and output mode 10 then the resolution is exactly the same 1280x720.
b) screen type 3 (hdmi), no matter of output mode i've got pink or black screen and error from dmesg: "DDC read timeout" which came from "ParseEDID" hdmi function.
BTW, If you want to change language, edit file from wing-common folder and change this setting:
You need to do clean and make all android source once again.


Thanks for the language stuff. I wrote this up this morning on my blog along with a few other things :)

I'll not get around to the HDMI tests until Monday as I am currently trying to get touch screen working :(


Quote from: dave-at-axon on February 14, 2014, 09:33:55 AM
Thanks for the language stuff. I wrote this up this morning on my blog along with a few other things :)

I'll not get around to the HDMI tests until Monday as I am currently trying to get touch screen working :(

Hi, I tried your olimex-a20 build and  the touch screen is not a problem. I have insert the module sunxi-ts.ko and I am build TSCalibration2 apps and after restart it run and I was able to calibrate and use the touch display.


Thanks. I actually managed to get it working before.

I also now have the LED on the board working for notifications. I'll be uploading the revised source later this week.

I am working on the updater. I have, with help on one of the Google groups, found out how to make an OTA image. I need to reverse engineer the update.apk file to see how to boot into recovery mode but I now have a ZIP that can go on the SD card and be installed from the bootloader in recovery mode. I still need to write the code to check on a server for the update and then download if it detects the change.

I'll document this up later but in the meantime, you can do this.

get_uboot from a terminal window in the Android4.2 directory will copy the bootloader to the output.

make otapackage will build and create a zip file which can be found on out/target/product/olinuxino-a20

I've not tried to use it yet as I need to write the code to do the download. :)