88FXXXX SoC‎ > ‎

POGO-V4

Load and run new U-Boot from console:
    kermit -c
    <ENTER> <ENTER> <ENTER> <ENTER> <ENTER>
    set ipaddr 192.168.11.150
    set serverip 192.168.11.1
    tftpb 80000 u-boot-pogo4.bin
    go 80000

Install U-Boot to NAND flash:
    netconsole 192.168.11.150
    ver
    tftpb 100000 u-boot-pogo4.kwb
    nand erase.chip
    nand write ${fileaddr} 0 ${filesize}
    set ethaddr xx:xx:xx:xx:xx:xx
    save
    nand read 200000 0 ${filesize}
    cmp.b 200000 ${fileaddr} ${filesize}
    reset

Boot Linux with Busybox initrd on U-Boot netconsole:
    ver
    date MMDDhhmmYYYY
    tftpb 100000 linux-3.18.1-pogo.uboot
    tftpb 800000 initrd-armv5te-88fxxxx.uboot
    tftpb c00000 kirkwood-pogo-v4.dtb
    set bootargs root=/dev/ram0 rw console=ttyS0,115200
    bootm 100000 800000 c00000

Create UBIFS and copy boot files there on telnet console:
    telnet 192.168.11.150
    uname -a
    cat /proc/mtd
    ubiattach -m 2 -d 0 /dev/ubi_ctrl
    ubimkvol /dev/ubi0 -N data -m
    mount -t ubifs ubi0:data /mnt
   
cd /mnt
    tftp -g -r linux-3.18.1-pogo.uboot -l linux-pogo.uboot 192.168.11.1
    tftp -g -r initrd-armv5te-88fxxxx.uboot 192.168.11.1
    tftp -g -r kirkwood-pogo-v4.dtb 192.168.11.1
    cd
    umount /mnt
    reboot

Verify boot files on U-Boot netconsole:
    mtdparts default
    mtdparts
    ubi part UBIFS
    ubifsmount ubi0:data
    ubifsls
    ubifsload 100000 linux-pogo.uboot
    ubifsload 800000 initrd-armv5te-88fxxxx.uboot
    ubifsload c00000 kirkwood-pogo-v4.dtb
    ubifsumount
    set bootargs root=/dev/ram0 rw console=ttyS0,115200
    bootm 100000 800000 c00000

Debianize on telnet console:
    telnet 192.168.11.150
    date MMDDhhmmYYYY
    dd if=/dev/zero of=/dev/sda count=1024
    fdisk /dev/sda
        n    p    1    <ENTR>    +4096M
        n    p    2    <ENTR>    +256M        t    2    82
        n    p    3    <ENTR>    <ENTR>
        p    w
    mke2fs -t ext4 /dev/sda1
    mke2fs -t ext4 /dev/sda3
    mkswap /dev/sda2
    swapon /dev/sda2
    mount -t ext4 /dev/sda1 /mnt
    cd /mnt
    mkdir home
    mount -t ext4 /dev/sda3 home
    tftp -g -r wheezy-armhf-debootstrap.txz 192.168.11.1
    tar xJf wheezy-armhf-debootstrap.txz
    rm wheezy-armhf-debootstrap.txz
    ifconfig eth0 192.168.11.60 netmask 255.255.255.0

    CTRL-]
    q

    telnet 192.168.11.60
    route add default gateway 192.168.11.10

   
cat <<END > /etc/resolv.conf
    nameserver 192.168.11.10
    END

    ping -c 3 mirrors.kernel.org
    LANG=C chroot /mnt /bin/bash
    debootstrap/debootstrap --second-stage

    cat <<END > /etc/fstab
    /dev/sda1       /               ext4    defaults                0       1
    /dev/sda2       none            swap    sw                      0       0
    /dev/sda3       /home           ext4    defaults                0       2
    proc            /proc           proc    defaults                0       0
    sysfs           /sys            sysfs   defaults                0       0
    devpts          /dev/pts        devpts  mode=0620,gid=5         0       0
    END

    mount /proc
    mount /sys
    mount /dev/pts
    dpkg-reconfigure tzdata

    cat <<END > /etc/network/interfaces
    auto lo
    iface lo inet loopback
    auto eth0
    iface eth0 inet static
            address 192.168.11.60
            network 192.168.11.0
            netmask 255.255.255.0
            broadcast 192.168.11.255
            gateway 192.168.11.10
    END

    cat <<END > /etc/resolv.conf
    search localdomain
    nameserver 192.168.11.10
    END

    echo pogo4 > /etc/hostname

    cat << END > /etc/apt/sources.list
    deb http://mirrors.kernel.org/debian wheezy main
    deb-src http://mirrors.kernel.org/debian wheezy main
    deb http://security.debian.org/ wheezy/updates main
    deb-src http://security.debian.org/ wheezy/updates main
    END

    apt-get update
    apt-get dist-upgrade
    aptitude install locales
    dpkg-reconfigure locales
    passwd
    tasksel install standard
    apt-get install ssh samba nfs-kernel-server udev ntp esekeyd mtd-utils
    aptitude clean
    vi /etc/exports
    vi /etc/samba/smb.conf

    vi /etc/inittab
        .
        .
        .
        #1:2345:respawn:/sbin/getty 38400 tty1
        #2:23:respawn:/sbin/getty 38400 tty2
        #3:23:respawn:/sbin/getty 38400 tty3
        #4:23:respawn:/sbin/getty 38400 tty4
        #5:23:respawn:/sbin/getty 38400 tty5
        #6:23:respawn:/sbin/getty 38400 tty6

        # Example how to put a getty on a serial line (for a terminal)
        #
        T0:23:respawn:/sbin/getty -L ttyS0 115200 vt100
        .
        .
        .

    update-rc.d esekeyd disable

   
vi /etc/rc.local
        #!/bin/sh -e
        #
        # rc.local
        #
        # This script is executed at the end of each multiuser runlevel.
        # Make sure that the script will "exit 0" on success or any other
        # value on error.
        #
        # In order to enable or disable this script just change the execution
        # bits.
        #
        # By default this script does nothing.

        /usr/sbin/esekeyd /etc/esekeyd.conf /dev/input/event0

        exit 0

    cat <<END > /etc/esekeyd.conf
    EJECTCD:/bin/umount /dev/sd[b-z]* dev/mmcblk0p*
    END

    addgroup --gid 4000 shihsung
    adduser --uid 4000 --ingroup shihsung shihsung

    for f in samba nfs-kernel-server nfs-common ssh atd exim4 cron ntp rpcbind dbus; do /etc/init.d/$f stop; done
    umount /dev/pts
    umount /sys
    umount /proc
    exit
    sync
    umount /mnt/home
    umount /mnt
    reboot

Setup U-Boot to auto-boot the system:
    mtdparts default
    mtdparts
    set loadubi 'ubi part UBIFS; ubifsmount ubi0:data; ubifsload 100000 linux-pogo.uboot; ubifsload c00000 kirkwood-pogo-v4.dtb'
    set bootcmd 'run loadubi; ubifsumount; bootm 100000 - c00000'
    set bootargs 'root=/dev/sda1 rootfstype=ext4 console=ttyS0,115200'
    print
    set fileaddr
    set filesize
    print
    save
    reset

Verify system boots:
    ssh root@192.168.11.60
Comments