Tiny Core Linux

dCore Import Debian Packages to Mountable SCE extensions => dCore Armv7 => Allwinner A10 => Topic started by: caminati on August 12, 2012, 08:00:20 AM

Title: Towards Microcore on Allwinner A10
Post by: caminati on August 12, 2012, 08:00:20 AM
Hello, I managed to set up a quite experimental minimal console linux on my tablet, as announced here:
http://lists.phcomp.co.uk/pipermail/arm-netbook/2012-August/005528.html (http://lists.phcomp.co.uk/pipermail/arm-netbook/2012-August/005528.html)

I deem this a substantial step towards microcore.
Indeed now I can work directly on my tablet to add the missing pieces to get Microcore: basically, udev, very few busybox applets missing, some other /bin and /sbin proggie, and /lib/modules.
Being targeted at only one specific machine, I guess the last one should be easier, with much fewer peripherals possibly running.

The most important step for further developments, however, is to get some kind of toolchain set (for the time being I am stealing binaries from Debian armhf :) ): gcc (or tcc?), eglibc (or uclibc?), linux headers, and this is harder.
How do I pack up eglibc, for example? Also, I have no idea of how to skim linux kernel headers from the sources, though this should be easier.

After that, repacking at least the most basic tczs for the new arch should be relatively straightforward.
It would be even more so if we had a strict policy of requiring buildscript(s) for each extension submitted, which now is quite loose (ibiblio src/ directory is, well, meager).
Maybe bitbake could help here? Or even leaving the choice of the script language to the submitter: any kind of automation would be of great help.

Another problem is that I don't have much spare time left to devote to that right now.
Anybody owning Allwinner hardware is welcome to join the effort.

Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on August 12, 2012, 09:52:57 AM
Awesome. I will definitely have a look.
Title: Re: Towards Microcore on Allwinner A10
Post by: tinypoodle on August 13, 2012, 05:51:10 AM
very few busybox applets missing

Not sure, but have you had a look at http://busybox.net/downloads/binaries/latest/ already?
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 13, 2012, 06:24:35 AM
Not sure, but have you had a look at http://busybox.net/downloads/binaries/latest/ already?

Well... no, because I just took the first working binary I found.
I just followed your suggestion, and tested armv6l which seems to work on the tablet!
Probably slower than debian armhf's one, but at this stage that's ok.
Hence: first problem solved, thanks. :)
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 13, 2012, 10:08:01 AM
Another important point is that busybox suggested by tinypoodle has standalone shell disabled, which is needed for e.g. coreutils!

Now I have only three busybox applets missing:
ar, taskset, uncompress

Before I start digging core.gz to know whether I actually need them, do you think I need them? :)
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on August 14, 2012, 01:14:54 PM
@caminati, Sorry but I did not have any success with your kernel & rootfs. But it is likely because  I don't have an Allwinner tablet.
Probably a script.bin (evb.bin) or some such. Seems Allwinner just about needs hardware packs of specific boot bin files.

Anyway, I am extending my kit methodology to my Allwinner A10 Mele. I believe I had Core booting. But alas I need to add X to be sure. So I continue with great hope for a mele-kit. 
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 14, 2012, 03:25:32 PM
@caminati, Sorry but I did not have any success with your kernel & rootfs. But it is likely because  I don't have an Allwinner tablet.
Probably a script.bin (evb.bin) or some such. Seems Allwinner just about needs hardware packs of specific boot bin files.

Anyway, I am extending my kit methodology to my Allwinner A10 Mele. I believe I had Core booting. But alas I need to add X to be sure. So I continue with great hope for a mele-kit.

Thanks for testing it, I hope it didn't waste too much of your time.
I have not clear if you got any other distro successfully booting on your Mele: in this case you should stick with the corresponding script.bin, evb.bin, sun4i-spl.bin and u-boot.bin to couple with other kernels and rootfs'.

I am working in a much less general way than you're doing with your kits.
I think I have a good initrd for Core, but I am going mad after u-boot: I'm having no success in passing it an initramfs (been working with a standard rootfs til now).
Heck, I am not even managing to pass it any boot parameter, while I have some showing up in /proc/cmdline from nowhere.
Going to ask for help on arm-netbook, and hope I can understand what's going on.

