WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Running TinyCore on Cortex-A9?  (Read 12919 times)

Offline sihorton

  • Jr. Member
  • **
  • Posts: 58
Running TinyCore on Cortex-A9?
« on: February 13, 2013, 07:05:36 PM »
I have just found out about the ODROID-U2 which has a quad core ARM Cortex-A9 processor (Samsung Exynos Prime i.e. same as in galaxy S3). http://www.hardkernel.com/renewal_2011/products/prdt_info.php. They ship with android on it but that is a little restrictive for my purposes.

I am happy with a microcore environment running standard server stuff (e.g. nodejs / apache / nginx / firewall /ssh / sqlite). I could use wired network and just console / ssh so no need for 3D graphics or audio support or even a desktop. I see there is an Arm V7 and Arm V6 port and don't know exactly how that would relate to an A9 processor. Odroid have instructions on building a linux kernel (http://dev.odroid.com/projects/linux) and have ubuntu running on it as well.

My question is would this be a many months project to get tinycore and some modules working or is it relatively simple? I guess my worry would be that there could be driver issues with the networking hardware or something like that stopping any practical use of the kit until it is fixed and I don't really have much knowledge of things at that level of the OS.

With this kind of hardware and tinycore combined I can run an optimised web application together with database entirely in memory which offers incredible performance and reliability in a micro package so the kit becomes very attractive.

/Simon

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Running TinyCore on Cortex-A9?
« Reply #1 on: February 14, 2013, 03:30:11 AM »
The binaries will run, you "just" need a kernel and a bootloader for your board.
The only barriers that can stop you are the ones you create yourself.

Offline sihorton

  • Jr. Member
  • **
  • Posts: 58
Re: Running TinyCore on Cortex-A9?
« Reply #2 on: February 14, 2013, 04:17:56 AM »
Great thanks for the help. Since they can supply a bootable sd-card with ubuntu on it I can just add the tinycore files to the sdcard and then modify the startup to boot into tinycore so I can get going quickly. They also detail how to build the kernel yourself on a ubuntu machine and then flash it to the sdcard.

This could be a fun project!

Offline pioj

  • Jr. Member
  • **
  • Posts: 76
Re: Running TinyCore on Cortex-A9?
« Reply #3 on: May 10, 2013, 09:01:19 AM »
Any news about the test? Did you succeded? I have a arm7 Cubox (armada510c) so I'd may apply the same method to the device and this platform too.

Offline sihorton

  • Jr. Member
  • **
  • Posts: 58
Re: Running TinyCore on Cortex-A9?
« Reply #4 on: May 13, 2013, 03:19:40 AM »
I have the device now, had to wait a month for it to arrive from china! Unfortunately I have been very busy on another project so have not had much time to play around. I have managed to build a kernel and minimal system with busy box using buildroot and a cross compiler. From what I hear from other ports the tricky thing is to get u-boot to boot the board with the initial root file system containing tinycore -- rather than switching root to a filesystem as most linux distros do. I have not yet attempted to do that part yet and will need help to get it working.

Tinycore seems ideal for all of these arm boards that are being released so if we document the porting process then hopefully it can get easier to do.

/Simon

Offline pioj

  • Jr. Member
  • **
  • Posts: 76
Re: Running TinyCore on Cortex-A9?
« Reply #5 on: May 13, 2013, 05:14:08 AM »
Sorry I don't understand the process at all...

Quote
... the tricky thing is to get u-boot to boot the board with the initial root file system containing tinycore -- rather than switching root to a filesystem as most linux distros do.

Isn't this supposed to be as 'easy' as tell u-boot what kernel and initrd to load, then let core.gz scripts to do the magic? Aren't they in charge of providing the way to load the system?


As an example, my device is supposed to boot it this way:
Code: [Select]
set bootargs 'console=ttyS0,115200n8 vmalloc=384M \
              video=dovefb:lcd0:1280x720-32@60-edid'
ext2load mmc 0:1 0x2000000 /uImage
ext2load mmc 0:1 0x4000000 /uInitrd
bootm 0x2000000 0x4000000
from: http://www.solid-run.com/mw/index.php/Initial_RAM_Disk

Offline sihorton

  • Jr. Member
  • **
  • Posts: 58
Re: Running TinyCore on Cortex-A9?
« Reply #6 on: May 13, 2013, 05:18:19 AM »
I am in no way an expert in this.

However distributions like ubuntu start up and load an initial root file system into memory, that contains enough to get started, then they switch the root filesystem to the disk and then boot the operating system from there.

Tinycore is different in that the initial root file system that is loaded directly into memory is the OS. It will then scan the disks and load extensions and startup the display manager etc. I remember reading that Roberts said that playing around with uboot to get it to load this initial root file system was a little tricky and was different for each board.

However I might be making mountains out of molehills, since I have not tried yet I do not know how tricky this step will be.

/Simon

Offline sihorton

  • Jr. Member
  • **
  • Posts: 58
Re: Running TinyCore on Cortex-A9?
« Reply #7 on: May 13, 2013, 05:24:26 AM »
Here is roberts reply to the question "Re: Porting between ARM platforms... How is it made?":
http://forum.tinycorelinux.net/index.php/topic,15126.msg86882.html#msg86882

Quote
Having access to a working Debian/Ubuntu system is not too much of an advantage for Core.
Now for most typical traditional distros it is a huge advantage as one would only need to identify and recompile their binaries and swap in their rootfs. Use existing boot loader. Done. That is why shortly after Ubuntu was made available for Mele, you saw several distros become available.

Core is not traditional, it's rootfs is the initrd, so even existing Arm boot loaders need to be studied to accomodate our initrd rootfs.  Since the major work has already been done to create a minimal Core Arm based initrd, I would start with say the a10Core and try to see what adjustments would need to be made for your particular boot loader and hopefully pick a platform that supports Arm v7hf, else be prepared to identify and compile the binaries within a10Core.

/Simon

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Running TinyCore on Cortex-A9?
« Reply #8 on: May 13, 2013, 10:05:12 AM »
If you have access to u-boot for your board then it could be very easy. I would start by using the a10Core image as it uses u-boot. My remarks are based on Allwinner, sunxi. Their git repository has a board specific section. I have compiled such for the boards and provided them here http://tinycorelinux.net/4.x/armv7/hardware/


10+ Years Contributing to Linux Open Source Projects.

Offline sihorton

  • Jr. Member
  • **
  • Posts: 58
Re: Running TinyCore on Cortex-A9?
« Reply #9 on: May 13, 2013, 10:33:50 AM »
Yes I have access to uboot and can compile it together with a kernel and then use build root to create a busybox system.

So if I understand correctly hopefully I can take the a10Core and then copy its initial root filesystem (I think its called uImage) and replace my busybox initial filesystem with it and hope that it starts up.

/Simon

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Running TinyCore on Cortex-A9?
« Reply #10 on: May 13, 2013, 12:13:39 PM »
Try it. Note that I do not have any modules in the rootfs, uCore. All modules are inline. So there should be no reason to unpack the initrd just to change out the modules.
10+ Years Contributing to Linux Open Source Projects.

Offline sihorton

  • Jr. Member
  • **
  • Posts: 58
Re: Running TinyCore on Cortex-A9?
« Reply #11 on: May 13, 2013, 12:18:45 PM »
I'll give it a go, it may take a while as I have a deadline for a project coming up soon so am really busy, but it will be fun to see how far I can get.

/Simon