Minggu, 10 Maret 2013

Xathrya Sabertooth

Xathrya Sabertooth


Installing Gentoo on Raspberry Pi

Posted: 09 Mar 2013 08:54 PM PST

Raspberry Pi, a small computer powered by ARM architecture is a very interesting board for learning embedded system. In this article we will discuss about how to install how to install Gentoo on Raspberry Pi.

For this article I use following:

  1. Slackware64 14.0
  2. Windows 8
  3. Raspberry Pi model B
  4. Gentoo

You can use either Linux (in this article, Slackware) or Windows (in this article Windows 8). Just pick one and follow the rest of article for your choice.

Obtain the Materials

The Operating System images I used is Gentoo which use hard-float system ABI. Gentoo actively builds new version for this project. You can check the available version at here. You can use any version, but in this article I use build for armv7. The one i use can be downloaded here.

Prepare the Disk (SD Card)

To boot the Raspberry Pi, an installation media and storage media is needed. All we need is a single SD card. On this article I use my 8GB SD card. You can use any SD card you want, but I recommend to use at least 4GB SD card. The image we download on previous section will be stored on this card and later installed. Make sure you have a way to write on SD card.

Windows-based Instruction

For Windows user, you can follow this section to “burn” the image. For this purpose you need additional software for writing to SD card, such as Win32DiskImager utility.

  1. Extract the image (in this case stage3-armv7a_hardfp-20130209.tar.bz2) so you will get an .img file. To extract the file in Windows, you can use 3rd party tools such as 7zip.
  2. Insert SD card into SD card reader and check what drive letter it assigned to. For example G:\
  3. If it is not new, format it. Or at least make sure there is only one partition (FAT32 is recommended).
  4. Run the Win32DiskImager with administrator privileges.
  5. Select the image we have extracted.
  6. Select the drive letter of the SD card on our machine. Make sure you have the correct drive, or you will destroy data on that drive.
  7. Click Write and wait. The process should be not long.
  8. Exit the imager and eject the SD card

Beside Win32DiskImager, you can also use other tool such as Flashnul.

  1. Follow step 1 to step 3 for Win32DiskImager’s solution
  2. Extract Flashnul from the archive
  3. Open command prompt with elevated privilege (administrator privilege).
  4. Go to your extracted directory and run flashnul with argument “-p”. For example: flashnul -p
  5. You will get list of physical drive attached on your machine, and list of drive. Make sure the drive is correct. At time of writing this article, the SD card is detected as device number 1 with and mounted to drive G:
  6. Load the image to flashnul: flashnul 1 -L stage3-armv7a_hardfp-20130209.img
  7. If you get an access denied error, try re-plugging the SD card and make sure to close all explorer windows or folders open for the device. If still get denial, try substitute the device number with its drive letter: flashnul G: -L stage3-armv7a_hardfp-20130209.img

At this point, you have successfully written image to your SD card. And I assume you are. You can proceed to next stage.

Linux-based Instruction

Writing image on Linux is easier, in my opinion. The utility we use is “dd” which is already bundled on most distro. Make sure you know the correct device file for your SD card. In my machine I use a built in card reader and detect my SD card as /dev/sdb. It might be different on your system so better check it. For this article I use /dev/sdb to refer to SD card.

  1. Extract the image (in this case stage3-armv7a_hardfp-20130209.zip) so you will get an .img file.
  2. Insert SD card into SD card reader .
  3. If it is not new, format it. Or at least make sure there is only one partition (FAT32 is recommended).
  4. Unmount the SD card if it is mounted. We need the whole SD card so if you see partition such as /dev/sdb1, etc its better you unmount them all.
  5. Write the image to SD card. Make sure you replace the input file after if= argument with correct path to .img file and “/dev/sdb” in the output file of= argument with your device. Also make sure to use whole SD drive and not their partition (i.e. not use /dev/sdb1, /dev/sdb1, etc). The command: dd bs=4M if=stage3-armv7a_hardfp-20130209.img of=/dev/sdb
  6. Run sync as root. This will ensure the write cache is flushed and safe to unmount SD card.
  7. Remove SD card from card reader.

If you hesitate to use terminal and prefer to use GUI method, here is the tutorial. Note that we

  1. Do step 1 to step 3 for previous tutorial. Make sure your directory or image file doesn’t contain any spaces.
  2. Install the ImageWriter tool from https://launchpad.net/usb-imagewriter
  3. Launch the ImageWriter tool (needs administrative privileges)
  4. Select the image file (in this case stage3-armv7a_hardfp-20130209.img) to be written to the SD card (note: because you started ImageWriter as administrator the starting point when selecting the image file is the administrator’s home folder so you need to change to your own home folder to select the image file)
  5. Select the target device to write the image to. In my case, it’s /dev/sdb
  6. Click the “Write to device” button
  7. Wait for the process to finish and then insert the SD card in the Raspberry Pi

At this point, you have successfully written image to your SD card. And I assume you are. You can proceed to next stage.

Running the Pi

You have write image and at this point your raspberry pi is ready. Now set up raspberry pi to boot: insert your SD card back to raspberry pi, put on power, plug video output (either HDMI or RCA).

To resize the SD card after installation, you can follow this article.

Have fun :D

Surf the Web using Terminal

Posted: 09 Mar 2013 08:37 PM PST

Can you mention all web browser in the world? At least the popular ones. Sure you got name like Firefox, Chrome, Safari, etc. But all of them are GUI based. Sometimes we are in a situation when our machine’s resource is so limited and we need to browse the web using minimal resource. Or maybe we have a server box, troubleshooting them need access to internet but we don’t have a beautiful GUI server like gnome / kde does (or even not having any). So?

In this article we will discuss about how to browse internet using only terminal. Yes, without fancy graphical interface. Of course don’t expect too much from this terminal. This proof of concept just show you that there is other way to do.

Grab the Materials

The application we use is elinks or links. Install it using your distro-flavor method.

Usage

Links use your keyboard and mouse (if any) as input. You can insert some command by pressing key (or combination of it). here, in this section we will discuss the usage.

When invoke it, you will be prompted by blank screen of your terminal. Don’t worry, your machine is not hang. It just link ready to receive any command you send to it. In this examples we will use www.google.com and www.xathrya.web.id

Simple Navigation

To navigate from page to page, you can use “left” and “right” arrow key on your keyboard. The left arrow key will make the screen back to previous page while the right arrow make it forward. The up arrow key and down arrow key can be used to navigate on links on that page.

Showing the Menubar

Command: ESC

links3

Go to URL

invoking by terminal: links xathrya.web.id

command: g

links1

Quit

Command: q

links2

Bookmark

Command: s

links4

Save Page

Command: d

links5

Manually Resize SD card on Slackware using Parted

Posted: 09 Mar 2013 08:06 PM PST

When write image to CD card for installation of Raspberry Pi, the usable size will only be the size of the image. That means the rest of the space will be waste. On some distribution such as Fedora Remix, when final configuration begin the distro run some script to automatically resize and fill the SD card. However not all distro does that. Therefore we need to do manual resize.

In this article we will discuss about how to manually resize SD card on Slackware. Alhtough using Slackware, you can also use other Linux, but we won’t cover that. This article describes activities relating partitions. Incorrectly following instruction is likely to corrupt your system, so please be careful.

On this article I use:

  1. Slackware64 14.0
  2. SD card with Debian Wheezy (2GB occupied)

Preparation

Insert the SD card to our machine. Make sure it is now mounted. We will use partition tool to resize the partition.

Following on from the instructions above, keep the newly-written SD card in the card reader, but unmounted. We’ll use the parted (partition editor) tool to resize the partitions.

Show partition information to find our SD card. Look for a partition that matches the roughly the size of your distribution image. On Debian Wheezy it should be around 2GB. For example, it is detected as /dev/sdc2. Then unmount that partition. Those can be done by invoking:

  mount  umount /dev/sdc2  

Resizing

Now use parted utility (GNU Parted) with root privileges. You can do sudo if you are on sudoer group or use super user account.

  parted /dev/sdc  (parted) unit chs  (parted) print  Disk /dev/sdc: 121535,3,31  Sector size (logical/physical): 512B/512B  BIOS cylinder,head,sector geometry: 121536,4,32.  Each cylinder is 65.5kB.  Partition Table: msdos    Number  Start      End         Type     File system     Flags   1      16,0,0     1215,3,31   primary  fat32           lba   2      1232,0,0   26671,3,31  primary  ext4   3      26688,0,0  29743,3,31  primary  linux-swap(v1)  

This shows how my SD card was formatted after writing the image. Notice that nothing uses the card from end of ‘cylinder’ 29743 to the card’s maximum at 121535.

Partition 1 is the boot partition. Nothing to do here, let’s leave that alone. Partition 2 is the root partition, which we’ll grow to fill most of the card. Some OS versions will have a Partition 3 for swap space, which needs to be moved to the end of the card. Note that on some other versions of linux partitioning swap before primary filesystem. Well, if that’s the case, our task will be easier.

Move the swap partition if it exists (you’ll have to adjust the numbers so that the end of partition 3 is at the end cylinder/head/sector of the card)

to calculate the number to use in the following formula can be used:

Partition 3 New Start = (Maximum - (Partition 3 End - Partition 3 Start) ) - 1

so in this example (121535 - ( 29743 - 26688)) -1 = 118479

Note: Following command will not work if your parted versions later than 2.4. On my machine, parted is at version 2.3

  (parted) move 3 118479,0,0  

Now grow the root partition. This involves removing the partition, re-creating it, then using resize2fs to grow the filesystem to fill the partition. It won’t destroy any data.

  (parted) rm 2  (parted) mkpart primary 1232,0,0 118478,3,31  (parted) quit  

Note that the starting address of the new partition is identical to its original value, and the ending address is immediately before the start of the swap partition.
Now clean and resize the root partition.

  e2fsck -f /dev/sdc2  

That command will allow it to add lost-and-found.

  resize2fs /dev/sdc2  

Then put the card in the RPi and boot. You end up with a 7Gb partition to use.

  pi@raspberrypi:~$ df -h  Filesystem            Size  Used Avail Use% Mounted on  tmpfs                  94M  4.0K   94M   1% /lib/init/rw  udev                   10M  168K  9.9M   2% /dev  tmpfs                  94M     0   94M   0% /dev/shm  rootfs                7.1G  1.3G  5.4G  20% /  /dev/mmcblk0p1         75M   28M   48M  37% /boot  

And that’s it, we can enjoy Raspberry again :D

Installing Fedora Remix for Raspberry Pi

Posted: 09 Mar 2013 07:21 PM PST

Raspberry Pi, a small computer powered by ARM architecture is a very interesting board for learning embedded system. In this article we will discuss about how to install how to install Fedore Remove for Raspberry Pi.