Regarding how to make sure you successfully booted: without fbcon and hardware console, you can rely on usb pens flashing, and on /var/log: in my rootfs I placed klogd at the beginning of init right for this reason.
To complicate matters, my microsd's all show some remarkable inconstancy: they boot roughly just half the times.
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 17, 2012, 01:08:50 PM
I packed a much more complete port of Micro Core, not even an alpha, though.
I am uploading it right now:
caminati.net.tf (http://caminati.net.tf)
or, equivalently:
https://sites.google.com/site/marcocaminati/ (https://sites.google.com/site/marcocaminati/)
It is a tar.bz2 with the separate components to be installed manually, if anybody wants a whole media image for simplicity, I can provide it.

Anyhow: now Core scripts are all there, even though actually tc-config is not completing yet.
Refer to the included README.
There I also explain the approach I adopted to port, somehow more streamlined than before, after seeing Robert's Rpi kit.
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 17, 2012, 02:37:19 PM
I took a screenshot from /dev/fb0 via rawtoppm (well, no camera or whatsoever here). See attachment (I don't know why the background turned out to be grayish, it is actually white). Boot time is about 10 seconds :)
Ok, tc-config does little of what it is supposed to do, still...
Title: Re: Towards Microcore on Allwinner A10
Post by: curaga on August 18, 2012, 02:19:34 AM
Dear god that font :P
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 18, 2012, 02:58:21 AM
Dear god that font :P

It's the one from ttf-ocra-font.tcz on ibiblio.
I find it is quite readable, and on the tablet's lcd little else matters.
It occupies a tiny amount of bytes, too; what else one could want? :)
I have to confess it misses ~ and ^ glyphs.
However, I could convert any ttf or bdf font.
Any suggestion?
Title: Re: Towards Microcore on Allwinner A10
Post by: curaga on August 18, 2012, 03:12:32 AM
Curious, because the TTF Ocra screenshots don't look even nearly as bad. Perhaps it's due to the conversion.

(I like bitstream vera sans mono, but since the ocra was mangled too, I doubt changing the source font would help.)
Title: Re: Towards Microcore on Allwinner A10
Post by: tinypoodle on August 18, 2012, 03:27:18 AM
I took a screenshot from /dev/fb0 via rawtoppm (well, no camera or whatsoever here). See attachment (I don't know why the background turned out to be grayish, it is actually white). Boot time is about 10 seconds :)
Ok, tc-config does little of what it is supposed to do, still...

"Created with GIMP" ??
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 18, 2012, 03:35:00 AM
Quote from: tinypoodle link=topic=13827.msg77595#msg77595

"Created with GIMP" ??

I had to cut the lower half of rawtoppm output, which was full of mess.
Mmm, maybe this has to do with how horrible the shot looks; for sure it is not OcrA's fault.
If I have time I will try to understand better the raw framebuffer pixel format and get a decent screenshot.
Title: Re: Towards Microcore on Allwinner A10
Post by: Rich on August 18, 2012, 05:20:52 AM
Hi tinypoodle
Quote
"Created with GIMP" ??
Sounds like he may have used  netpbm.
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 18, 2012, 05:56:45 AM
Hi tinypoodle
Quote
"Created with GIMP" ??
Sounds like he may have used  netpbm.

Yes, I originally used netpbm.
However Tinypoodle (who must be a detective in real life :) ) quoted a tag in the header of the png I posted, so I explained why it is there.
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on August 18, 2012, 11:14:06 AM
I packed a much more complete port of Micro Core, not even an alpha, though.
I am uploading it right now:
caminati.net.tf (http://caminati.net.tf)
or, equivalently:
https://sites.google.com/site/marcocaminati/ (https://sites.google.com/site/marcocaminati/)
It is a tar.bz2 with the separate components to be installed manually, if anybody wants a whole media image for simplicity, I can provide it.

Anyhow: now Core scripts are all there, even though actually tc-config is not completing yet.
Refer to the included README.
There I also explain the approach I adopted to port, somehow more streamlined than before, after seeing Robert's Rpi kit.
Still no text display on my Mele. Is it because I need hdmi output while you use lcd output for table?
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 18, 2012, 12:51:28 PM
Still no text display on my Mele. Is it because I need hdmi output while you use lcd output for table?

On my hardware, video output is completely and solely determined by which script.bin I place in the first partition (root directory, along with uImage).
All the other distros I tried gave me either hdmi or builtin lcd output according to that.
I never tested the statement above wrt this release, however. I will try and let you know if I have hdmi output, since at the moment I am lucky enough to have hdmi tv around.
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 18, 2012, 01:54:22 PM
I just tested the mele-a1000.bin contained in:
http://dl.linux-sunxi.org/nightly/2012.07.23/mele-a1000_hwpack_2012.07.23.7z (http://dl.linux-sunxi.org/nightly/2012.07.23/mele-a1000_hwpack_2012.07.23.7z)
replaced my script.bin with it (using the latter name), and successfully got hdmi output.
Is your kernel alive? I mean, usb pens flashing, keyboard leds responding...
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on August 18, 2012, 02:08:12 PM
I cp mele-a1000.bin /mnt/sdb1/script.bin.
Boot Mele, keyboard lights flash, mouse stays lighted.
But no signal to hdmi.
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on August 18, 2012, 02:11:42 PM
Your code is specifically looking for script.bin?
I will try other bin files on the Ubuntu image.
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 18, 2012, 02:17:28 PM
I cp mele-a1000.bin /mnt/sdb1/script.bin.
Boot Mele, keyboard lights flash, mouse stays lighted.
But no signal to hdmi.

Does writing something like /bin/busybox poweroff -fn work?
Sorry to bother you: have you tried Alt+SysRq+e or Alt+SysRq+i (the sooner during booting process the better)?
Does the whole reisub sequence actually reboot (supposing you could sense a reboot in these conditions)?
Maybe there is some problem due to tc-config not completing.
I stupidly forgot to add blkid utility, which crashes it.
Thanks for your report!
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 18, 2012, 02:21:53 PM
Your code is specifically looking for script.bin?
I will try other bin files on the Ubuntu image.

You can replace script.bin with the filename you like by editing boot.scr.
However, each time you have to do mkimage -C none -A arm -T script -d on the source of boot.scr, which is a nuisance.
Also, sticking with the standard is advisable: unforeseen consequences of small changes is what u-boot excels in :)
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on August 18, 2012, 02:39:05 PM
No response that I can detect when I try:
Does writing something like /bin/busybox poweroff -fn work?
Sorry to bother you: have you tried Alt+SysRq+e or Alt+SysRq+i (the sooner during booting process the better)?

I also tried renaming evb.bin, that is what Ubuntu and the miniand distros use, to script.bin and still no hdmi output.
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 18, 2012, 02:54:06 PM
No response that I can detect when I try:
Does writing something like /bin/busybox poweroff -fn work?
Sorry to bother you: have you tried Alt+SysRq+e or Alt+SysRq+i (the sooner during booting process the better)?

I also tried renaming evb.bin, that is what Ubuntu and the miniand distros use, to script.bin and still no hdmi output.
Yes, during tests I kept both names with identical contents, to be on the safe side.
In the meantime I found out that the Mele script.bin that I suggested you disables the usb port on my tablet. Argh, matters are getting complex.
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 18, 2012, 03:02:29 PM
No response that I can detect when I try:

This is interesting, anyway. Sounds like the problem is not video output or framebuffer, but more serious.
I will try to summon some more mele owners on other allwinner forums as soon I fix some issues.
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 19, 2012, 04:05:59 PM
We have a second piece of hardware booting something on hdmi:
https://www.miniand.com/forums/forums/development/topics/minimal-textonly-linux-testers-wanted (https://www.miniand.com/forums/forums/development/topics/minimal-textonly-linux-testers-wanted)

A kind user on miniand forum gave me feedback using his 1Gb MK802, and a stripped-down version of console linux I posted there.
I can get a script.bin from the huge image he used, though it is not clear if he tried it with my kernel and u-boot.

EDIT: Here it is
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on August 19, 2012, 07:14:55 PM
Seeing that you posted a new image file: A10MinimalLinux.img.gz
I tried it with mele-a1000.bin renamed to script.bin.

Viola! I see text. Very LARGE text. It boots to login!

But this is not uCore, initramfs as was the first attempt.
This is why I am delaying initramfs on rpi until I get the basics, traditional rootfs working.

Anyway, you  have reached a first milestone. Awesome!
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 20, 2012, 12:27:04 AM
Seeing that you posted a new image file: A10MinimalLinux.img.gz
I tried it with mele-a1000.bin renamed to script.bin.

Viola! I see text. Very LARGE text. It boots to login!

But this is not uCore, initramfs as was the first attempt.

You're right: it is just busybox, bterm and a very sleepy init, which just mounts devpts and respawns getty->bterm.
On the other hand, here I have full Micro Core working on the tablet, with only zcache kernel module missing, and tce-load -i working fine.
So, the real question now is why my previous file didn't work for you.
u-boot.bin, sun4i-spl.bin and the kernel are identical, and I have no control on script.bin. So it must necessarily be /init or /bin/busybox, which changed, or /etc/tc-config, which is here bypassed. Or something with initramfs.
And why the very first release also didn't work for you? That was VERY similar to this.
Only the boot loaders and script were left out there; maybe...
Mumble, very difficult to troubleshoot remotely :)

This is why I am delaying initramfs on rpi until I get the basics, traditional rootfs working.

Anyway, you  have reached a first milestone. Awesome!

Glad it works :)
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on August 20, 2012, 07:30:51 AM
uCore now working.

Used the image file. Copied the boot.scr from first attempt together with uCore to first partition. Formatted the 2nd partition and left blank.

Boots and is working fine.
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 20, 2012, 07:57:26 AM
uCore now working.

Used the image file. Copied the boot.scr from first attempt together with uCore to first partition. Formatted the 2nd partition and left blank.

Boots and is working fine.

Nice! That uCore is still not completely functional, mainly due to blkid missing, but this is nice to hear.
I think the presence of 2nd partition is irrelevant, by the way.
From now on, I will use image files :)

As soon as I have time, I will try to get to beta quality (except for zcache, again).
Then on to toolchain: if you have some tcz already done, I would like to try that.
Otherwise, I've my eyes set on aboriginal, which seems to provide binary tarballs with nice toolchains for lazy people :)
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 22, 2012, 10:20:12 AM
If the upload goes well, you will find first beta image on my homepage.
Check README for usage.

