Annotation of wikisrc/ports/evbarm/odroid-c1.mdwn, revision 1.4

1.1       wiki        1: [[!meta title="NetBSD/evbarm on Hardkernel ODROID-C1"]]
                      2: 
                      3: [[!toc levels=2]]
                      4: 
1.2       wiki        5: # Supported hardware
                      6:  - CPU: Cortex-A5: S805 (4-core) at 1.5GHz
                      7:    - CPU frequency scaling is supported with machdep.cpu sysctl tree
                      8:    - SMP supported
                      9:    - PL310 L2 cache controller
                     10:  - GIC
                     11:  - A5 watchdog timer
                     12:  - A5 global timer
                     13:  - SD/MMC controller (DMA)
                     14:  - Serial console
                     15:  - USB host (OTG)
                     16:  - Gigabit Ethernet (GMAC)
                     17:    - RTL8211F PHY
                     18:  - Hardware random number generator
                     19: 
                     20: # TODO
                     21:  - USB device mode
                     22:  - Simultaneous SD card and eMMC usage
                     23:  - SD/MMC UHS-I support (needs sdmmc(4) changes)
                     24:  - HDMI / framebuffer
                     25:  - IR receiver
                     26:  - GPIO
                     27:  - I2C
                     28: 
                     29: # Installation
                     30: 
                     31: * Start with an ARMv7 image from *evbarm-earmv7hf/binary/gzimg/* such as *beagleboard.img*
                     32: * Build U-Boot for ODROID-C1 <https://github.com/hardkernel/u-boot/tree/odroidc-v2011.03>
1.3       wiki       33:   * Pre-built binaries here: <http://ftp.netbsd.org/pub/NetBSD/misc/jmcneill/odroidc1/u-boot-odroidc-v2011.03-20150308.tar.gz>
1.4     ! wiki       34: * Note the location and size of the FFS partition in the *beagleboard.img* disklabel:
        !            35: [[!template  id=programlisting text="""
        !            36: # $TOOLDIR/bin/nbdisklabel -M evbarm -B le beagleboard.img
        !            37: ...
        !            38: 8 partitions:
        !            39: #        size    offset     fstype [fsize bsize cpg/sgs]
        !            40:  a:   1359312    385024     4.2BSD      0     0     0  # (Cyl.    188 -    851*)
        !            41:  b:    262144    122880       swap                     # (Cyl.     60 -    187)
        !            42:  c:   1744336         0     unused      0     0        # (Cyl.      0 -    851*)
        !            43:  d:   1744336         0     unused      0     0        # (Cyl.      0 -    851*)
        !            44:  e:    114688      8192      MSDOS                     # (Cyl.      4 -     59)
        !            45: """]]
1.2       wiki       46: * Write the bootloader to the empty space at the start of the base image:
                     47: [[!template  id=programlisting text="""
                     48: # dd if=bl1.bin.hardkernel of=beagleboard.img bs=1 count=442 conv=notrunc
                     49: # dd if=bl1.bin.hardkernel of=beagleboard.img bs=512 skip=1 seek=1 conv=notrunc
                     50: # dd if=u-boot.bin of=beagleboard.img bs=512 seek=64 conv=notrunc
                     51: """]]
1.4     ! wiki       52: * Since the bootloader has overwritten the disklabel, we need to re-add partition "a" from the disklabel to the MBR partition table:
        !            53: [[!template  id=programlisting text="""
        !            54: # $TOOLDIR/bin/armv7--netbsdelf-eabihf-fdisk -u beagleboard.img
        !            55: ...
        !            56: Which partition do you want to change?: [none] 1
        !            57: The data for partition 1 is:
        !            58: <UNUSED>
        !            59: sysid: [0..255 default: 169] 
        !            60: start: [0..109cyl default: 63, 0cyl, 0MB] 385024
        !            61: size: [0..85cyl default: 1359312, 85cyl, 664MB] 1359312
        !            62: ...
        !            63: Which partition do you want to change?: [none] 
        !            64: ...
        !            65: Should we write new partition table? [n] y
        !            66: """]]
1.2       wiki       67: * Write the image to an SD card.
                     68: * Copy the kernel (netbsd.ub) for your board to the root of the MS-DOS partition on the SD card.
                     69: * Create or edit boot.ini on the MS-DOS partition:
                     70: [[!template  id=programlisting text="""
                     71: ODROIDC-UBOOT-CONFIG
                     72: 
                     73: setenv m "1080p"
                     74: setenv vout_mode "hdmi"
                     75: setenv m_bpp "32"
                     76: setenv disableuhs "disableuhs"
1.4     ! wiki       77: setenv bootargs "root=ld0f awge0.mac-address=${ethaddr}"
1.2       wiki       78: setenv bootcmd "fatload mmc 0:1 0x21000000 netbsd.ub; bootm 0x21000000"
                     79: run bootcmd
                     80: """]]
1.4     ! wiki       81: * On first boot, it will stopbecause of the wrong device in /etc/fstab. Take this opportunity to grow the root file-system:
        !            82: [[!template  id=programlisting text="""
        !            83: # fdisk -u ld0
        !            84: ...
        !            85: Which partition do you want to change?: [none] 1
        !            86: The data for partition 1 is:
        !            87: NetBSD (sysid 169)
        !            88:     start 385024, size 1359312 (664 MB, Cyls 23/246/32-108/147/55)
        !            89:         PBR is not bootable: All bytes are identical (0x00)
        !            90: sysid: [0..255 default: 169]
        !            91: start: [0..966cyl default: 385024, 24cyl, 188MB]
        !            92: size: [0..942cyl default: 1359312, 85cyl, 664MB] $
        !            93: ...
        !            94: Which partition do you want to change?: [none]
        !            95: ...
        !            96: Should we write new partition table? [n] y
        !            97: # resize_ffs -y /dev/rld0f
        !            98: # reboot
        !            99: """]]
        !           100: * Next boot, create a new /etc/fstab:
        !           101: [[!template  id=programlisting text="""
        !           102: # mount -u -o rw /dev/ld0f /
        !           103: # cat > /etc/fstab << EOF
        !           104: /dev/ld0f       /               ffs     rw      1 1
        !           105: /dev/ld0e       /boot           msdos   rw      1 1
        !           106: kernfs          /kern           kernfs  rw
        !           107: ptyfs           /dev/pts        ptyfs   rw
        !           108: procfs          /proc           procfs  rw
        !           109: tmpfs           /var/shm        tmpfs   rw,-m1777,-sram%25
        !           110: EOF
        !           111: # reboot
        !           112: """]]
1.2       wiki      113: 
1.1       wiki      114: # ODROID-C1 UART pins
                    115: 
                    116: From [ODROID Forum](http://forum.odroid.com/viewtopic.php?f=115&t=7684):
                    117: 
                    118: [[!template  id=programlisting text="""
                    119:  ___UART____
                    120: |Pin 4 - GND|
                    121: |Pin 3 - RXD|
                    122: |Pin 2 - TXD|
                    123: |Pin 1 - VCC|
                    124: \___________|
                    125: 
                    126: 3.3V LVTTL
                    127: """]]

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb