Apc8750: Difference between revisions

From SlackWiki
Jump to navigation Jump to search
No edit summary
Line 8: Line 8:
    
    
For this you need a custom built kernel and a initramfs image from slackware for arm distribution - uinitrd-kirkwood.img
For this you need a custom built kernel and a initramfs image from slackware for arm distribution - uinitrd-kirkwood.img
            * uzImage.bin
                  [[Detailed description of how uzImage.bin was prepared.]]
            * initrd-kirkwood.cpio
                  [[Detailed description of how initrd-kirkwood.cpio was prepared.]]
Download and keep these files ready


=== Preparing the micro sd card ===
=== 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.
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.


<pre>
<pre>
Line 34: Line 41:
* 2nd partition: create a reiserfs ( or other ) file system using mkreiserfs
* 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
==== Detailed description of how uzImage.bin was prepared. ====
available at https://github.com/linux-wmt/linux-vtwm
 
Please refer to the link: for the config file which was used.
I used linux-vtwm-testing available at https://github.com/linux-wmt/linux-vtwm
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
Please refer to the link [[config.slackinstall.vga]] for the config file which was used. This method 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.
use the following init scrip with the initrd.gz from apc.io library.


Line 60: Line 67:


Copy the initramfs_data.cpio.gz for to $KERNEL_SRC/usr area.
Copy the initramfs_data.cpio.gz for to $KERNEL_SRC/usr area.
In case you are building it on your own:
 
===== Details of how initramfs_data.cpio.gz was prepared. =====
 
<pre>
<pre>
gunzip initrd.gz
gunzip initrd.gz
mkdir initramfs_dat
mkdir initramfs_data
mountpoint initramfs_data || mount -o loop initrd fs
mount -o loop initrd initramfs_data
 
create initramfs_data/init as shown above
create initramfs_data/init as shown above
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  > ../initramfs_data.cpio.gz )
</pre>
</pre>


Line 78: Line 90:
kernel is compiled on the host, using arm-2014.05 from arm.
kernel is compiled on the host, using arm-2014.05 from arm.


Eg:
kernel build procedure:
<pre>
<pre>
export OBJ=/src/apc.io/obj.testing
export OBJ=/src/apc.io/obj.testing
Line 97: Line 109:
Preparing the cpio archive:
Preparing the cpio archive:
<pre>
<pre>
        download uinitrd-kirkwood.img
         dd if=./uinitrd-kirkwood.img bs=64 skip=1 of=initrd-kirkwood.cpio.gz
         dd if=./uinitrd-kirkwood.img bs=64 skip=1 of=initrd-kirkwood.cpio.gz
         gunzip initrd-kirkwood.cpio.gz
         gunzip initrd-kirkwood.cpio.gz
</pre>
</pre>
Once both uzImage.bin and initrd-kirkwood.cpio copy them to the bootable vfat partition.
 
=== Copying slackware install files onto second partition ===


Create a slackware14.1 directory in the reiserfs partition of the micro sd card.
Create a slackware14.1 directory in the reiserfs partition of the micro sd card.
Copy slackware for arm distribution to the slackware14.1 directory. Now you  
Copy slackware for arm distribution to the slackware14.1 directory.  
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 ).
=== Booting and installing slackware ===
 
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 ===
=== Configuration ===

Revision as of 17:05, 3 August 2014

Trial Edition

Installing Slackware on apc-8750

Creating a bootable micro sd card

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

            * uzImage.bin
                  Detailed description of how uzImage.bin was prepared.
            * initrd-kirkwood.cpio
                  Detailed description of how initrd-kirkwood.cpio was prepared.

Download and keep these files 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 filesystem:

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

Detailed description of how uzImage.bin was prepared.

I used linux-vtwm-testing available at https://github.com/linux-wmt/linux-vtwm Please refer to the link config.slackinstall.vga for the config file which was used. This method 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.

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
        exec chroot /root /bin/busybox init
        exec /bin/busybox init

Copy the initramfs_data.cpio.gz for to $KERNEL_SRC/usr area.

Details of how initramfs_data.cpio.gz was prepared.
gunzip initrd.gz
mkdir initramfs_data
mount -o loop initrd initramfs_data

create initramfs_data/init as shown above

chmod a+x initramfs_data/init
sync
(cd initramfs_data ; find . | cpio -o -H newc | gzip  > ../initramfs_data.cpio.gz )

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

  • CONFIG_CMDLINE=" mem=440M console=tty0 mbtotal=52M"

for serial:

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

kernel is compiled on the host, using arm-2014.05 from arm.

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:

        download uinitrd-kirkwood.img
        dd if=./uinitrd-kirkwood.img bs=64 skip=1 of=initrd-kirkwood.cpio.gz
        gunzip initrd-kirkwood.cpio.gz

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.

Booting and installing slackware

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

For X Windows, use a window manager like fluxbox.

links

http://apc.io/products/8750a/

http://apc.io/library/

https://github.com/linux-wmt/linux-vtwm

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

http://ftp.arm.slackware.com/slackwarearm/