E O M A   B O O T



LOG FOR BOOT UP EOMA68 & INSTALL GAMBAS 3



This web page is a log and is held at http://www.gplsquared.com/eoma_boot/eoma_boot.html 



Figure 1 - The EOMA68 CPUs that arrived  2013-07-29 (Click image to enlarge)


Waiting for the PCMCIA expansion board to allow the EOMA to boot up.

Highest priority:

1. Boot EOMA with Linux

2. Get Gambas to compile on EOMA



The Micro Engineering Board Has arrived 2013-08-08

The Micro Engineering Board (MEB) has arrived all the way from USA - thanks Chris! Hope you get better soon!




Case for Micro Engineering Board and EOMA 2013-08-11


Figure 2 - MEB and EOMA-68 inside their own protective box (Click image to enlarge)

Two cases shown above cut from 3mm acrylic. The cases illustrate how easy it would be to parallel up EOMA for future server room projects.

The case design has no screws or glue to hold them together!

They are held together by tight friction joints. It exploits the inability of the laser to cut straight. The laser beam diverges a little when cutting
and that means the edges taper a little. This is enough to allow the edges to grip tightly when the sides of the boxes are closed together.
(Sometimes the edges can work loose in which case use selotape, some clear epoxy glue or pipe cement to hold the parts together.
Avoid using superglue - its vapour will turn the acrylic foggy.)

The board is retained by 4 corner pillars that have slots to allow the PCB to rest inside by becoming trapped. Board will rattle if too loose,
in which case add a little selotape to edge before inserting into the pillar for a tight fit.

Assemble the pillars first with the PCB trapped inside, and then assemble the sides, and then put the lid on.
The pillars fall into a hole in the base plate. If the pillars are too thick, then they have to be lightly filed.
If they are too thin, then a little selotape needs to be wrapped around the part and jammed into the hole.

Avoid using too much force to jam the friction joints shut. That will likely crack the case.
Instead work the case shut slowly from all sides in small increments.
A small knife or a file can be used to clean edges if the gaps are stubbornly interfering.
Too much filing will work the edges loose - use selotape, transparent epoxy glue or pipe cement to repair it.



Figure 3 - MEB and EOMA-68 inside their own protective box with access holes for power, SATA, ethernet and USB (Click image to enlarge)

The cases have been arranged to show the access holes to the connectors on the side and the top.
Of the 4 pillars that retain the PCB, the pillars nearest to the DC socket and the USB socket have arcs cut into them
to allow more space for connectors.




Figure 4 - Drawing for parts used to make box for EOMA-68 with MEB


The above diagram is the case dxf file meb1e.dxf  (released under GPL) ready for a laser cutter.

If you have access to a hack space, you can get it laser cut with 3mm acrylic.
If you make one, do send a picture as example to put up here of what others have built. (Email research@enemygadgets.com.)

2013-10-16  Example of unit that has been independently made http://revident.net/projects/emoa-68/meb-v1-w-cases-in-colour.jpg

If you would like to buy a case, email a request with delivery address to calculate postage.
The price is US $5 + postage if cut from 4.3mm plywood with just the top cover and pillars made from 3mm transparent acrylic.
The price is US $8 + postage if cut entirely from 3mm acrylic as in above pictures.
Send email to research@enemygadgets.com and you will be sent a paypal invoice for the total amount.
Goods dispatched within 1-2 working days of receiving payment.



EOMA68 RGB/TTL to VGA converter For Micro Engineering Board (MEB) 2013-08-18



Figure 5 - KiCAD drawing 3D view of VGA board to connect to MEB (Click to enlarge)

The files for this are in KiCAD and released under GPL 3. http://www.gplsquared.com/eoma_boot/vga_2013_08_18.tar.gz 
If you make one, do send a picture as example to put up here of what others have built. (Email research@enemygadgets.com.)
The PCB will has gone for manufacturing last week of August 2013.


26 August 2013

The SoM2 board has arrived.  There are at least 4 issues known at present for this board.
Also arrive is EOMA68 and Cubieboard 2.

Between all of them, there is enough infrastructure to get the boards working.
A running log will be kept of the debugging so that future incidents can be reduced.
A mega scale debug board consisting of all three CPU cards have been created as illustrated below:



Figure 6  - Mega scale debug board consisting of  three CPU cards

The frame allows board to rest without tangling on wires and ending up with accident as more items are added.
The frame is big enough to add prototying boards around the periphery by drilling holes into the plastic and attaching them with nylon nuts and bolts preferably.

The PCB frame was made with a DXF file and cut with a laser using 3mm acrylic.



Figure 6  - CAD drawing of mega scale debug board frame

The file for above frame is released under GPL - http://gplsquared.com/SoM2/expeyes_frame.tar.gz 


31 August 2013

Following the advise being built up on http://rhombus-tech.net/allwinner/a20/boot/  to boot EOMA68.

To prepare hardware, on the MEB (the Micro Engineering Board that takes the EOMA-68 PCMCIA)
short circuited D1, cut D2 (not mentioned, but I recommend), cut R2 and soldered a wire
from pin 1 to pin 11 under the ethernet socket.
These pins under the ethernet socket are the 1st and last pins of the 11 pin ethernet socket.

The software instructions did not go to plan. To reduce problems:

1. Avoid connecting the microUSB to any PC - it will power up the EOMA68 through that connector
and the MEB and anything attached. It could leave the CPU booting and crashed in some unpredictable state.


2. If you can add LEDs to the MEB and to the EOMA-68

  

Figure 7 - Add LED and resistor to MEB board to show when the board is powered up




Figure 8 - Add LED and resistor to EOMA-68 board to show when it is powered up

Take care when adding the LED and resistor to EOMA board. There is not much space to work with. Avoid splashing solder on to 0402 components.
The LEDs are not essential - but helps reduce accidents if doing a lot of debug work.


3. Connect RS232 to USB converter between pins 41 (TX), pin 42 (RX) and pin 43 (GND).



Figure 9 - 3 wires connected to the RS232 to USB dongle (black wire not connected)

Use good quality RS232 to USB converter than can work down to 3.3V.
Many a converter has 5V power line as well. Do not connect that wire to the MEB unless you are following instructions for a limited number of devices out there that requires this line to be connected.
Most devices get their power from the USB which is why the 5V must not be connected. It could end up connecting the PC power supply to the MEB and booting up the EOMA-68.
That is not desirable.