For this article I use following:

  1. Slackware64 14.0
  2. Windows 8
  3. Raspberry Pi model B
  4. Fedora Remix ARM

You can use either Linux (in this article, Slackware) or Windows (in this article Windows 8). Just pick one and follow the rest of article for your choice.

Obtain the Materials

The Operating System images I used is Fedora Remix for ARM. On fedoraproject ARM official site, there is no official support. The reason may come from licensing support or lack of upstream support. However, unofficial fedora remix for Raspberry pi can be found here. You can also directly download the image from here.

Prepare the Disk (SD Card)

To boot the Raspberry Pi, an installation media and storage media is needed. All we need is a single SD card. On this article I use my 8GB SD card. You can use any SD card you want, but I recommend to use at least 4GB SD card. The image we download on previous section will be stored on this card and later installed. Make sure you have a way to write on SD card.

Windows-based Instruction

For Windows user, you can follow this section to “burn” the image. For this purpose you need additional software for writing to SD card, such as Win32DiskImager utility.

  1. Extract the image (in this case rpfr-f18-final.zip) so you will get an .img file.
  2. Insert SD card into SD card reader and check what drive letter it assigned to. For example G:\
  3. If it is not new, format it. Or at least make sure there is only one partition (FAT32 is recommended).
  4. Run the Win32DiskImager with administrator privileges.
  5. Select the image we have extracted.
  6. Select the drive letter of the SD card on our machine. Make sure you have the correct drive, or you will destroy data on that drive.
  7. Click Write and wait. The process should be not long.
  8. Exit the imager and eject the SD card

Beside Win32DiskImager, you can also use other tool such as Flashnul.

  1. Follow step 1 to step 3 for Win32DiskImager’s solution
  2. Extract Flashnul from the archive
  3. Open command prompt with elevated privilege (administrator privilege).
  4. Go to your extracted directory and run flashnul with argument “-p”. For example: flashnul -p
  5. You will get list of physical drive attached on your machine, and list of drive. Make sure the drive is correct. At time of writing this article, the SD card is detected as device number 1 with and mounted to drive G:
  6. Load the image to flashnul: flashnul 1 -L rpfr-f18-final.img
  7. If you get an access denied error, try re-plugging the SD card and make sure to close all explorer windows or folders open for the device. If still get denial, try substitute the device number with its drive letter: flashnul G: -L rpfr-f18-final.img

At this point, you have successfully written image to your SD card. And I assume you are. You can proceed to next stage.

Linux-based Instruction

Writing image on Linux is easier, in my opinion. The utility we use is “dd” which is already bundled on most distro. Make sure you know the correct device file for your SD card. In my machine I use a built in card reader and detect my SD card as /dev/sdb. It might be different on your system so better check it. For this article I use /dev/sdb to refer to SD card.

  1. Extract the image (in this case rpfr-f18-final.zip) so you will get an .img file.
  2. Insert SD card into SD card reader .
  3. If it is not new, format it. Or at least make sure there is only one partition (FAT32 is recommended).
  4. Unmount the SD card if it is mounted. We need the whole SD card so if you see partition such as /dev/sdb1, etc its better you unmount them all.
  5. Write the image to SD card. Make sure you replace the input file after if= argument with correct path to .img file and “/dev/sdb” in the output file of= argument with your device. Also make sure to use whole SD drive and not their partition (i.e. not use /dev/sdb1, /dev/sdb1, etc). The command: dd bs=4M if=rpfr-f18-final.img of=/dev/sdb
  6. Run sync as root. This will ensure the write cache is flushed and safe to unmount SD card.
  7. Remove SD card from card reader.

If you hesitate to use terminal and prefer to use GUI method, here is the tutorial. Note that we

  1. Do step 1 to step 3 for previous tutorial. Make sure your directory or image file doesn’t contain any spaces.
  2. Install the ImageWriter tool from https://launchpad.net/usb-imagewriter
  3. Launch the ImageWriter tool (needs administrative privileges)
  4. Select the image file (in this case rpfr-f18-final.img) to be written to the SD card (note: because you started ImageWriter as administrator the starting point when selecting the image file is the administrator’s home folder so you need to change to your own home folder to select the image file)
  5. Select the target device to write the image to. In my case, it’s /dev/sdb
  6. Click the “Write to device” button
  7. Wait for the process to finish and then insert the SD card in the Raspberry Pi

At this point, you have successfully written image to your SD card. And I assume you are. You can proceed to next stage.

Running the Pi

You have write image and at this point your raspberry pi is ready. Now set up raspberry pi to boot: insert your SD card back to raspberry pi, put on power, plug video output (either HDMI or RCA). You also need to plug an Ethernet cable to a network with a DHCP server and internet gateway. This will be used to set the system clock.

Unlike other images such as Debian Wheezy, you don’t need to do SD card resizing as the fedora will do it for you.

If you use interactive system, you will be prompted to do final system configuration such as setting the root password, create account, set the timezone, and select character mode or graphical default operation. These process are managed by Raspberry Pi init script.

Have fun :D

Installing Bodhi Linux on Raspberry Pi

Posted: 09 Mar 2013 07:05 PM PST

Raspberry Pi, a small computer powered by ARM architecture is a very interesting board for learning embedded system. In this article we will discuss about how to install how to install Bodhi Linux Mobile for Raspberry Pi.

For this article I use following:

  1. Slackware64 14.0
  2. Windows 8
  3. Raspberry Pi model B
  4. BodhiLinux ARM

