Apc8750: Difference between revisions

From SlackWiki
Jump to navigation Jump to search
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Installing Slackware on APC-8750 ==


== Trial Edition ==
[[Image:http://apc.io/media/apc/img/apc-products-8750.jpg|APC 8750]]<br />[http://apc.io/media/apc/img/apc-angle.jpg Another photograph of APC 8750]


[https://sourceforge.net/p/slackwareonapc8750 Project Area]


== Installing Slackware on apc-8750 ==
[http://sourceforge.net/p/slackwareonapc8750/wiki/Home/ wiki @ sourceforge] Check this for latest updates
 
[http://sourceforge.net/p/slackwareonapc8750/code/ helper scripts] / [https://github.com/gv1/apc8750 helper scripts] 
 
Mainline Linux kernel lacks support for [http://www.wondermedia.com.tw/en/products/platform/soc/wm8750/ Wondermedia WM 8750] currently. However [https://github.com/linux-wmt/linux-vtwm linux-vtwm-testing] kernel available at github has support for Wondermedia 8750 SOC. Since the kernel failed to load initrd cpio archive the normal way, a special method was used for loading the Slackware setup image. ( Installer Kernel booting from embedded initramfs image creates a filesystem on ramdisk, extracts Slackware setup initrd image and chroots to the filesystem on ramdisk ). Briefly, the steps followed in installing Slackware on APC 8750 are :
 
# '''Installing Slackware.'''
## Prepare boot media: Create three partitions, first bootable vfat, second reiserfs and third Linux swap.
## Copy installer boot files: Download and copy uzImage.bin and initrd-kirkwood.cpio to first vfat partition.
## Download and copy Slackware installation files over to second partition.
## Boot from the micro sd card prepared, install, and configure Slackware.
# '''Making new installtion bootable.'''
## Download and replace the installer kernel with new uzImage.bin for booting from second partition.
## Reboot.
 
=== Creating a bootable micro sd card for installation ===


== Creating a bootable micro sd card ==
For this you need a custom built kernel and a initramfs image from Slackware for arm distribution - [http://ftp.arm.slackware.com/slackwarearm/slackwarearm-14.1/isolinux/uinitrd-kirkwood.img uinitrd-kirkwood.img].
 
 
For this you need a custom built kernel and a initramfs image from slackware for arm distribution - uinitrd-kirkwood.img
* [http://sourceforge.net/projects/slackwareonapc8750/files/install/vga/uzImage.bin/download uzImage.bin] for console on VGA monitor.<br />If this kernel is chosen boot messages will appear on VGA monitor. or
* [http://sourceforge.net/projects/slackwareonapc8750/files/install/ttyWMT0/uzImage.bin/download uzImage.bin] for console on serial port.<br />If this kernel is chosen boot messages will appear on the serial port.
* [http://sourceforge.net/projects/slackwareonapc8750/files/initrd-kirkwood.cpio.gz/download initrd-kirkwood.cpio.gz] initramfs cpio archive.<br />Download and gunzip this image file.
* Download [http://arm.slackware.com/getslack/ Slackware 14.1 for arm].<br />If you prefer, you may download this to micro sd card directly, under slackware14.1 directory.


=== Preparing the micro sd card ===
Download and keep these ready.


==== Preparing the micro sd card. ====


You need at least three partitions, one vfat, one or more Linux partitions, and a Linux swap partition. Here is how the partitions I used look like under fdisk ran on host.
You need at least three partitions, one vfat, one or more Linux partitions, and a Linux swap partition for this method of installation. Here is how the partitions I used look like under fdisk ran on host.


<pre>
<pre>
Line 29: Line 50:
</pre>
</pre>


Creating filesystem:
==== Creating filesystems. ====
 
* 1st partition - make it bootable, and create a file system using mkfs.vfat
* 2nd partition - create a reiserfs file system using mkreiserfs ( or other tools for other types )
 
==== Copying Slackware install files onto second partition. ====
 
Create a slackware14.1 directory in the reiserfs partition of the micro sd card. Copy Slackware for arm distribution to the slackware14.1 directory, from http://arm.slackware.com/getslack/. Once the preparation is over,
 
<pre>sdc1:
    /uzImage.bin 
    /initrd-kirkwood.cpio
 
sdc2:
    /slackware14.1/</pre>
==== Booting with the installer and installing Slackware. ====
 
Now you are ready to boot from the new disk just prepared, and install Slackware from the pre mounted directory under /mnt/slackware14.1/slackware ( which is automounted as the selection for target is done ). Put the newly prepared micro sd card in the slot and reboot APC-8750. Once you get the Slackware login prompt, proceed for installation as usual.
 
==== Configuration ====
 
For X Windows, use a lightweight window manager like Fluxbox.
 
=== Post installation preparation. ===
 
After the installation is done, you need to replace the kernel uzImage.bin with a new one, this time with no initramfs_data.cpio.gz, and CONFIG_CMDLINE= changed for booting from partition 2:
 
<pre>CONFIG_CMDLINE=&quot; mem=460M root=/dev/mmcblk0p2 rootwait nonitrd ro console=tty0&quot;
CONFIG_CMDLINE_FORCE=y</pre>
For this, download one of
 
* [http://sourceforge.net/projects/slackwareonapc8750/files/boot/vga/uzImage.bin/download uzImage.bin] for console on VGA. Or
* [http://sourceforge.net/projects/slackwareonapc8750/files/boot/ttyWMT0/uzImage.bin/download uzImage.bin] for console on serial port.
 
and copy over to the first partition ( bootable vfat one ).
 
Once Slackware is installed, and the new uzImage.bin is copied over,
 
<pre>sdc1:
    /uzImage.bin
    /initrd-kirkwood.cpio  =&gt; not required anymore
 
sdc2:
    /bin
    /boot
    /cdrom
    /dev/
    /etc/
    /home/
    /proc/
    /slackware14.1  =&gt; not required anymore
    /usr/
    /var/</pre>
You may remove files which are not required anymore, and free up some space. Once that is done, reboot APC-8750 to get Slackware up and running.


* 1st partition: make it bootable, and create a file system using mkfs.vfat
=== Information on building kernel and other images. ===
* 2nd partition: create a reiserfs ( or other ) file system using mkreiserfs


Now you need to make a custom kernel for booting into. I used linux-vtwm-testing
Please also refer to [http://sourceforge.net/projects/slackwareonapc8750/files/build.sh/download build.sh] script used to help the build procedure.
available at https://github.com/linux-wmt/linux-vtwm
 
Please refer to the link: for the config file which was used.
==== Detailed description of how Slackware install kernel was prepared. ====
also require a small initramfs image prepared from the boot media aviable at apc.io library. download it from here : initramfs_data.cpio.gz or
 
use the following init scrip with the initrd.gz from apc.io library.
===== Getting the Kernel source code. =====
 
I used [https://github.com/linux-wmt/linux-vtwm linux-vtwm-testing]. Zipfile you download from the site may cause problem when extracting on Linux. In my case couple of files were missing. One option is to use p7zip or other unzip program instead of the default zip utility in Slackware. You may also get a tar.gz file using:
 
<pre>wget --no-check-certificate \
    https://github.com/linux-wmt/linux-vtwm/archive/testing.tar.gz</pre>
Please refer to the link [http://sourceforge.net/projects/slackwareonapc8750/files/configs/config.slackinst.vga/download config.slackinst.vga] or [http://sourceforge.net/projects/slackwareonapc8750/files/configs/config.slackinst.ttyWMT0/download config.slackinst.ttyWMT0] for the config file which was used.
 
===== Details of how initramfs_data.cpio.gz was prepared. =====
 
This method also require a small initramfs image prepared from the boot media available at [http://apc.io/library/ apc.io library]. Download it from here [http://sourceforge.net/projects/slackwareonapc8750/files/initramfs_data.cpio.gz/download initramfs_data.cpio.gz]<br />or<br />Use the following init scrip with a stripped down version of initrd.gz in [http://apc.io/media/apc/library/8750/apc-firmware-v1.0.2.zip apc-firmware-v1.0.2] from [http://apc.io/library/ apc.io library].


init:
init:
<pre>
        #!/bin/busybox sh
        /bin/busybox mount -t proc /proc
        /bin/busybox mount -t sys /sys
        /bin/busybox echo /sbin/mdev > /proc/sys/kernel/hotplug
        /bin/busybox mdev -s
        /bin/busybox --install
        mkfs.ext2 /dev/ram0
        mkdir /root
        mount /dev/ram0 /root
        cd /root
        mkdir /flash
        mount /dev/mmcblk0p1 /flash
        cpio -id < /flash/initrd-kirkwood.cpio
        exec chroot /root /bin/busybox init
        exec /bin/busybox init
</pre>


Copy the initramfs_data.cpio.gz for to $KERNEL_SRC/usr area.
<pre>#!/bin/busybox sh
In case you are building it on your own:
/bin/busybox mount -t proc /proc
<pre>
/bin/busybox mount -t sys /sys
gunzip initrd.gz
/bin/busybox echo /sbin/mdev &gt; /proc/sys/kernel/hotplug
mkdir initramfs_dat
/bin/busybox mdev -s
mountpoint initramfs_data || mount -o loop initrd fs
/bin/busybox --install
create initramfs_data/init as shown above
mkfs.ext2 /dev/ram0
mkdir /root
mount /dev/ram0 /root
cd /root
mkdir /flash
mount /dev/mmcblk0p1 /flash   
cpio -id &lt; /flash/initrd-kirkwood.cpio
umount /flash
exec chroot /root /bin/busybox init
exec /bin/busybox init</pre>
Commands to build initramfs_data.cpio.gz:
 
<pre>gunzip initrd.gz
mkdir initramfs_data
mount -o loop initrd initramfs_data
# create initramfs_data/init as shown above
sh build.sh init
chmod a+x initramfs_data/init
chmod a+x initramfs_data/init
sync
sync
(cd initramfs_data ; find . | cpio -o -H newc | gzip  > ../initramfs_data.cpio.gz )
(cd initramfs_data ; find . | cpio -o -H newc | gzip  &gt; ../initramfs_data.cpio.gz )</pre>
</pre>
Copy [http://sourceforge.net/projects/slackwareonapc8750/files/initramfs_data.cpio.gz/download initramfs_data.cpio.gz] cpio archive to $KERNEL_SRC/usr area.
 
Please note that the kernel uses a CONFIG_CMDLINE= for VGA:


Please note that the kernel uses a CONFIG_CMDLINE=
<pre>CONFIG_CMDLINE=&quot; mem=440M console=tty0 mbtotal=52M&quot;
for vga:
CONFIG_CMDLINE_FORCE=y</pre>
* CONFIG_CMDLINE=" mem=440M console=tty0 mbtotal=52M"
for serial:
for serial:
* CONFIG_CMDLINE=" mem=440M console=ttyWMT0,115200n8 mbtotal=52M"
kernel is compiled on the host, using arm-2014.05 from arm.


Eg:
<pre>CONFIG_CMDLINE=&quot; mem=440M console=ttyWMT0,115200n8 mbtotal=52M&quot;
<pre>
CONFIG_CMDLINE_FORCE=y</pre>
export OBJ=/src/apc.io/obj.testing
kernel is compiled on the host, using a cross compiler [http://www.elinux.org/ARMCompilers Sourcery CodeBench Lite 2014.05-28] for [http://www.arm.com/ arm]. For mkimage tool refer to [http://github.com/apc-io/apc-8750 Kernel and Bootloader] link at apc-io page at github.
 
===== kernel build procedure: =====
 
<pre>export OBJ=/src/apc.io/obj.testing
export KERNEL_SRC=/src/apc.io/linux-vtwm-testing
export KERNEL_SRC=/src/apc.io/linux-vtwm-testing
export PATH=~/apc.io/apc-8750-master/u-boot/tools:$PATH
export PATH=~/apc.io/apc-8750-master/u-boot/tools:$PATH
Line 90: Line 175:
mv $OBJ/arch/arm/boot/zImage $1/$2/ ;
mv $OBJ/arch/arm/boot/zImage $1/$2/ ;
make -C $KERNEL_SRC O=$OBJ ARCH=arm CROSS_COMPILE=arm-none-eabi- dtbs
make -C $KERNEL_SRC O=$OBJ ARCH=arm CROSS_COMPILE=arm-none-eabi- dtbs
cat $1/$2/zImage $OBJ/arch/arm/boot/dts/wm8750-apc8750.dtb > $1/$2/zImage_w_dtb
cat $1/$2/zImage $OBJ/arch/arm/boot/dts/wm8750-apc8750.dtb &gt; $1/$2/zImage_w_dtb
mkimage -A arm -O linux -T kernel -C none -a 0x8000 \
mkimage -A arm -O linux -T kernel -C none -a 0x8000 \
    -e 0x8000 -n "My Linux" -d $1/$2/zImage_w_dtb $1/$2/uzImage.bin
      -e 0x8000 -n &quot;My Linux&quot; -d $1/$2/zImage_w_dtb $1/$2/uzImage.bin</pre>
===== Preparing the cpio archive: =====


</pre>
<pre>wget -c http://ftp.arm.slackware.com/slackwarearm/slackwarearm-14.1/isolinux/uinitrd-kirkwood.img 
Preparing the cpio archive:
dd if=./uinitrd-kirkwood.img bs=64 skip=1 of=initrd-kirkwood.cpio.gz
<pre>
gunzip initrd-kirkwood.cpio.gz </pre>
        dd if=./uinitrd-kirkwood.img bs=64 skip=1 of=initrd-kirkwood.cpio.gz
==== Procedure used for preparing the Slackware boot kernel. ====
        gunzip initrd-kirkwood.cpio.gz
</pre>
Once both uzImage.bin and initrd-kirkwood.cpio copy them to the bootable vfat partition.  


Create a slackware14.1 directory in the reiserfs partition of the micro sd card.
Please refer to the link [http://sourceforge.net/projects/slackwareonapc8750/files/configs/config.slackboot.vga/download config.slackboot.vga] or [http://sourceforge.net/projects/slackwareonapc8750/files/configs/config.slackboot.ttyWMT0/download config.slackboot.ttyWMT0] for the config file which was used. Download and copy this file as .config in $OBJ area before starting the build
Copy slackware for arm distribution to the slackware14.1 directory. Now you
are ready to boot the new disk, and install slackware from the pre mounted directory
under /mnt/slackware14.1/slackware ( which is automounted as the selection for target is done ).


=== Configuration ===
===== Kernel build procedure: =====


For X Windows, use a window manager like fluxbox.
<pre>export OBJ=/src/apc.io/obj.testing
export KERNEL_SRC=/src/apc.io/linux-vtwm-testing
export PATH=~/apc.io/apc-8750-master/u-boot/tools:$PATH
export PATH=/opt/local/arm/arm-2014.05/bin:$PATH
cp config.slackboot.vga $OBJ/.config
rm $KERNEL_SRC/usr/initramfs_data.cpio.g


== links ==
make -C $KERNEL_SRC O=$OBJ ARCH=arm CROSS_COMPILE=arm-none-eabi- zImage -j 3
mv $OBJ/arch/arm/boot/zImage $1/$2/ ;
make -C $KERNEL_SRC O=$OBJ ARCH=arm CROSS_COMPILE=arm-none-eabi- dtbs
cat $1/$2/zImage $OBJ/arch/arm/boot/dts/wm8750-apc8750.dtb &gt; $1/$2/zImage_w_dtb
mkimage -A arm -O linux -T kernel -C none -a 0x8000 \
  -e 0x8000 -n &quot;My Linux&quot; -d $1/$2/zImage_w_dtb $1/$2/uzImage.bin</pre>
=== Additional info ===
From Slackware-14.1 boot messages:


http://apc.io/products/8750a/
<pre>Linux version 3.13.0-rc8 (ahoh@tampa) (gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite 2014.05-28) ) #23 Mon Aug 4 07 :40:48 IST 2014
Kernel command line:  mem=460M root=/dev/mmcblk0p2 rootwait nonitrd ro console=tty0</pre>


http://apc.io/library/
From original boot messages on ttyS0:


https://github.com/linux-wmt/linux-vtwm
<pre>Linux version 2.6.32.9-default (root@Ryan-VM-Ubuntu) (gcc version 4.5.2 (Sourcery G++ Lite 2011.03-41) ) #1 Wed Dec 5 19:29:52 CST 2012
Kernel command line: mem=460M root=/dev/mtdblock11 noinitrd rootfstype=yaffs2 rw console=ttyS0,115200n8 mbtotal=52M init=/init
CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387f
...
Memory: 460MB = 460MB total
Memory: 460288KB available (5188K code, 1069K data, 136K init, 0K highmem)
...
Creating 6 MTD partitions on &quot;mtdsf device&quot;:
0x000000000000-0x000000d00000 : &quot;filesystem-SF&quot;
0x000000d00000-0x000000f80000 : &quot;kernel-SF&quot;
0x000000f80000-0x000000fd0000 : &quot;u-boot-SF&quot;
0x000000fd0000-0x000000fe0000 : &quot;u-boot env. cfg. 1-SF&quot;
0x000000fe0000-0x000000ff0000 : &quot;u-boot env. cfg. 2-SF&quot;
0x000000ff0000-0x000001000000 : &quot;w-load-SF&quot;
wmt sf controller initial ok


http://arm.slackware.com/getslack/
...


http://ftp.arm.slackware.com/slackwarearm/
NAND device: Manufacturer ID: 0xec, Chip ID: 0xd59476 (Samsung K9GAG08U0F)
Bad block at 16
Bad block at 17
Bad block at 89
Bad block at 613
Bad block at 880
Bad block at 1583
WMT_nand: uboot no dynamic partitions defined, use default static
Creating 11 MTD partitions on &quot;WMT.nand&quot;:
0x000000000000-0x000000100000 : &quot;w-load-NAND&quot;
0x000000100000-0x000000a00000 : &quot;u-boot env. cfg. 1-NAND&quot;
0x000000a00000-0x000001300000 : &quot;u-boot-NAND&quot;
0x000001300000-0x000001b00000 : &quot;kernel-NAND&quot;
0x000001b00000-0x000002100000 : &quot;initrd-NAND&quot;
0x000002100000-0x000012100000 : &quot;filesystem-NAND&quot;
0x000012100000-0x000012300000 : &quot;u-boot-logo&quot;
0x000012300000-0x000012700000 : &quot;kernel-logo&quot;
0x000012700000-0x000052700000 : &quot;android-data&quot;
0x000052700000-0x00005a700000 : &quot;android-cache&quot;
0x00005a700000-0x000080000000 : &quot;LocalDisk&quot;
nand initialised ok
...
VIA Networking Velocity Family Gigabit Ethernet Adapter Driver Ver. 1.14
...
eth0: VIA Networking Velocity Family Gigabit Ethernet Adapter
...
WMT_SOC: dai_name=i2s, codec_name=vt1603
WMT_SOC: single, wmt_i2s_rate=44100
...
VT1603 Audio Codec 0.10
wmt.audio.i2s = vt1603:f2:f2:f1:f1:100
...</pre>

Latest revision as of 06:33, 9 August 2014

Installing Slackware on APC-8750

APC 8750
Another photograph of APC 8750

Project Area

wiki @ sourceforge Check this for latest updates

helper scripts / helper scripts

Mainline Linux kernel lacks support for Wondermedia WM 8750 currently. However linux-vtwm-testing kernel available at github has support for Wondermedia 8750 SOC. Since the kernel failed to load initrd cpio archive the normal way, a special method was used for loading the Slackware setup image. ( Installer Kernel booting from embedded initramfs image creates a filesystem on ramdisk, extracts Slackware setup initrd image and chroots to the filesystem on ramdisk ). Briefly, the steps followed in installing Slackware on APC 8750 are :

  1. Installing Slackware.
    1. Prepare boot media: Create three partitions, first bootable vfat, second reiserfs and third Linux swap.
    2. Copy installer boot files: Download and copy uzImage.bin and initrd-kirkwood.cpio to first vfat partition.
    3. Download and copy Slackware installation files over to second partition.
    4. Boot from the micro sd card prepared, install, and configure Slackware.
  2. Making new installtion bootable.
    1. Download and replace the installer kernel with new uzImage.bin for booting from second partition.
    2. Reboot.

Creating a bootable micro sd card for installation

For this you need a custom built kernel and a initramfs image from Slackware for arm distribution - uinitrd-kirkwood.img.

  • uzImage.bin for console on VGA monitor.
    If this kernel is chosen boot messages will appear on VGA monitor. or
  • uzImage.bin for console on serial port.
    If this kernel is chosen boot messages will appear on the serial port.
  • initrd-kirkwood.cpio.gz initramfs cpio archive.
    Download and gunzip this image file.
  • Download Slackware 14.1 for arm.
    If you prefer, you may download this to micro sd card directly, under slackware14.1 directory.

Download and keep these ready.

Preparing the micro sd card.

You need at least three partitions, one vfat, one or more Linux partitions, and a Linux swap partition for this method of installation. Here is how the partitions I used look like under fdisk ran on host.

Disk /dev/sdc: 15.9 GB, 15931539456 bytes
64 heads, 32 sectors/track, 15193 cylinders, total 31116288 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *        2048      206847      102400    c  W95 FAT32 (LBA)
/dev/sdc2          206848    28878847    14336000   83  Linux
/dev/sdc3        28878848    31116287     1118720   82  Linux swap

Creating filesystems.

  • 1st partition - make it bootable, and create a file system using mkfs.vfat
  • 2nd partition - create a reiserfs file system using mkreiserfs ( or other tools for other types )

Copying Slackware install files onto second partition.

Create a slackware14.1 directory in the reiserfs partition of the micro sd card. Copy Slackware for arm distribution to the slackware14.1 directory, from http://arm.slackware.com/getslack/. Once the preparation is over,

sdc1: 
    /uzImage.bin  
    /initrd-kirkwood.cpio

sdc2:
    /slackware14.1/

Booting with the installer and installing Slackware.

Now you are ready to boot from the new disk just prepared, and install Slackware from the pre mounted directory under /mnt/slackware14.1/slackware ( which is automounted as the selection for target is done ). Put the newly prepared micro sd card in the slot and reboot APC-8750. Once you get the Slackware login prompt, proceed for installation as usual.

Configuration

For X Windows, use a lightweight window manager like Fluxbox.

Post installation preparation.

After the installation is done, you need to replace the kernel uzImage.bin with a new one, this time with no initramfs_data.cpio.gz, and CONFIG_CMDLINE= changed for booting from partition 2:

CONFIG_CMDLINE=" mem=460M root=/dev/mmcblk0p2 rootwait nonitrd ro console=tty0"
CONFIG_CMDLINE_FORCE=y

For this, download one of

and copy over to the first partition ( bootable vfat one ).

Once Slackware is installed, and the new uzImage.bin is copied over,

sdc1:
    /uzImage.bin
    /initrd-kirkwood.cpio  => not required anymore

sdc2:
    /bin
    /boot
    /cdrom
    /dev/
    /etc/
    /home/
    /proc/
    /slackware14.1  => not required anymore
    /usr/
    /var/

You may remove files which are not required anymore, and free up some space. Once that is done, reboot APC-8750 to get Slackware up and running.

Information on building kernel and other images.

Please also refer to build.sh script used to help the build procedure.

Detailed description of how Slackware install kernel was prepared.

Getting the Kernel source code.

I used linux-vtwm-testing. Zipfile you download from the site may cause problem when extracting on Linux. In my case couple of files were missing. One option is to use p7zip or other unzip program instead of the default zip utility in Slackware. You may also get a tar.gz file using:

wget --no-check-certificate \
    https://github.com/linux-wmt/linux-vtwm/archive/testing.tar.gz

Please refer to the link config.slackinst.vga or config.slackinst.ttyWMT0 for the config file which was used.

Details of how initramfs_data.cpio.gz was prepared.

This method also require a small initramfs image prepared from the boot media available at apc.io library. Download it from here initramfs_data.cpio.gz
or
Use the following init scrip with a stripped down version of initrd.gz in apc-firmware-v1.0.2 from apc.io library.

init:

#!/bin/busybox sh
/bin/busybox mount -t proc /proc
/bin/busybox mount -t sys /sys
/bin/busybox echo /sbin/mdev > /proc/sys/kernel/hotplug
/bin/busybox mdev -s
/bin/busybox --install
mkfs.ext2 /dev/ram0
mkdir /root
mount /dev/ram0 /root
cd /root
mkdir /flash
mount /dev/mmcblk0p1 /flash     
cpio -id < /flash/initrd-kirkwood.cpio
umount /flash
exec chroot /root /bin/busybox init
exec /bin/busybox init

Commands to build initramfs_data.cpio.gz:

gunzip initrd.gz
mkdir initramfs_data
mount -o loop initrd initramfs_data
# create initramfs_data/init as shown above
sh build.sh init
chmod a+x initramfs_data/init
sync
(cd initramfs_data ; find . | cpio -o -H newc | gzip  > ../initramfs_data.cpio.gz )

Copy initramfs_data.cpio.gz cpio archive to $KERNEL_SRC/usr area.

Please note that the kernel uses a CONFIG_CMDLINE= for VGA:

CONFIG_CMDLINE=" mem=440M console=tty0 mbtotal=52M"
CONFIG_CMDLINE_FORCE=y

for serial:

CONFIG_CMDLINE=" mem=440M console=ttyWMT0,115200n8 mbtotal=52M"
CONFIG_CMDLINE_FORCE=y

kernel is compiled on the host, using a cross compiler Sourcery CodeBench Lite 2014.05-28 for arm. For mkimage tool refer to Kernel and Bootloader link at apc-io page at github.

kernel build procedure:
export OBJ=/src/apc.io/obj.testing
export KERNEL_SRC=/src/apc.io/linux-vtwm-testing
export PATH=~/apc.io/apc-8750-master/u-boot/tools:$PATH
export PATH=/opt/local/arm/arm-2014.05/bin:$PATH
cp config.slackinst.vga $OBJ/.config
cp initramfs_data.cpio.gz $KERNEL_SRC/usr

make -C $KERNEL_SRC O=$OBJ ARCH=arm CROSS_COMPILE=arm-none-eabi- zImage -j 3
mv $OBJ/arch/arm/boot/zImage $1/$2/ ;
make -C $KERNEL_SRC O=$OBJ ARCH=arm CROSS_COMPILE=arm-none-eabi- dtbs
cat $1/$2/zImage $OBJ/arch/arm/boot/dts/wm8750-apc8750.dtb > $1/$2/zImage_w_dtb
mkimage -A arm -O linux -T kernel -C none -a 0x8000 \
       -e 0x8000 -n "My Linux" -d $1/$2/zImage_w_dtb $1/$2/uzImage.bin
Preparing the cpio archive:
wget -c http://ftp.arm.slackware.com/slackwarearm/slackwarearm-14.1/isolinux/uinitrd-kirkwood.img  
dd if=./uinitrd-kirkwood.img bs=64 skip=1 of=initrd-kirkwood.cpio.gz  
gunzip initrd-kirkwood.cpio.gz  

Procedure used for preparing the Slackware boot kernel.

Please refer to the link config.slackboot.vga or config.slackboot.ttyWMT0 for the config file which was used. Download and copy this file as .config in $OBJ area before starting the build

Kernel build procedure:
export OBJ=/src/apc.io/obj.testing
export KERNEL_SRC=/src/apc.io/linux-vtwm-testing
export PATH=~/apc.io/apc-8750-master/u-boot/tools:$PATH
export PATH=/opt/local/arm/arm-2014.05/bin:$PATH
cp config.slackboot.vga $OBJ/.config
rm $KERNEL_SRC/usr/initramfs_data.cpio.g

make -C $KERNEL_SRC O=$OBJ ARCH=arm CROSS_COMPILE=arm-none-eabi- zImage -j 3
mv $OBJ/arch/arm/boot/zImage $1/$2/ ;
make -C $KERNEL_SRC O=$OBJ ARCH=arm CROSS_COMPILE=arm-none-eabi- dtbs
cat $1/$2/zImage $OBJ/arch/arm/boot/dts/wm8750-apc8750.dtb > $1/$2/zImage_w_dtb
mkimage -A arm -O linux -T kernel -C none -a 0x8000 \
  -e 0x8000 -n "My Linux" -d $1/$2/zImage_w_dtb $1/$2/uzImage.bin

Additional info

From Slackware-14.1 boot messages:

Linux version 3.13.0-rc8 (ahoh@tampa) (gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite 2014.05-28) ) #23 Mon Aug 4 07 :40:48 IST 2014 
Kernel command line:  mem=460M root=/dev/mmcblk0p2 rootwait nonitrd ro console=tty0

From original boot messages on ttyS0:

Linux version 2.6.32.9-default (root@Ryan-VM-Ubuntu) (gcc version 4.5.2 (Sourcery G++ Lite 2011.03-41) ) #1 Wed Dec 5 19:29:52 CST 2012
Kernel command line: mem=460M root=/dev/mtdblock11 noinitrd rootfstype=yaffs2 rw console=ttyS0,115200n8 mbtotal=52M init=/init
CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387f
...
Memory: 460MB = 460MB total
Memory: 460288KB available (5188K code, 1069K data, 136K init, 0K highmem)
...
Creating 6 MTD partitions on "mtdsf device":
0x000000000000-0x000000d00000 : "filesystem-SF"
0x000000d00000-0x000000f80000 : "kernel-SF"
0x000000f80000-0x000000fd0000 : "u-boot-SF"
0x000000fd0000-0x000000fe0000 : "u-boot env. cfg. 1-SF"
0x000000fe0000-0x000000ff0000 : "u-boot env. cfg. 2-SF"
0x000000ff0000-0x000001000000 : "w-load-SF"
wmt sf controller initial ok

...

NAND device: Manufacturer ID: 0xec, Chip ID: 0xd59476 (Samsung K9GAG08U0F)
Bad block at 16
Bad block at 17
Bad block at 89
Bad block at 613
Bad block at 880
Bad block at 1583
WMT_nand: uboot no dynamic partitions defined, use default static
Creating 11 MTD partitions on "WMT.nand":
0x000000000000-0x000000100000 : "w-load-NAND"
0x000000100000-0x000000a00000 : "u-boot env. cfg. 1-NAND"
0x000000a00000-0x000001300000 : "u-boot-NAND"
0x000001300000-0x000001b00000 : "kernel-NAND"
0x000001b00000-0x000002100000 : "initrd-NAND"
0x000002100000-0x000012100000 : "filesystem-NAND"
0x000012100000-0x000012300000 : "u-boot-logo"
0x000012300000-0x000012700000 : "kernel-logo"
0x000012700000-0x000052700000 : "android-data"
0x000052700000-0x00005a700000 : "android-cache"
0x00005a700000-0x000080000000 : "LocalDisk"
nand initialised ok
...
VIA Networking Velocity Family Gigabit Ethernet Adapter Driver Ver. 1.14
...
eth0: VIA Networking Velocity Family Gigabit Ethernet Adapter
...
WMT_SOC: dai_name=i2s, codec_name=vt1603
WMT_SOC: single, wmt_i2s_rate=44100
...
VT1603 Audio Codec 0.10
wmt.audio.i2s = vt1603:f2:f2:f1:f1:100
...