Connect the RS232-USB device to PC. (I'm using a Ubuntu PC.)
Enter dmesg on the console and check which port it has been registered as. Usually something like /dev/ttyUSB0 will show up.
Install minicom RS232 program by entering command:     sudo apt-get install minicom
Run minicom:   minicom -s 
Scroll down to Serial port setup and hit enter
Select option A to set the serial device to /dev/ttyUSB0  and then hit return.
Select option E and change to 115200 N81  to set speed, parity, number of bits and number of stop bits.
Select option F and set to No  to indicate no hardware flow control is needed.
Select option G and set to No to indicate no software flow control is not required.
Hit return again to leave the menu.
Scroll down to Exit and hit enter - this will exit the menu and start up the minicom software.

4. Connect the micro HDMI to a monitor.

5. Connect to USB a wireless mouse and keyboard dongle.
If you have a good quality 4 port USB hub, or better still, a powered hub then wire those in and then connect the USB keyboard and mouse.

5. Connect  power to DC power socket on the MEB and power up the EOMA-68. And then turn on the power to the USB hub if using a powered USB hub.

After a while, the screen should show the Android logo and then the Android unlock screen is presented.
This is just a test version of Android that has been loaded to test the EOMA before shipment.
The RS232 terminal should also show a lot of activity relating to boot.

To log into Android, unlock the home screen by dragging the central lock icon to the periphery and dropping it there.
Then the Chinese defaut Android page is shown.

Here is silent video that shows how to change from default Chinese language
to English language. http://www.youtube.com/watch?v=M_LR5mFGDsw

Also go to setting and then display and then set font size to small
and set how long before screen blanks out due to inactivity to 30 minutes (max available).
If screen does go blank, there doesn't seem to be any
way of reviving it back into life other than hard boot.
The people who supplied the Android need to fix that.

The internal SDCard and MEB Ethernet does not work from Android. Again the people who supplied the Android need to fix that.


Its possible that those items will not get repaired as there is no plan in place currently for Android support.
The reason is that Android uses closed binary blobs and that causes endless headaches for maintenance if you haven't got access to the source code to repair any issues.

Attached a USB ethernet dongle and USB storage. USB storage was readable and plays 720p video without any jitter thanks to power
of a dual core A20 in the EOMA. The USB ethernet also worked - need to go into Android's settings, click on device, and then enable the ethernet.

With ethernet working, use Chrome to watch youtube.

The 5V supply was 20A rated, so there were no power issues with all these devices attached.


uboot and sunxi-tools now cross compiles on Ubuntu 12.04.3

Source material here
http://rhombus-tech.net/allwinner/a20/boot/ 

  # ARM with floating point support cross compiler install
  sudo apt-get install gcc-4.4-arm-linux-gnueabihf
  cd /usr/bin
  sudo ln -s arm-linux-gnueabihf-gcc-4.4 arm-linux-gnueabihf-gcc
  cd ~

  # download and cross compile uboot
  git clone https://github.com/linux-sunxi/u-boot-sunxi.git
  cd u-boot-sunxi
  make CROSS_COMPILE=arm-linux-gnueabihf- EOMA68_A20_FEL
  cd ..
 
  # download and cross compile sunxi-tools
  sudo apt-get install libusb-1.0.0-dev
  git clone https://github.com/linux-sunxi/sunxi-tools.git
  cd sunxi-tools
  make
  cd ..


Get u-boot working through serial port Ubuntu 12.04.3

Source material here http://rhombus-tech.net/allwinner/a20/boot/ 

  #To get serial port software such as minicom going on Ubuntu 12.04: 
  # unfortunately something has been done to Ubuntu 12.04 leaving serial port
  # functionality broken - do these to repair it (temporarily)

  sudo adduser your_user_name dialout
  sudo chmod a+rw /dev/ttyUSB0

  # open up a new command line window and run serial port from command line and leave it running all the time
  minicom -s
  # scroll down to serial port set up, and set device to /dev/ttyUSB0, 115200 8N1,
  # software or hardware flow control; press enter again to leave that menu.
  # scroll down and select Exit from the menu. This exits the menu and takes you
  # to RS232 interactive mode. (minicom exit command is type CRTL-A, Z, X)


  # keeping the 2 pressed on the keyboard, turn on the EOMA, and something like this will show:
  # (keep pressing the 2 key until "Jump to fel" message is seen on the minicom screen)

 
HELLO! BOOT0 is starting!                                                   
boot0 version : 2.0.0                                                  
read dram para.                                                             
dram size =1024MB                                                           
0xffffffff                                                                  
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.151] boot1 version : 2.0.0                                           
[       0.160] script installed early ok                                       
[       0.161] pmu type = 3                                                    
[       0.162] bat vol = 0 mv                                                  
[       0.180] axi:ahb:apb=4:2:2                                               
[       0.180] set dcdc2=1400mv, clock=912M successed                          
[       0.182] key                                                             
[       0.195] no key found                                                    
[       0.195] flash init start                                                
[       0.279] flash init finish                                               
[       0.305] fs init ok                                                      
[       0.307] fattype FAT16                                                   
[       0.307] fs mount ok                                                     
[       0.312] nand good_block_ratio=912                                       
[       0.312] storage_type=0                                                  
[       0.357] 50                                                              
[       0.357] Jump to fel    
                                                 

  # going back to old command line window, plug in EOMA micro USB cable and enter

  lsusb
 
  # The listing will look something like this:

Bus 001 Device 002: ID 064e:a129 Suyin Corp.
Bus 002 Device 003: ID 1f3a:efe8 
Bus 003 Device 003: ID 062a:0001 Creative Labs Notebook Optical Mouse
Bus 005 Device 006: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x Composite Device
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


  # Note the device listed as Bus 002 - it has no entries on the right side.
  # That is the EOMA. To check it is working, do this:

  cd sunxi-tools
  sudo ./usb-boot ../u-boot-sunxi/spl/u-boot-spl.bin ../u-boot-sunxi/u-boot.bin

  # ordinarily sudo is not needed in above line, it seems USB on Ubuntu 12.04 is broken.
  # note ./usb-boot takes two parameters, both of which were previously compiled
  # and sitting in u-boot-sunxi directory.
  # The messages I get when ./usb-boot runs are these:



fel write 0x2000 ../u-boot-sunxi/spl/u-boot-spl.bin
fel exe 0x2000
fel write 0x4a000000 ../u-boot-sunxi/u-boot.bin
fel write 0x41000000 ./bin/ramboot.scr
fel exe 0x4a000000



  # and on the minicom window, these messages appear.
  # enter the setenv commands and ping commands manually according to your own network settings


U-Boot SPL 2013.10-rc1-08247-gd787d30 (Sep 04 2013 - 10:03:46)                 
Board: EOMA68_A20_FEL                                                          
DRAM: 1024 MiB                                                                 
CPU: 960000000Hz, AXI/AHB/APB: 3/2/2                                           


U-Boot 2013.10-rc1-08247-gd787d30 (Sep 04 2013 - 10:03:46) Allwinner Technology
                                                                               
CPU:   Allwinner A20 (SUN7I)                                                   
Board: EOMA68_A20_FEL                                                          
I2C:   ready                                                                   
DRAM:  1 GiB                                                                   
MMC:   SUNXI SD/MMC: 0                                                         
Card did not respond to voltage select!                                        
MMC init failed                                                                
Using default environment                                                      
                                                                               
In:    serial                                                                  
Out:   serial                                                                  
Err:   serial                                                                  
Net:   emac                                                                    
Hit any key to stop autoboot:  0     (pressed a key to stop the count down here)                                          
sun7i# setenv ethaddr 00:00:00:00:00:01                                        
sun7i# setenv ipaddr 172.16.1.25                                               
sun7i# setenv netmask 255.255.255.128                                          
sun7i# ping 172.16.1.1                                                         
ENET Speed is 100 Mbps - FULL duplex connection                                
Using emac device                                                              
host 172.16.1.1 is alive 
sun7i#

# remember to unplug the micro USB lead whenever it is not needed as it will power up the EOMA through that USB cable
# and power cycling the MEB will not power cycle the EOMA if the micro USB lead is left connected

TO CHECK uSD CARD SOCKET IS OPERATIONAL

# put in a fat formatted uSD card then enter these commands

sun7i# mmc rescan
sun7i# fatls mmc 0

            lost.dir/                                                          
            video/                                                             
                                                           
0 file(s), 2 dir(s)                                                            
sun7i#




Reverse SATA connector 2013-09-09



Figure 10 - Reverse solder the SATA connector. (Note the EOMA pin numbers in photo is misleading as they were taken from an old diagram.)

Flip the SATA 180 degrees and refit the SATA connector to make it work. In above photo, a second sata connector was soldered on top of the first one.
The EOMA pinout is incorrect in the photo. The correct pin outs are at http://elinux.org/Embedded_Open_Modular_Architecture/EOMA-68 (RXP should read 34 instead of 67, TXP should read 32 instead of 63).



LCD Lash Up 2013-09-12

EOMA LCD pins are working - announcement here http://rhombus-tech.net/community_ideas/kde_tablet/news/
That set up uses an LVDS chip to convert LCD signals to drive LVDS LCD display.

Want to try and reproduce to drive cheap LCDs using direct drive of LCD pin from EOMA to LCD module.



Figure 11 - Underside of LCD lash up


Figure 12 - Top side of LCD lash up

