Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

Compile Android to nios2

Altera_Forum
Honored Contributor II
2,182 Views

hello, 

 

I must bring s.o. Android on the Cyclone FPGA 2. You can do this? If so, how? 

 

thank you
0 Kudos
13 Replies
Altera_Forum
Honored Contributor II
445 Views

I'm not an Android expert, but I'm guessing this is a huge task. 

First you will need to put a CPU soft core in the FPGA. Android is designed to run on ARM cores, so I think putting an ARM IP core would make the job easier than using Nios II, which would require a complete port of the kernel. But in any case you will still need to write the drivers for all the hardware that you put around the CPU. 

You must also take into account that the CPU in the FPGA will run a lot slower than a hardcore CPU, and any entry-level smartphone will have a much better performance under Android that a solution based on a Cyclone II.
0 Kudos
Altera_Forum
Honored Contributor II
445 Views

 

--- Quote Start ---  

Android is designed to run on ARM cores, 

--- Quote End ---  

 

 

AFAIK, there are Android ports for X86 (for ATOM based devices).  

 

So the basic Android sources should be not too much tied to the ARM.  

 

OTOH ARM is a lot more similar to NIOS than X86 is, so using an ARM port as a basis seems appropriate. 

 

-Michael
0 Kudos
Altera_Forum
Honored Contributor II
445 Views

 

--- Quote Start ---  

AFAIK, there are Android ports for X86 (for ATOM based devices).  

 

So the basic Android sources should be not too much tied to the ARM.  

 

OTOH ARM is a lot more similar to NIOS than X86 is, so using an ARM port as a basis seems appropriate. 

 

-Michael 

--- Quote End ---  

 

 

thanks, 

and how do I implement ARM on the Cyclone 2?
0 Kudos
Altera_Forum
Honored Contributor II
445 Views

 

--- Quote Start ---  

and how do I implement ARM on the Cyclone 2? 

--- Quote End ---  

 

You need to buy a license from ARM costing some $ 100,000.  

 

AFAIK only a small Cortex is available for implementation in an FPGA. I suppose same does not have an MMU. I suppose porting Android to a no-MMU system will be harder than porting it to NIOS with MMU. 

 

-Michael
0 Kudos
Altera_Forum
Honored Contributor II
445 Views

 

--- Quote Start ---  

You need to buy a license from ARM costing some $ 100,000.  

 

AFAIK only a small Cortex is available for implementation in an FPGA. I suppose same does not have an MMU. I suppose porting Android to a no-MMU system will be harder than porting it to NIOS with MMU. 

 

-Michael 

--- Quote End ---  

 

 

But also I need a license Altera?
0 Kudos
Altera_Forum
Honored Contributor II
445 Views

Unfortunately, the university did not give me the license yet

0 Kudos
Altera_Forum
Honored Contributor II
445 Views

The only Nias core with MMU is the Nios II/f, and you need a license from Altera for it. You can still run it in evaluation mode without a license though. 

 

Do you have some experience in FPGA, embeded CPUs, C, Java, Android, kernels and device drivers? I'm not sure that you realize the complexity of this task... Are you alone on this project?
0 Kudos
Altera_Forum
Honored Contributor II
445 Views

While I think that it would be a very viable benefit for the community to have a decent Android port for NIOS and do think that it is doable, I agree with Daixiwen that this task supposedly is much too big for a one-person team. 

 

-Michael
0 Kudos
Altera_Forum
Honored Contributor II
445 Views

Thanks to all,  

in fact we are 3 people and we were assigned the task of assessing whether it is possible to compile android for nios2... 

Should we not be too difficult to describe the solution without implementing
0 Kudos
Altera_Forum
Honored Contributor II
445 Views

you shoud first port linux and later port android. 

 

porting linux has been done in nioswiki.  

and later you would need modify many libraries in android to patch your linux. 

 

that is my opinion.
0 Kudos
Altera_Forum
Honored Contributor II
445 Views

I just read that there is an Android port for MIPS. As NIOS is similar to MIPS this might provide another pointer... 

 

-Michael
0 Kudos
Altera_Forum
Honored Contributor II
445 Views

Hi, 

 

 

--- Quote Start ---  

I just read that there is an Android port for MIPS. As NIOS is similar to MIPS this might provide another pointer... 

 

--- Quote End ---  

 

 

I think the most difficult part is to port the 'dalvik' virtual machine. And we need to port new IPC mechanism. 

 

Kazu
0 Kudos
Altera_Forum
Honored Contributor II
445 Views

Dear Kazu,  

 

How do we go about with current nios2linux distribution to be able to run Android, at least on NEEK just as a proof of concept? 

 

I am a bit confused with information in nioswiki and yours regarding Linux + MMU.
0 Kudos
Reply