This page describes how to build and run Minix/ARM. ====== Target ====== The Minix ARM port targets the [[http://beagleboard.org/hardware-xm|BeagleBoard-xM]] and its QEMU based emulator, the [[http://beagleboard.org/Products/BeagleBone|BeagleBone]] and the [[http://beagleboard.org/Products/BeagleBone%20Black|BeagleBone Black]] products from the BeagleBoard community. These are all based on system on chip designs from TI and all contain a Cortex-A8 ARM core. The code is developed and integrated in the same (master) code branch as the official MINIX3 x86 port. ===== Feature Matrix ===== This is a preliminary list of what's supported and what isn't. Feel free to add anything important that was left off the list and/or update the list with the latest developments. |<90%>| | @#E0E0FF:**Drivers**| @#E0E0FF:**BeagleBone Black**| @#E0E0FF:**BeagleBone (White)** | @#E0E0FF:**BeagleBoard-xM** | | tty (Terminal)| @#aaffaa:yes | @#aaffaa:yes | @#aaffaa:yes | | mmc (Multimedia Card)| @#aaffaa:yes | @#aaffaa:yes | @#aaffaa:yes | | eMMC (Internal Multimedia Card)| @#aaffaa:yes | @#ffaaaa:no | @#ffaaaa:no | | i2c (Inter-Integrated Circuit)| @#aaffaa:yes | @#aaffaa:yes | @#aaffaa:yes | | fb (Frame Buffer)| @#ffaaaa:no | @#ffaaaa:no | @#aaffaa:yes | | EDID Reading (Extended Display Identification Data)| @#aaffaa:yes | @#aaffaa:yes | @#aaffaa:yes | | eeprom | @#aaffaa:yes | @#aaffaa:yes | @#aaffaa:yes | | gpio (General Purpose Input/Output)| @#aaffaa:yes | @#aaffaa:yes | @#aaffaa:yes | | readclock | @#aaffaa:yes | @#aaffaa:yes | @#aaffaa:yes | | PMIC (Power Management IC)| @#aaffaa:yes | @#aaffaa:yes | @#aaffaa:yes | | ethernet | @#aaffaa:yes | @#aaffaa:yes | @#ffaaaa:no | | usb (Universal Serial Bus) HCD| @#aaffaa:yes | @#aaffaa:yes | @#ffaaaa:no | | usb mass storage| @#aaffaa:yes | @#aaffaa:yes | @#ffaaaa:no | | usb hubs| @#aaffaa:yes | @#aaffaa:yes | @#ffaaaa:no | | spi (Serial Peripheral Interface Bus)| @#ffaaaa:no | @#ffaaaa:no | @#ffaaaa:no | | pwm (Pulse-width modulation)| @#ffaaaa:no | @#ffaaaa:no | @#ffaaaa:no | | adc (Analog to Digital Converter)| @#ffaaaa:no | @#ffaaaa:no | @#ffaaaa:no | | audio | @#ffaaaa:no | @#ffaaaa:no | @#ffaaaa:no | | @#E0E0FF:**Kernel Features**| @#E0E0FF:**BeagleBone Black**| @#E0E0FF:**BeagleBone (White)** | @#E0E0FF:**BeagleBoard-xM** | | reboot | @#aaffaa:yes | @#aaffaa:yes | @#aaffaa:yes | | Power-Off | @#aaffaa:yes | @#aaffaa:yes | @#ffaaaa:no | | @#E0E0FF:**Miscellaneous Features**| @#E0E0FF:**BeagleBone Black**| @#E0E0FF:**BeagleBone (White)** | @#E0E0FF:**BeagleBoard-xM** | | Capes / Expansion Boards | @#aaffaa:yes | @#aaffaa:yes | @#ffaaaa:no | |<90%>| | @#E0E0FF:**Supported Capes / Expansion Boards**| @#E0E0FF:**Status** | |[[http://circuitco.com/support/index.php?title=BeagleBone_Weather|BeagleBone Weather]] | @#aaffaa:yes | Please note that pkgsrc, the package repository used by MINIX3, is not yet available on ARM at this moment. See [[developersguide:pkgsrconarm|this document]] for an explanation as to why and how we hope to move forward on this. Note that the framebuffer (fb) driver is not supported on the Black and White models. You will need a serial interface cable to connect. Please review [[http://dave.cheney.net/2013/09/22/two-point-five-ways-to-access-the-serial-console-on-your-beaglebone-black | Dave Cheney's article]] on connecting via the serial port. Users of Apple products may want to review [[http://pbxbook.com/other/mac-tty.html | Mike's PBX Cookbook article]] on using Terminal for serial communication. In Terminal, the command 'screen /dev/tty.usbmodem* 115200' works well (replace the * with the appropriate label). ====== Building Minix/ARM ====== First do a checkout of the code $ mkdir -p $HOME/minix $ cd $HOME/minix $ git clone git://git.minix3.org/minix src $ cd src Secondly configure your build by creating a .settings file. For the BeagleBoard-xM use these settings: # beagleboard-xm U_BOOT_BIN_DIR=build/omap3_beagle/ CONSOLE=tty02 For the BeagleBone(s) use the following settings: #beaglebone (and black) U_BOOT_BIN_DIR=build/am335x_evm/ CONSOLE=tty00 Now launch the build by calling the image creation script (This will call the [[DevelopersGuide:Crosscompiling]] script with a machine set to "evbearm-el". NOTE: if you get errors during this step, please check that page!): $ ./releasetools/arm_sdimage.sh If you receive the error "**Skipping image creation: missing tool 'mcopy'" do pkgin install mtools If there are no errors, the result is a file called minix_arm_sd.img in your src directory. This image can be copied onto an SD-Card using dd: sudo dd if=minix_arm_sd.img of=/dev/mmcblk0 bs=1M oflag=direct WARNING Just make sure your file system did not mount the sd-card while you where dd'ing. ====== Running Minix/ARM ====== Once the sd-card is inserted on the BeagleBoard-xM (or BeagleBone) press the reset button and watch the serial for messages. Alternatively you can start the same image in the emulator (Read about that in [[.:minixonlinaroqemuarm]]). for information on network booting, see the [[developersguide:netbootingarm|Netbooting ARM]] article. ## Starting application at 0x80200000 ... MINIX booting MINIX 3.2.1. Copyright 2012, Vrije Universiteit, Amsterdam, The Netherlands MINIX is open source software, see http://www.minix3.org Started VFS: 8 worker thread(s) starting mmc driver mmc_block(info)Initializing the MMC block device mmc_host_mmchs(info)Using instance number 0 mmc_block(info)System event framework fresh start Root device name is /dev/c0d0p1s0 /dev/c0d0p1s0: clean /dev/c0d0p1s0 is mounted on / none is mounted on /proc date: timed: no such device or address Tue Jan 1 00:00:00 GMT 2013 /dev/c0d0p1s2: clean /dev/c0d0p1s1: clean size on /dev/imgrd set to 0kB Multiuser startup in progress ... Starting services: randomrm /dev/eth0 rm /dev/eth mknod /dev/psip0 c 7 1 ln /dev/psip0 /dev/psip mknod /dev/ip0 c 7 2 ln /dev/ip0 /dev/ip mknod /dev/tcp0 c 7 3 ln /dev/tcp0 /dev/tcp mknod /dev/udp0 c 7 4 ln /dev/udp0 /dev/udp mknod /dev/ipstat c 7 0 inet: unable to read random data from /dev/random: resource temporarily unavailable inet: using current time for random-number seed inet ipc. Starting daemons: update cron syslogd. Starting networking: nonamed. Local packages (start): done. Minix Release 3 Version 2.1 (console) 10.0.0.1 login: ====== Ethernet Configuration ====== If you're using a BeagleBone or BeagleBone Black, there is an ethernet driver available. It's configured through ''/etc/inet.conf''. Running ''netconf'' as usual will let you select the right driver, which is ''lan8710a''. To enable services like telnet/ftp/etc you can create an ''rc.daemons'' file. mv /etc/rc.daemons.dist /etc/rc.daemons vi /etc/rc.daemons Restart the system for the changes to take effect. reboot If the system hangs on reboot after starting the service 'random,' shut down the board entirely, then bring it back up. This will completely reset the ethernet chip and prevent issues when bringing up the inet interface from a non-default configuration. Typing 'Control-c' will interrupt the multi-user boot process and go to single user. Type shutdown -h now to properly unmount the file system and shut down. Unplug the power supply from the board, wait briefly, then plug the power supply back in. ====== Videos ====== * A video showing the above steps of obtaining and building the system [[https://www.youtube.com/watch?v=J9UOtVU6lKY|is here]]. * A video showing how to use gdb to debug a minix from a qemu [[https://www.youtube.com/watch?v=Wni_Yw-2b88|is here]]. * A video showing how to use Code Composer studio to debug the BeagleBone White [[https://www.youtube.com/watch?v=ra8STql8pJM|is here]]. ====== Want to contribute? ====== Great, that's what I wanted to hear! Help with documentation, making the above procedure more clean, hardware support, debugging, running the test set and finding and debugging problems! Check the [[:resources|resources page]] for more information on how to join the community. See ARM-specific (or not ARM-specific!) points on the [[:Wishlist:]] page for the current list of todo's. ====== ARM Manuals ====== The ARM Cortex-A8 processor is used in the Minix-supported BeagleBoard and BeagleBone devices. Many ARM documents require registration and some are behind a paywall, but the following is freely available from the ARM site as of October 2016: * [[http://infocenter.arm.com/help/topic/com.arm.doc.ddi0344k/DDI0344K_cortex_a8_r3p2_trm.pdf|Cortex-A8 Revision: r3p2 Technical Reference Manual]]