To create an alternative test bed,  a 480 272 pixel LCD has been wired up using SoM1 motherboard which has 0.5mm pitch 40 pin FPC connector for LCDs that
has been brought out to pads for manual wiring. The display used is KD43G18-40NB-A1 (about $15 on Aliexpress storespdf datasheet.

The LCD is not being set up properly - log of errors  lcd_boot_log.txt,  the script.fex file.

The LCD is now working - see below on how it was done.



Boot Image 2013-09-14

uSD boot image done up  http://www.gplsquared.com/eoma_boot/linaro1_2gb_uSD_image.bin.xz  (see below for more up to date image file) password is linaro
The file uses xz compression and unzips into a 2GB image file that can be written to a 2GB or bigger micro SDCard, and then used to boot the EOMA.
To write the 2GB file to uSD card, use the dd command.
To get the EOMA to boot from micro SDCard, follow the instructions at http://rhombus-tech.net/allwinner/a20/boot/

How the uSD card was built:
 - one of the sunxi-linux images for cubieboard SD card was made and then the root directory was deleted
   this leaves a bootable ext4 partition.
   The image is from here http://dl.linux-sunxi.org/users/hramrach/cubieboard2-linux3.3-SD-card-image/ and the file is  cubieboard2-linux3.3-SD-card-image.xz
   The reason for doing that is that the uSD card then also gains the boot partition information. A un-prepared boot card won't work.

 - use the instructions from http://linux-sunxi.org/Bootable_SD_card#Rootfs to fill the SD Card with the new distro files
 - to do that, one of the links points to http://releases.linaro.org/latest/ubuntu/raring-images/alip where the root file system linaro-raring-alip-20130826-474.tar.gz was downloaded, unzipped into a 2GB ext4 formatted card.
 - then the kernel that was supposedly compiled from instructions http://rhombus-tech.net/allwinner/a20/boot/ was dropped into the boot directory as the file uImage.
   (Caveat: I still have not managed to get my compiler environment to work yet.)
 - the remaining parameters and set ups for boot.cmd script.fex were taken taken from various sources to try out different settings.

The end result is that the configuration boots. Various logs collected from the eoma during boot and after boot are available here - http://www.gplsquared.com/eoma_boot/linaro_log.txt
Sata is not working as far as I can tell.
If sata is working  sudo lsmod  should produce a listing with sw_ahci_platform listed. At the moment lsmod produces no listing.

Questions and feedback send to boronn@blueyonder.co.uk, arm-netbook mailing list, or freenode #arm-netbook (handle is focus)




Sunxi-Linux compile attempts 2013-09-15

Now that there is a boot uSD image that can be made from above work, it is easy to make sunxi linux and drop in the kernel file (uImage) and lib directory into the uSD card to try and boot the EOMA.
The instructions from http://linux-sunxi.org/FirstSteps are needed, as are some information from http://rhombus-tech.net/allwinner/a20/boot/.
Needed files that are specific to EOMA are EOMA fex file http://rhombus-tech.net/allwinner/a20/boot/script.fex  and
EOMA .config file for compiling linux which is http://rhombus-tech.net/allwinner/a20/boot/eoma68-a20-config  that has to be downloaded and renamed to .config and dropped into the sunxi-linux directory.
The version of Linux that is compiled from http://linux-sunxi.org/FirstSteps  will end being version 3.0.  Version 3.4 has been released. So when doing the command to git checkout origin/sunxi-3.0,
change that to read git checkout origin/sunxi-3.4.

The end result compiled but did not work properly. Here is the link to data logged during boot to study what might have went wrong http://www.gplsquared.com/eoma_boot/sunxi_3.4_eoma_boot1.txt
The log ends with the machine hanging.


Luke's announcement

here's the status of all hardware interfaces: we now have everything
confirmed working and are therefore ready to go to larger production runs.

* LCD: tested using the lkcl-3.3-a20-dev kernel with an LVDS 1024x600 screen
* SATA: tested using the sunxi-3.4 kernel
* Ethernet: tested using hno's sunxi u-boot _and_ both above 3.3 and 3.4 kernels
* I2C: tested using i2c-tools on debian/wheezy
* GPIO: tested using /sys/class/gpio from lkcl-3.3-a20-dev kernel
* USB-OTG: tested using boot0/boot1, u-boot, lkcl-3.3-a20-dev
* USB2: tested using lkcl-3.3-a20-dev and debian/wheezy (armhf).
* MicroSD: tested using boot0/boot1, hno sunxi u-boot, and both above 3.3 and 3.4 kernels
* NAND: tested using boot0/boot1, allwinner u-boot, cubieboard2-3.4 kernel
* HDMI: tested using debian/wheezy with lkcl-3.3-a20-dev running xorg, wdm, firefox etc.

the only issues i have which i would _like_ to change are as follows:
* reducing the number of 5V pins from 4 to 3 (7.5 watt is plenty)
* connecting one of the 5V pins to the AXP209 "power on" line
* connecting the u-boot line to the last remaining EOMA68 pin (pin 22)
* rewiring two of the GPIOs (GPIO0 and GPIO1) to EINT-capable pins.
thoughts on the above appreciated.

---

> Please give sunxi-3.4 a shot, and tell us what should be fixed. Because

well, arokux,  you're in luck: USB-OTG on sunxi-3.4
works perfectly, as does SATA, USB2 and SD/MMC.  i also tested
ethernet - got a link-light, packets transmit, but aren't received.  i
just tested with u-boot (known-good) and that doesn't work either, so
it's likely a hardware fault not software.

 the config's here:

 http://rhombus-tech.net/allwinner/a20/boot/eoma68-a20-3.4-config


Boot Image 2013-09-16

Another boot image done up linaro2_2gb_uSD_image.bin.xz  (see below for updated image file) password is linaro

This one has sata working. Ethernet doesn't work yet, and hdmi is doing something but not fully working. Boot log: linaro_log2.txt  

The file uses xz compression and unzips into a 2GB image file that can be written to a 2GB or bigger micro SDCard, and then used to boot the EOMA.
To write the 2GB file to uSD card, use the dd command.
(Future sdcards will be bigger as they will come more self contained and with more tools and sources.)

The difference with previous version is down to suggestion by arokux on freenode #linux-sunxi to compile differently:
The guide at http://linux-sunxi.org/FirstSteps is followed to make a bootable uSD card.
The differences:
1. instead of git checkout origin/sunxi-3.0, used git checkout origin/sunxi-3.4 
2. instead of make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- sun4i_defconfig, used make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- sun7i_defconfig 
3. The remaining information came from http://rhombus-tech.net/allwinner/a20/boot/ to set up the EOMA to boot from uSD card,
    and get this file http://rhombus-tech.net/allwinner/a20/boot/script.fex to inform Linux of hardware configuration.

Less duplication, uses more of the existing documentation available, and it cross compiles on Ubuntu 12.04.3 using ubuntu tool chain.



VGA boards have arrived 2013-09-16



Figure 13 - EOMA VGA PCBs - 4 sub board to a PCB - need to have the cut into 4 pieces

The EOMA-VGA PCBs have arrived. There are 4 sub boards to a PCB. There are 10 PCBs that were ordered,
or at total of 40 pieces can be made.

The files for this are in KiCAD and released under GPL 3. http://www.gplsquared.com/eoma_boot/vga_2013_08_18.tar.gz 



Linaro boots from uSD card on EOMA 2013-09-17



Figure 14 - Linaro booted on EOMA68-A20


Linaro distro now boots on EOMA68-A20. Downloadable uSD card image:  http://www.gplsquared.com/eoma_boot/linaro3_2gb_uSD_image.bin.xz  password is linaro

The ethernet is working, SATA is working, and HDMI is working.  Boot log http://www.gplsquared.com/eoma_boot/linaro_boot_log.txt 

The usSD card image is in xz compressed file format, and it unzips into a 2GB image file that can be written to a 2GB or bigger micro SDCard, and then used to boot the EOMA.
To write the 2GB file to uSD card, use the dd command. If size errors or block errors are reported, then run gparted and resize the partition which will automatically correct the error.
(Future sdcards will be bigger as they will come more self contained and with more tools and sources.)

The difference with previous version is down to suggestions by Turl on freenode #linux-sunxi to change some options.

The guide at http://linux-sunxi.org/FirstSteps is followed to make the bootable uSD card. The root file system selected was the linaro distro.
http://releases.linaro.org/latest/ubuntu/raring-images/alip  (linaro-raring-alip-20130826-474)
Frequently updated snapshots to try out here: http://snapshots.linaro.org/raring/images/alip

The differences:

1. instead of git checkout origin/sunxi-3.0, used git checkout origin/sunxi-3.4
    This is the print out for "git show"  which describes the exact version that was checked out.

2. In the Linux directory, the file arch/arm/configs/sun7i_defconfig has been modified to add CONFIG_SUNXI_EMAC=y   (see http://linux-sunxi.org/Notes_on_Linux_Kernel_configuration
    This is a copy of the modified sun7i_defconfig_2013_09_17 file for reference (use more up to date files from sunxi if you have a choice).
  
3. instead of make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- sun4i_defconfig, used make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- sun7i_defconfig 

4. The remaining information came from http://rhombus-tech.net/allwinner/a20/boot/ to set up the EOMA to boot from uSD card,
    and get this file http://rhombus-tech.net/allwinner/a20/boot/script.fex to inform Linux of hardware configuration.
    That file has been modified to shut off LCD for now and enable HDMI, and it can be found in the /boot directory in the uSD card image.
    This is a copy of that file script.fex_2013_09_17.

The Linux kernel was cross compiled on Ubuntu 12.04.3 using ubuntu armhf tool chain.
The print out for "arm-linux-gnueabihf-gcc --version" describes version of tool chain used.

In short, make the uSD image from instructions at http://linux-sunxi.org/FirstSteps noting the 4 changes to the instructions to make it work on EOMA.
If any information is missing, send request a request to boronn@blueyonder.co.uk.
(Note: Linux-sunxi is updated frequently - and is more correct. Trust the linux-sunxi documentation if there are differences.)


EOMA68-A20 + SATA Dock Becomes Accidental PC, And Boots In 20 Seconds - 2013-09-20



Figure 15a  EOMA + SATA docking station turns system into a fully working PC equivalent






Figure 15b  EOMA + SATA docking station turns system into a fully working PC equivalent

Adding a SATA docking bay that has built in powered USB port expander and memory card slots suddently turns the EOMA into a fully working desktop PC!!!

It feels a lot quicker than a nettop computer. Because of the massive speed improvements with the SSD SATA drive, it doesn't feel
as fragile as its predecessors like the MK802. It feels and functions just like a normal fast desktop PC.
Perfectly good for browsing and average secretarial work. The linaro comes built in with AbiWord and Gnumeric spreadsheet.
Much more software can be downloaded once the networking is set up correctly.

Instructions about how to get networking going on the linaro distro

The networking has to be set up manually.

Read these links  (thanks to arokux guidance from freenode #linux-sunxi )

    h
ttps://www.miniand.com/forums/forums/2/topics/1?page=4
    https://help.ubuntu.com/13.04/serverguide/network-configuration.html

    $ sudo groupadd -g 3003 inet
    $ sudo groupadd -g 3005 inetadmin
    $ sudo leafpad /etc/network/interfaces   
       and then add these two lines
                auto eth0
                iface eth0 inet dhcp
       save the file. The stop and restart eth0 (or reboot).


With network working, packages such as Apache server, vsftpd and ssh were installed to give http access, ftp access and ssh access.

The repository had gambas3. Tried installing it, but once again (as is usual for linaro, suse and a limited number of other distro makers)
the gambas went into software loop and maxed out CPU cycles. Gambas is broken yet again on Linaro. Previously it was Gambas2 and now its Gambas3.

The EOMA 'PC' can boot in about 20 seconds using SSD as its SATA drive (excluding the 3 seconds it waits for user boot intervention).

The EOMA first boots from internal flash and then transfer to uSD card where it picks up enough information and transfers the booting to the SSD.

The SSD contains the bootable uSD created 2013-09-17 that has been dd copied to the SATA drive, and then the partition size has
been grown to fill the disk.

The uSD card is same as the bootable uSD created 2013-09-17 but is changed slightly. In the /boot/boot.cmd file where it says root=/dev/mmc...   change it to read root=/dev/sda1
Then remake boot.scr as described in http://linux-sunxi.org/FirstSteps using the mkimage command and drop the file into /boot directory of the uSD card.

At this point, if you have a spare uSD card, it is possible to delete everything and just have the /boot directory as the only directory, and the partition
can be shrunk to 256MB size and below and use a smaller memory size uSD flash card.
To save time a small image file about 150MB has been made linaro_boot_sda.bin.xz.  Unzip the file and dd the image file into a uSD card 256MB or larger in size.

[It can be made smaller to fit a 128MB uSD card - mount the image file as ext4, shrink the partition size to below 128MB, and then dd just the partition to the uSD card]

Insert the uSD into EOMA, switch on SATA drive and watch it boot directly into Linaro (password is linaro).

As the SATA is a removable drive from the dock station, it is very easy for developers to swap drives and experiment.

A future SATA docking station could be build with added slot for EOMA PCMCIA computer and then simple wiring or a switch at the back, or even a set of relays and
a switch could configure the docking station to be either a desktop computer or a simple SATA docking station. The Micro Engineering Board (MEB) could be extended
to cater for this feature.


Ubuntu 13.04 Desktop Linux Working on EOMA - 2013-09-29



Figure 16 - Ubuntu 13.04 working on EOMA68-A20

The Linaro ARM based Ubuntu 13.04 Desktop Linux is now working on the EOMA.

The distro is booting from SATA disk. The image file for this available from here: http://www.gplsquared.com/eoma_boot/linaro_ubuntu_desktop.img.xz  (username / password = jm / jm )
The file was zipped up after taking an image of a partition (i.e. unlike other images that are images of drives, this is an image of a partition).

Unzip the file and dd the image file into a partition greater than 5GB that has been formatted to ext4 (e.g. dd if=linaro_ubuntu_desktop.img of=/dev/sdc1
where sdc1 is the name of the partition of your choice). Run gparted, click on partition, and then click check for gparted to analyze the partition and repair
errors that would have been caused by this method of using dd command directly. (Always work on a spare disks instead, as valuable data can easily
get destroyed by dd command.)

Use the bootable uSD described earlier (2013-09-20) to boot from uSD card and switch to booting from SATA drive.

Booting up a Cubieboard2 with Ubuntu 13.04



Figure 17 - EOMA image can also boot on Cubieboard2 with minor modifications to the way the Cubie is booted compared to EOMA.

The same image file for the EOMA also boots on a Cubieboard.
The uSD boot disk is different in one file. An image of the file is available here http://www.gplsquared.com/eoma_boot/uSD_cubie_boot_sda1.img.xz
How to make the boot disk is same as what was described for the eoma earlier (2013-09-20).
The one file that is different is script.bin in the boot directory, and that came from the file cubieboard2-linux3.3-SD-card-image.xz  in http://dl.linux-sunxi.org/users/hramrach/cubieboard2-linux3.3-SD-card-image/ 
Other than that, all other files relevant to booting remain same.

How the Ubuntu 13.04 was made:

The construction proces was identical to that described earlier (2013-09-17) except that the root filesystem used was a Linaro Ubuntu 13.04 desktop.
The file used was linaro-raring-ubuntu-desktop-20130915-494.tar.gz released by http://www.linaro.org  from their snap shot servers  http://snapshots.linaro.org/raring/images/ubuntu-desktop/494  
If you are making your own, use the latest snapshots - they contain more bug fixes.

(For this particular snapshot release, there were a lot of problems.
 Firstly, login doesn't work. To get over it, press CTRL ALT F1 to log in via the command prompt.
 The command promt gives root access.
 Use the instruction in 2013-09-20 to start up networking.
 Then install gnome-session-fallback (type apt-get install gnome-session fallback)
 Reboot the computer, and a small round ubuntu logo should appear beside the login box. Select the classic login with no effects, and it should allow default linaro user in with password linaro.
 If something went wrong, go back to the root access command prompt and adduser <username> to create a new user, and add the user to the sudo group by typing usermod -aG sudo <username>.
 If that failed as well, you will need to delete the /etc/shadow file  and replace it with a new file from your own working Ubuntu computer.
)

What is not working

- Sound is not working. Thanks to popolon in irc freenode #cubieboard, type sudo adduser jm audio and sound will work through jack socket of cubieboard2.
  (Install alsamixer to control the volume with that utility - the default ubuntu utility shows no audio cards.)

- OpenGL is not working. Install mesa-utils and enter glxgears to get idea of speeds with software emulation.

- Video and other items have not been checked yet. (mplayer is working with video and sound.)

- Serial port. Serial port can be got working by typing sudo adduser jm dialout.

- wings3d, blender not working


What can be problematic

- Not having ethernet connected properly seems to increase boot times by about 2 to 3 minutes with long periods of inactivity as the boot scripts retry to get the ethernet connection going.

- When trying to install new software, some modules belonging to repository gambas3 (which does not work) gets flagged up as needing to be removed.
  If those files are removed, some files from the installed gambas3 compiled from sources will also be removed. If that happens, re-install gambas3 compiled from sources
  by changing to directory
       cd ~/code/gambas/trunk
 
and then run
       sudo make install
  This will re-install gambas3 although the menu option will not be displayed. Gambas3 can be run from command line (or create a menu entry manually or create a desktop shortcut).

- HDMI cable needs to be connected and monitor turned on before booting or video will default to lowest resolution.


What is working

- High definition HDMI video signals, SATA and internet.
- Gambas3 (not the repository one - but freshly download and compiled from sources, all of which are on the image file).
  Gamabs allows GUI based rapid software development for desktop applications to IoT applications.
  USB port expander works and allows keyboard and mouse to be plugged in to make the device into a desktop PC with a desktop top operating system.

- apache2 (web server), vsftpd (ftp server), ssh (ssh server), mplayer, espeak, firefox, minicom, htop, xfce4, lxde, gparted, mesa-utils,
  mesa-utils-extra, glmark2-es2, kicad (older file formats), libreoffice, librecad, wicd, gimp, onscreen keyboard, openbox, gnome-session-fallback, ccsm (compiz),
  terminal (CTRL+ALT+T)


Summary

In summary, it is now possible to easily build miniature netbooks, laptops, Internet of Things and real time
controllers with a compact computer such as EOMA68-A20, as well as with similar gadgets like Cubieboad2.
They will be as functional as the original netbooks with BOM costs around $50 or below for the lowest
spec devices. Being built from ARM, they feel quicker, and consume a lot less power at the same time.


Alternative Install Guide

For alternative description of Cubieboard2 installation, see popolon's blog https://popolon.org/gblog3/?p=165&lang=en


Ubuntu 13.04 Desktop Linux With 3D Acceleration Working on EOMA and Cubieboard2 - 2013-10-07



The image is available on this link http://www.gplsquared.com/eoma_boot/cubie_eoma_ubuntu_13_04_3d.bin.xz 
(Further operations require use of dd command which can seriously damage your disk data if you are not sure how to use it properly.)
Unzip the image file, and the use the dd command to write the image to an ext4 partition such as /dev/sda1 on a fresh new hard disk. Then run gparted, right click and select check to repair partition problems.

The uSD boot cards set to boot from SDA1 are available for EOMA68-A20 http://www.gplsquared.com/eoma_boot/uSD_stage_sda1_eoma.bin.xz  and Cubieboard2  http://www.gplsquared.com/eoma_boot/uSD_stage_sda1_cubie2.bin.xz .
Unzip the image file and use the dd command to write the image to the uSD card directly to the device e.g. /dev/sdc

The 3 image files were made by extending the work earlier (2013-09-29) using instructions at http://linux-sunxi.org/Binary_drivers
A big thanks to popolon of freenode #cubieboard, rz2k and ssvb from #linux-sunxi.
popolon first made it work on the image file after hunting down all the details. This is a duplicate of those attempts.
:
When installing 3D acceleration against this version of Ubuntu, came across a number of problems.
1. Create /dev/ump and /dev/mali manually and set permissions to 777. The advise to set up 50-mali.rules doesn't work.
2. The command mv /usr/lib/arm-linux-gnueabihf/mesa-egl/ /usr/lib/arm-linux-gnueabihf/.mesa-egl/  needed to be run earlier otherwise later compiling may not work.
3. Install mesa-utils, mesa-utils-extra, and glmark2-es2. The mesa utils has a package glxgears, mesa-utils-extra has the es2gears program and the program glmark2-es2 are all test
    programs to check 2D/3D accleration. The blue cat in above picture is from glmark2-es2.


The linux checked out was stage/sunxi-3.4 and compiled in 8 minutes on a 2.4GHz quad core. The versions and their details can be found in this file git_show_2013_10_07.txt
The instructions for obtaining and compiling the Linux is same as before.
The exact .config file used is automatically placed in the /proc/config.gz file which can be found by booting the Linux and checking in /proc directory.
A copy of it is at http://www.gplsquared.com/eoma_boot/config_stage_2013_10_06.txt

Terminology
Opengl is a graphics lib, but a lot of it is proprietary despite wanting to calling itself open, opengl ES is a cut down version for embedded CPUs, and mesa is the 'real' gpl'd version of opengl.
What is working is the cut down opengl ES. So if the software requires opengl or mesa then it may not work. If it can use opengl ES then it can work fairly well.
If software can use emulation of opengl, then that too will work, though it will be slow. Software rendering has advantage that it works over X/ssh tunnel.

Additional software
Also installed from the repositories were gparted, kicad, gimp. xmaxima (symbolic maths solver), libreoffice, htop, xfce4, lxde, openbox, rasmol, wicd, inkscape and kdiff3.
The kicad is reasonably usable to design new PCBs.

Everything is from sources. The links to sources and version number information should get you exact information. If anything is missing, let me know.

Alternative Install Guide
For alternative description of Cubieboard2 installation, see popolon's blog  http://popolon.org/gblog3/?p=193&lang=en 
Popolon's video showing use of MyPaint and Wacom on Cubieboard2  https://www.youtube.com/watch?v=8aNn_BJS0uU   


Accessing the GPIO (General Purpose Input Output) pins of the EOMA68-A20 - 2013-10-10

In script.fex, the pin IO mapping names to real GPIO pins are these entries:

[gpio_para]
gpio_used = 1
gpio_num = 8
gpio_pin_1 = port:PB02<0><default><default><default>
gpio_pin_2 = port:PI03<0><default><default><default>
gpio_pin_3 = port:PF00<0><default><default><default>
gpio_pin_4 = port:PF01<0><default><default><default>
gpio_pin_5 = port:PF02<0><default><default><default>
gpio_pin_6 = port:PF03<0><default><default><default>
gpio_pin_7 = port:PF04<0><default><default><default>
gpio_pin_8 = port:PF05<0><default><default><default>


Example to turn bit pf2 on for 1 second and then read pf3  is below:

# 1. make available the 8 GPIO pins for use
#     NOTE - This only works with sunxi-3.4 kernel
#
cd /sys/class/gpio
echo 1 >export
echo 2 >export
echo 3 >export
echo 4 >export
echo 5 >export
echo 6 >export
echo 7 >export
echo 8 >export
#
# 2. Turn pf2 to output a logic 1
#

echo "out" > gpio5_pf2/direction
echo 1 > gpio5_pf2/value
#
# 3. Pause for 1 second and turn back to logic 0
#

sleep 1
echo 0 > gpio5_pf2/value
#
# 4. Read from pf3 and store into a file called
pf3_value.txt in home directory
#

echo "in" > gpio5_pf3/direction
cat gpio5_pf3/value > ~/pf3_value.txt



Hopefully a Gambas program can be released shortly that will test the IO pins by pressing buttons.

Note - have not got any of this to work reliably yet
The commands may be working typing  sudo sh filename_with_script.sh




Popolon's work on Linaro 13.10  -  2013-10-10

Great work by https://popolon.org/gblog3/?p=208&lang=en  to get Linaro 13.10 on to Cubieboard 2.

Hope to follow that work soon, replicate and hopefully an image file with Linaro 13.10 for EOMA68-A20.



Isidoro's port to Olixino of Ubuntu 13.04 image - 2013-10-15

Modified version for Olixino by Isidoro https://www.olimex.com/forum/index.php?topic=2014.0  http://olimex.wordpress.com/2013/10/15/unofficial-ubuntu-13-04-image-with-mali-3d-drivers-for-a20-olinuxino/ 
(Thanks to Arokux of freenode #linux-sunxi for the link)




Alternative download mirror of selected image files - 2013-10-15

Alternative download mirrors of selected image files here http://dl.cubieboard.org/software/a20-cubieboard/ubuntu/

Thanks to a note by popolon of freenode #cubieboard.


Scott verifies lasercut MEB case design for EOMA - 2013-10-16


Example of unit that has been independently made by Scott http://revident.net/projects/emoa-68/meb-v1-w-cases-in-colour.jpg
of the MEB1 case and the gpl'd laser cut design for 3mm acrylic case meb1e.dxf.



Cubieboard + 2.5" SATA Brick Case  - 2013-10-16



This a design for cubieboard with 2.5" hard disk case. It is shaped like a compact brick.
The dxf CAD file is cubie7_hard_disk_d.dxf  released under GPL3. A copy of the GPL license can be obtained from http://www.fsf.org
The parts need to be cut from 3mm thick acrylic to get correct fitting.
Design can be modified to fit the EOMA boards, but for now waiting for the second version of MEB (Micro Engineering Board) to arrive.
The glueless case design exploits the inability of lasers to cut straight because the beam diverges a little which is enough to create tight fitting interference fit box.
The tight fit can work itself loose if  - if that happens add a small dash of glue, selotape or pipe cement for the weakest parts.
(Avoid superglue or cyanoacrylate glues. Their vapour condensing on clear plastic will dry and fog the acrylic.)
If the brackets or the edges don't fit the holes, then file lightly until they do.



Use the dxf CAD file to make own box with laser cutter which many hack spaces have.
If you just want to order pre-made parts then here are the options:

Laser cut parts for case are available for US $15 + postage.
Send email with delivery address to research@enemygadgets.com requesting a paypal invoice for the total amount.
Goods dispatched within 1-2 working days of receiving payment.
M3 nuts and screws for fitting the Cubieboard are supplied, but screws for the hard disk are not supplied.
The acrylic parts are covered in a protective plastic film which will have to be peeled away before assembly.
The letters written in green can be customized. Download the dxf design file, modify the design, and send it with order.
If extra holes needed, then add that in purple colour.
No extra charges if design changes are minimal.
An open sourced free CAD editor such as librecad in Ubuntu can edit dxf files (older versions of Ubuntu had QCad for dxf editing).


Scott verifies cubie brick size case design 2013-11-10


Cubieboard box without HD released under GPL - 2014-04-20   -  the file is cubie5b.dxf   




This case is for Cubieboards mounted without a HDD.
Laser cut parts for case are available for US $14 + postage.
Send email with delivery address to research@enemygadgets.com requesting a paypal invoice for the total amount.
Goods dispatched within 1-2 working days of receiving payment.
M3 nuts and screws for fitting the Cubieboard are supplied.

The acrylic parts are covered in a protective plastic film which will have to be peeled away before assembly.
The letters written in green can be customized. Download the dxf design file, modify the design, and send it with order.
If extra holes needed, then add that in purple colour.
No extra charges if design changes are minimal.
An open sourced free CAD editor such as librecad in Ubuntu can edit dxf files (older versions of Ubuntu had QCad for dxf editing).



LCD working - 2013-10-21

The working script.fex and scipt.bin is on this link working_lcd.tar.gz
The kicad lcd lashup circuit diagram is here http://www.gplsquared.com/eoma_boot/eoma_lcd_wiring.tar.gz  and  wire_lcd_to_eoma.pdf
A video of the device working is video-2013-10-21-15-06-42.mp4


(Click to enlarge)

The script.fex file  was converted to script.bin using fex2bin utility as described in http://linux-sunxi.org/FirstSteps.
The bin2fex (and fex2bin) software is in the directory set up after installing the sunxi-tools (i.e. follow the instructions where it mentions git clone git://github.com/linux-sunxi/sunxi-tools.git and compille it.)
For reference a copy of the actual file is this script.fex_working_lcd. It is slightly different to the settings described for KD43G18-40NB-A11 at http://linux-sunxi.org/Fex_Guide
The two parameters
    lcd_hv_vspw = 10
    lcd_hv_hspw = 41
were needed to get the display to sync lock.
The remaining parameters were verbatim copies and guess work.
The KD43G18-40NB-A11 datasheet  use of words such as vertical sync had to be matched with the symbols for LCD in the fex file. The two items added were the vertical sync porch width and
horizontal sync porch width to get the LCD to sync lock. (NOTE - the exact implementation of each LCD hardware can vary and some can work without perfect set up of signals such
as porch width which is why there can be differences between what is decribed here and fex guide at sunxi.)

The distro used to test the EOMA was the Ubuntu 13.04 with the 3D working as describe 2013-10-07
That distro also has mplayer installed.
    The command mplayer -fs filename.mp4
will play MP4 videos without the sound.



Livening up LCDs, OLEDs and E-Ink Displays as a service

If you have a datasheet for a display and would like the display livened up to work Linux and hardware such as the EOMA or the Cubieboard,
then a service is being made available for livening up these displays.

Usually this would happen if the connectors, datasheets and driver information all conspire to become a road block
and then it requires an oscilloscope, test jigs and power supplies to be built to get to the bottom of all the issues.
The work can be undertaken for a 'fee'.
The fee is 3 LCD displays or $300 worth of such displays.
Contact research@enemygadgets.com.
Send the datasheets first so that it is possible to check what needs to be done and get agreement first before sending the displays.
If PCBs have to be made, connectors have to be purchased, and test jigs to power supplies have to be built and wired up, then it will all get done.
The end result of that work is that it will get documented here, like the information above, for everyone else to use.




Historical conspiracy against
use of color LCDs in products

Take care when designing products with LCDs from strange companies that are shy about documentation.

Historically there has been a massive conspiracy by all the major players to fix prices for LCDs to prevent cheap LCDs reaching product
developers in case they made product and made money! :)

The directors of these companies have shamelessly paid hundreds of millions of dollars in fines - which is nothing but a slap on the wrist for wrong doing while they
go laughing to their bank for the billions they have secured through their fraud.

The conspiracy still continues today with lack of access to datasheets to all the top range displays, e-ink displays, OLED displays, IPS displays, capacitive sensors,
and most of the advanced displays such as color e-ink, large area oleds, large area sensors, "retina" displays, and so on. The higher the resolution
the higher the hoo haa around handing out datasheets to make products. Most of the offenders are huge conglomorates with lots of subdivisions
that make products that use these displays. So these conglomorates have grown too large and have an internal market it seeks to protect
from competition which is where all the problems are coming from.

Luckily, standard TFT LCDs are all out of patent, and rise of China manufacturing has indirectly made sure LCDs are available cheaply
and in HUGE enough quantities at every price point to satisfy every product demand.

The losers in this new game now are all the conspirators still holding on to their datasheets with NDAs and all kinds of rubbish that lose them all their current
and future sales. There is absolutely nothing important or new in a datasheet for an LCD. Its no more different than a datasheet for a 7400 chip as far
as an electronics engineer is concerned. So there is never a good reason to put an NDA on a display panel datasheet. If these conspirators are afraid
we might make product and make money while their subdivisions can't make money, then it must be time for regulators to break them up.

Until that happens, if it is possible to avoid using products from these types of companies that insist on NDA and the like, then best avoid them and
support manufacturers that freely make available their datasheets and can readily service your orders for large quantities of color displays unconditionally.
In turn they will some day keep on expanding and be able to offer OLEDs and other LCDs with free datasheets so that it allows shorter time to market for products
that you wish to make and sell, and make money with.



Livening up 5" LCD with 800x480 resolution on EOMA 2013-11-04

Most fo the details are the same as before with the 4.3" LCD. The script.bin file is modified for the LCD parameters - here is the working script - script_5_inch_lcd.fex
The LCD used was the  HW800480F which is availble for under $20 from vendors in places like aliexpress.
A compressed file with script.fex, script.bin and the datasheet for the 5" LCD HW800480F is available here - eoma_5inch_lcd.tar.gz
The colors seems to be mixed up again with red and blue swapped. Next step is to wire up a Cubieboard2 to compare the wiring
and use of signals and cross check with EOMA. The cubie also has resistive sensor controller - so it will be possible to wire up the LCD and get the touch panel
working with minimal effort.



LCD with 800 x 480 resolution, 5" size, working with EOMA68-A20



Cubieboard Wired Up For 5 Inch 800x480 LCD And Touch Sensor 2013-11-09

   

Work in progress to try to get the Cubieboard to use the resistive touch sensor.
(After gaining some knowledge of that, it will be possible to wire up a capacitive or resistive I2C chip to the EOMA and do the same thing.)



Repair suggestion for UART_RX line powering up EOMAs (and other similar boards) - 2013-11-11

There  is currently a problem with reference designs from Allwinner that allow the UART-RX line to power up the entire board!
The end result is that the CPU may not reset and reboot properly when it is power cycled with UART debug port connected.
To prevent that from happening some isolation between the CPU RX line and the CPU is needed:



The bottom diagram is for EOMA68-A20 motherboard based design.
The top diagram is for circuit board if the internal CPU 3.3V line is accessible.

These are only suggestions - any number of different techniques may be used to solve the problem.






Copyright (C) J. Michael  2014

Web Page Released Under Creative Commons License