You can use either Linux (in this article, Slackware) or Windows (in this article Windows 8). Just pick one and follow the rest of article for your choice.

Obtain the Materials

The Operating System images I used is Bodhi Linux for Mobile and can be downloaded from here. You can also directly download the image from here.

Prepare the Disk (SD Card)

To boot the Raspberry Pi, an installation media and storage media is needed. All we need is a single SD card. On this article I use my 8GB SD card. You can use any SD card you want, but I recommend to use at least 4GB SD card. The image we download on previous section will be stored on this card and later installed. Make sure you have a way to write on SD card.

Windows-based Instruction

For Windows user, you can follow this section to “burn” the image. For this purpose you need additional software for writing to SD card, such as Win32DiskImager utility.

  1. Extract the image (in this case bodhi-pi-20130125.img.tar.gz) so you will get an .img file. Extraction on Windows can be done using 3rd party utility such as 7zip.
  2. Insert SD card into SD card reader and check what drive letter it assigned to. For example G:\
  3. If it is not new, format it. Or at least make sure there is only one partition (FAT32 is recommended).
  4. Run the Win32DiskImager with administrator privileges.
  5. Select the image we have extracted.
  6. Select the drive letter of the SD card on our machine. Make sure you have the correct drive, or you will destroy data on that drive.
  7. Click Write and wait. The process should be not long.
  8. Exit the imager and eject the SD card

Beside Win32DiskImager, you can also use other tool such as Flashnul.

  1. Follow step 1 to step 3 for Win32DiskImager’s solution
  2. Extract Flashnul from the archive
  3. Open command prompt with elevated privilege (administrator privilege).
  4. Go to your extracted directory and run flashnul with argument “-p”. For example: flashnul -p
  5. You will get list of physical drive attached on your machine, and list of drive. Make sure the drive is correct. At time of writing this article, the SD card is detected as device number 1 with and mounted to drive G:
  6. Load the image to flashnul: flashnul 1 -L bodhi-pi-20130125.img
  7. If you get an access denied error, try re-plugging the SD card and make sure to close all explorer windows or folders open for the device. If still get denial, try substitute the device number with its drive letter: flashnul G: -L bodhi-pi-20130125.img

At this point, you have successfully written image to your SD card. And I assume you are. You can proceed to next stage.

Linux-based Instruction

Writing image on Linux is easier, in my opinion. The utility we use is “dd” which is already bundled on most distro. Make sure you know the correct device file for your SD card. In my machine I use a built in card reader and detect my SD card as /dev/sdb. It might be different on your system so better check it. For this article I use /dev/sdb to refer to SD card.

  1. Extract the image (in this case bodhi-pi-20130125.img.tar.gz) so you will get an .img file. To extract you can use 3rd party tool such as 7zip.
  2. Insert SD card into SD card reader .
  3. If it is not new, format it. Or at least make sure there is only one partition (FAT32 is recommended).
  4. Unmount the SD card if it is mounted. We need the whole SD card so if you see partition such as /dev/sdb1, etc its better you unmount them all.
  5. Write the image to SD card. Make sure you replace the input file after if= argument with correct path to .img file and “/dev/sdb” in the output file of= argument with your device. Also make sure to use whole SD drive and not their partition (i.e. not use /dev/sdb1, /dev/sdb1, etc). The command: dd bs=4M if=bodhi-pi-20130125.img of=/dev/sdb
  6. Run sync as root. This will ensure the write cache is flushed and safe to unmount SD card.
  7. Remove SD card from card reader.

If you hesitate to use terminal and prefer to use GUI method, here is the tutorial. Note that we

  1. Do step 1 to step 3 for previous tutorial. Make sure your directory or image file doesn’t contain any spaces.
  2. Install the ImageWriter tool from https://launchpad.net/usb-imagewriter
  3. Launch the ImageWriter tool (needs administrative privileges)
  4. Select the image file (in this case bodhi-pi-20130125.img) to be written to the SD card (note: because you started ImageWriter as administrator the starting point when selecting the image file is the administrator’s home folder so you need to change to your own home folder to select the image file)
  5. Select the target device to write the image to. In my case, it’s /dev/sdb
  6. Click the “Write to device” button
  7. Wait for the process to finish and then insert the SD card in the Raspberry Pi

At this point, you have successfully written image to your SD card. And I assume you are. You can proceed to next stage.

Running the Pi

You have write image and at this point your raspberry pi is ready. Now set up raspberry pi to boot: insert your SD card back to raspberry pi, put on power, plug video output (either HDMI or RCA).

To log in on your Raspberry pi you can use the default login, which is:

Username: pi
Password: bodhilinux

Have fun :D

Setting up Static IP address for Raspberry Pi

Posted: 09 Mar 2013 06:44 PM PST

A DHCP network makes easy for network configuration. Any node (computer, laptop, or devices) connected to this network will automatically get IP address. A raspberry pi connected on DHCP network is also get benefit. We don’t need to set IP address manually.

Dynamic IP is good, but at some point it troubles us. In some case static IP address is convenient for deep inspection.

In this article we will discuss about how to set up static IP address for raspberry pi. The method we use is similar to Linux-based PC does, unless you use non Linux Operating System for your Pi.

In this article I use:

  1. Slackware64 14.0 for desktop OS
  2. ArchLinux ARM for Raspberry Pi’s OS

Initial Connection, When and What

