WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Alwinner A20  (Read 15241 times)

Offline beerstein

  • Hero Member
  • *****
  • Posts: 519
Alwinner A20
« on: January 31, 2014, 05:21:24 AM »
Hi bmarkus:
I might be able to adapt the Allwinner single core A10 dCore to the dual core Allwinner A20 cubietruck. I could compile a list a questions. May be I only need help in a way such as a road map. I am willing to learn the details by myself. Do you have the time to help me with that?
At the cubieboard forum a lot of members had Raspberries before and switched to CT. So in the long run I would like to see an Allwinner A20 section on this forum. What do you think?
t(w)o be(ers) or not t(w)o be(ers) that is the question

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 6869
    • My Community Forum
Re: Alwinner A20
« Reply #1 on: January 31, 2014, 05:57:39 AM »
My advice to use the Armv7 section of the forum for A20 related discussions and later if it is necessary we can create a sub forum. But definietly not in Rasberry Pi part :)
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline beerstein

  • Hero Member
  • *****
  • Posts: 519
Re: Alwinner A20
« Reply #2 on: January 31, 2014, 08:03:46 AM »
OK thats OK.
From cubietruck forum I learned:

1) the gmac ethernet driver for the 1GHz LAN in CT is already built into the 3.4.75 kernel and not a loadable module

2) A CT tinycore distro will need a CT kernel+modules. There is akernel available at:
cubieforums.com/patwood/
name: A20-kernel-3.4.75-ct.tar.gz

what's in files from Allwinner dCore forum:

uImage - 3.0.42 kernel
uCore - startup ramdisk; contains just enough stuff to get a busybox shell, mkfs, fsck, and udev running; no modules.
uEnv.txt, boot.scr - contain all the kernel parameters and boot-time file loading.
linux-sunxi-modules-3.0.42.tar.gz - modules (drivers) specific to this kernel.

To swap out the kernel, replace uImage and linux-sunxi-modules-3.0.42.tar.gz.

So here is what I think needs to done:
recompile the kernel and replace modules.

But- How to do it?
Is this a lot of work?

« Last Edit: February 01, 2014, 09:09:23 AM by beerstein »
t(w)o be(ers) or not t(w)o be(ers) that is the question

Offline beerstein

  • Hero Member
  • *****
  • Posts: 519
Re: Alwinner A20
« Reply #3 on: February 05, 2014, 08:41:18 AM »
Hello bmarkus I need your help please:
I made some progress now with my cubietruck. I used a new CT kernel from the cubietruck forum and copied it over my current uImage. I left everything unchanged and I have a cubietruck system now working at the command line and has dhcp connection to the internet. That is great so far. According to the README file in the dCore Allwinner A10 repo I should be able to install an X-desktop.
I set up my tce directory on mmcblk0p1 (/dev/sdc1) using tce-setdrive. I have only one FAT32 partition on my micro SDcard which is sdc1=mmcblk0p1. Now - when I try ro install the first extension:
$ importsce -b Xprogs
I am getting errors like this:
tar:can't create symlink from /usr/local/share/pixmaps/screenshot.png to logo.png : Operation not permitted.
tar:can't create symlink from..... and so on.
Other stuff is copied and my /mnt/mmcblk0p1/ shows all the boot files and my /tce with all the content from my importsce operations. I also modified uEnv.txt to start x at boot. But it does not start x and it seems that it can not execute code.

Question: What might be wrong?
Am I supposed to put the /tce into the boot location /mnt/mmcblk0p1 ????
Or should I shrink the  mmcblk0p1 (/dev/sdc1) partition, which is now 100% FAT32 and make a new mmcblk0p2 partition using ext4 or ext2 and put the /tce onto that partition?

If I could find a solution for this problem I could have a dCore -X  for cubietruck.
BTW: This board is selling like hot cakes.
t(w)o be(ers) or not t(w)o be(ers) that is the question

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline beerstein

  • Hero Member
  • *****
  • Posts: 519
Re: Alwinner A20
« Reply #5 on: February 05, 2014, 09:52:38 AM »
Thank you for your quick response. I will try to scale the partition and insert an ext4 partition and just copy the current /tce over. Hope that works. Does a small swap make sense?
t(w)o be(ers) or not t(w)o be(ers) that is the question

Offline beerstein

  • Hero Member
  • *****
  • Posts: 519
Re: Alwinner A20
« Reply #6 on: February 05, 2014, 11:28:06 AM »
I resized sdc1 and put an ext4 partition behind the FAT32 partition. Then the importsce worked fine, but the files in sdc1 (mmcblk0p1) were not visible in dCore any more. But they showed up in USB adaptor on my PC - Strange
t(w)o be(ers) or not t(w)o be(ers) that is the question

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Alwinner A20
« Reply #7 on: February 05, 2014, 12:33:54 PM »
Any chance out of habit you expected the former tce-drive to be automounted?
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline beerstein

  • Hero Member
  • *****
  • Posts: 519
