Building LeMaker Android 4.2 from Source

129 64428
For the GMAC, that other source (zrox) worked out of the box. (showed MAC)
I didn't need to change the code at all.
That download should be available in dlanors post.
Then, should be able to copy over the gmac code

Ok, will compare to find the strict minimum change necessary. Thanks.

Unfortunately I got a bit "trigger happy" with my clean out and deleted the repo for it

Edited by liab at Sat Dec 13, 2014 22:11

After some days of hard work I now have - for me - the best android image build I ever had. Benchmark for me is a perfect streaming in hd with the app vu+.

- My new build use this U-Boot 2011.09-rc1-00003-ge89ab14-dirty (Jan 03 2014 - 12:57:33) Allwinner Technology.
- The console supports commands repeat mode
- No problem with 1080 x
- No problem with the screen trimming
- No terrible Lemaker default wallpaper
- Build for sugar-lemaker and sugar-bpi are possible, last has a better performance, hd streaming with vu+ CPU lower than 18 %
- WLAN Stick 8192cu is working

The way was:
- git from 05.12.14, I think it's the same like the actual git
- git matthuismen from the 30.11.14
and mix them.

- Use in the actual git the lichee from the matthuismen
and delete in the current git the folder frameworks and insert the folder frameworks from the matthuismen git

- To make both, bpi and lemaker some adaptations in android/device and lichee/tools are necessary.
- make clean and make

It gives the same good result to take the matthuismen git as basis and delete the folder device and insert the folder device from the actual git.
The effect is a better report from the console with command repeat.


Actually I made a lot of tentative to include drivers from older git repository (I finally found out that one of my test VM still had a copy on it), but I losed so many time to struggle with dependencies that I gave out for now. The driver structure between both git repo is just slighly different enough so that making a proper fix is far beyond my poor experience in that area.

So I am now trying to integrate the bsp kernel generation from Lemaker with our android generation sources, to make android to use 3.4.103 kernel. The issue I got now is I dunno what is the u-boot format provided by the SDK and how to replace it by the u-boot generated by lemaker-bsp. The u-boot used by pack is stored at this place: /android/lichee/tools/pack/chips/sun7i/bin/u-boot-sun7i.bin

But I will try yours as a branch in the ctual git

Edited by ChrisP at Tue Dec 16, 2014 23:50

Ok, gone a bit further in lemaker 3.4.103 integration. The image have kernel, modules and u-boot integrated on the image, but still can't boot, I'm stuck at u-boot level, complaining he can't read filessystems.

And I still have to refine a clean .config to avoid to include allmost every modules possible, and to refine the build_kernel script. For now I just used wiki instructions. A last issue I found, is that in the same way as the 4.4 beta 1 image, the battery level is considered too low at first boot, it's necessary to do a reset using the button, then the boot continue.

The modification are shown on a specific branch here: ... /lemaker-bsp-kernel

When loading, I have the following messages on UART:

Any idea and feedback to fix this issue are warmly wellcome
  1. HELLO! BOOT0 is starting!
  2. boot0 version : 2.0.0
  3. try dram para.
  4. dram driver version: 1.15
  5. dram size =1024MB
  6. 0xffffffff
  7. super_standby_flag = 0
  8. boot card number =0
  9. sdcard 0 init ok
  10. The size of Boot1 is 0x00048000.
  11. Succeed in loading boot1 from sdmmc flash.
  12. Ready to disable icache.
  13. Succeed in loading Boot1.
  14. Jump to Boot1.
  15. [       0.165] boot1 version : 2.0.0
  16. [       0.165] script installed early ok
  17. [       0.166] pmu type = 3
  18. [       0.270] bat vol = 6 mv
  19. [       0.282] axi:ahb:apb=4:2:2
  20. [       0.282] set dcdc2=1400mv, clock=912M successed
  21. [       0.284] key
  22. [       0.297] no key found
  23. [       0.297] flash init start
  24. [       0.311] flash init finish
  25. [       0.313] fs init ok
  26. [       0.314] fattype FAT16
  27. [       0.314] fs mount ok
  28. [       0.317] storage_type=1
  29. [       0.327] 0
  30. [       0.327] set pc
  31. [       0.328] usbdc_vol = 4000, usbdc_cur = 0
  32. [       0.329] usbpc_vol = 4400, usbpc_cur = 0
  33. [       0.334] init to usb pc
  34. [       0.336] set pc
  35. [       0.418] battery enough
  36. [       0.418] power_start=0x00000000
  37. [       0.419] pre sys mode
  38. [       0.422] key value = 0
  39. [       0.424] recovery key high 6, low 4
  40. [       0.445] show pic finish
  41. [       0.445] load kernel start
  42. [       0.460] load kernel successed
  43. [       0.460] start address = 0x4a000000
  44. [       1.098] power exit detect
  45. [       1.098] usb exit detect
  46. [       1.098] jump to

  47. U-Boot 2014.04-10733-gbb5691c (Dec 14 2014 - 20:10:24) Allwinner Technology

  48. CPU:   Allwinner A20 (SUN7I)
  49. Board: BananaPi
  50. I2C:   ready
  51. DRAM:  1 GiB
  52. MMC:   SUNXI SD/MMC: 0
  53. *** Warning - bad CRC, using default environment

  54. In:    serial
  55. Out:   serial
  56. Err:   serial
  57. Net:   dwmac.1c50000
  58. Hit any key to stop autoboot:  0
  59. reading uEnv.txt
  60. ** Unable to read file uEnv.txt **
  61. Failed to mount ext2 filesystem...
  62. ** Unrecognized filesystem type **
  63. Failed to mount ext2 filesystem...
  64. ** Unrecognized filesystem type **
  65. reading boot.scr
  66. ** Unable to read file boot.scr **
  67. Failed to mount ext2 filesystem...
  68. ** Unrecognized filesystem type **
  69. Failed to mount ext2 filesystem...
  70. ** Unrecognized filesystem type **
  71. Failed to mount ext2 filesystem...
  72. ** Unrecognized filesystem type **
  73. reading script.bin
  74. ** Unable to read file script.bin **
  75. Failed to mount ext2 filesystem...
  76. ** Unrecognized filesystem type **
  77. sun7i#
Copy the Code
In addition, in the UART console, I can see the env used:
  1. sun7i# env print
  2. autoboot=run loadkernel && run setargs && true && bootm 0x48000000
  3. baudrate=115200
  4. boot_ram=saved_stdout=$stdout;setenv stdout nc;if iminfo 0x41000000; then true; setenv stdout $saved_stdout; source 0x41000000;else setenv stdout $saved_stdout;fi
  5. bootcmd=if run loadbootenv; then echo Loaded environment from ${bootenv};env import -t ${scriptaddr} ${filesize};fi;if test -n "${uenvcmd}"; then echo Running uenvcmd ...;run uenvcmd;fi;if run loadbootscr; then echo Jumping to ${bootscr};source ${scriptaddr};fi;run autoboot;
  6. bootdelay=2
  7. bootenv=uEnv.txt
  8. bootm_size=0x10000000
  9. bootscr=boot.scr
  10. console=ttyS0,115200
  11. device=mmc
  12. ethact=dwmac.1c50000
  13. ethaddr=02:51:0b:c2:0d:4d
  14. kernel=uImage
  15. loadbootenv=fatload $device $partition $scriptaddr ${bootenv} || ext2load $device $partition $scriptaddr boot/${bootenv} || ext2load $device $partition $scriptaddr ${bootenv}
  16. loadbootscr=fatload $device $partition $scriptaddr ${bootscr} || ext2load $device $partition $scriptaddr boot/${bootscr} ||ext2load $device $partition $scriptaddr ${bootscr}
  17. loadkernel=if bootpath=/boot/ && ext2load $device $partition 0x43000000 ${bootpath}${script} && ext2load $device $partition 0x48000000 ${bootpath}${kernel};then true; elif bootpath=/ && fatload $device $partition 0x43000000 ${script} && fatload $device $partition 0x48000000 ${kernel};then true; elif bootpath=/ && ext2load $device $partition 0x43000000 ${bootpath}${script} && ext2load $device $partition 0x48000000 ${bootpath}${kernel};then true; else false;fi
  18. loglevel=8
  19. panicarg=panic=10
  20. partition=0:1
  21. script=script.bin
  22. scriptaddr=0x44000000
  23. setargs=if test -z \\"$root\\"; then if test \\"$bootpath\\" = "/boot/"; then root="/dev/mmcblk0p1 rootwait"; else root="/dev/mmcblk0p2 rootwait"; fi; fi; setenv bootargs console=${console} root=${root} loglevel=${loglevel} ${panicarg} ${extraargs}
  24. stderr=serial
  25. stdin=serial
  26. stdout=serial

  27. Environment size: 1919/131068 bytes
Copy the Code
I suspect that ext4 should be supported instead of ext2, but not really sure.

At least initial battery status seems to be fixed now. But still can't boot

Edited by liab at Thu Jan 15, 2015 10:55

The work of my last days was to make, when using a hdmi2dvi cable, AUDIO_CODEC (audio jack) as default. So I changed .../device/softwinner/common/hardware/audio/audio_hw.c.

Now sound goes to the audio jack as default. The name in the settings "Audio output mode" is AUDIO_HDMI. The name of the ordinary HDMI sound is AUDIO_HDMI2, but now it's not default!

Well, the answer was just in front of me and I didn't see it: the env used for uboot is not the one I was expecting to boot android. I have to find where is this env define to try to adapt the one in pack config.

You have to log in before you can reply Login | Sign Up

Points Rules