WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Towards Microcore on Allwinner A10  (Read 87282 times)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Towards Microcore on Allwinner A10
« Reply #45 on: August 25, 2012, 03:39:53 PM »
Quote
In fact, qemu-extra.tcz could use an update!

According to this bug:
https://bugs.meego.com/show_bug.cgi?id=16858

The Qemu version required is 0.13 or 0.14, qemu-extra is at 1.0. Is it a config option instead?
The only barriers that can stop you are the ones you create yourself.

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Towards Microcore on Allwinner A10
« Reply #46 on: August 25, 2012, 03:47:42 PM »
I'm no expert on Qemu so not sure. While visiting a friend, I, we, were able to download the latest stable Qemu onto his lastest Ubuntu system, qemu-1.1.1.1.tar.bz2 and after compiling were able to run raspbian. I don't have the luxury of having so many machines to run the latest Ubuntu and Qemu. Perhaps you wish to investigate?
10+ Years Contributing to Linux Open Source Projects.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Towards Microcore on Allwinner A10
« Reply #47 on: August 25, 2012, 04:25:20 PM »
I see, 1.0 has buggy float support for those early ARMs. http://lists.gnu.org/archive/html/qemu-devel/2012-03/msg05454.html
But the readybuilt Pi kernels don't support newer ARMs either ;)
The only barriers that can stop you are the ones you create yourself.

Offline caminati

  • Full Member
  • ***
  • Posts: 184
    • Homepage
Re: Towards Microcore on Allwinner A10
« Reply #48 on: August 25, 2012, 05:27:11 PM »
caminati, what is the code that you used to create the final  img  file.

I'm not sure I understood what you want to know.
As root, I did the following:
Code: [Select]
find | cpio -H newc -o | gzip > ~/core
mkimage -C none -A arm -T ramdisk -d ~/core ~/uCore

Then put uCore, boot.scr, uImage and script.bin in first partition of mmc.
As usual (see rhombus-tech.net), that partition should start at sector 2048, with previous sectors containing spl and u-boor binaries.
I have a script to prepare an empty mmc this way, which must be run from a directory containing sun4i-spl.bin and u-boot.bin: see attachment.
If you use it, be careful!

I now have Core's busybox, blikid, and mke2fs working in uCore. I can now do a backup on A10!
Most scripts should be working since it is our busybox. I would like to post the img so that others may begin testing.

Can't wait for that.
Of course, an img file would be much handier if truncated at x+1 Mb (where x is the size of first partition and hopefully not much more than the total size of the four files it contains), and not as large as the whole mmc.
Please tell me if I omitted needed details.
« Last Edit: August 25, 2012, 05:28:42 PM by caminati »

Offline caminati

  • Full Member
  • ***
  • Posts: 184
    • Homepage
Re: Towards Microcore on Allwinner A10
« Reply #49 on: August 25, 2012, 05:32:48 PM »
caminati, what is the code that you used to create the final  img  file.

I'm not sure I understood what you want to know.
As root, I did the following:
Code: [Select]
find | cpio -H newc -o | gzip > ~/core
mkimage -C none -A arm -T ramdisk -d ~/core ~/uCore

Then put uCore, boot.scr, uImage and script.bin in first partition of mmc.
As usual (see rhombus-tech.net), that partition should start at sector 2048, with previous sectors containing spl and u-boor binaries.
I have a script to prepare an empty mmc this way, which must be run from a directory containing sun4i-spl.bin and u-boot.bin: see attachment.
If you use it, be careful!
Guessing the right version of u-boot binaries turned out to be the single major point of trouble, so I attach also those two files. They should be the same contained in my image.

I now have Core's busybox, blikid, and mke2fs working in uCore. I can now do a backup on A10!
Most scripts should be working since it is our busybox. I would like to post the img so that others may begin testing.

Can't wait for that.
Of course, an img file would be much handier if truncated at x+1 Mb (where x is the size of first partition and hopefully not much more than the total size of the four files it contains), and not as large as the whole mmc.
Please tell me if I omitted needed details.
« Last Edit: August 25, 2012, 05:53:51 PM by caminati »

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Towards Microcore on Allwinner A10
« Reply #50 on: August 25, 2012, 05:41:41 PM »
Thanks for your script. I will take a look.
I know of creating the sdcard and uCore. I have been overwriting the original uCore with my updated uCore.
But typically one dd the sdcard to an image file. I presume you are using some count= with dd as you wouldn't want 4GB or 8GB image.
Are you just summing up the four files +1MB for the count. That is my question.
10+ Years Contributing to Linux Open Source Projects.

Offline caminati

  • Full Member
  • ***
  • Posts: 184
    • Homepage
Re: Towards Microcore on Allwinner A10
« Reply #51 on: August 25, 2012, 05:51:39 PM »
Thanks for your script. I will take a look.
I know of creating the sdcard and uCore. I have been overwriting the original uCore with my updated uCore.
But typically one dd the sdcard to an image file. I presume you are using some count= with dd as you wouldn't want 4GB or 8GB image.
Are you just summing up the four files +1MB for the count. That is my question.

I only know where partitions are inside the device, not where the files are inside a given partition, so I do
Code: [Select]
dd if=/dev/sdb bs=1M count=p+1 | gzip > img.gzwhere p is the size of the first partition, which contains everything.
The optimal value of p would hence be the minimal one to fit all four files; as a rough guess I made it 8.

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Towards Microcore on Allwinner A10
« Reply #52 on: August 25, 2012, 06:26:36 PM »
OK. I did a du -h on first( only) partition. Results 5.8MB so I rounded 6 +1 = 7MB
It boots OK for me. Note that I changed the font to 12 so you may want to use the larger font if on tablet.
Also it has my mele script.bin. Anyway, have a go it can be found at
 http://distro.ibiblio.org/tinycorelinux/4.x/arm/armv7
« Last Edit: August 25, 2012, 08:28:14 PM by roberts »
10+ Years Contributing to Linux Open Source Projects.

Offline karlmw

  • Newbie
  • *
  • Posts: 9
Re: Towards Microcore on Allwinner A10
« Reply #53 on: August 25, 2012, 10:26:59 PM »
I have tested the image posted on my 512M mini-x.  It boots fine; USB hub and keyboard works; SD card is mountable; and a USB flash drive works.
Didn't need to fiddle with script.bin - it works fine as it is.  It seems to me that mele script.bin is reasonably compatible with mini-x.

dmesg (file attached) reports some unhappiness with the ethernet NIC built-in to the processor, but there is no physical ethernet port on the mini-x, so that's not a big problem at the moment.

Given the lack of a physical ethernet port, I look forward to some modules being built so I can use my USB-NIC and access the mini-X remotely.  Can you point me to information on where to get modules (if you've grabbed them from elsewhere) or configs/toolchain for building them myself?  Thanks.

For people not familiar with the mini-x, have a look at the miniand website - they have some nice teardown photos.

Thanks for all the work - just a week ago I was thinking that the mini-x might be a long term project for me (with slow progress on my own), but it looks now like it is all going to come together  :-)

Offline suzuke

  • Newbie
  • *
  • Posts: 5
Re: Towards Microcore on Allwinner A10
« Reply #54 on: August 25, 2012, 11:40:53 PM »
OK. I did a du -h on first( only) partition. Results 5.8MB so I rounded 6 +1 = 7MB
It boots OK for me. Note that I changed the font to 12 so you may want to use the larger font if on tablet.
Also it has my mele script.bin. Anyway, have a go it can be found at

I have tested roberts's image on my gemei G2, but it reboots again and again for loop.
I will test it again on my other A10 machine later.

--
Edit:

I use caminati's image (A10MicroCoreBeta0.1.tar.bz2) and replace the uCore to roberts's uCore then it works.
« Last Edit: August 25, 2012, 11:54:42 PM by suzuke »

Offline caminati

  • Full Member
  • ***
  • Posts: 184
    • Homepage
Re: Towards Microcore on Allwinner A10
« Reply #55 on: August 26, 2012, 03:13:32 AM »
Thanks, it boots fine for me.
I notice that you didn't take my last image as a starting point: there is an error in init.d/rcS coming frome my previous posts, and zram/zcache are missing.

OK. I did a du -h on first( only) partition. Results 5.8MB so I rounded 6 +1 = 7MB

You rounded to 6: you mean that you re-created, using fdisk, a 6Mb partition?
Because only after that you can be sure to catch everything.


Offline caminati

  • Full Member
  • ***
  • Posts: 184
    • Homepage
Re: Towards Microcore on Allwinner A10
« Reply #56 on: August 26, 2012, 03:23:10 AM »

I have tested roberts's image on my gemei G2, but it reboots again and again for loop.

If it reboots after loading the kernel (screen on, usb flashing, etc...), and with a wait time of 10 seconds, it could be the panic=10 in boot.scr.
In this case, the kernel panic could be due to something wrong with uCore or uImage.
Since it works for other people, are you sure you had no IO errors when writing Robert's image to mmc?

Offline suzuke

  • Newbie
  • *
  • Posts: 5
Re: Towards Microcore on Allwinner A10
« Reply #57 on: August 26, 2012, 10:28:44 PM »
If it reboots after loading the kernel (screen on, usb flashing, etc...), and with a wait time of 10 seconds, it could be the panic=10 in boot.scr.
In this case, the kernel panic could be due to something wrong with uCore or uImage.
Since it works for other people, are you sure you had no IO errors when writing Robert's image to mmc?

I re-download the image, it works fine now.
Maybe it has something wrong when downloading it.

On the other hand, I still do not have luck to change the font.
Is the font needed to be converted under a arm-system ?

Offline caminati

  • Full Member
  • ***
  • Posts: 184
    • Homepage
Re: Towards Microcore on Allwinner A10
« Reply #58 on: August 27, 2012, 03:20:36 AM »
On the other hand, I still do not have luck to change the font.
Is the font needed to be converted under a arm-system ?

No, actually I myself converted the provided fonts on a x86.
Please, describe your problem more accurately: "no luck" means no terminal at all or the old font persisting? What happens when you apply your font?
Did you check the font file's permissions?

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Towards Microcore on Allwinner A10
« Reply #59 on: August 27, 2012, 09:50:12 AM »
Thanks, it boots fine for me.
I notice that you didn't take my last image as a starting point: there is an error in init.d/rcS coming frome my previous posts, and zram/zcache are missing.

OK. I did a du -h on first( only) partition. Results 5.8MB so I rounded 6 +1 = 7MB

You rounded to 6: you mean that you re-created, using fdisk, a 6Mb partition?
Because only after that you can be sure to catch everything.

Actually I made an 8MB partition to test with. And I used 8MB to dd the download img file.

root@dev:/home/tc# df -h /mnt/sdc1/
Filesystem                Size      Used Available Use% Mounted on
/dev/sdc1                 8.0M      5.8M      2.1M  73% /mnt/sdc1

« Last Edit: August 27, 2012, 10:24:30 AM by roberts »
10+ Years Contributing to Linux Open Source Projects.