Where you want to connect or via what network. If you want to do the setting over network, this question must answered first before we proceed. There are two possibilities for doing static IP setup:

  1. DHCP network in which Raspberry Pi has been assigned with a dynamic IP address. In this scenario we want to set up the board to use a static IP (change from dynamic to static)
  2. Peer to peer or connecting your PC to Pi directly, in which raspberry pi request for dynamic IP but our desktop doesn’t provide any. This is difficult because your machine won’t be able to communicate to your pi
  3. peer to peer with DHCP server enabled on your machine. In this scenario the IP is provided by our machine but we need to know what IP it is.
  4. peer to peer, raspberry pi with static IP assigned before. This is the easiest method. In this scenario, we want to change the IP to something else.

If you don’t want to connect the Pi, we can do another thing. Insert your SD card to your machine host SD card reader. We then can configure the system from this.

Any method is fine and I assume you have known how to connect to your Pi. At least you can access the file system.

Configuration Begin

Now, here is the core for this article.

If you want to connect Raspberry Pi to internet via gateway (switch/router) then you should specify which router pi connect to. Find out what gateway address for your network by using route command. You should see a lines like this:

Kernel IP routing table

Destination Gaterway Genmask Flags Metric Ref Use Iface
default 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0

In this example, my default gateway for this network is 192.168.1.1. Save this information.

If you are only intent to set Pi’s IP for private connection from your machine to your Pi, you can pick any IP you like but make sure both Pi and your machine on same network IP.

Now open /etc/network/interfaces file as super user. You can use text editos such as vi. Modify the file so it will similar to this one:

  # Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or  # /usr/share/doc/ifupdown/examples for more information.  auto lo  iface lo inet loopback  #  # New entries to support static IP follow:    auto eth0  iface eth0 inet static  hwaddress ether b8:27:eb:b5:e8:90  address 192.168.1.113  network 192.168.1.0  netmask 255.255.255.0  broadcast 192.168.1.255  gateway 192.168.1.1  

On above snippet, I set the Pi’s IP address to 192.168.1.113/24 with network 192.168.1.0.

Next, rewrite the content of /etc/resolv.conf so. Invoke following command:

  cat 'nameserver 192.168.1.1' > /etc/resolv.conf  

That line will set our DNS resolver to our gateway.

Reboot your Pi and check whether you get the right IP address by involing ifconfig command.

Java SE Embedded on Raspberry Pi

Posted: 09 Mar 2013 05:51 PM PST

Raspberry, a small computer powered by ARM architecture is a very interesting board for learning embedded system. The joy has not ended soon as Oracle also supported the board with their Java. In this article we will discuss about how to installing Java SE embedded on Raspberry Pi for running Java bytecode.

In this article I use:

  1. Slackware64 14.0
  2. Raspberry Pi Model B
  3. Soft-Float Debian Wheezy
  4. Java SE Embedded

For the installation of Operating System, you can follow this article.

Other things we should prepared:

    • A wired network to which we can connect raspberry pi by an Ethernet cable. The network must supply DHCP IP address

A linux host computer on the same wired Ethernet network as Raspberry Pi to download JAVA. In this case I use Slackware64.

  • Java runtime from Oracle.
  • Enough free space to store Java SE Embedded on Raspberry Pi. 256MB is recommended.

Obtain the Materials

In this section we will use host (Slackware) to download Java SE Embedded and copy it over to the Raspberry Pi. Go to http://www.oracle.com/technetwork/java/embedded/downloads/javase/index.html. To download, you must agree to their license.

Choose Java SE Embedded 7, in this case I choose Java SE Embedded 7 for ARMv6/7 Linux – Headless EABI, SoftVFP ABI, Little Endian. At this time of writing, the version is 7u10 with size 31.39 MB. It is the first item on the list. Download it.

Oracle might ask for you to login. Just create an account if you don’t have any or login with your account if you have.

Setup

Login to Raspberry Pi over the network. The default username is pi with password raspberry. You can use ssh from terminalto do so. Open up another terminal and then copy the Java to pi using scp. Do extraction. You can also store Java on a directory such as /opt/java.

In this article I assume the host computer IP (Slackware64) is 192.168.1.113 and Raspberry IP’s is 192.168.1.114. Of course it would be different in your situation, but you can adjust it. The package is located on /home/xathrya/Downloads with name ejre-7u10-fcs-b18-linux-arm-vfp-client_headless-28_nov_2012.tar.gz.

For detailed command, you can read this commands.

  # terminal 1  cd /home/xathrya/Downloads  scp <strong>ejre-7u10-fcs-b18-linux-arm-vfp-client_headless-28_nov_2012.tar.gz</strong> pi@192.168.1.114:/home/pi    # terminal 2  ssh pi@192.168.1.114  cd /home/pi  mkdir /opt  mv ejre*.gz /opt; cd /opt/java  tar -zxvf *.gz    # launch Java  mv ejre* ejre  /opt/ejre/bin/java -version  

That’s it. At this point, you should be able run Java code on your raspberry :D

Installing RISC OS On Raspberry Pi

Posted: 09 Mar 2013 05:01 PM PST

Raspberry Pi, a small computer powered by ARM architecture is a very interesting board for learning embedded system. In this article we will discuss about how to install how to install RISC OS on Raspberry Pi.

For this article I use following:

  1. Slackware64 14.0
  2. Windows 8
  3. Raspberry Pi model B
  4. Official RISC OS

You can use either Linux (in this article, Slackware) or Windows (in this article Windows 8). Just pick one and follow the rest of article for your choice.

What is RISC OS?

