WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How to port piCore to other ARM boards  (Read 9572 times)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
How to port piCore to other ARM boards
« on: January 07, 2015, 03:43:38 AM »
There is an increasing number of ARM single board computers, like BeagleBone Black, Banana Pi, Odroid just to mention the most populars. Unfortunately we have access to a limited set only to port Tiny Core. The good point is that it is relatively easy to start TC, in most cases without any compilation only remixing existing components. This article explains how to do that. This procedure was used to get a BeagleBone Black version up and running in less than 3 hours, including dowload of Debian Image.

We are porting piCore, the Raspberry Pi version of TC to the target ARM board. piCore is built for ARMv6 architecture. Thanks to the good backward compatibily of ARM processor, binaries run on more advanced CPU's like ARMv7-A Cortex A8 used in BeagleBone Black and others, no need to rebuild them.

You need also a working Linux distro to have a kernel, kernel modules and a boot environment to use by our system.

Linux kernel

Core base is formed of two files, one of them is the kernel. It is board specific. We are trying to use an existing kernel from another Linux distro if possible. Requirements:
  • loopback block device (module or built-in)
  • squashfs file system (module or built-in)
It is a must have to be able to use tcz extensions.

zram support is optional, but it is good to have. However Core will work without it.

initrd

The other file is the initrd file which holds the system itself and kernel modules matching selected kernel.
  • unpack piCore initrd in a temp directory
  • replace modules in /lib/modules directory with modules of new kernel; add all modules to initrd, we do not know which can be omitted and we do not have board specific module extensions in the repo yet
  • update directory name in /usr/local/lib/modules to match kernel version
  • update kernel.tclocal symlink in /lib/modules/<kernel version>
  • edit tty device name in /usr/sbin/startserialtty to get serial terminal working
  • edit version number in /usr/share/doc/tc/release.txt (keep 6.0 and do not add new line to the end
  • pack initrd and copy to the boot directory

Booting

This is the most difficult part. What is common, most boards are using U-Boot built for the specific board. Study how the other Linux system is booted. Configuration is in uEnv.txt Look for initrd_file= line and modify according to your inird file name. Next find where setenv bootargs configured (kernel boot parameters) and add nortc if no RTC and nozswap if kernel do not support zram.

It can take same time and several iterations to get it working, be prepared.

Repository

There is an armv7 repository with a copy of the armv6 (Raspberry Pi) tcz's. They are working fine. This repo can be used as long as the target system is identified as an armv7 architecture. If it is different, let us know.

« Last Edit: January 07, 2015, 03:59:51 AM by bmarkus »
Béla
Ham Radio callsign: HA5DI

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