Showing posts with label fedora. Show all posts
Showing posts with label fedora. Show all posts

Thursday, July 2, 2015

Run Pidora on Raspberry Pi Model B+

Inroduction

Pidora is a Fedora Remix optimized for the Raspberry Pi computer. So, it is a good candidate choice for implementation if you are familiar with Fedora.
Here, I present the installation steps of installing Pidora 20 on Raspberry Pi Model B+ board. All the preparing works are done on Fedora 20.


Download image file

http://pidora.ca/pidora/releases/20/images/Pidora-2014-R3.zip


Write image file to SD card

dd (convert and copy a file) is a command-line utility for Unix/Linux, I use dd to write Pidora-2014-R3.img file to SD card.

# unzip Pidora-2014-R3.zip (uncompress to Pidora-2014-R3.img)
# dd if=Pidora-2014-R3.img of=/dev/sdb bs=4M (The SD card is at /dev/sdb)

On Windows, you can write image file by Win32 Disk Image.

After the dd command has done, remove the SD card and plug into socket, again. It would be mounted at 2 path:
/run/media/{user}/BOOT
/run/media/{user}/rootfs



Extra works

The default running job is display X window on TV/Monitor via HDMI interface, and the default network is using dynamic IP address. If you want to run it on console mode with static IP address, there is some extra work that you should do.

# vi /run/media/{user}/BOOT/headless
IPADDR=192.168.1.19         # the static IP address
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
RESIZE         # extend the SD card size to its real size
SWAP=512

# vi /run/media/{user}/rootfs/etc/sysconfig/network-scripts/ifcfg-Wired_connection_1
TYPE=Ethernet
BOOTPROTO=none
IPADDR0=192.168.1.19    # the static IP address
PREFIX0=24
GATEWAY0=192.168.1.1
DNS1=168.95.1.1
DNS2=168.95.192.1
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME="Wired connection 1"
UUID=b2df4348-a75e-4e80-ab3f-470154e1fc8c
ONBOOT=yes


Install/Update application packages

Some of my works is done by python with serial communication, therefore, I have to install some packages:


# yum update
# yum install python-setuptools
# yum install python-pip
# easy_install pyerial   <== serial communication package
# yum install python-devel
# yum install libxml2 libxslt
# yum install libxslt-devel
# pip install RPi.GPIO   <== GPIO control package
# pip install cython
# reboot


Conclusion

Except the write image to SD card process and disk partition policy is different from Fedora on PC, other works are same as you work on Fedora environment.


Reference

Pidroa official site
Win32 Disk Image

Wednesday, August 27, 2008

Make MCU Board - Development Tools

I plan to program firmware on Linux platform, so I use software packages as following:

  • Fedora Core 9/Ubuntu 8.04 on PC
  • sdcc - free compiler for 8051/AVR/Z80
  • gputils - GCC compiler for PIC
  • codeblocks - IDE development tool

Installation:

* In Fedora Core 9

# yum install gputils
# yum install sdcc
# yum install codeblocks codeblocks-contrib


* In Ubuntu 8.04

# vim /etc/apt/sources.list
deb http://apt.wxwidgets.org/ gutsy-wx main
deb http://lgp203.free.fr/ubuntu/ gutsy universe

# wget -q http://apt.wxwidgets.org/key.asc -O- | apt-key add -
# wget -q http://lgp203.free.fr/public.key -O- | apt-key add -

# apt-get update
# apt-get install gputils
# apt-get install sdcc
# apt-get install codeblocks
# apt-get install codeblocks-contrib
# apt-get install libwxsmithlib0

If you want to get more optimized compiling code,
e.g. the compiled binary code is small than sdcc, and reference resource is reach,
you can consider to use HI-TECH's PICC(for PIC) or 8051 C compiler.
HI-TECH supports tool(HI-TIDE) to plugin into eclipse's IDE.