Welcome, Guest

Author Topic: How to Build Android 4.2.2 for A20-OLinuXino-MICRO  (Read 34557 times)

ph.fouquet

  • Newbie
  • *
  • Posts: 33
  • Karma: +1/-0
Re: Open source or not????
« Reply #15 on: January 24, 2014, 02:44:39 PM »
I din't see that files are get out from http://bundie.neterra.net:8080/index.php?path=last
I try to upload to google drive.
It could be take some time because my internet line are not very fast.
I give you the link when the downloads are complited

Philippe

dave-at-axon

  • Hero Member
  • *****
  • Posts: 624
  • Karma: +18/-0
Re: Open source or not????
« Reply #16 on: January 24, 2014, 03:11:18 PM »
Thanks Philippe, it would be much appreciated.


ph.fouquet

  • Newbie
  • *
  • Posts: 33
  • Karma: +1/-0
Re: Open source or not????
« Reply #17 on: January 24, 2014, 06:22:52 PM »
For downloading the files https://drive.google.com/folderview?id=0BzB_M_u_IizEemJzSmpBdmpVbWs&usp=sharing

I add a defconfig (lichee/linux-3.4/arch/arm/configs/) for enabeled ehternet

Philippe

dave-at-axon

  • Hero Member
  • *****
  • Posts: 624
  • Karma: +18/-0
Re: Open source or not????
« Reply #18 on: January 26, 2014, 05:07:59 AM »
Thanks Philippe,

I've downloaded all the files now. If you are OK with it, would you mind if I uploaded the files to another location and then create a website based on what you have provided along with additional information that I will add?

This will aid new users to find the information and build it too, as there are a lot of questions on how to do this.


ph.fouquet

  • Newbie
  • *
  • Posts: 33
  • Karma: +1/-0
Re: Open source or not????
« Reply #19 on: January 26, 2014, 06:12:45 PM »
I have not problem with that. If I have some additional information I post it on the forum.

Philippe

dave-at-axon

  • Hero Member
  • *****
  • Posts: 624
  • Karma: +18/-0
Re: Open source or not????
« Reply #20 on: January 27, 2014, 12:33:53 PM »
I can build lichee and Android and then create the image with pack but it won't run from nand so I suspect the image was build to write to SD.

Working my way through it to figure out how to build for nand as it's a good learning exercise.

ph.fouquet

  • Newbie
  • *
  • Posts: 33
  • Karma: +1/-0
Re: Open source or not????
« Reply #21 on: January 27, 2014, 01:23:27 PM »
I work with nand device for loading the image I used PhoenixSuit that you can find in lichee/tools/tools_win/USB_update_and_produce

Philippe

ph.fouquet

  • Newbie
  • *
  • Posts: 33
  • Karma: +1/-0
Re: Open source or not????
« Reply #22 on: January 27, 2014, 01:28:11 PM »
Start PhoenixSuit
  • Go to Firmware part
  • Choose your image
  • Restart the board wuth push REC button
  • The upgrade will start on PhoenixSuit

Philippe

dave-at-axon

  • Hero Member
  • *****
  • Posts: 624
  • Karma: +18/-0
Re: Open source or not????
« Reply #23 on: January 27, 2014, 01:58:04 PM »
I've got 1.08 installed. It detects the board and installs to the nand but fails to boot fully into Android.

This is the output from the debug port

[Fet]:-------------------------------------------------
[Fet]:            Succeed in Updating boot0.
[Fet]:-------------------------------------------------
FES:INFO : run addr = 0x401a87cc , type = 1437204481
start watchdog
HELLO! BOOT0 is starting!
boot0 version : 2.0.0˜
read dram para.
dram driver version: 1.15
dram size =1024MB
0x08002000
super_standby_flag = 0
Succeed in opening nand flash.
block from 2 to 6
deal block 2
Succeed in reading Boot1 file head.
The size of Boot1 is 0x00068000.
The file stored in 0x00000000 of block 2 is perfect.
Check is correct.
Ready to disable icache.
Succeed in loading Boot1.
Jump to Boot1.
[       0.158] boot1 version : 2.0.0
[       0.158] script installed early ok
[       0.159] pmu type = 3
[       0.263] bat vol = 4040 mv
[       0.278] axi:ahb:apb=4:2:2
[       0.278] set dcdc2=1400mv, clock=912M successed
[       0.281] key
[       0.293] no key found
[       0.293] flash init start
[       0.293] NB1 : enter NFB_Init
[       0.296] NB1 : enter phy init
[       0.299] [NAND] nand driver(A20) version: 0x0x00000002, 0x0x00000012, data
: 0x426fff64 1111692733
[       0.308] set retry default value: [       0.311]  0x00000021[       0.314]
  0x00000021[       0.316]  0x00000072[       0.318]  0x000000be[       0.321]
[       0.322] get the good blk ratio from hwscan : 870
[       0.327] NB1 : nand phy init ok
[       0.377] NB1 : init ok
[       0.377] flash init finish
[       0.378] fs init ok
[       0.380] fattype FAT16
[       0.382] fs mount ok
[       0.385] nand good_block_ratio=870
[       0.388] storage_type=0
[       0.400] 0
[       0.400] set pc
[       0.400] usbdc_vol = 4000, usbdc_cur = 0
[       0.402] usbpc_vol = 4400, usbpc_cur = 0
[       0.406] init to usb pc
[       0.409] set pc
[       0.491] battery enough
[       0.492] power_start=0x00000000
[       0.492] pre sys mode
[       0.495] key value = 0
[       0.497] recovery key high 40, low 4
[       0.518] show pic finish
[       0.518] load kernel start
[       0.538] load kernel successed
[       0.538] start address = 0x4a000000
[       1.049] power exit detect
[       1.049] usb exit detect
[       1.049] jump to
[       1.051] set retry default value: [       1.055]  0x00000021[       1.057]
  0x00000021[       1.059]  0x00000072[       1.061]  0x000000be[       1

U-Boot 2011.09-rc1 (Jan 26 2014 - 22:05:45) Allwinner Technology

CPU:   SUNXI Family
Board: SUN7I-EVB
DRAM:  1 GiB
NAND:  NB1 : enter NFB_Init
[NAND] nand driver(A20) version: 0x2, 0x12, data: 12 1610225348
set retry default value:  21 21 72 be
[NAND] set nand_good_block_ratio 870
NB1 : nand phy init ok
NB1 : init ok
3480 MiB
In:    serial
Out:   serial
Err:   serial
--------fastboot partitions--------
-total partitions:11-
-name-        -start-       -size-
bootloader  : 8000          8000
env         : 10000         8000
boot        : 18000         8000
system      : 20000         140000
data        : 160000        100000
misc        : 260000        8000
recovery    : 268000        10000
cache       : 278000        140000
databk      : 3b8000        80000
private     : 438000        8000
UDISK       : 440000        28c000
-----------------------------------
bootcmd set setargs_nand
Hit any key to stop autoboot:  0
set retry default value:  21 21 72 be
[NAND]dumy read,chip 0

Starting kernel ...

[    2.556027] init: width = 800
[    2.559374] init: height = 480
[    2.562888] init: s.st_size = 1536000
[    2.595302] EXT4-fs (nande): VFS: Can't find ext4 filesystem
[    2.652029] init: buffer : /dev/block/nande
[    4.107876] init: do_umount: /data
[    4.111883] init: do_umount error = Invalid argument
[    4.292716] EXT4-fs (nandh): VFS: Can't find ext4 filesystem
[    4.341994] init: buffer : /dev/block/nandh
[    6.045679] init: do_umount: /cache
[    6.049760] init: do_umount error = Invalid argument
[    6.102837] init: start format /dev/block/UDISK
[    6.108156] init: wait for format /dev/block/UDISK
[    6.108377] init: fork to format /dev/block/UDISK
[    7.631323] init: format /dev/block/UDISK ok
[    7.638519] EXT4-fs (nandi): VFS: Can't find ext4 filesystem
[    7.692011] init: buffer : /dev/block/nandi
[    8.551501] init: do_umount: /databk
[    8.555661] init: do_umount error = Invalid argument
[    8.594805] init: cannot find '/system/etc/install-recovery.sh', disabling 'f
lash_recovery'
[    9.319950] i2c i2c-1: Invalid 7-bit I2C address 0x00
[    9.576863] android_usb: already disabled
[    9.581755] init: using deprecated syntax for specifying property 'sys.usb.co
nfig', use ${name} instead
[    9.598445] init: using deprecated syntax for specifying property 'sys.usb.co
nfig', use ${name} instead
shell@android:/ $
                                   
At this point, I get the Allwindder Android 4.2.2 graphic on the LCD which after a little time appears to crash. Nothing after this.                         

I suspect my image is the issue as I can flash the default image from Olimex for NAND and that works. I just built it without any changes from the source you provided a link to. There must be a different PACK for SD and NAND as Olimex have 2 different files for download. I can't find anything on how to create either of them.

« Last Edit: January 27, 2014, 02:04:17 PM by dave-at-axon »

ph.fouquet

  • Newbie
  • *
  • Posts: 33
  • Karma: +1/-0
Re: Open source or not????
« Reply #24 on: January 27, 2014, 02:43:23 PM »
I had seen some time the kernel faillure but I don't where could be come from.
I work on this probleme this week.

But in many case android start correctly (without modification for kernel and android source).
Have you something to connect to your board?

For the first time try to start it whitout any thing connected.

Philippe

dave-at-axon

  • Hero Member
  • *****
  • Posts: 624
  • Karma: +18/-0
Re: Open source or not????
« Reply #25 on: January 27, 2014, 03:12:51 PM »
No, nothing connected. Just the bare system out of the box. No WiFi, no GSM etc.

I've tried it again and this time the image boots into Android. It has crashed part through the setup process.

I'll keep playing with it! It's encouraging though to get this far in just a few hours.! :)

