Annotation of wikisrc/ports/evbarm/raspberry_pi.mdwn, revision 1.22
1.1 jakllsch 1: [[!meta title="NetBSD/evbarm on Raspberry Pi"]]
2:
1.3 wiki 3: [[images/raspberrypi.jpg]]
4:
1.1 jakllsch 5: This page attempts to document and coordinate efforts towards NetBSD/evbarm on [Raspberry Pi](http://www.raspberrypi.org).
6:
1.14 wiki 7: <small>([Raspberry Pi image](http://www.flickr.com/photos/42325803@N07/8118758647/) by Christopher Lee used under CC-By-2.0 license)</small>
1.3 wiki 8:
1.7 wiki 9: # Installation
1.17 wiki 10: - Use the latest HEAD/-current which builds for install
1.19 wiki 11: - As the Raspberry Pi port is still not part the stable release, you will want to use the
1.17 wiki 12: HEAD branch to download installation sets.
1.19 wiki 13: - You may use the rpi.img file created by an evbarm build - evbarm-earmv6hf is recommended, but this is not currently available on nyftp. For now, evbarm-earmhf is best.
14: - An example can be found in the 'evbarm-earmhf/binary/gzimg/' directory under releng.netbsd.org
1.17 wiki 15: - On nyftp.netbsd.org/pub/NetBSD-daily/HEAD/YYYYMMDDHHMMZ (it will look like pub/NetBSD-daily/HEAD/201305220150Z)
1.19 wiki 16: - 'releasedir/evbarm/binary/gzimg/' if you run (for example) './build.sh -m evbarm -a earmv6hf -u release'
1.10 wiki 17: - <i>gunzip and dd</i> this img to your sd card.
18:
1.14 wiki 19: dd if=rpi.img of=/dev/disk1
20:
21: - Using a serial console
1.19 wiki 22: - By default the rpi.img is set to use the HDMI output; to change to using a serial console first mount rpi.img (it's a FAT filesystem)
1.14 wiki 23:
24: edit cmdline.txt and remove '"console=fb"'
25:
1.10 wiki 26: - Growing the root file-system
1.17 wiki 27: - During the partitioning process, do not delete or format the
28: first MSDOS (FAT) partition, as the Raspberry pi firmware is
29: hard coded to boot on the SDCAD / 1st MSDOS partition / Firmware
30: updates and boot loader.
1.10 wiki 31: - Copy /boot/cmdline.txt to /boot/cmdline.txt.orig
1.15 wiki 32: - Edit /boot/cmdline.txt and add the '-s' flag to the end of the first line of text to boot into single-user mode.
1.20 wiki 33: - For the next steps, the root filesystem mustn't be mounted rw. So reboot, and at the prompt to enter the pathname of shell,
34: press return for the default (/bin/sh).
1.10 wiki 35: - At the # prompt, type
36:
37: "disklabel -i ld0" and press return.
1.19 wiki 38:
1.15 wiki 39: - At the partition> prompt type "A" and press return.
1.10 wiki 40:
41: Adjust disklabel sector from 4194304 to 62333952 [n]?
42: Type "y" and press return.
1.19 wiki 43:
1.15 wiki 44: - partition> prompt type "a" and press return.
1.12 wiki 45:
1.11 wiki 46: Filesystem type prompt, press return to use the current value (4.2BSD).
47: Start offset prompt, press return to use the current value.
48: Partition size prompt, type "$" and press return to grow the
49: partition to use all available free space.
1.19 wiki 50:
1.15 wiki 51: - partition> prompt type "W" to save the changes to the disklabel.
1.11 wiki 52:
53: Confirm this choice by typing "y" at the Label disk prompt.
1.12 wiki 54: Type "Q" and press return to quit disklabel.
1.19 wiki 55:
1.15 wiki 56: - At the # prompt (shell), type
1.11 wiki 57:
58: fsck -fy /dev/rld0a
59: resize_ffs -y /dev/rld0a
1.19 wiki 60:
1.11 wiki 61: - This may take a few minutes, be patient!
62:
63: fsck -fy /dev/rld0a
1.18 wiki 64: mount_msdos /dev/ld0e /boot
1.11 wiki 65: mv /boot/cmdline.txt.orig /boot/cmdline.txt
66: reboot
1.19 wiki 67:
1.11 wiki 68: - When the system comes back up, the root file-system will have been expanded to
1.10 wiki 69: fill the SD card.
1.7 wiki 70:
1.16 wiki 71: # Installation with sshramdisk image
72: - You may use the rpi_inst.img.gz file created by an evbarm build.
73: - Connect Ethernet Cable to RPI.
1.19 wiki 74: - After starting DHCP client, SSH login to with user "sysinst", and password "netbsd".
1.17 wiki 75: - Be careful to note the ip address given during DHCP so you don't lose your connection
76: - Also for after the sysinst is done and the system reboots
77: - sysinst started!
1.16 wiki 78:
1.7 wiki 79: # Updating the firmware
1.8 wiki 80: - [rpi firmware files](https://github.com/raspberrypi/firmware/tree/master/boot)
1.19 wiki 81: - Copy all files except 'kernel*.img' into /boot and reboot
1.7 wiki 82:
1.9 wiki 83: # Additional links
84: - [ARM userland utilities](https://github.com/jaredmcneill/userland)
85:
1.21 skrll 86: # What works in -current
1.6 wiki 87: - multi-user boot with root on SD card
88: - serial or graphics console (with EDID query / parsing)
1.21 skrll 89: - Audio: works, but has issues. man page missing.
90: - I²C: works, could use enhancements, man page
91: - GPIO
92: - RNG
93: - SPI: could use enhancements, man page
94: - VCHIQ: man page missing. (-current)
1.19 wiki 95: - USB (host) - dwctwo(4)
96: - USB Ethernet - usmsc(4)
1.21 skrll 97: - X windows.
1.1 jakllsch 98:
99: # What needs work
1.19 wiki 100: - USB (host); isochronous transfers.
1.22 ! skrll 101: - DMA controller driver and sdhc(4) support
CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb