Problems compiling Android for A20

Started by serralha, December 28, 2018, 11:49:49 AM

Previous topic - Next topic

serralha

Greetings to all

I'm trying to compile Android to use on A20, as we need to do some customizations we can't use the images provided by Olimex.

I'm following the tutorial provided here https://github.com/hehopmajieh/olinuxino_configs

and I've been able to proceed with the compilation until the following appeared.

During the make process it appears this error

cp: cannot stat 'out/target/product/olinuxino-a20/obj/*.ko': No such file or directory

This happens right after it prints "Copying baseline ramdisk".

Already checked and the directory stated exists 'out/target/product/olinuxino-a20/obj/' .

After digging a little, I've found that the command that's causing the error is

cp -f out/target/product/olinuxino-a20/obj/*.ko out/target/product/olinuxino-a20/recovery/root

I'm running this as root, so permissions aren't the problem.

In order to try to correct this, I've copied the modules that are on

/android4.2/device/softwinner/olinuxino-a20/modules/modules

to out/target/product/olinuxino-a20/obj/

(don't know if it's the right thing to do ...)

After doing this, and execute make again, it compiled without more problems.

Executed pack and obtained the final image on

/lichee/tools/pack/sun7i_android_olinuxino-a20.img

I'm able to open this image with DragonFace and change it and save it again.

Since the image generated is for NAND ( checked the fex file ) I tried to upload the image to the A20-OLinuXino-MICRO-n8GB via PhoenixSuit.

I've followed the steps provided and when the burning it's at 70% it appears an error "Burn firmware failed! Please ensure the firmware file is valid and devide work out correctly"

At this point I tried to upload and image from Olimex and worked, so I would say that the problem is at the image that I've generated.

I've tried to recreate the android image but with the fex file configured for sdcard, but when booting with the sdcard placed it starts to boot from NAND ( at this point it has the Olimex imaged burned ).

I would appreciate some help on this.

Did I've done right copying the .ko files from that folder?

How can I know what's the problem that it's causing the error burning it to NAND? Are there some log files?

Thanks

[I'm using Ubunto 12.04 LTS on VMware]

(If needed I can provide some files)

HeHoPMaJIeH

Hi,
did you build bsp under lichee dir ?

Also extract-bsp command will copy kernel and modules from lichee to android dir.


~Best

serralha

Good afternoon

First of all, thanks for your reply.

Yes I've executed successfully the build on lichee dir.

Since I was unsure if the *.ko presented on the folder were copied from me, or from the extract-bsp command, I've deleted the out dir and run make again.

But the output was the same.

Here you can see the output.


Copying baseline ramdisk...
cp -R out/target/product/olinuxino-a20/root out/target/product/olinuxino-a20/recovery
target SharedLib: libbcinfo (out/target/product/olinuxino-a20/obj/SHARED_LIBRARIES/libbcinfo_intermediates/LINKED/libbcinfo.so)
cp -f out/target/product/olinuxino-a20/obj/*.ko out/target/product/olinuxino-a20/recovery/root
target SharedLib: libcorkscrew (out/target/product/olinuxino-a20/obj/SHARED_LIBRARIES/libcorkscrew_intermediates/LINKED/libcorkscrew.so)
cp: cannot stat `out/target/product/olinuxino-a20/obj/*.ko': No such file or directory
make: *** [out/target/product/olinuxino-a20/recovery.img] Error 1



serralha

Good evening

After some tests I finally made the kernel boot but Android don't start yet.

So after I power the board the A20 logo appears on LCD, but after that the LCD just turns black.

Seeing the logs from UART I can see that the android process is starting but doesn't boot.

And it's appearing an message saying that "something wrong in chip id"


Here's a part of the log, the rest you can download here https://each-cs.com/repository/a20boot_custom1.log

bootcmd set setargs_nand
Hit any key to stop autoboot:  0
[NAND]dumy read,chip 0

Starting kernel ...

[    0.784710] something wrong in chip id
[    1.469447] something wrong in chip id
[    1.473976] something wrong in chip id
[    1.483898] something wrong in chip id
[    3.440384] init: width = 1024
[    3.443895] init: height = 600
[    3.447319] init: s.st_size = 1536000
[    3.451404] init: logo match failed!fbsize = 2457600
[    3.524858] init: do_umount: /data
[    4.047747] init: do_umount: /cache
[    4.389117] init: dont need format /dev/block/UDISK
[    4.407828] init: do_umount: /databk
[    5.371589] init: cannot find '/system/etc/install-recovery.sh', disabling 'flash_recovery'
[    5.771152] i2c i2c-1: Invalid 7-bit I2C address 0x00
[    5.835751] something wrong in chip id
[    5.997669] android_usb: already disabled
[    6.003720] init: using deprecated syntax for specifying property 'sys.usb.config', use ${name} instead
[    6.015808] init: using deprecated syntax for specifying property 'sys.usb.config', use ${name} instead
shell@android:/ $ [    6.974059] init: untracked pid 1129 exited
[   11.312759] init: untracked pid 1488 exited
[   16.066861] init: untracked pid 1579 exited




serralha

#4
Just to say that I've finally managed to compile the Android for A20 with touchscreen activated

First of all, I've only managed to compile for wing-nck70.

Had to change some files on android and on linux.
Most of it can be found here https://axonjakarta.wordpress.com

and following the steps of https://github.com/hehopmajieh/olinuxino_configs

And some adjustments on other files.

( since I tried many stuff, can't really tell if all the changes are needed )

on linux3.4/scripts/build_sun7i_android.sh   comment this lines
make ARCH=${ARCH} CROSS_COMPILE=${CROSS_COMPILE} KDIR=${LICHEE_KDIR} \
      -C ${LICHEE_KDIR}/arch/arm/mach-sun7i/pm/dram-freq all

Just by follwing Axon tutorial, the android compiled, but the filesystem didn't worked well, couldn't install apps, nor could put the touch screen working.

Just by following hehopmajieh couldn't boot android.

So I've established the base with hehopmajieh and compared with Axon, and the final result is that all is working.

Next step try to activated SPI.