Building LeMaker Android 4.2 from Source

129 41136
liab  
Edited by liab at Mon Dec 29, 2014 22:50

Hi ChrisP,

xsltproc was not installed. But it although stops with same error.
The folder dalvik/vm/mterp/out is absent.

ChrisP  
liab replied at Tue Dec 30, 2014 04:43
Hi ChrisP,

xsltproc was not installed. But it although stops with same error.

You are right, something is wrong, I just downloaded on another VM and failed to build it.

I do not have much time right now but will dig the issue later.

Edited by 冥王大太子 at Mon Jan 5, 2015 09:32

Great work ! Looking for this Android source code for a long time.

liab  
For my second BPi I bought a second WLAN-Stick:
http://www.amazon.de/Wireless-Ad ... 9T41P6STC0X264K9BZD

Generally I use LAN, but there are some apps which will not work without WLAN.

My old WLAN-Stick from Pearl has a rtl8192cu Chip, no Problem with Android on the BPi.
But the new Stick has a rtl8192eu Chip.

So I insert in the lichee from ChrisP's git the Realtek 8192eu source from the CD and compiled it.
Not forget to adapt the Makefile.

To use both sticks on both BPi's and to recognize the used stick automatically I changed the mkshrc:

lsusb | grep 0bda:818b
if [ $? = 0 ] && [ -e system/vendor/modules/8192eu.ko ]; then
mv system/vendor/modules/8192cu.ko system/vendor/modules/8192cu.ko-org
mv system/vendor/modules/8192eu.ko system/vendor/modules/8192cu.ko
else
lsusb | grep 0bda:8178
if [ $? = 0 ] && [ -e system/vendor/modules/8192cu.ko-org ]; then
mv system/vendor/modules/8192cu.ko system/vendor/modules/8192eu.ko
mv system/vendor/modules/8192cu.ko-org system/vendor/modules/8192cu.ko
fi; fi

: place customisations above this line

It works fine!