RISC OS is a computer Operating System initially designed and developed by Acorn in Cambridge, England. RISC OS was specifically designed to run on the ARM chipset for their Archimedes personal computers. The name RISC is taken form RISC (Reduced Instruction Set Computing) architecture it support.

Now, the OS is owned by  Castle Technology, and maintained by RISC OS Open. RISC is not for desktop OS which use x86 CPU. Hence it is not very popular and familiar. But mostly RISC OS Is used on embedded system, specifically for the system which use ARM.
RISC OS is unix-like Operating System but differ from Linux.

Obtain the Materials

The Operating System images I used are RISC OS provided by Raspberry Pi on their download page. The version I use is latest version at time of writing this article (per March 10th, 2013). You can either direct download on this link, or download by torrent by this link. This version of RISC OS for Raspberry Pi is free of charge.

Prepare the Disk (SD Card)

To boot the Raspberry Pi, an installation media and storage media is needed. All we need is a single SD card. On this article I use my 8GB SD card. You can use any SD card you want, but I recommend to use at least 4GB SD card. The image we download on previous section will be stored on this card and later installed. Make sure you have a way to write on SD card.

Windows-based Instruction

For Windows user, you can follow this section to “burn” the image. For this purpose you need additional software for writing to SD card, such as Win32DiskImager utility.

  1. Extract the image (in this case riscos-2012-11-01-RC6.zip) so you will get an .img file.
  2. Insert SD card into SD card reader and check what drive letter it assigned to. For example G:\
  3. If it is not new, format it. Or at least make sure there is only one partition (FAT32 is recommended).
  4. Run the Win32DiskImager with administrator privileges.
  5. Select the image we have extracted.
  6. Select the drive letter of the SD card on our machine. Make sure you have the correct drive, or you will destroy data on that drive.
  7. Click Write and wait. The process should be not long.
  8. Exit the imager and eject the SD card

Beside Win32DiskImager, you can also use other tool such as Flashnul.

  1. Follow step 1 to step 3 for Win32DiskImager’s solution
  2. Extract Flashnul from the archive
  3. Open command prompt with elevated privilege (administrator privilege).
  4. Go to your extracted directory and run flashnul with argument “-p”. For example: flashnul -p
  5. You will get list of physical drive attached on your machine, and list of drive. Make sure the drive is correct. At time of writing this article, the SD card is detected as device number 1 with and mounted to drive G:
  6. Load the image to flashnul: flashnul 1 -L riscos-2012-11-01-RC6.img
  7. If you get an access denied error, try re-plugging the SD card and make sure to close all explorer windows or folders open for the device. If still get denial, try substitute the device number with its drive letter: flashnul G: -L riscos-2012-11-01-RC6.img

At this point, you have successfully written image to your SD card. And I assume you are. You can proceed to next stage.

Linux-based Instruction

Writing image on Linux is easier, in my opinion. The utility we use is “dd” which is already bundled on most distro. Make sure you know the correct device file for your SD card. In my machine I use a built in card reader and detect my SD card as /dev/sdb. It might be different on your system so better check it. For this article I use /dev/sdb to refer to SD card.

  1. Extract the image (in this case 2013-02-09-wheezy-raspbian.zip) so you will get an .img file.
  2. Insert SD card into SD card reader .
  3. If it is not new, format it. Or at least make sure there is only one partition (FAT32 is recommended).
  4. Unmount the SD card if it is mounted. We need the whole SD card so if you see partition such as /dev/sdb1, etc its better you unmount them all.
  5. Write the image to SD card. Make sure you replace the input file after if= argument with correct path to .img file and “/dev/sdb” in the output file of= argument with your device. Also make sure to use whole SD drive and not their partition (i.e. not use /dev/sdb1, /dev/sdb1, etc). The command: dd bs=4M if=riscos-2012-11-01-RC6.img of=/dev/sdb
  6. Run sync as root. This will ensure the write cache is flushed and safe to unmount SD card.
  7. Remove SD card from card reader.

If you hesitate to use terminal and prefer to use GUI method, here is the tutorial. Note that we

  1. Do step 1 to step 3 for previous tutorial. Make sure your directory or image file doesn’t contain any spaces.
  2. Install the ImageWriter tool from https://launchpad.net/usb-imagewriter
  3. Launch the ImageWriter tool (needs administrative privileges)
  4. Select the image file (in this case riscos-2012-11-01-RC6.img) to be written to the SD card (note: because you started ImageWriter as administrator the starting point when selecting the image file is the administrator’s home folder so you need to change to your own home folder to select the image file)
  5. Select the target device to write the image to. In my case, it’s /dev/sdb
  6. Click the “Write to device” button
  7. Wait for the process to finish and then insert the SD card in the Raspberry Pi

At this point, you have successfully written image to your SD card. And I assume you are. You can proceed to next stage.

Running the Pi

You have write image and at this point your raspberry pi is ready. Now set up raspberry pi to boot: insert your SD card back to raspberry pi, put on power, plug video output (either HDMI or RCA).

RISC OS is different to other Operating System for Raspberry we have discussed (hence, they are Linux-based).

To resize the SD card after installation, you can follow this article.

Installing Arch Linux on Raspberry Pi

Posted: 09 Mar 2013 04:39 PM PST

Raspberry Pi, a small computer powered by ARM architecture is a very interesting board for learning embedded system. In this article we will discuss about how to install how to install Arch Linux ARM on Raspberry Pi.

