Beginning A20 OLinuXino MICRO, Linux and Android for Dummies

Started by TeamKings, January 10, 2016, 01:00:39 AM

Previous topic - Next topic

TeamKings

I really hate to do this. I've looked and read for hours on this site and others, and keep going in circles. I need help to get started here.


I am new to the forum, and new to the A20 and new to Linux and new to Android. I have been studying and working with electronics for around 48 years. I have done hundreds of programs in Basic and C for various Windows, PIC, Atmel, Basic Stamp.

Following the instructions

"How To Build Android 4.2.2 for A20-OLinuXino-MICRO from scratch" located at
https://olimex.wordpress.com/2014/01/30/how-to-build-android-4-2-2-for-a20-olinuxino-micro-from-scratch/

I managed to get my i7 PC loaded with Ubuntu 14.04, then installed the Java jdk-6u45-linux-i586.bin (after Googling how to get the "Command Line" - called "Terminal" in Linux, by following the instructions at
http://source.android.com/source/initializing.html
To establish a build environment.
At the bottom of that page, it says "Next: Download the source" with a link to follow.

First question: Do I continue following the Android instructions here at

http://source.android.com/source/downloading.html

Or per Dave at Axom's webpage
https://axonjakarta.wordpress.com/2014/02/14/olimex-a20-android-building-4/
go to
http://dl.linux-sunxi.org/users/tsvetan/ANDROID-4.2.2-SDK2.0-KERNEL-3.4/

Or go back to the Olimex instructions
How To Build Android 4.2.2 for A20-OLinuXino-MICRO from scratch
Which then says to
"Then Build the kernel, kernel modules and u-boot
   cd lichee
   ./build.sh -psun7i_android"

Second question: What is a "lichee" in this context other than a Chinese berry? Seriously, I can see it is a "folder" but where does it come from?

Third question: I saw somewhere (Dave at Axom maybe?) a mention of "Android Studio" Is this a viable IDE to use for the A20 OLinuXino MICRO 4GB? If it can be used, can one have the same control over pins and functions that is available by this other convoluted process? (sorry I have been spoiled by other programming IDE's)
I feel like the "How to..." instructions are assuming one has some prior knowledge of Linux and Android. Unfortunately, I have neither.

Thanks in advance for your help. I hope to make some new friends here and hope to learn enough to help others later.

igorpec

The situation with building from sources is generally a "little disaster". That's a reason I started and maintain a project to cover that part for various (two) versions of Linux kernel for A20 ... and after others SoCs.

One source come from Allwinner but is maintained by community with a bunch of patches on the top, next is mainline (www.kernel.org) since A20 SoCs are already well supported.

If you already have Ubuntu 14.04, start here:
https://github.com/igorpecovnik/lib

You will be able to build your own image, kernel, ... with few clicks on enter. It should works out of the box and you also can add customization. Just check the docs to see how. Make sure you always use the same u-boot and kernel combination. They are not much cross compatible.

I can't help you around Android - never ever build one.
linux for ARM development boards
www.armbian.com

JohnS

Android is usually from a vendor like Allwinner and "support" varies from "here are files, bye" to "pay vast $$$ and then we might help".

google and a lot of effort often needed...

For Linux or Android, chip makers tend to provide grossly inadequate, misleading, incomplete documentation (often Chinese only) and no other help.  You need determination to cope.

John

TeamKings

Thank you both for a reply. I don't mind putting in some hard work, searching and reading posts. But I know this can't be too hard to set up the programs and tools IF it was documented better somewhere. Different posts point to different paths to set up the development tools, but all seem to leave out some minor step that makes me want to pull my hair out. I just want to get to the point where I can work on writing code for the A20. I have read the 800 page A20 user Manual, and I am quite comfortable with it. I just need to write some code to set registers and work with some GPIO and UARTS.

I have started the Linux set up on a dedicated i7 PC, but still need to download and configure the files
android4.2.tar.qz
lichee-v2.0.tar.qz
olinuxino-a20.tqz
pack.tar.qz

I would like a better understanding of what each of these files are and do?
Is the android file a special file for the A20 or just Android 2.2?
What is the lichee file?
the olinuxino file?
the pack file?

Is one of the files above the same as the complete Android image that Olimex supplies for the MICRO 4GB?

I have been seeing in the posts the FEX file - which appears to be where to set registers in the A20 and let Android (or Linux) know what the configuration is for control of the A20.

Where is the FEX file in the above downloads?

AS A SEPERATE ROUTE, I have tried to install Android Studio this morning on my Windows PC, after reading a post by Dave-At-Axon that it can be used.
I saw on some post that you must use Java JDK6 for the Linux install (should we use 32bit or 64 bit? Java Does it depend on the PC or does the A20 need 32 bit Java JDK?)

The Android Studio install appears to require JDK 7 or higher. Is that OK for the A20 development> 32 or 64 bit?

I know this is a lot of questions. Any answers you can give should help the solution to the puzzle become more clear for me.

dave-at-axon

Quote from: TeamKings on January 11, 2016, 06:53:43 PM
I have started the Linux set up on a dedicated i7 PC, but still need to download and configure the files
android4.2.tar.qz
lichee-v2.0.tar.qz
olinuxino-a20.tqz
pack.tar.qz

I would like a better understanding of what each of these files are and do?
Is the android file a special file for the A20 or just Android 2.2?
What is the lichee file?

That is the Android Linux core code.

Quote
the olinuxino file?

That is the configuration and setup files for the Android build for the Olimex board. When you type LUNCH in the build environment, this will show up here.

Quote
the pack file?

That is the file that assembles all of the Linux core, Android core and any other files to create the image that you flash to your board. After this runs, you now have an image you can use.

Quote
Is one of the files above the same as the complete Android image that Olimex supplies for the MICRO 4GB?

I have found that the image that Olimex supply is not the same as the source they offer. Having he source means you can rip out all of the Chinese apps etc and add in your own.

Quote
I have been seeing in the posts the FEX file - which appears to be where to set registers in the A20 and let Android (or Linux) know what the configuration is for control of the A20.

The FEX file is where you configure your hardware and is loaded as part of the Linux kernel. This is where you will enable the UARTS, I2C, Video etc so suit your hardware. As your board is custom you need to ensure that the IO here is configured to match with your design.

Quote
Where is the FEX file in the above downloads?

It is buried down in the TOOLS and then PACK folder of the Linux source. Drill down into this and look for olinuxinoA20 (can't recall the exact directory as I am not near the Linux PC just now)

Quote
AS A SEPERATE ROUTE, I have tried to install Android Studio this morning on my Windows PC, after reading a post by Dave-At-Axon that it can be used.
I saw on some post that you must use Java JDK6 for the Linux install (should we use 32bit or 64 bit? Java Does it depend on the PC or does the A20 need 32 bit Java JDK?)

Install whichever version is suitable for your development PC. You can target Android apps with 32 or 64 bit. Just use the one to match with your PC.

Quote
The Android Studio install appears to require JDK 7 or higher. Is that OK for the A20 development> 32 or 64 bit?

You can use them both on the same computer. Part of the Android setup is to indicate which JDK to use. For Android source build you need JDK6 but for Android dev with Studio, needs 7 or higher. I do my development on a Windows PC but the Android source building is done on a Linux machine. That's the beauty of Android Dev, you can use any platform, even the Mac.

Quote
I know this is a lot of questions. Any answers you can give should help the solution to the puzzle become more clear for me.

Sorry for the late reply but I have been away from the forum for some time as I have moved away from the A20 as it runs too hot for my application but I still support the systems that are out there.

TeamKings

Dave, thanks for giving your time here to answer some questions. I am getting a slightly better understanding of what some of these files are and how they interact. I will spend a few days studying the files and tools and see where it leads.