dave-at-axon

  • Hero Member
  • *****
  • Posts: 624
  • Karma: +18/-0
Re: Open source or not????
« Reply #26 on: January 27, 2014, 03:38:59 PM »
OK. I've gotten it to boot this time and I have the main screen and apps etc but it is missing a lot of stuff that came with the prebuilt image.

There is no touch capability. Only USB mouse. There is not even the calibrate function.

The lower USB socket does not work. If I plug in the mouse to it, nothing. Only the top one appears to work for now.

The GSM modem crashes the system when plugged in.

I re-installed the default image and it runs fine. Even the lower USB works.

I suspect this is not the Allwinner source that is used to create the same default image on the Olimex website???

ph.fouquet

  • Newbie
  • *
  • Posts: 33
  • Karma: +1/-0
Re: Open source or not????
« Reply #27 on: January 28, 2014, 09:19:24 AM »
There is no touch capability. Only USB mouse. There is not even the calibrate function.

Ok for that if you are in resitive touche  screen you must modiffy the fex file for activate the module in bios for that add (refer to http://linux-sunxi.org/Fex_Guide#.5Brtp_para.5D):

Code: [Select]
[rtp_para]
rtp_used = 1
rtp_screen_size = 7
rtp_regidity_level = 7
rtp_press_threshold_enable = 0
rtp_press_threshold = 0x1f40
rtp_sensitive_level = 0xf
rtp_exchange_x_y_flag = 0

after you must run the kernel module with command line

insmod /system/vendor/module/sunix-ts.ko

I didn't find any mort how to run at startup (finaly I must used capacitive touch) but I think if you configure the sunix-ts in kernel and not as modul it cuold be run automaticaty (drive->input->sw_device I think)

I suspect this is not the Allwinner source that is used to create the same default image on the Olimex website???

It's probably true.

dave-at-axon

  • Hero Member
  • *****
  • Posts: 624
  • Karma: +18/-0
Re: Open source or not????
« Reply #28 on: January 29, 2014, 07:20:10 AM »
Hi Philippe,

Are you running this code on an A20?

I can't get it to run reliably each time. The stock image I can download from Olimex is stable and boots every time, even if there is nothing on the LCD until it shows the Android main screen.

With the download you provided, I get lots of SDRAM errors. I am wondering if the timing for this is wrong but I have nothing to compare it with?

I've emailed Allwinner to see if I can get the source that was used for the image on Olimex but they have not responded as yet. Maybe because of the Chinese new year delays, who knows.

I am trying to develop a system that I hope to move to being commercial and lack of source code is making it difficult. If only I knew Linux development I would switch to that but I prefer Android as it gives me the ability to do updates over the air, Google Cloud Messaging etc.

The reason for the source is that I need 2 additional serial ports and the stock image only has UART 6 and 7 enabled. I need to add 3 and 4 to the kernel. These are present on the GPIO connector so physically available.

I also need to add my Real Time Clock (DS1338) to the kernel so that I can keep time without a network connection.

olimex

  • Administrator
  • Hero Member
  • *****
  • Posts: 791
  • Karma: +20/-3
Re: Open source or not????
« Reply #29 on: January 29, 2014, 08:12:40 AM »
I've emailed Allwinner to see if I can get the source that was used for the image on Olimex but they have not responded as yet. Maybe because of the Chinese new year delays, who knows.

The reason for the source is that I need 2 additional serial ports and the stock image only has UART 6 and 7 enabled. I need to add 3 and 4 to the kernel. These are present on the GPIO connector so physically available.

I must have written several times here on the forum that the SDK used to generate our image is the one linked on the Wiki, but I'm still puzzled when I read something like this above? What exactly do you expect to receive from Allwinner? special SDK for each of their customers? The SDK is one, then it's up to the customers to enable or disable this or that module and drivers, all of them are inside the SDK.

to enable UARTs you do not need sources at all, the drivers for UARTs are already inside the kernel image, all you have to do is to learn how to configure your FEX and to enable the UARTs you want to use with their corresponding multiplexing function and to make sure there are no collisions with other peripherals

same is for the DDR settings they are all defined in the FEX (SCRIPT.BIN) no need to re-compile anything just set them in the FEX