For this article I use following:

  1. Slackware64 14.0
  2. Windows 8
  3. Raspberry Pi model B
  4. Official Arch Linux ARM

You can use either Linux (in this article, Slackware) or Windows (in this article Windows 8). Just pick one and follow the rest of article for your choice.

Obtain the Materials

The Operating System images I used are Arch Linux ARM which use hard-float system ABI provided by Raspberry Pi on their download page. The version I use is latest version at time of writing this article (per March 10th, 2013) and only use hard-float ABI. You can either direct download on this link, or download by torrent by this link.

Prepare the Disk (SD Card)

To boot the Raspberry Pi, an installation media and storage media is needed. All we need is a single SD card. On this article I use my 8GB SD card. You can use any SD card you want, but I recommend to use at least 4GB SD card. The image we download on previous section will be stored on this card and later installed. Make sure you have a way to write on SD card.

Windows-based Instruction

For Windows user, you can follow this section to “burn” the image. For this purpose you need additional software for writing to SD card, such as Win32DiskImager utility.

  1. Extract the image (in this case archlinux-hf-2013-02-11.zip) so you will get an .img file.
  2. Insert SD card into SD card reader and check what drive letter it assigned to. For example G:\
  3. If it is not new, format it. Or at least make sure there is only one partition (FAT32 is recommended).
  4. Run the Win32DiskImager with administrator privileges.
  5. Select the image we have extracted.
  6. Select the drive letter of the SD card on our machine. Make sure you have the correct drive, or you will destroy data on that drive.
  7. Click Write and wait. The process should be not long.
  8. Exit the imager and eject the SD card

Beside Win32DiskImager, you can also use other tool such as Flashnul.

  1. Follow step 1 to step 3 for Win32DiskImager’s solution
  2. Extract Flashnul from the archive
  3. Open command prompt with elevated privilege (administrator privilege).
  4. Go to your extracted directory and run flashnul with argument “-p”. For example: flashnul -p
  5. You will get list of physical drive attached on your machine, and list of drive. Make sure the drive is correct. At time of writing this article, the SD card is detected as device number 1 with and mounted to drive G:
  6. Load the image to flashnul: flashnul 1 -L archlinux-hf-2013-02-11.img
  7. If you get an access denied error, try re-plugging the SD card and make sure to close all explorer windows or folders open for the device. If still get denial, try substitute the device number with its drive letter: flashnul G: -L archlinux-hf-2013-02-11.img

At this point, you have successfully written image to your SD card. And I assume you are. You can proceed to next stage.

Linux-based Instruction

Writing image on Linux is easier, in my opinion. The utility we use is “dd” which is already bundled on most distro. Make sure you know the correct device file for your SD card. In my machine I use a built in card reader and detect my SD card as /dev/sdb. It might be different on your system so better check it. For this article I use /dev/sdb to refer to SD card.

  1. Extract the image (in this case archlinux-hf-2013-02-11.zip) so you will get an .img file.
  2. Insert SD card into SD card reader .
  3. If it is not new, format it. Or at least make sure there is only one partition (FAT32 is recommended).
  4. Unmount the SD card if it is mounted. We need the whole SD card so if you see partition such as /dev/sdb1, etc its better you unmount them all.
  5. Write the image to SD card. Make sure you replace the input file after if= argument with correct path to .img file and “/dev/sdb” in the output file of= argument with your device. Also make sure to use whole SD drive and not their partition (i.e. not use /dev/sdb1, /dev/sdb1, etc). The command: dd bs=4M if=archlinux-hf-2013-02-11.img of=/dev/sdb
  6. Run sync as root. This will ensure the write cache is flushed and safe to unmount SD card.
  7. Remove SD card from card reader.

If you hesitate to use terminal and prefer to use GUI method, here is the tutorial. Note that we

  1. Do step 1 to step 3 for previous tutorial. Make sure your directory or image file doesn’t contain any spaces.
  2. Install the ImageWriter tool from https://launchpad.net/usb-imagewriter
  3. Launch the ImageWriter tool (needs administrative privileges)
  4. Select the image file (in this case archlinux-hf-2013-02-11.img) to be written to the SD card (note: because you started ImageWriter as administrator the starting point when selecting the image file is the administrator’s home folder so you need to change to your own home folder to select the image file)
  5. Select the target device to write the image to. In my case, it’s /dev/sdb
  6. Click the “Write to device” button
  7. Wait for the process to finish and then insert the SD card in the Raspberry Pi

At this point, you have successfully written image to your SD card. And I assume you are. You can proceed to next stage.

Running the Pi

You have write image and at this point your raspberry pi is ready. Now set up raspberry pi to boot: insert your SD card back to raspberry pi, put on power, plug video output (either HDMI or RCA).

To resize the SD card after installation, you can follow this article.

To log in on your Raspberry pi you can use the default login, which is:

Username: root
Password: root

Have fun :D

Installing Soft-Float Debian Wheezy on Raspberry Pi

Posted: 09 Mar 2013 04:36 PM PST

Raspberry Pi, a small computer powered by ARM architecture is a very interesting board for learning embedded system. In this article we will discuss about how to install how to install Soft-Float Debian Wheezy on Raspberry Pi. For installing Hard-Float version, you can follow this article.

For this article I use following:

  1. Slackware64 14.0
  2. Windows 8
  3. Raspberry Pi model B
  4. Official Debian Wheezy

You can use either Linux (in this article, Slackware) or Windows (in this article Windows 8). Just pick one and follow the rest of article for your choice.

Hard-Float and Soft-Float?

Hard-Float (hardware floating point calculation) and Soft-Float (software floating point calculation) are refers to how floating point are calculated.

The difference of Hard-float and Soft-float lies on how and what method are used to calculated floating points. The hard-float means floating point calculations are processed by chip hardware whereas soft-float calculations are emulated. This impact on performance and theoretically hard-floats won the race in term of speed. But some application / software doesn’t support hard-float code so despite of the facts, it needs to be installed on soft-float system.

If you are familiar with Intel processor, you will find similarity between their (Intel and ARM) situation. Hard-float is pretty much comparable to floating point calculation using 80×87 maths co-processor. Hardware float-point calculation will win every time on speed but on some occasion (if processor cannot float or perform correctly, i.e. on Cyrix 486 or early Pentium) the software emulation will win for sure.

Obtain the Materials

The Operating System images I used are Debian Wheezy which use soft-float system ABI provided by Raspberry Pi on their download page. The version I use is latest version at time of writing this article (per March 10th, 2013). You can either direct download on this link, or download by torrent by this link.

Prepare the Disk (SD Card)

To boot the Raspberry Pi, an installation media and storage media is needed. All we need is a single SD card. On this article I use my 8GB SD card. You can use any SD card you want, but I recommend to use at least 4GB SD card. The image we download on previous section will be stored on this card and later installed. Make sure you have a way to write on SD card.

Windows-based Instruction

For Windows user, you can follow this section to “burn” the image. For this purpose you need additional software for writing to SD card, such as Win32DiskImager utility.

  1. Extract the image (in this case 2012-08-08-wheezy-armel.zip) so you will get an .img file.
  2. Insert SD card into SD card reader and check what drive letter it assigned to. For example G:\
  3. If it is not new, format it. Or at least make sure there is only one partition (FAT32 is recommended).
  4. Run the Win32DiskImager with administrator privileges.
  5. Select the image we have extracted.
  6. Select the drive letter of the SD card on our machine. Make sure you have the correct drive, or you will destroy data on that drive.
  7. Click Write and wait. The process should be not long.
  8. Exit the imager and eject the SD card

Beside Win32DiskImager, you can also use other tool such as Flashnul.

  1. Follow step 1 to step 3 for Win32DiskImager’s solution
  2. Extract Flashnul from the archive
  3. Open command prompt with elevated privilege (administrator privilege).
  4. Go to your extracted directory and run flashnul with argument “-p”. For example: flashnul -p
  5. You will get list of physical drive attached on your machine, and list of drive. Make sure the drive is correct. At time of writing this article, the SD card is detected as device number 1 with and mounted to drive G:
  6. Load the image to flashnul: flashnul 1 -L 2012-08-08-wheezy-armel.img
  7. If you get an access denied error, try re-plugging the SD card and make sure to close all explorer windows or folders open for the device. If still get denial, try substitute the device number with its drive letter: flashnul G: -L 2012-08-08-wheezy-armel.img

At this point, you have successfully written image to your SD card. And I assume you are. You can proceed to next stage.

Linux-based Instruction

Writing image on Linux is easier, in my opinion. The utility we use is “dd” which is already bundled on most distro. Make sure you know the correct device file for your SD card. In my machine I use a built in card reader and detect my SD card as /dev/sdb. It might be different on your system so better check it. For this article I use /dev/sdb to refer to SD card.

  1. Extract the image (in this case 2013-02-09-wheezy-raspbian.zip) so you will get an .img file.
  2. Insert SD card into SD card reader .
  3. If it is not new, format it. Or at least make sure there is only one partition (FAT32 is recommended).
  4. Unmount the SD card if it is mounted. We need the whole SD card so if you see partition such as /dev/sdb1, etc its better you unmount them all.
  5. Write the image to SD card. Make sure you replace the input file after if= argument with correct path to .img file and “/dev/sdb” in the output file of= argument with your device. Also make sure to use whole SD drive and not their partition (i.e. not use /dev/sdb1, /dev/sdb1, etc). The command: dd bs=4M if=2012-08-08-wheezy-armel.img of=/dev/sdb
  6. Run sync as root. This will ensure the write cache is flushed and safe to unmount SD card.
  7. Remove SD card from card reader.

If you hesitate to use terminal and prefer to use GUI method, here is the tutorial. Note that we

  1. Do step 1 to step 3 for previous tutorial. Make sure your directory or image file doesn’t contain any spaces.
  2. Install the ImageWriter tool from https://launchpad.net/usb-imagewriter
  3. Launch the ImageWriter tool (needs administrative privileges)
  4. Select the image file (in this case 2012-08-08-wheezy-armel.img) to be written to the SD card (note: because you started ImageWriter as administrator the starting point when selecting the image file is the administrator’s home folder so you need to change to your own home folder to select the image file)
  5. Select the target device to write the image to. In my case, it’s /dev/sdb
  6. Click the “Write to device” button
  7. Wait for the process to finish and then insert the SD card in the Raspberry Pi

At this point, you have successfully written image to your SD card. And I assume you are. You can proceed to next stage.

Running the Pi

You have write image and at this point your raspberry pi is ready. Now set up raspberry pi to boot: insert your SD card back to raspberry pi, put on power, plug video output (either HDMI or RCA).

To resize the SD card after installation, you can follow this article.

To log in on your Raspberry pi you can use the default login, which is:

Username: pi
Password: raspberry

Have fun :D

Tidak ada komentar:

Posting Komentar