Apc8750: Difference between revisions
(Created page with " JUST PREPARING THE PAGE Installing Slackware on apc-8750 http://apc.io/products/8750a/ http://apc.io/library/ https://github.com/linux-wmt/linux-vtwm http://arm.slackware...") |
No edit summary |
||
Line 1: | Line 1: | ||
== 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 | |||
=== 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. | |||
<pre> | |||
Disk /dev/sdc: 15.9 GB, 15931539456 bytes | Disk /dev/sdc: 15.9 GB, 15931539456 bytes | ||
64 heads, 32 sectors/track, 15193 cylinders, total 31116288 sectors | 64 heads, 32 sectors/track, 15193 cylinders, total 31116288 sectors | ||
Line 39: | Line 27: | ||
/dev/sdc3 28878848 31116287 1118720 82 Linux swap | /dev/sdc3 28878848 31116287 1118720 82 Linux swap | ||
</pre> | |||
Creating filesystem: | |||
1st partition: make it bootable, and create a file system using mkfs.vfat | * 1st partition: make it bootable, and create a file system using mkfs.vfat | ||
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 | Now you need to make a custom kernel for booting into. I used linux-vtwm-testing | ||
Line 48: | Line 39: | ||
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 | 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. | ||
init: | init: | ||
<pre> | |||
#!/bin/busybox sh | #!/bin/busybox sh | ||
/bin/busybox mount -t proc /proc | /bin/busybox mount -t proc /proc | ||
Line 65: | Line 57: | ||
exec chroot /root /bin/busybox init | exec chroot /root /bin/busybox init | ||
exec /bin/busybox init | exec /bin/busybox init | ||
</pre> | |||
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: | In case you are building it on your own: | ||
<pre> | |||
gunzip initrd.gz | gunzip initrd.gz | ||
mkdir initramfs_dat | mkdir initramfs_dat | ||
Line 75: | Line 69: | ||
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> | |||
Please note that the kernel uses a CONFIG_CMDLINE= | Please note that the kernel uses a CONFIG_CMDLINE= | ||
for vga: | for vga: | ||
CONFIG_CMDLINE=" mem=440M console=tty0 mbtotal=52M" | * CONFIG_CMDLINE=" mem=440M console=tty0 mbtotal=52M" | ||
for serial: | for serial: | ||
CONFIG_CMDLINE=" mem=440M console=ttyWMT0,115200n8 mbtotal=52M" | * CONFIG_CMDLINE=" mem=440M console=ttyWMT0,115200n8 mbtotal=52M" | ||
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: | Eg: | ||
<pre> | |||
export OBJ=/src/apc.io/obj.testing | 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 | ||
Line 99: | Line 94: | ||
-e 0x8000 -n "My Linux" -d $1/$2/zImage_w_dtb $1/$2/uzImage.bin | -e 0x8000 -n "My Linux" -d $1/$2/zImage_w_dtb $1/$2/uzImage.bin | ||
</pre> | |||
Preparing the cpio archive: | Preparing the cpio archive: | ||
<pre> | |||
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> | |||
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. | |||
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 | 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 ). | 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/ |
Revision as of 14:45, 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
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.
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
Now you need to make a custom kernel for booting into. I used linux-vtwm-testing available at https://github.com/linux-wmt/linux-vtwm Please refer to the link: for the config file which was used. 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. In case you are building it on your own:
gunzip initrd.gz mkdir initramfs_dat mountpoint initramfs_data || mount -o loop initrd fs 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.
Eg:
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:
dd if=./uinitrd-kirkwood.img bs=64 skip=1 of=initrd-kirkwood.cpio.gz gunzip initrd-kirkwood.cpio.gz
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. 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
For X Windows, use a window manager like fluxbox.
links
https://github.com/linux-wmt/linux-vtwm