liab  
I compiled the latest git, now it builds without errors. But I find my version (#54) is better, because it uses a newer u-boot and has no problem with the screen trimming. The current git don't save the trimming settings, after reboot the screen is too large again.

To use two different WLAN-Sticks, in my case the RTL8192CU and the RTL8192EU with the same image I made the following:

1. Compile the kernel with both drivers
2. Insert the new stick (for me it was the RTL8192EU) in /hardware/libhardware_legacy/wifi/Android.mk and in wifi.c
3. Insert the new stick in /device/softwinner/sugar-bpi/BoardConfig.mk
4. In BoardConfig.mk activate only one stick!! For me it was the RTL8192EU.
5. Compile Android. If it is not the first compile make clean is necessary!
6. Go to /out/target/product/sugar-bpi/system/lib/libhardware_legacy.so and copy it to a folder and rename it to libhardware_legacy.so-eu
7. Disable in the BoardConfig.mk the RTL8192EU and enable the RTL8192CU and compile Android again. Attention after changing the BoardConfig.mk make clean is necessary!
8. After compiling add the libhardware_legacy.so-eu to the folder /out/target/product/sugar-bpi/system/lib/
9. Insert at the end in /out/target/product/sugar-bpi/system/etc/mkshrc this:

#8192cu
lsusb | grep 0bda:8178
if [ $? = 0 ] && [ -e system/lib/libhardware_legacy.so-cu ]; then
mv system/lib/libhardware_legacy.so system/lib/libhardware_legacy.so-eu
mv system/lib/libhardware_legacy.so-cu system/lib/libhardware_legacy.so
else
#8192eu
lsusb | grep 0bda:818b
if [ $? = 0 ] && [ -e system/lib/libhardware_legacy.so-eu ]; then
mv system/lib/libhardware_legacy.so system/lib/libhardware_legacy.so-cu
mv system/lib/libhardware_legacy.so-eu system/lib/libhardware_legacy.so
fi; fi

: place customisations above this line

10. Pack the image

Now the image works with both sticks. It uses automatically for the WLAN_Stick the right libhardware_legacy.so. The only to do is, to change the stick and to restart the bpi.

May be you must adjust the both usb-ID's.

ChrisP  
The version you used is the mix between the matrix initial version and the lemaker sdk ? I will try again to put the initial mattrix git copy I have on a VM, I think I forgot to checkout to the last stable modification set.

Is there any chance that you could put your version on a git repo ?

(By the way I fixed the way by adding just some folder then push to git to have smaller transactions. Then I can upload several GB in total to the same repo, overwize it just timeout).

wendell  
hi , mattrix
      I follow your steps to make the Android compiler, but the emergence of a question, When you tried to run ./config.sh ,  got an error  , Make: * * * no rules can create a target "menuconfig". Stop. I  think make menuconfig must have one xxx.config , but I don't  konw xxx.config is whereis !

lenny  
Hi I tried your step-by-step guide
but my build fails at the packing stage:

  1. INFO: Packing for android
  2.   File "/home/leo/bananapi/ANDROID/lichee/tools/pack/pctools/linux/mod_update/script_parse", line 22
  3.     print "\033[0;31;1m[Error] %s\033[0m" %msg
  4.                                         ^
  5. SyntaxError: invalid syntax
  6.   File "/home/leo/bananapi/ANDROID/lichee/tools/pack/pctools/linux/mod_update/script_parse", line 22
  7.     print "\033[0;31;1m[Error] %s\033[0m" %msg
  8.                                         ^
  9. SyntaxError: invalid syntax
  10. ‘chips/sun7i/bin/boot0_nand_sun7i.bin’ -> ‘out/boot0_nand.fex’
  11. ‘chips/sun7i/bin/boot0_sdcard_sun7i.bin’ -> ‘out/boot0_sdcard.fex’
  12. ‘chips/sun7i/bin/fes1_sun7i.bin’ -> ‘out/fes1.fex’
  13. ‘chips/sun7i/bin/u-boot-sun7i.bin’ -> ‘out/u-boot.fex’
  14. script sys_config.fex [OK]
  15. script sys_partition.fex [OK]
  16. update_mbr sys_partition.bin 4 [OK]
  17. update_boot0 boot0_nand.fex sys_config.bin NAND [OK]
  18. update_boot0 boot0_sdcard.fex sys_config.bin SDMMC_CARD [OK]
  19. update_uboot u-boot.fex sys_config.bin  [Uncheck]
  20. update_fes1 fes1.fex sys_config.bin  [Uncheck]
  21. disk : c
  22. CopyRootToFS(/home/leo/bananapi/ANDROID/lichee/tools/pack/out/boot-resource)

  23. c:\bat
  24. c:\magic.bin
  25. find magic !!
  26. RealLen=0x4B0C00
  27. CPlugin Free lib
  28. CPlugin Free lib
  29. normal
  30. dragon image.cfg sys_partition.fex [Failed]

  31. refer to out/pack.log for detail information.

  32. ERROR: Packing Failed.
Copy the Code
and pack.log says:

  1. ----------

  2. fes1 file Path=/home/leo/bananapi/ANDROID/lichee/tools/pack/out/fes1.fex
  3. script file Path=/home/leo/bananapi/ANDROID/lichee/tools/pack/out/sys_config.bin

  4. script update fes1 ok
  5. ----------
  6. /home/leo/bananapi/ANDROID/lichee/tools/pack/pctools/linux/eDragonEx/
  7. /home/leo/bananapi/ANDROID/lichee/tools/pack/out
  8. Begin Parse sys_partion.fex
  9. Add partion bootloader.fex BOOTLOADER_FEX00
  10. Add partion very bootloader.fex BOOTLOADER_FEX00
  11. FilePath: bootloader.fex
  12. FileLength=4b0c00 FileSizeHigh=0
  13. Add partion env.fex ENV_FEX000000000
  14. Add partion very env.fex ENV_FEX000000000
  15. FilePath: env.fex
  16. FileLength=20000 FileSizeHigh=0
  17. Add partion boot.fex BOOT_FEX00000000
  18. Add partion very boot.fex BOOT_FEX00000000
  19. FilePath: boot.fex
  20. CreateFile failed 2^M
  21. Add partion system.fex SYSTEM_FEX000000
  22. Add partion very system.fex SYSTEM_FEX000000
  23. FilePath: system.fex
  24. CreateFile failed 2^M
  25. Add partion recovery.fex RECOVERY_FEX0000
  26. Add partion very recovery.fex RECOVERY_FEX0000
  27. FilePath: recovery.fex
  28. CreateFile failed 2^M
  29. Add partion diskfs.fex DISKFS_FEX000000
  30. The file boot.fex length = 0
  31. BuildImg 400
  32. Dragon execute image.cfg Failed ! ArgCnt = 3, 400
  33. ----------
Copy the Code
any ideas?

ChrisP  
wendell replied at Thu Jan 15, 2015 07:51
hi , mattrix
      I follow your steps to make the Android compiler, but the emergence of a questio ...

Sometimes, some actions on kernel can modify the .config in a way you do not want. You can reverse to the initial one by doing a git checkout or using the one on Git as a template, here: https://github.com/ChrisP-Androi ... e/linux-3.4/.config

ChrisP  
lenny replied at Thu Jan 15, 2015 13:52
Hi I tried your step-by-step guide
but my build fails at the packing stage:and pack.log says:any ide ...

did you run the install.sh to install all the prereq ? What linux are you using to compile ?

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

Points Rules