Novena Documentation Release PVT2
Total Page:16
File Type:pdf, Size:1020Kb
Novena Documentation Release PVT2 contributors like you May 29, 2015 Contents 1 Quickstart: Desktop 3 2 Quickstart: Just the Board 5 3 Common Tasks 9 3.1 Installing and Running Debian Linux on a SATA Disk.........................9 3.2 Flashing Factory Image to microSD Card................................ 11 3.3 Pairing a Bluetooth Keyboard...................................... 11 3.4 Creating a Simple WiFi Access Point (Hotspot)............................. 11 3.5 Upgrading the Kernel and u-boot.................................... 12 3.6 Compiling and Installing the Kernel................................... 13 3.7 Using an External HDMI Monitor.................................... 13 4 The Hardware 15 4.1 Revisions................................................. 15 5 Default Distribution (Debian) 17 6 FPGA Hacking 19 6.1 GPBB FPGA Communications Quickstart............................... 19 7 Porting Operating Systems 21 7.1 GNU/Linux Distributions........................................ 21 7.2 Other Operating Systems......................................... 21 8 Source and Licensing 23 9 About The Guide Sources 25 10 Documentation License 27 i ii Novena Documentation, Release PVT2 The Novena Open Hardware Laptop, in Board, Desktop, and Laptop configurations. Photos: Crowdsupply Contents 1 Novena Documentation, Release PVT2 2 Contents CHAPTER 1 Quickstart: Desktop Note: This page is a work-in-progress stub. Contributions welcome! The “Laptop” hardware has not yet shipped as of January 2015. For now, start with the Desktop Assembly Guide. See also Quickstart: Just the Board. 3 Novena Documentation, Release PVT2 4 Chapter 1. Quickstart: Desktop CHAPTER 2 Quickstart: Just the Board This page runs through the steps of configuring a “bare” Novena mainboard for use as a display-less system using the factory-installed microSD card as the rootfs media. Fig. 2.1: Novena PVT2 “Just-The-Board” contents (December 2014) Before you begin... You will need a 3.3V USB-FTDI cable and a computer to work from (as a terminal). You will also need an Ethernet cable if you want wired networking. First, before applying power, attach the FTDI cable with the USB side connected to your host machine and the UART end connected to the Novena. The correct UART connection is described on the “Using Novena PVT1” wiki page, and is shown below. Open a terminal program on the work machine and open the FTDI device using 115200 baud as the speed and “normal” settings for everything else (eg, 8n1). For example, on a UNIX machine you could use the screen command line program: 5 Novena Documentation, Release PVT2 Fig. 2.2: Novena PVT2 board with FTDI UART cable attached to console port (note wire colors and orientation) Fig. 2.3: Pinout of Novena PVT2 board console port, wire colors correspond to default FTDI UART connector 6 Chapter 2. Quickstart: Just the Board Novena Documentation, Release PVT2 screen /dev/ttyUSB0 115200 # Should be a blank screen until the Novena boots. # Type "Ctrl-A" then "k" to quit when you are done. Or you could use minicom or GtkTerm or whatever your favorite is. If you get access errors, you might need to add yourself to dialout or plugdev or a group like that, then completely log out and log back in: $ ls -l /dev/ttyUSB0 crw-rw---- 1 root dialout 188, 0 May 28 21:10 /dev/ttyUSB0 $ groups SOMEBODY cdrom floppy audio dip video plugdev netdev $ sudo usermod SOMEBODY -a -G dialout $ groups SOMEBODY cdrom floppy audio dip video plugdev netdev $ # Still need to logout and back in, then: $ groups SOMEBODY dialout cdrom floppy audio dip video plugdev netdev Finally, connect power to the Novena board’s DC barrel jack. You should see u-boot and then kernel boot messages stream out the console. Eventually you will enter the “first run” menu system, which was created by xobs specifically for the Novena. You should be able to make reasonable selections for yourself by reading the prompts; a US-centric set of defaults for a headless (aka, no display) system might be: • “Configuring console-data”: select “Don’t touch keymap” • “Configuring locales”: “en_US.UTF-8 UTF-8” or yours • “Configuring locales”: the locale you selected • “Configuring tzdata”: your region, or “none of the above” to get to UTC • Enter a new root password • Create a user account • Choose a hostname or accept the autogenerated one • Disable graphical logins Following all the prompts, the system should get configured and you will be able to login as the user you created. Blessed be! The next step will be to get networking up and running so you can upgrade and/or install new software. Note: You need a wired connection to install required utilities before you can configure the wireless interfaces. Configure Ethernet Networking Attach ethernet cable to a switch/router to the left-hand port (eth0). If DHCP is enabled on the local network, the interface should be configured automatically. Test the connection with: sudo ifconfig eth0 sudo ping www.mit.edu Configure WiFi Networking Install packages (over the wired connection); be sure to add your user to the netdev group when prompted: sudo apt-get install wireless-tools iw wicd-curses 7 Novena Documentation, Release PVT2 Run wicd-curses to connect to a wireless access point. You should be presented with a list of detected stations; hit enter to connect to a station, or right arrow and then scroll down to enter a WPA/WPA2 password (if necessary). You could also install network-manager instead of wicd and use the nmtui command to connect to networks and manage wired networking as well. After networking is configured Once networking is going, you should definately update the apt package database, and you may wish to upgrade all existing packages (from the factory image) to the most recent available versions. The default configured debian mirror (to download updates from) is in the United States. You might want to change the /etc/apt/sources.list file to point to something closer; changing to http.debian.net will auto-select a good mirror wherever you are in the world. To update package information, a process which should run reasonably fast even the first time: sudo apt-get update The upgrade step could take 30+ minutes all together, even given a fast connection, because disk I/O operations on the built-in microSD card are very slow. Don’t start this process until you are patient enough to let it finish without interruption. You don’t really need to do the upgrade up front before you start experimenting, it’s just a good idea to stay patched with bug fixes and security updates. To upgrade all packages with new versions, run: sudo apt-get upgrade You may encounter a dpkg problem with the dbus package (“Package libdbus-1-3:armhf is not configured yet.”). If this happens run sudo apt-get install -f to fix configuration, then sudo apt-get upgrade to finish the upgrade. You will almost certainly find youself needing i2c control utilities if you will be hacking on the Novena, eg to compile the FPGA userland tools, so now would be a good time to do: sudo apt-get install i2c-tools libi2c-dev Fixing Audio The version of pulseaudio-novena that shipped with PVT2 boards (v1.0) has some known problems that prevent audio from working correctly out of the box. Later versions (v1.1) fix this, but as of January 10th 2015 have not been pushed to the Kosagi apt repository as a package update. As a work around, one can either build a new .deb and install that, or as a hack just copy the updated configuration files by hand to the correct paths. After this the audio will need to be unmuted and turned up using alsamixer as usual. mplayer works fine for playing audio files from the (headless) command line. 8 Chapter 2. Quickstart: Just the Board CHAPTER 3 Common Tasks 3.1 Installing and Running Debian Linux on a SATA Disk These instructions will result in a system that boots u-boot and the Linux kernel from the internal microSD slot, then loads the rootfs and entire userland operating system from an ext4 partition on a SATA hard disk. In addition to increased disk capacity, using a SATA disk as a rootfs should vastly improve disk I/O and thus general system performance. Connect the SATA disk while the system is powered down, then boot up from the microSD card. Note that there are two SATA-like connectors on the Novena mainboard: one is for power from the battery board, and the other is the actual SATA connection. It isn’t possible to connect to the wrong port because the polarities are flipped. It’s strongly recommended to use some form of an enclosure or mechanical support to prevent the SATA disk from coming detatched while in use, which could obviously result in data loss. First make sure required tools are installed: sudo apt-get install parted debootstrap We’re going to assume that the SATA disk is blank and unpartitioned, and all data on the disk will be overwritten. We’re going to use the offical novena-image.sh install script. Checkout out xobs’ novena-image repo: sudo apt-get install apt-cacher-ng cd git clone https://github.com/xobs/novena-image You’ll almost certainly want to install apt-cacher-ng and change the mirror setting (in sata-install.sh) to --mirror "http://127.0.0.1:3142/http.debian.net/debian" (the default is a debian mirror in Hong Kong). We recommend copying sata-install.sh to local-install.sh and making changes there. See the novena- image.sh documentation for more details. To configure the kosagi repositories by default, you can download the kosagi-repo debian package and kosagi signing key with: # WARNING: this isn't a secure way to verify the signing key gpg --keyserver keyserver.ubuntu.com --recv-keys 03C7B7EC gpg --export 03C7B7EC > kosagi.key # WARNING: https is not available for this server wget http://repo.novena.io/repo/pool/main/k/kosagi-repo/kosagi-repo_1.0-r1_all.deb wget http://repo.novena.io/repo/pool/main/n/novena-eeprom/novena-eeprom_2.1-1_armhf.deb wget http://repo.novena.io/repo/pool/main/n/novena-firstrun/novena-firstrun_1.4-r1_all.deb 9 Novena Documentation, Release PVT2 If you are running from the microSD card and have limited space, you’ll probably want to cull down the default installed package list significantly.