Notes:

Very few kernel modules and binaries, hopefully not needed during boot, missing.
I redirected verbose tc-config output to /var/log/tc-config: it would be useful if Core people checked that to assess about thinks going well.

tce-load et others do not work due to absence of builtin getopts.
Redirecting to busybox getopt does not work, however changing #!/bin/sh to #!/bin/ash should do it, if I included the right busybox.

Sorry, I am not totally sure of statement above, since busybox versioning is a mess, as is u-boot one: indeed I probably included the wrong version in previous releases, so yes, Robert's failure to boot was probably my fault.
This time I checked the upladed version myself, should work.
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on August 23, 2012, 10:29:04 AM
First let me say thanks for your interest, contribution, and progress in getting Core on A10.

Your latest build boots fine too. However I have some concerns about the direction this is going.
Obviously bterm is the trick to get Core on A10 without it, as the other distros have done, is to have full X.

Your approach is to have already packaged up Core (initramfs) which makes it more difficult to be open development.
My approach, as I have stated was to have an open rootfs, then later package it up. It eliminates extra steps during development cycles. I know of the packaging technique, as documented on j1nx's site.  But not of unpacking such. If you do please share.

Do you have the source and makefiles for the binaries that you are distributing or are you basing this on say the linaro builds?

I am most interested in the source and makefile for bterm

Also it would be great if our target is the same. So if you have sources then perhaps hosting them here will make for a more open devlopment environment.

Otherwise I can only test your packaged core while continuing in parallel development.
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 23, 2012, 03:25:33 PM
First let me say thanks for your interest, contribution, and progress in getting Core on A10.

I'm doing that because I want my hardware to run the software I like.
Sheer utility apart, hence, I'm doing that to celebrate how good what you and Core team created is: thanks for that, folks!

Your latest build boots fine too. However I have some concerns about the direction this is going.
Obviously bterm is the trick to get Core on A10 without it, as the other distros have done, is to have full X.
If you mean that a possible bterm crash could make the machine unreachable, I am a bit concerned about that, too.
We're relying on some obscure piece of code as the only means of video output.
However, it is a tiny piece of code, while any X server is much bigger, and hence much more likely to crash.
The good news is that it never crashed here, and even under some trivial crash tests (e.g. killing it while reading /dev/ptmx) it behaved itself.
By the way, any ideas for meaner tests on bterm are welcome.
Of course, I would prefer fbcon support in mainline kernel, even only to be a bit more confident about stability.

Your approach is to have already packaged up Core (initramfs) which makes it more difficult to be open development.
My approach, as I have stated was to have an open rootfs, then later package it up. It eliminates extra steps during development cycles.
At first stages, I used standard rootfs (no initramfs). Later, with some stability achieved, I stuck with initramfs; the main reason is that I want to stay as close as possible to original core.gz x86 initramfs.
Indeed, I preliminarily repackaged your core.gz in nine separate rootfs: binaries, scripts, symlinks, and so on, which is probably not much scriptable (but may desirable for its own sake).
Then I overlaid selected binaries and patches to some of those split rootfs and repackaged, which is quite quick and scriptable.
A second reason is that there is an annoying difference between working with and without initramfs: in the latter former case /dev must be pre-populated, I don't know why exactly.
So I had to avoid switching between the two modes, and stuck with initramfs.

I know of the packaging technique, as documented on j1nx's site.  But not of unpacking such. If you do please share.
Sure: the only constructive difference between uCore and core.gz is the final mkimage pass, which merely prepends a 64-byte header for u-boot purposes (I think this has to do with u-boot having to deal with a filesystem without having an OS running).
Bottom line: doing something like
Code: [Select]
tail -c +65 uCore | gunzip | sudo cpio -idshould give the rootfs in pwd.

Do you have the source and makefiles for the binaries that you are distributing or are you basing this on say the linaro builds?

I am most interested in the source and makefile for bterm

This is a patchwork. busybox binary is the one distributed on its homepage, with a second version coming from aboriginal for some applets (notably sh).
bterm binary comes from debian.
I managed to build it on x86 (with both manual patches and debian's diff, which I don't like, however), but I have to set up some toolchain before having and TESTING it on ARM.
Alternatively, I could free a mmc and setup some ready-made Allwinner Debian to straight compile it.
The rest is either from debian or compiled on ARM Debian some weeks ago, before I needed the mmc for other uses.

Also it would be great if our target is the same. So if you have sources then perhaps hosting them here will make for a more open devlopment environment.

Otherwise I can only test your packaged core while continuing in parallel development.
I would strongly prefer an open and collaborative work, and would gladly provide any source code.
As from above, the sources are all there, the problem is that in many cases I'm using the corresponding binaries compiled by someone else (i.e., Debian maintainers), and that I did that manually, without tidy scripting as you did in your picore.
In the future, I could set up Debian on my tablet, and reproduce the binaries by myself, if you think this would be preferable. In a second moment, I could do the same from ARM Micro Core by using some toolchain.

For the time being, I can supply:
or whatever you deem worth it.
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on August 23, 2012, 03:47:29 PM
Thanks, I figured out how to get into Ucore by using dd.

I did notice that your busybox is not compiled from our config as some applets are missing and other are configured differently, e.g.,tar.

I usually start with natively comping our busybox, e.g. as on the raspberry pi, as it is the center piece of Core then start from there.

Today I have setup a headless Arm development machine for compiles. Now that I am able to get to the roofs I can better look around and hopefully start adding some missing pieces.

Sorry, If I sounded like I was complaining about bterm. That is a great find!

I suppose we can hold off hosting until compile from sources becomes available or unless your resources (serfver) becomes to taxed.

Allwinner is a challenging platform and you have done an awesome job!



Title: Re: Towards Microcore on Allwinner A10
Post by: curaga on August 23, 2012, 04:04:24 PM
So, anybody hacking on the Allwinner fbcon currently? I haven't seen anything about that recently on the arm-netbook list.
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 23, 2012, 04:40:49 PM
Today I have setup a headless Arm development machine for compiles. Now that I am able to get to the roofs I can better look around and hopefully start adding some missing pieces.
Is your headless running Debian or what? Just curious.

Sorry, If I sounded like I was complaining about bterm. That is a great find!
You can be sure you didn't sound like that.

I suppose we can hold off hosting until compile from sources becomes available or unless your resources (serfver) becomes to taxed.
That's ok.

Allwinner is a challenging platform and you have done an awesome job!
Thanks!
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 23, 2012, 04:42:46 PM
So, anybody hacking on the Allwinner fbcon currently? I haven't seen anything about that recently on the arm-netbook list.

I'm afraid nothing's happening on that front.
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on August 23, 2012, 08:37:18 PM
My headless is running a linaro ubuntu precise server via cnxsoft.

Success! I have now scripted unpacking and repack of uCore and it still boots!   ;D
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 24, 2012, 12:10:23 AM

Success! I have now scripted unpacking and repack of uCore and it still boots!   ;D

You mean that you repacked it substituting your own-compiled busybox?
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on August 24, 2012, 10:38:33 AM

Success! I have now scripted unpacking and repack of uCore and it still boots!   ;D

You mean that you repacked it substituting your own-compiled busybox?

Yes!

Looking at other issues now. Finding many broken links.
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 24, 2012, 08:27:56 PM

Success! I have now scripted unpacking and repack of uCore and it still boots!   ;D

You mean that you repacked it substituting your own-compiled busybox?

Yes!

Looking at other issues now. Finding many broken links.

Yes, there are some, especially among libraries.
Now that you have a good busybox, you can set back shebang in tce-load to
Code: [Select]
#!/bin/sh.
Furthermore, could you check if
Code: [Select]
mkswap /dev/zram0 works?
Cause for me it fails with something like `image too small', and I fear issues with kernel compilation.
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 25, 2012, 01:20:05 AM
Here I take public notes about another issue stemming from the problematic diversity among ARM hardware: hard-float (armhf) versus emulation (armel) EABI.

Since even RPi has hardfloat, and given the gain, it would be better to make sure everything is built as hardfloat right from the start.
I think this is already the case with the userspace binaries in my images (I have no idea about the kernel, but this should be a minor problem, see here: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=71&t=15221 (http://www.raspberrypi.org/phpBB3/viewtopic.php?f=71&t=15221) and here: http://www.linuxsmiths.com/blog/?p=253 (http://www.linuxsmiths.com/blog/?p=253)).
To test that, I downloaded the same app from Debian armel and armhf repositories, and tried to run both: armel one couldn't start, armhf could.
Is there a better way?
Robert, do you know which species is the RPi image build with your picore-kit?
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on August 25, 2012, 11:19:18 AM
caminati, what is the code that you used to create the final  img  file.
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.
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on August 25, 2012, 11:40:35 AM
picore-kit is currently Debian arm soft float. Reason, it was easy to use Qemu to begin testing. The qemu-extra.tcz currently in the repository was used. This version of qemu does not support hard float. In fact, qemu-extra.tcz could use an update!

But the concept of the kit should be easy to extend with Raspbian with the caveat of those arm-linux-gnueabihf directories. Since I see no progress here, I will revisit as time permits.

I agree with observation of the current state of arm development. I was choosing the kit method so as to have a complete environment from which to start. Being kernel, modules, and libraries compatible with a released and supported system is nice for prototyping as Core only needs few binaries.

Then there is the decision going forward should extensions be made so as to be compatible between rpi and a10 systems, lowest common denominator? It is still early and I feel we are still prototyping both rpi and a10. We have a ways to go.
Title: Re: Towards Microcore on Allwinner A10
Post by: curaga on August 25, 2012, 12: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?
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on August 25, 2012, 12: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?
Title: Re: Towards Microcore on Allwinner A10
Post by: curaga on August 25, 2012, 01: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 ;)
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 25, 2012, 02: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.
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 25, 2012, 02: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.
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on August 25, 2012, 02: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.
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 25, 2012, 02: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.
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on August 25, 2012, 03: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
Title: Re: Towards Microcore on Allwinner A10
Post by: karlmw on August 25, 2012, 07: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  :-)
Title: Re: Towards Microcore on Allwinner A10
Post by: suzuke on August 25, 2012, 08: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.
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 26, 2012, 12: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.

Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 26, 2012, 12: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?
Title: Re: Towards Microcore on Allwinner A10
Post by: suzuke on August 26, 2012, 07: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 ?
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 27, 2012, 12: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?
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on August 27, 2012, 06: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

Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on August 27, 2012, 06:51:49 AM
No, I did not see that you posted another cut. I will post another update with the missing zram.
Title: Re: Towards Microcore on Allwinner A10
Post by: suzuke on August 27, 2012, 07:16:08 AM
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?

Sorry for my bad depiction.
The situation is the backlight turns on, but it seems not to open the terminal.
I think the kernel is loaded correctly, but the bterm doesn't.
Does the font file's permission really have any effect on it?
I had used your font file with different permissions for simple quickly tests, and it seems not to have any effect.
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 27, 2012, 07:20:17 AM
Sorry for my bad depiction.
The situation is the backlight turns on, but it seems not to open the terminal.
I think the kernel is loaded correctly, but the bterm doesn't.
Does the font file's permission really have any effect on it?
I had used your font file with different permissions for simple quickly tests, and it seems not to have any effect.

Permissions was just a blind guess.
Maybe bterm doesn't like your particular fonts.
You could try it on another machine, like an X11-running ARM or X86, and see what happens.
I'm afraid nothing else's coming to my mind for the moment.
Title: Re: Towards Microcore on Allwinner A10
Post by: Rich on August 27, 2012, 07:21:23 AM
Hi suzuke
I would think you need read permissions set correctly in order to load the font.
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 27, 2012, 07:29:18 AM
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

It seems your dd worked fine.
However, I was just saying that, theoretically, it's possible, though unlikely, that dd-ing just 8Mb you lose some data, because one can't reasonably know where fat algorithm actually stores the files.
For example, if for whatever reason your mmc partition becomes fragmented, some piece of some file could end in that final 1Mb of the partition that you left out.
That's why I suggested dd-ing x+1 Mbytes, where x is the size of the whole partition, rather than only the used portion of it.
So in this case, I think the best thing is to dd 9Mbytes, or 9Mbytes + 1 sector, even better :)
Should I have misunderstood what you said, please ignore my whole rant.
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 27, 2012, 07:32:42 AM
No, I did not see that you posted another cut. I will post another update with the missing zram.

Gosh, I thought you posted in this thread about it booting fine (I'm referring to A10MicroCoreBeta0.1.tar.bz2).
Maybe I just lost count of the various version, it's been an hectic (and fruitful!) timeline.
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on August 27, 2012, 07:40:14 AM
I thought that is what I used. Yes, hectic. I am spread thin and trying to keep track of a of a bunch of sdcards.
Looking on the positive side, much progress with more to come.
Title: Re: Towards Microcore on Allwinner A10
Post by: suzuke on August 27, 2012, 07:42:04 AM
Permissions was just a blind guess.
Maybe bterm doesn't like your particular fonts.
You could try it on another machine, like an X11-running ARM or X86, and see what happens.
I'm afraid nothing else's coming to my mind for the moment.

I tried to use your fonts on my X86_64 machine with bterm and it got stuck.
(sudo bterm -f ocra-12.bogl )
The permissions of  ocra-12.bogl is :
-r--r--r--  1 root root  12384  8月 27 09:06 ocra-12.bogl
And I used my own fonts it works correctly.
-r--r--r--  1 root root 285908  8月 27 21:55 FreeMono.bogl
I also change the permissions of my font to:
----------  1 root root 285908  8月 27 21:55 FreeMono.bogl
It also works.
Due to this test, I think the permissions doesn't have any effect.
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 27, 2012, 07:50:21 AM
Permissions was just a blind guess.
Maybe bterm doesn't like your particular fonts.
You could try it on another machine, like an X11-running ARM or X86, and see what happens.
I'm afraid nothing else's coming to my mind for the moment.

I tried to use your fonts on my X86_64 machine with bterm and it got stuck.
(sudo bterm -f ocra-12.bogl )
The permissions of  ocra-12.bogl is :
-r--r--r--  1 root root  12384  8月 27 09:06 ocra-12.bogl
And I used my own fonts it works correctly.
-r--r--r--  1 root root 285908  8月 27 21:55 FreeMono.bogl
I also change the permissions of my font to:
----------  1 root root 285908  8月 27 21:55 FreeMono.bogl
It also works.
Due to this test, I think the permissions doesn't have any effect.

Uhm, I don't know.
I think I used latest version of bterm (it's from some year ago, so no ambiguity) available on packages.debian.org, and I think you have the same.
Another test you can do is booting with standard ocra (Robert's latest image, for example), then copy your bogl file to /usr/share/fonts, and the launch another instance of bterm, like bterm -f /usr/share/fonts FreeMono.bogl, without symlinking.
So you could see what would happen.
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on August 27, 2012, 03:36:39 PM
Another cut, for testing purposes only, now posted see:  http://distro.ibiblio.org/tinycorelinux/4.x/arm/armv7
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 27, 2012, 04:30:41 PM
Another cut, for testing purposes only, now posted see:  http://distro.ibiblio.org/tinycorelinux/4.x/arm/armv7

Just booted fine for me.
It looks quite complete, now!
I finally removed the two debugs added by me to tc-config:
Code: [Select]
SHOWAPPS=1and
Code: [Select]
# while [ ! -e /dev/rtc0 ]; do usleep 50000; doneAnd it still worked: this should be the original tc-config file working.
The (hopefully) only remaining problem is the error given by mkswap /dev/zram0, which was also in my release.
I found it can be solved by a preliminar
Code: [Select]
echo 33554432 > /sys/block/zram0/disksize.

Now I wonder why it's not needed in x86 Core?! Maybe there was a default size of /dev/zram0 in 3.0.21 which is no longer in 3.0.39?
Anyway, some reasonable value for /sys/block/zram0/disksize should be probably devised to be set by tc-config script.
Here http://pclosmag.com/html/Issues/201107/page12.html (http://pclosmag.com/html/Issues/201107/page12.html) 25% of free memory is suggested.


Title: Re: Towards Microcore on Allwinner A10
Post by: curaga on August 28, 2012, 02:44:36 AM
There was a bug in zram in 3.0 at least, we have a patch for it. It's also fixed in upstream, but I'm not sure which versions have the fix.

(The docs state that lacking the disksize echo, it defaults to 25% of RAM. This didn't work in 3.0)
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 28, 2012, 08:28:01 AM
Robert, I think your busybox has dns-related issues.
I have /etc/resolv.conf, and no dhcp server running.
I can't ping neither wget nor traceroute any server name, only IPs.
On the other hand, using another busybox, I can.
Could be a bug in more recent busybox, or the build configuration or who knows what.
Anyone can reproduce this?
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on August 28, 2012, 12:59:04 PM
What version of busybox and would need its config file.
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 28, 2012, 01:36:24 PM
What version of busybox and would need its config file.

The problematic busybox is the one included in
http://distro.ibiblio.org/tinycorelinux/4.x/arm/armv7/a10Core-20120827.img.gz (http://distro.ibiblio.org/tinycorelinux/4.x/arm/armv7/a10Core-20120827.img.gz)

I wonder if you used http://distro.ibiblio.org/tinycorelinux/4.x/x86/release/src/busybox-1.19.2-config (http://distro.ibiblio.org/tinycorelinux/4.x/x86/release/src/busybox-1.19.2-config) to build it.

The working one is this:
http://www.busybox.net/downloads/binaries/1.17.2/busybox-armv6l (http://www.busybox.net/downloads/binaries/1.17.2/busybox-armv6l)
Not sure about whether I could get the corresponding config file.
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on August 28, 2012, 02:05:58 PM
Actually I used busybox-1.20.1-config. Which I see Brian has not yet posted.

Curious that you used 1.17 ? Are you suggesting later ones from the same site have the same issue?
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 28, 2012, 02:28:20 PM
Actually I used busybox-1.20.1-config. Which I see Brian has not yet posted.

Curious that you used 1.17 ? Are you suggesting later ones from the same site have the same issue?

No, probably I have 1.17 around because more recent ones have standalone shell enable. Not sure why, I tried so many lately. However, also
http://www.busybox.net/downloads/binaries/1.19.0/busybox-armv6l (http://www.busybox.net/downloads/binaries/1.19.0/busybox-armv6l)
pings names fine, so no dns problem with it.
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on August 29, 2012, 09:22:20 AM
I see the issue. Actually corrected it on Raspbian, next I will focus back on A10.
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on August 30, 2012, 02:19:11 PM
Another cut now posted with net applets now resolving names.
 http://distro.ibiblio.org/tinycorelinux/4.x/arm/armv7
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 30, 2012, 02:33:16 PM
Another cut now posted with net applets now resolving names.
 http://distro.ibiblio.org/tinycorelinux/4.x/arm/armv7

Thank you. What was the problem?
I'm a bit disappointed that for some weeks I won't have time to contribute further to this effort.
I'm glad it's coming up nice, anyway!
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on August 30, 2012, 05:40:36 PM
The issue is that many distributions have enhanced/deviated from standard unix. Many have IMHO bloated up everywhere. So each platform I had tried their resolver infrastructure was preventing the network applets from working. Finally, I decided to setup a cross-compiler so that I could use Tiny Core. Success!
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 30, 2012, 11:33:37 PM
The issue is that many distributions have enhanced/deviated from standard unix. Many have IMHO bloated up everywhere. So each platform I had tried their resolver infrastructure was preventing the network applets from working. Finally, I decided to setup a cross-compiler so that I could use Tiny Core. Success!

Yes, I think we should use directly TinyCore even for compiling as soon as possible: as I said, I started that mainly to be able to use it, so why not for building, too?
I tcz-ed the binary toolchain from aboriginal, and it looks I can compile successfully on Core on Allwinner. My first attempts were towards compiling compilers and LIBCs anew, to make more modular toolchain.
I only built tcc so far, but it seems like you can't bootstrap a LIBC (neither klib, nor uclibc, nor musl) without the whole beast of gcc :(
Title: Re: Towards Microcore on Allwinner A10
Post by: caminati on August 31, 2012, 12:38:27 AM
Good news: on https://github.com/amery/linux-allwinner (https://github.com/amery/linux-allwinner) there is some promise from last commit:

Quote
video: sun5i-disp: Initial fbcon support. …
based on Jari Helaakoski's 3ca6f75 for sun4i.
commit 59b89c9e95
amery authored 20 hours ago

Haven't tried that yet.
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on September 05, 2012, 11:26:32 PM
Now posted a10Core-20120905.img.gz. This image has been updated to reflect Core's 4.6.1 base.
http://distro.ibiblio.org/tinycorelinux/4.x/arm/armv7
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on September 06, 2012, 10:00:12 AM
The image for Allwinner A10 currently supports the Mele family of arm computers using HDMI at 720p.
However, as Marco pointed out it works equally well on his Allwinner tablet with, for now, a connected usb keyboard.

To help the effort and try your Allwinner device you will need to copy the file named script.bin from your device. This file resides on nanda a vfat filesystem not easily accessible. I am sure you could use ADB to fetch it, but I prefer the standard Unix approach. Most Allwinner devices come already rooted.

How to get script.bin from your Allwinner device via ssh:
1. Install dropbear for Android, free in the Play Store and configure it.
2. Start dropbear SSH server on your Android Allwinner device.
3. From your x86 Core ssh root@ip number as displayed from dropbear Android server
4. mkdir /mnt/test
5. mount -t vfat /dev/block/nanda /mnt/test
6. ls -l /mnt/test              (look for script.bin)
7. Open another xterm on Core.
8. scp root@ip as displayed from dropbear Android server:/mnt/test/script.bin .
9. exit your ssh session.
10. Stop dropbear ssh server app on Android.

Now copy your script.bin to the sdcard containing the a10Core image that you downloaded.
Try booting your Allwinner device from your updated sdcard.

If it works please post here and state your device specific.

I would be interested to know if it works on A13 devices.
Perhaps I will host many script.bin file listed by specifc target name,

Or if you already have a script.bin working with a10Core please post.
Title: Re: Towards Microcore on Allwinner A10
Post by: karlmw on September 06, 2012, 12:12:40 PM
Tested successfully on 512MB mini-x  :-)
Booted from sdcard written with a10Core-20120905.img.gz
Mounted /mnt/nanda and /mnt/mmcblk0
Copied /mnt/nanda/script.bin to /mnt/mmcblk0
Rebooted - everything fine. 

Results in dmesg have improved:
Now there are no WEMAC errors since it knows not to bother.
A message about "[AXP]axp driver uning configuration failed(1579)" has gone as well.

EDIT: For completeness, I should add that the mini-x is using HDMI output, via a cable adapter to a DVI monitor.
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on September 10, 2012, 12:13:35 PM
Thanks!

I have posted mini-x_512MB_original_script.bin to http://distro.ibiblio.org/tinycorelinux/4.x/arm/armv7/
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on September 10, 2012, 12:22:10 PM
I am woking on a refresh of the base libraries. I want to align with Debain Wheezy
so that a tool that I have been working on for raspbianCore
(see: http://forum.tinycorelinux.net/index.php/topic,13982.msg78620.html#msg78620).
Will also work for a10Core.

The result will hopefully be easy access to gain tcz extensions with very little effort,
while maintaining Core's philosophy of pristine boot, onboot and ondemand features.
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on September 11, 2012, 01:27:46 PM
Kernel source and defconfig files now posted. I have downloaded and rebuilt kernel to verify.
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on September 11, 2012, 01:29:47 PM
I have posted both mele scripts bin, one for HDMI and one for VGA.
http://distro.ibiblio.org/tinycorelinux/4.x/arm/armv7/
Title: Re: Towards Microcore on Allwinner A10
Post by: karlmw on September 11, 2012, 03:04:50 PM
Did you build the kernel using TinyCore?  (I mean building inside the x86 version of TinyCore)

I have a TinyCore VM (running under qemu) which I use for building x86 TinyCore packages, and find that it is the easiest way for me to maintain a stable environment to compile in regardless of changes on my main machine.  Qemu (running on windows) hosting the TinyCore VM works well for this because it's a completely portable setup that I can backup or make copies of and it still works just fine.

I'd like to be able to use a TinyCore VM to build modules for the mini-x - I really need to build a wifi module (8192cu) so that the mini-x can be useful for something (no RJ45 ethernet on the mini-x - only wifi).

Do you have any tips for the build environment?  I've only ever compiled one kernel module (many years ago) but I seem to recall that for compiling the modules you need exactly the same compile environment as the kernel had.    Thanks  :-)
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on September 11, 2012, 03:50:59 PM
Yes. I use Tiny Core to do everything!
I am using Code Sourcery as my cross compiler.
I have built both rpi and a10 kernels using only Tiny Core and Code Sourcery.

You will need the following tcz extensions loaded:
bash.tcz
util-linux.tcz
perl5.tcz
ncurses.tcz

1. Download Code Sourcery
http://www.codesourcery.com/sgpp/lite/arm/portal/package/7851/public/arm-none-linux-gnueabi/arm-2010.09-50-arm-none-linux-gnueabi-i686-pc-iinux-gnu.tar.bz2

2, Untar it on a persistent device, e.g., /mnt/sdb1
    It will create a directory called arm-2010.09

3. mkdir -p /mnt/sdb1/mele/modules  and cd /mnt/sdb1/mele
Download the kernel and defconfig from our armv7 directory and untar and bunzip the defconfig
This will create an amery-linux-allwinner-21eeb80 directory, cd into it.

4. cp ../mbc_defconfig arch/arm/configs

5. Setup exports for cross compile
    export PATH="$PATH":/mnt/sdb1/arm-2010.09/bin
    export ARCH=arm
    export CROSS_COMPILE=/mnt/sdb1/arm-2010.09/bin/arm-none-linux-gnueabi-

6. make mbc_defconfig

7. make menuconfig

8. make uImage && make modules

9. make modules_install INSTALL_MOD_PATH=/mnt/sdb1/mele/modules

Your modules will be in /mnt/sdb1/mele/modules
The kernel is in arch/arm/boot

HTH
Title: Re: Towards Microcore on Allwinner A10
Post by: karlmw on September 11, 2012, 05:27:24 PM
Thanks for the detailed instructions. 
Unfortunately, the codecourcery link does not work for me ("The page you requested does not exist.")

It appears that codesourcery are now only offering 30-day evaluation copies.
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on September 11, 2012, 06:05:41 PM
Try this:
http://www.codesourcery.com/sgpp/lite/arm/portal/package7853/public/arm-none-linux-gnueabi/arm-2010.09-50-arm-none-linux-gnueabi.bin

It appears to be self-extracting offering the same version.
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on September 11, 2012, 06:10:59 PM
Another option is to build natively on mini-x. Use one of the full linux distros mount a pendrive, place download files and directories on pendrive and hopelly perhaps overnight it will complete the compile!
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on September 11, 2012, 06:28:37 PM
Karl, I will post my modules directory. If all you want is 8192 its in there!
Wait while I upload if.

....

Done: Look for allwinner-sunxi-v3.0.39-modules.tgz in the armv7 directory.
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on September 13, 2012, 11:24:13 AM
New cut posted. Fixed some links and added missing library.
http://distro.ibiblio.org/tinycorelinux/4.x/arm/armv7/
Now passes the links.tcz test. I can browser on allwinner a10 with links.tcz
Title: Re: Towards Microcore on Allwinner A10
Post by: karlmw on September 13, 2012, 06:13:45 PM
Thanks for the modules!

Using brute force and quite a lot of ignorance, I was able to get wifi working last night.  I used the 8192cu module you provided, with wireless-tools and wpa_supplicant from Debian Wheezy armhf.

Over the next week I will try to get SSH working, along with documenting what I've done (last night was a quick hack job to see if it would work at all).  Being able to connect remotely will make the mini-x enormously easier for me to play with.  My goal is to setup mpd (Music Player Daemon) to replace my existing HP t5710 (which is running mpd on tinycore).

Is there a working mechanism for persistency, yet?  All I need is something to run a script at boot time.  If there is no existing method, I'll have a go at a simple remaster and add some code to bootlocal.sh to find and call my own script (which will then get wifi/ssh going).

Is your links.tcz posted anywhere?  I did not see it in the tcz directory where you have posted the a10core images.
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on September 13, 2012, 09:38:23 PM
In order to begin testing functionality I need at least one extension with some dependencies.
A kind of chicken versus egg situation. To that end I began to extend a tool, deb2tcz to automate the creation of complex extensions.
I posted about it in the raspberrypi section.
Quote
Knowing that it is a huge task of compiling and building extensions,
I have purposely made raspbianCore library compatible with Raspbian.

To that end I have been working on and testing dynamically creating
tczs directly from Raspbian repositories. If this is successful then
it will greatly lessen the need to build/compile hundreds of extensions.
So far initial tests look promising, example: Links browser and its dependencies.
Auto created by entering only links.

My goal is to easily and transparently gain access to some of the 40,000 debs
which the user can select. They, of course, become tczs and thus gain
the Core advantage of pristine boot, onboot, and ondemand features.
Our ibibio arm tcz repository might then only need to host custom extensions not
available in the Raspbian repositories.

So I would hold off building extensions until I accomplish a first
milestone of this tool. Then evaluate its performance and capabilities.

Of course, I am not going to abandon the community built extensions.
The support code for such will remain intact.
The new tool will be just another option. Another tool that the user may or may not
elect to use.

So links.tcz and links.tcz.dep were auto-generated. I am hoping that wireless-tools and
wpa-supplicant will also be as easy. Although I don't think that my program will be a
panacea. It will hopefully be a sometimes useful option.

As for persistence, at the moment I am using a pendrive. It is recognized and is easily available via
the standard mount /mnt/sda1. You can backup and restore from it, you can tce-setdrive it.
You can tce-load -i links and it will use the link /etc/sysconfig/tcedir. All that seems to be working.

However, I have not yet looked into how to specify boot commands. I believe it will be in boot.scr
boot.src is another allwinner "compiled" file. Therefore another obstacle to overcome. We need to
be able to specify a waitusb command inorder to test onboot functionality.

Trying to do both allwinner and raspberrypi in parallel is also quite trying as their boot methods are
quiet different. Albeit quite interesting.
Title: Re: Towards Microcore on Allwinner A10
Post by: karlmw on September 13, 2012, 11:32:47 PM
Making use of existing repositories sounds like a fine idea to me, whether it provides only a stepping stone or becomes a preferred method of installing extensions.  While we have the option of building our own, being able to use existing packages enriches our options.

Is the links.tcz you have used on A10 derived from the Raspbian repo or the Debian repo?  I know from my own testing that the Debian Wheezy armhf binaries work, but I was not sure if code compiled for raspberrypi was compatible with A10 or not.  It's not 100% clear to me whether your quote from the raspberrypi section was merely illustrative of the concept, or specific of the detail.

Given the inconvenience of editing/compiling boot.scr, my thoughts on persistency (in the absence of something better) tend toward being able to specify a script (on the boot drive) which will provide additional boot scripting. 
eg.  my first hack (for my own testing) will be to remaster an a10core image with a bootsync.sh which searches for a flashdrive with a specified label, mounts it, searches it for a script with a specified name (probably just bootsync.sh in the flashdrive root to start with) and passes control to it.  I'd probably also get bootlocal.sh to look for a bootlocal.sh on the flashdrive.

This approach will give me enough to play with so I can have the mini-x boot and get itself online without me needing keyboard/monitor.
 
In practice, I'm probably not going to search for a flashdrive - I'll probably just mount mmcblk0 (the micro-sd card) and look for a bootsync.sh there.  Should be quick/easy/reliable.  In the long term, I'd like kernel commandline options to specify additional bootsync/bootlocal files - that way boot.scr only needs to be edited once, and thereafter it's easy to fiddle with a text file instead.

My other thought is for options which would normally be passed on the kernel commandline.  I wonder if instead it would be possible to pass a kernel commandline option which specified a file to parse for extra options as if tinycore had received them on the kernel commandline.  The file spec could be much like the spec for current x86 TinyCore persistency,

eg. options=LABEL=MyFlashDriveLabel/path/to/file/with/boot_options.txt
   which would look for the specified file on a device labelled as MyFlashDriveLabel

or options=BOOT=/path/to/file/with/boot_options.txt
   which would look on the device we booted from rather than specifying by label (I don't know if the kernel knows what its boot device was, though)

I don't know if this is practical or not, or even useful - they're just some things I was thinking about.  There's probably a simpler way to do it - eg. just edit boot.scr, compile it, and stop wasting time dreaming up complexities  :-)
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on September 14, 2012, 03:35:14 AM
Karl, The script that I have started is generic. Porint it at a Debian repository,i.e., your closest mirror, as would be the case with a Debian install. So no, not Raspbian specific. links.tcz + dependency tczs are from Debain Wheezy armv7h. Like I said I have not yet had a chance to consider boot.scr possibilities yet. Much to do, but progress is certainly happening. At the moment my script is 3/4 done, some parts I am still doing manually, but the concepts are all there. I will post it as soon as I reach first milestone. Both A10 and Raspberry Pi will benefit, in fact, any other port of Core to any other Arm device, which Debian has already been ported should benefit as well. Keep posting about your progress as well.
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on September 15, 2012, 08:43:51 PM
Given the fact that these Allwinner devices currently boot from a know source, I have automated the update of the boot codes.

Presently we have the typical showbootcodes command. I now have an updbootcodes command which based on the environment variable EDITOR allows easy editing of extra boot commands. We trust users to be able to edit grub/menu.lst, syslinux.conf, etc. So too, I have transparently scripted the unpacking of boot.scr dumping the contents into an editor and upon exit of editor, dynamically compile a new boot.scr. Update occurs only  if no detectable errors. Then reboot to effect.

So now...

I am using a pendrive for my backup and extensions. It is recognized and is easily available via
the standard mount /mnt/sda1. You can backup and restore from it, you can tce-setdrive it.
You can tce-load -i links and it will use the link /etc/sysconfig/tcedir. All that seems to be working.

And now you can easily specify the usual boot commands by using the updbootcodes program e.g., waitusb=5:LABEL=melepen tce=LABEL=melepen tz=PST+8PDT,M3.2.0/2,M11.1.0/2
 
onboot works as expected and automatic restore work as expected!

I will do some more testing and then post an updated image with this new updbootcodes command.

Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on September 17, 2012, 03:26:12 PM
Now posted 20120917 image. See: http://distro.ibiblio.org/tinycorelinux/4.x/armv7/

This has the new updbootcodes.
This allows easy editing of the systems's boot codes file to add Core specific boot codes.
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on September 20, 2012, 08:42:44 PM
Now posted 20120920 image. See: http://distro.ibiblio.org/tinycorelinux/4.x/armv7/
Fixed more library issues.
Title: Re: Towards Microcore on Allwinner A10
Post by: karlmw on September 21, 2012, 05:04:31 AM
I'm running the 20120920 image on my mini-x.
I've added the kernel modules posted on ibiblio, along with some bodgy scripting and a bunch of Debian Wheezy armhf packages.
So, now I can ssh into the mini-x via wifi - a great success  :-)
Title: Re: Towards Microcore on Allwinner A10
Post by: karlmw on September 21, 2012, 07:27:48 PM
Here are some notes on how I setup wifi and ssh using PK authentication: http://mowson.org/karl/mini-x/a10Core-20120920/ (http://mowson.org/karl/mini-x/a10Core-20120920/)
The approach is crude and unlikely to be of long-term use to anybody, but it's enough to be able to access the mini-x over wifi, and that makes it a whole lot easier to play with.
I haven't setup sftp yet.
Despite the crudeness of the script (extracting all the deb packages at every boot), it takes about 22s from connecting power to being pingable over wifi.
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on September 24, 2012, 07:58:14 AM
Karl, Thanks for sharing. As time permits, I am making progress on the "import" program to easily access Debian Repositories directly from Tiny Core x86, and A10 devices. Then auto generate full tcz extensions with dependencies. I now have another test suite, wireless and wpa, via your blog post.
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on September 24, 2012, 08:02:18 AM
Another cut 20120923 now posted:
 http://distro.ibiblio.org/tinycorelinux/4.x/arm/armv7

This will set time via getTtime.sh when nortc is specified and net access is available.
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on September 26, 2012, 10:51:38 PM
Karl, Thanks for sharing. As time permits, I am making progress on the "import" program to easily access Debian Repositories directly from Tiny Core x86, and A10 devices. Then auto generate full tcz extensions with dependencies. I now have another test suite, wireless and wpa, via your blog post.
More progress to report.
I have been able to easily import wireless-tools and wpasupplicant to get wifi working with the auto generated tczs + deps.
This is all done without running any debian distro and without storing any .deb files. I have been able to import running Core x86 as well a10Core and rpiCore.  I have also be able to use the wifi.tcz to scan, select, and connect. The concept is proving to be a viable additional tool.
Title: Re: Towards Microcore on Allwinner A10
Post by: suzuke on September 26, 2012, 11:26:50 PM
More progress to report.
I have been able to easily import wireless-tools and wpasupplicant to get wifi working with the auto generated tczs + deps.
This is all done without running any debian distro and without storing any .deb files. I have been able to import running Core x86 as well a10Core and rpiCore.  I have also be able to use the wifi.tcz to scan, select, and connect. The concept is proving to be a viable additional tool.

Great, so I can stop converting the deb to tcz .
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on September 28, 2012, 01:53:55 PM
Posted an update: a10Core-20120928.img.gz
This brings the image up to 4.6.2 base and also changes provides from cgi to zsync'ed local database.
Title: Re: Towards Microcore on Allwinner A10
Post by: karlmw on October 01, 2012, 02:06:53 AM
Thanks to Robert's clear notes - http://forum.tinycorelinux.net/index.php/topic,13827.90.html (http://forum.tinycorelinux.net/index.php/topic,13827.90.html) - I have successfully built extra modules for my mini-x, despite committing a newbie mistake on my first attempt.  I tried to build modules without building the kernel first (ie. I didn't follow the instructions), assuming that the makefile would take care of any dependencies.  I was mistaken - it appears that successful module building depends on some files which are created during the kernel build process.  Attempting to load one of my bad modules gives this error:
        modprobe: can't load module fuse (kernel/fs/fuse/fuse.ko): invalid module format

with this in dmesg:
        fuse: no symbol version for module_layout

I was using the fuse module for testing because it was one I already had a good copy of, so could confirm that the good one could be loaded OK.  Now that I have built a kernel, everything is fine - my modules work with the existing a10core kernel.

I did the build in an x86 TinyCore VM (running inside qemu on windows).  Needed to load two more tcz's which weren't mentioned in the notes (but were pretty obvious from the errors) - compiletc and ncurses-dev.  There's also a missing dependency for a "mkimage" command - this just means I didn't get the final kernel file out of it all.  That's OK for now - I didn't want my own kernel.  I imagine that grabbing mkimage from Debian would work.

Unfortunately for me, my module building has not been immediately productive - I have got my USB-serial adapter working, but it seems that the adapter doesn't work with my onewire interface anyway. 

On an unrelated note, I'm now using sftp-server from the Debian Wheezy openssh package to handle sftp with dropbear.  So, now I can ssh into the mini-x, and use sftp as well.  I was getting tired of having to shuffle a flashdrive back and forth between machines.
Title: Re: Towards Microcore on Allwinner A10
Post by: poshat on December 18, 2012, 07:44:55 AM
Karl, I will post my modules directory. If all you want is 8192 its in there!
Wait while I upload if.

....

Done: Look for allwinner-sunxi-v3.0.39-modules.tgz in the armv7 directory.

How correct add this modules to flash card?

Now I'm using Army only with command line, because system can't tune wifi device without modules.
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on December 18, 2012, 02:56:38 PM
I have posted 8192cu.tcz for wireless support typically found in Allwinner devices. Find it in the armv7 repository.

Also posted in the armv7 repo is wifi.sh. However, you will need to import wireless-tools and if needed wpa-supplicant. Both were found to be very easy imports.

Later, I will produce a README for wireless, when demands of my time lessen, or anyone else volunteers.
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on December 18, 2012, 02:58:44 PM
Just for kicks, I have moved my tce directory onto the internal nand drive.
I found much free spaces on nandd.
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on December 18, 2012, 03:01:21 PM
I have compiled, posted, and currently using rsync and dropbearmulti extensions.
Now available in the armv7 report.
Title: Squeezelite Microcore on Allwinner A10
Post by: bricolodu13 on July 10, 2013, 06:04:58 AM
Hello,

Sorry I'm newbbie but trying to learn  :D

First I succeeded in making squeezelite runing on USB Card on Roman's headless Debian server.
Now, I'm trying to do the same on Tinycore.
Up to now I have Tinycore and Dropbear running, Alsa-utils, Flac, Limad, Libvorbis,  installed and most probably running.
Alsamixer shows The HDMI but not USB soundcard, Kernel must probably be moded (how to) ?
Squeezelite-armv6hf (that is running fine on Roman's Headless Debian) is not running on TinyCore, no idea why ?

Any thought ?

Best regards,
Jean
Title: Re: Towards Microcore on Allwinner A10
Post by: athouston on July 18, 2013, 09:41:30 PM
Hi @Roberts,

Have you seen this site..http://elinux.org/Hack_A10_devices.. it details loading linux internally rather than on the external sd card. It also seems a pretty good outline of the whole A10 boot process.

I wouldn't be surprised if you have but ... just in case.

Cheers.
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on July 19, 2013, 11:26:23 AM
I have seen LiveSuit. But since it is a Windows program and I do not have, nor desire Windows, I am unable to comment on its function with regard to Core.

Most of the A10 devices that I have enabled Core, have been borrowed with the promise that I would not wipe out Android. So I have not ventured there. I do know, that it is quite easy, to specify one of the larger nand partitions for use as your tce directory. Doing so, will not harm Android and provides a slightly faster sce loading.

My main A10 device, mele, supports SATA, so my sces loads from that.
Title: Re: Towards Microcore on Allwinner A10
Post by: athouston on July 19, 2013, 03:47:14 PM
OK, that answers my unasked SATA question. None of the sticks have SATA connections.

I have a running TCL on the MK802 and therefore I have access to the internal sd card partitions. Hence some of my questions.

If you would like a device as a development toy to get this working on a quad core stick, as per other discussions, just say the word and I will get one to you. Once you have a TCL on the the external sd card I thought it would be simple to copy the internal card out to a file and therefore not care about the Android. I have the livesuite program so that would not matter anyway.
Title: Re: Towards Microcore on Allwinner A10
Post by: roberts on July 19, 2013, 04:37:48 PM
I have no loyalty to the Allwinner devices. I sent you a PM regarding the GK802.
Title: Re: Towards Microcore on Allwinner A10
Post by: mocore on July 21, 2013, 01:42:51 AM
I have seen LiveSuit. But since it is a Windows program and I do not have, nor desire Windows, I am unable to comment on its function with regard to Core.


i found this
http://linux-sunxi.org/LiveSuit_images#Linux
and that
https://github.com/matson-hall/allwinner-pack-tools/blob/ics-cubieboard/tools/Livesuit-linux.zip

it seems to work under Debian based distro's
so i think maybe it can work with dcore or even core 
but i have not yet tried !