Differences

This shows you the differences between two versions of the page.

Link to this comparison view

tools:retrobsd [2015/03/09 10:44]
darron [Test]
tools:retrobsd [2015/03/22 21:55]
Line 1: Line 1:
-==== RetroBSD ==== 
-<wrap right> 
-{{:tools:2.11bsd.jpg?200}} 
-\\ \\ 
-{{:tools:2.11bsd-2.jpg?200}} 
-</wrap> 
  
-RetroBSD is an embedded version of 2.11BSD for PIC32 micro-controllers. 
- 
-=== Setup === 
-First we need to fetch a working cross-compiler. RetroBSD supports this one in Linux. 
- 
-<code> 
-cd /usr/local 
-wget https://github.com/downloads/jasonkajita/chipKIT-cxx/pic32-tools-chipKIT-cxx-master-Linux32-image-20120720.zip 
-unzip pic32-tools-chipKIT-cxx-master-Linux32-image-20120720.zip 
-</code> 
- 
-=== Checkout === 
-Now we fetch the RetroBSD source from GitHUB.  
-<code> 
-mkdir -p /embedded 
-cd /embedded 
-git clone https://github.com/RetroBSD/retrobsd.git 
-cd retrobsd 
-</code> 
-=== Configure === 
-In this example we will configure RetroBSD for the [[:boards:sdxl|SDXL]] board. 
- 
-First select the SDXL. 
-<code> 
-sed -i 's/(MAX32)/(SDXL)/' Makefile 
-</code> 
- 
-Now we will enable two UARTS. Edit the following file, 
-<code> 
-vi sys/pic32/sdxl/Makefile 
-</code> 
- 
-and add the following within the DEFS section, save the file. 
-<code> 
-DEFS += -DUART1_BAUD=115200 
-DEFS += -DUART1_ENABLED=YES 
-DEFS += -DUART2_BAUD=115200 
-DEFS += -DUART2_ENABLED=YES 
-</code> 
- 
-Now edit the kernel configuration to enable the devices. 
-<code> 
-vi sys/pic32/sdxl/SDXL 
-</code> 
- 
-Add the following options to enable the UARTS. 
-<code> 
-# tty0 
-device uart1 baud=115200 
-# tty1 
-device uart2 baud=115200 
-</code> 
- 
- 
-=== Build === 
-Building will create the unix boot image and the SDcard image for the system. 
-<code> 
-make cleanall 
-make 
-</code> 
- 
-=== Install === 
- 
-First we create the file system image on a micro SD card. 
-<code> 
-dd if=sdcard.img of=/dev/sdc bs=4M 
-</code> 
- 
-Next, Hold the PROG button and toggle RESET on the SDXL board to enter the boot laoder. We will use [[:tools:pic32prog|PIC32Prog]] to install the kernel. 
- 
-<code> 
-pic32prog -d /dev/ttyACM0 ./sys/pic32/sdxl/unix.hex 
-Programmer for Microchip PIC32 microcontrollers, Version 1.119M 
-    Copyright: (C) 2011-2014 Serge Vakulenko 
-      Adapter: STK500v2 Bootloader 
- Program area: 1d000000-1d07ffff 
-    Processor: Bootloader 
- Flash memory: 512 kbytes 
-  Boot memory: 12 kbytes 
-         Data: 157004 bytes 
-        Erase: done 
-Program flash: ####################################### done 
- Verify flash: ####################################### done 
-Rate: 40790 bytes per second 
-</code> 
- 
-=== Login === 
- 
-A virtual com port should have been detected after installation. 
- 
-The kernel will log something similar to the following. 
-<code> 
-usb 1-1.4: new full-speed USB device number 12 using dwc_otg 
-usb 1-1.4: New USB device found, idVendor=04d8, idProduct=000a 
-usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0 
-usb 1-1.4: Product: RetroBSD Console 
-usb 1-1.4: Manufacturer: Microchip Technology Inc. 
-cdc_acm 1-1.4:1.0: This device cannot do calls on its own. It is not a modem. 
-cdc_acm 1-1.4:1.0: ttyACM0: USB ACM device 
-</code> 
- 
-Connecting with a terminal emulator to the virtual com port and pressing enter will boot the system. 
-<code> 
-screen /dev/ttyACM0 115200 
-</code> 
- 
-Enter the username root with an empty password to login. 
-<code> 
- 
-2.11 BSD Unix for PIC32, revision G205 build 2: 
-     Compiled 2015-03-09 by root@beethoven: 
-     /embedded/retrobsd/sys/pic32/sdxl 
-cpu: 795F512H 80 MHz, bus 80 MHz 
-oscillator: external, PLL div 1:2 mult x20 
-console: ttyUSB0 (6,0) 
-sd0: port SPI2, select pin G9 
-sd0: type SDHC, size 3932160 kbytes, speed 13 Mbit/sec 
-phys mem  = 128 kbytes 
-user mem  = 96 kbytes 
-root dev  = rd0a (0,1) 
-root size = 102400 kbytes 
-swap dev  = rd0b (0,2) 
-swap size = 2048 kbytes 
-/dev/rd0a: 659 files, 10738 used, 91261 free 
-Starting daemons: update /var/cron: No such file or directory 
-/var/cron: created 
-tabs: No such file or directory 
-tabs: created 
-cron  
- 
- 
-2.11 BSD UNIX (pic32) (console) 
- 
-login: root 
-Password: 
-Welcome to RetroBSD! 
-erase, kill ^U, intr ^C 
-# ps axl 
-  F S   UID   PID  PPID CPU PRI NICE  ADDR  SZ WCHAN    TTY  TIME COMMAND 
-  3 S              54     0 0x6800   3 runout   ?    0:03 swapper 
-200 S                30     0x69  45 proc     ?    0:00 init -  
-200 S        11      23  40      0xd   6 u        ?    0:00 update  
-200 S        13      42  26      0x9  73 selwait  ?    0:00 cron  
-200 S        14        30     0x19  56 proc     USB  0:00 -sh  
-  1 R        17    14  24  51   0 0x7400  52          USB  0:00 ps axl  
-# 
-</code>