VIA APC: UART, ARM Toolchain, Kernel & U-Boot

August 15th, 2012 No comments

So you snagged one of those new boards.  Cool.

If you’re like me you’re going to want to hack the heck out of it.  In my case I want to use it for a project I’m working on and don’t really want to run Android on it.   I’m going to go for redsleeve Linux since everything else in the project is build on CentOS/RHEL.  To get started with hacking the board I downloaded the pre-build software that is available at APC.IO’s Library Section for a reference, and source files they’ve uploaded to github.  Since we’re building for an ARM platform on an Intel x86_64 (in my case) platform, we’ll also need to locate or build an ARM toolchain.

I’ve split up each section into their own posts since this page was getting a bit long:

These posts are being actively update as I explore the board, please be aware the information is being provided without any warranty.



August 17th, 2012 No comments

Just a little information about the on board NAND memory on the stock APC:

[root@BTLocal sbin]# ./mtdinfo
Count of MTD devices:           17
Present MTD devices:            mtd0, mtd1, mtd2, mtd3, mtd4, mtd5, mtd6, mtd7, mtd8, mtd9, mtd10, mtd11, mtd12, mtd13, mtd14, mtd15, mtd16
Sysfs interface supported:      yes

[root@BTLocal mnt]# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00d00000 00010000 "filesystem-SF"
mtd1: 00280000 00010000 "kernel-SF"
mtd2: 00050000 00010000 "u-boot-SF"
mtd3: 00010000 00010000 "u-boot env. cfg. 1-SF"
mtd4: 00010000 00010000 "u-boot env. cfg. 2-SF"
mtd5: 00010000 00010000 "w-load-SF"
mtd6: 00100000 00100000 "w-load-NAND"
mtd7: 00900000 00100000 "u-boot env. cfg. 1-NAND"
mtd8: 00900000 00100000 "u-boot-NAND"
mtd9: 00800000 00100000 "kernel-NAND"
mtd10: 00600000 00100000 "initrd-NAND"
mtd11: 10000000 00100000 "filesystem-NAND"
mtd12: 00200000 00100000 "u-boot-logo"
mtd13: 00400000 00100000 "kernel-logo"
mtd14: 40000000 00100000 "android-data"
mtd15: 08000000 00100000 "android-cache"
mtd16: 25900000 00100000 "LocalDisk"

Read more…

Categories: APC, ARM, Redsleeve Linux Tags:

VIA APC: Building the Kernel

August 17th, 2012 No comments

[This post is being actively updated so some parts may be incomplete]

Lets first take a look at the current kernel before hopping into trying to make a new one.  If you’ve downloaded the pre-build packages from the APC site and extracted it, the current kernel image is called uzImages.bin, if you’ve already compiled u-boot you can see a little more information on it by running the ‘mkimage -l’ command:

[rar@ares apc-firmware-v1.0]$ ../apc-io-apc-8750-2740910/u-boot/tools/mkimage -l uzImage.bin
Image Name:   Linux-
Created:      Wed Mar 14 05:32:38 2012
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    2969192 Bytes = 2899.60 kB = 2.83 MB
Load Address: 0x00008000
Entry Point:  0x00008000

Things to take note here are the Load Address and Entry Point fields, they’re required for making a vmlinuz file into a uImage file and as far as I can tell they’re device specific.

[more coming soon]

Categories: APC, ARM Tags: , , , , ,

VIA APC: Redsleeve Linux Install

August 17th, 2012 No comments

[This post is being actively updated so some parts may be incomplete]

I was able to boot the stock APC kernel and U-Boot with the redsleeve rootfs on an SD card.  To do so you need to:

  • Create a partition on the SD card in some linux readable format (I used ext3)
  • Extract the redsleeve rootfs on the card (striping the first layer of the contents of the tar ball)
  • Extract the kernel_modules_WM8710.120130.1629.tgz (found in the binary apc firmware download) over the rootfs
  • Modify /etc/fstab to make /dev/mmcblk0p1 your root partition and comment out the /dev/sda1 /boot partition.  Also, change the root partition type to be whatever you made it in step one.
  • Add /etc/init/ttyS0.conf with the following contents:
start on stopped rc RUNLEVEL=[2345]
stop on starting runlevel [016]


pre-start exec /sbin/securetty ttyS0
exec /sbin/agetty -L /dev/ttyS0 115200 vt102

Read more…

VIA APC: Building and Exploring Das U-Boot

August 17th, 2012 No comments

[This post is being actively updated so some parts may be incomplete]

I don’t know what the developers working on APC are thinking, but the u-boot code on github does not compile out of the box – and it’s not just a difference in environments – there are actually coding issues.  My guess is that’s not the latest version or at least not the version they shipped and they haven’t taken the time to update it on github.   Also note that they didn’t just “add on a board” as described in the README that comes with the boot loader, they went and hacked up the actual boot loader code.  On top of all this, it’s a very old version of u-boot and enough changes have been made that it’s not exactly a “copy over and hope for the best” type of situation.

Building U-Boot

All the whining aside, the errors that need to be addressed are:

  • In u-boot/board/wmt/wmt.c, you’ll need to add a dummy method called ‘nand_init’, otherwise you’ll get linker complaints:

void nand_init(void) {}

Read more…

Categories: APC, ARM, u-boot Tags: , , , , , ,