Re: Alwinner A20
« Reply #8 on: February 05, 2014, 03:32:15 PM »
yes I discovered that I have to mount /dev/sdc1 before I can read it. :( So i was able to edit my uEnv.txt and placed: desktop=flwm_topside at he end of that extraargs line. I also put waitusb=5 in here and learned that this is the line where I can put in tinycore boot codes - if needed.
I still have sdc1 = mmcblk0p1 formated as FAT and mmcblk0p2 as ext4. The importsce seems to work, but still no X desktop.

Question: Do I have to format mmcblk0p1 as ext2 instead of FAT32?

From the link you gave me I understand only the partition where /tce sits needs to linux file system - or??
t(w)o be(ers) or not t(w)o be(ers) that is the question

Offline beerstein

  • Hero Member
  • *****
  • Posts: 519
Re: Alwinner A20
« Reply #9 on: February 06, 2014, 10:43:23 AM »
It seems that the cubietruck needs a FAT (VFAT) partition to boot from. I tried ext2 and ext4 and got boot errors. Now I am back to a 50 MB FAT /dev/sdc1 partition which holds the kernel and other .bin .scr .txt files. /dev/sdc2 is now ext4 and covers the reminder of the 2GB microSD card. tce-setdrive brought /tce onto /dev/sdc2 and I was able to importsce the extensions to get an X desktop. After importing the extensions (Xprogs, flwm_topside, wbar and xorg-fbdev there were no files in /home/tc ?
I assume that after something is installed the /home/tc folder should have files and data?
The /usr/local/tce.installed folder is empty although there are extension .sce files in /mnt/mmcblk0p2/tce/sce
The /mnt/mmcblk0p2/tce/import/deb folder contains .deb and .tar.gz files.
It seems that all necessary extensions are loaded but not installed.

So something is not working here?
 Just for the fun of it I installed mc (midnight commander) screen activity  looked like a successful install, but I was not able to run mc from the CLI.

Here are my questions:
1. Where should I look for executable extensions? Which folder?
2. Is there something as an onboot.lst and .filetool.lst in A10 dCore?
3. How can I make a persistant /home in A10 dCore?
4. How can I istall the local extensions and make the installation persistant.
5. What is that /run folder in the file system good for?

Help please.
t(w)o be(ers) or not t(w)o be(ers) that is the question

Offline beerstein

  • Hero Member
  • *****
  • Posts: 519
Re: Alwinner A20
« Reply #10 on: February 12, 2014, 12:22:12 PM »
Thank you Jason for the new A10 dCore.
How much work and time would be involved to port it to A20 cubietruck?
I used the uCore from the previous A10 sytem and added a new cubietruck kernel. LAN works fine but I can not install extensions.
Where can I find help to move on with my project?
t(w)o be(ers) or not t(w)o be(ers) that is the question

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Alwinner A20
« Reply #11 on: February 12, 2014, 01:45:51 PM »
Start by comparing our kernel config file, found in the A10 download section, with that of the kernel you are using.
If you are able to bool to a prompt then at least initrd is supported in your kernel.
If no extensions are loaded then I suspect no squashfs in your kernel. Will need kernel recompile to include.
10+ Years Contributing to Linux Open Source Projects.

Offline beerstein

  • Hero Member
  • *****
  • Posts: 519
Re: Alwinner A20
« Reply #12 on: February 13, 2014, 12:47:02 AM »
Thank you Robert. Will try to find that out and post back. I never recompiled a kernel, but I will try to learn it.
t(w)o be(ers) or not t(w)o be(ers) that is the question

Offline beerstein

  • Hero Member
  • *****
  • Posts: 519
Re: Alwinner A20
« Reply #13 on: February 13, 2014, 09:20:49 AM »
Here is what patwood from the cubieboard forum posted for me:
"The kernels I've uploaded have squashfs built as a module, not baked into the kernel.  However, if you have an initrd working, you should be able to copy /lib/modules/3.4.75-sun4i+/kernel/fs/squashfs/squashfs.ko into it and install it with modprobe or insmod."

Question: How can I copy this into my dCore? and make it permanent?
t(w)o be(ers) or not t(w)o be(ers) that is the question

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Alwinner A20
« Reply #14 on: February 13, 2014, 02:29:13 PM »
I would not advise to change dcore as it is not a simple initrd that can be easily unpacked and repacked as core.gz. It is pseudo compiled with sunxi tools.

However, additional .gzs are still supported in tce-setup and that is what I would try. You will need to be familiar with cpio and gzip to make this specialized extension. Start only with squashfs and then add others as might be needed. The .gz is loaded before any regular extensions (sces). Give that a try.
10+ Years Contributing to Linux Open Source Projects.