New IT forum
23 April 2014, 05:54:44 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: PiHub now in stock.
 
   Home   SHOP Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Getting Started with the Sheevaplug  (Read 37468 times)
NewIT_Marcus
Hero Member
*****
Posts: 960


« on: 10 October 2009, 11:56:17 am »

This information applies to the Sheevaplug only. We'll create a Guruplug version as soon as possible.

Prerequisites

Some of the instructions that we provide, or that you will find elsewhere on the 'net may provide long and/or complicated commands to be entered on the command line. The ability to copy and paste this information will save a great deal of time.

  • For Linux users:
  • We prefer the cu package, which runs from a terminal (command line).

    • Installation may be as simple as apt-get install cu
    • Sometimes it is necessary to execute sudo modprobe ftdi_sio vendor=0x9e88 product=0x9e8f for the connected SheevaPlug to be recognised.
    • Then it's as easy as cu -s 115200 -l /dev/ttyUSB1 (within a cu session type ~? to list commands and ~z to exit).
    • (When connecting via ssh you can copy / paste the same as you would do in any other terminal session)


  • For Windows Users:

    • Do read the .pdf ReadMe that is on the SheevaPlug CD. Appendix B gives instructions on how to install the driver for connecting via the USB miniport.(this is no longer supplied as a CD, but can be downloaded from here: http://www.downloadsnewit.co.uk/CD-images/Sheeva_CD/)
    • We prefer PuTTY when working with the USB connection, however you cannot copy & paste in or out of a PuTTY session. We prefer Cygwin for anything that involves copy & paste. The installer for Cygwin is somewhat unusual, but the key element that is required is openssh, which is to be found in the Net category of the package list.

We strongly recommend that the very first things that you do are to install the aforementioned packages on the PC that you will use to connect to the SheevaPlug.

Concepts

The SheevaPlug has Ubuntu 9.04 pre-installed. If or when you get stuck, it may be helpful to use SheevaPlug and / or Ubuntu in your search terms.

Unless you have purchased a pre-configured UBIFS or SD card booting model, there are a couple of configuration errors with the pre-installed Ubuntu. For instructions on correcting those errors, see here. (But you should read the rest of this article first).

  • For Windows users and / or linux newbies:
    • In order to edit a file on the SheevaPlug, from within a terminal session, we recommend nano. If you already know how to use another editor, by all means use the method that you are familiar with. Otherwise, type nano -w /path/to/file - the TAB key may be used to autocomplete. The -w switch allows for simpler editing of long lines ("Don't wrap long lines").
    • When you are logged in as root, your access to the system is not restricted and you should be able to run any command, or edit any file. If you are logged in as any other user, it may be necessary to prefix your command with sudo, which will prompt you for your current password and then allow you to run the otherwise restricted command. For instance, unless you are logged in as root mkdir /mnt/my-usb-stick would most likely display the error mkdir: cannot create directory `/mnt/my-usb-stick': Permission denied. The correct way to execute the command would be sudo mkdir /mnt/my-usb-stick
    • In a terminal session, you may use the up and down arrows on your keyboard to recall previous typed commands, and navigate through them.

Until you've configured additional software or attached an external communications device (such as a USB wireless device), there are two ways to connect to your SheevaPlug; via the included USB cable or via ethernet.

Sometimes when connecting, you may be presented with a blank (terminal) screen. You may wonder if you did something wrong. If nothing seems to be happening, hit the Enter key and you should see a welcome prompt. If you don't, go back and check your settings.

If you connect via USB, you can observe the boot process, and you should see a series of console messages similar to that listed in the Appendices of the USB Flash Recovery pdf file on the CD. It starts like this:


         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_
| | | |___|  _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
 \___/    |____/ \___/ \___/ \__|
 ** MARVELL BOARD: SHEEVA PLUG LE

U-Boot 1.1.4 (Mar 19 2009 - 16:06:59) Marvell version: 3.4.16

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CEE80

Soc: 88F6281 A0 (DDR2)
CPU running @ 1200Mhz L2 running @ 400Mhz
SysClock = 400Mhz , TClock = 200Mhz

DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 256MB
DRAM CS[1] base 0x10000000   size 256MB
DRAM Total size 512MB  16bit width
Flash:  0 kB
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:512 MB

CPU : Marvell Feroceon (Rev 1)

Streaming disabled
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME], egiga1
Hit any key to stop autoboot:  0



There's no need to stop the autoboot; wait another minute or two and you should be presented with a login prompt. Sometimes it doesn't appear immediately (if you connected after the boot process is completed, for instance, so there's no harm in hitting enter if you see only an empty screen).

If you connect via ssh, you must first wait for the SheevaPlug to boot up and be assigned an IP address (i.e. it will need to be connected to a network where there is a DHCP server; usually a router or modem will provide such a service).


debian login:


Login as root with password nosoup4u


debian login: root
Password:
Last login: Sun Sep 20 17:40:53 UTC 2009 on ttyS0
Linux debian 2.6.22.18 #1 Thu Mar 19 14:46:22 IST 2009 armv5tejl

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/
root@debian:~#


Now you may use this login to configure the SheevaPlug the way you want it. (The first thing you might want to do is change the root password, and create a non-root user).

In its out-of-the-box configuration, the SheevaPlug will boot in approximately 2 minutes; here's one set of timings:

From power-up to mounting the jffs2 filesystem30 seconds
mounting the jffs2 filesystem70 seconds
final part of boot 20 seconds

See also:


2009-11-07: Edited to clarify that Fixing the out-of-the-box configuration is not appropriate to UBIFS and SD card boot configurations.
2009-11-14: Added link to computingplugs.com
2009-11-24: Added link for Mac users
« Last Edit: 14 September 2011, 01:41:31 pm by NewIT_Tayler » Logged
NewIT_Marcus
Hero Member
*****
Posts: 960


« Reply #1 on: 16 February 2010, 03:26:08 pm »

If you purchased one of our preconfigured plug options, more details about your configuration may be found in the booting board
Logged
NewIT_Marcus
Hero Member
*****
Posts: 960


« Reply #2 on: 10 October 2010, 04:05:14 pm »

This information was originally posted in our preconfigured Debian SD cards thread, but the issue applies to many of the Sheevaplug configurations that we sell, and belongs somewhere for all to see.

From a security point of view, using ssh keys that already exist on a preconfigured plug is not a good idea. You don't know how or when those keys were generated, or who may have had access to those keys. In some cases (it happens on our Fedora SD card), the keys are generated at the time of first boot. You could look into that, and attempt to verify it, and decide whether or not you believed that this was as secure as you would like.

Or you could just go straight ahead with generating new keys (which is what we would recommend, as good security practice):

Code:
ssh-keygen -q -f /etc/ssh/ssh_host_key -N '' -t rsa1
ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa
ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa

Note that the ssh keys will have been created on the NAND for all multiboot plugs, and on most SD cards. My recollection (as stated in the original post) is that the ssh keys are generated at the time that they are first required under Fedora; in all other cases that I am aware of the keys will not be unique (ie they will be the same for all plugs where we used the same rootfs for building the SD card, or flashing the NAND).

Bottom line: Regenerate your ssh keys as soon as you possible.

See also http://www.softec.st/en/OpenSource/DevelopersCorner/HowToRegenerateNewSsh.html

2010-10-24: Modified to correct ssh commands
« Last Edit: 24 October 2010, 10:04:40 pm by NewIT_Marcus » Logged
kleptog
Newbie
*
Posts: 13


« Reply #3 on: 10 October 2010, 05:57:55 pm »

Or you could just go straight ahead with generating new keys (which is what we would recommend, as good security practice):

Code:
ssh-keygen -q -f /etc/ssh/ssh_host_key -N  -t rsa1
ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N  -t rsa
ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N  -t dsa

[/quote]

ISTM something got lost above, the -N option requires a argument, you probably intended an empty string, like so:

Code:
ssh-keygen -q -f /etc/ssh/ssh_host_key -N '' -t rsa1
ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa
ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa
Logged
NewIT_Marcus
Hero Member
*****
Posts: 960


« Reply #4 on: 24 October 2010, 10:06:15 pm »

Thank you for the correction. I have modified the original post, so as to avoid confusion.
Logged
bittner
Newbie
*
Posts: 6



WWW
« Reply #5 on: 13 April 2011, 08:21:14 am »

The SheevaPlug has Ubuntu 9.04 pre-installed.

Marcus, is there any safe and easy way to use a more recent version of Ubuntu on the Sheevaplug? What about apt-pinning?

IIUC, the reason why we can't use 10.04 Lucid LTS is that there is no kernel for running the Sheevaplug in the 10.04 repository. Isn't it possible to pin the kernel and have all remaining packages be taken from a current release? Should be feasible, shouldn't it?

Sorry for not having tried this myself, but I'm so afraid of f***ing up my plug again...
Logged

NewIT_Marcus
Hero Member
*****
Posts: 960


« Reply #6 on: 13 April 2011, 04:36:53 pm »

I thought that the reason more recent versions of Ubuntu aren't available is that ARM binaries aren't offered.

As for pinning, it seems to me that the reason one chooses an O/S - especially one with such a helpful package manager as Debian, but even more so with Ubuntu, is so that one doesn't have to make decisions about software versions; the package manager takes care of it all. It's what I like about my standard desktop setup. If I want to experiment, mix & match, then I am wanting to have more freedom, but I must sacrifice more attention and work on my own part. I'll do that for the sake of experimentation, but not on a production / critical use platform.

Personally, I think that if Ubuntu can be said to be good at anything, it is good at making linux look like a reasonable alternative to a Windows user. I'll even put aside some of my own bad upgrade experiences and suggest that on the whole they probably do a fair job of that. But I don't see desktops as being terribly significant for plug computers, and my own preference is for Debian. Whereas Ubuntu might push through a version number change every 6 months, like it or not, both stable and testing branches of Debian will experience regular updates, and just because they don't have a version number change, it doesn't mean they aren't valuable updates.

I'll bet you can quote examples of packages that you would like to use in versions more recent than that provided by Debian or Ubuntu, but I bet that issue works against plenty of users too. If you want the ultimate freedom, try Slackware; I managed to install it on an SD card; I should have some notes about it somewhere, if you want some hints. But I don't think the [version of the] Operating System is quite as important on a plug, if it is designed for a small number of specific tasks. IMO the aim should be to configure it, stabilise it, then leave it alone as much as possible.

I was under the impression that at some point in the future Ubuntu will support a version of the ARM processor that will be used on future hardware. I don't know the specifics (sorry if that's not very helpful).
Logged
TheoGB
Newbie
*
Posts: 3


« Reply #7 on: 02 July 2011, 11:35:07 am »

Hi

Quote
For Windows Users:

Do read the .pdf ReadMe that is on the SheevaPlug CD. Appendix B gives instructions on how to install the driver for connecting via the USB miniport.

My eSATA plug arrived without a CD. I decided to just plug it into my PC using the USB anyway and let Windows 7 x64 find the drivers but it tells me it couldn't find a SheevaPlug JTAGKey FT2232D B driver so what do I do next? This is pretty frustrating. Sad

Googling isn't helping a great deal.
« Last Edit: 02 July 2011, 11:37:40 am by TheoGB » Logged
TheoGB
Newbie
*
Posts: 3


« Reply #8 on: 02 July 2011, 06:28:25 pm »

Okay,

I got an email pointing out the driver CD was here:

http://www.downloads.newit.co.uk/

Thanks
Logged
TheoGB
Newbie
*
Posts: 3


« Reply #9 on: 05 July 2011, 07:50:41 am »

Just to say: PuTTY does allow cut and paste but it works much like Windows CMD Shell in that you copy in Windows but you just right click the mouse in PuTTY to paste. You can select and do CTRL+C to copy from PuTTY but again, you are given no indication you copied it until you paste elsewhere.
Logged
NewIT_Marcus
Hero Member
*****
Posts: 960


« Reply #10 on: 13 July 2011, 07:26:15 am »

As of 2011-07ish, see this post for a necessary change to apt sources:

Quote
Try http://old-releases.ubuntu.com/ubuntu/ instead of http://ports.ubuntu.com/ in your /etc/apt/sources.list
Logged
cumulus
Newbie
*
Posts: 1


« Reply #11 on: 21 August 2011, 03:32:43 pm »

When I read that this tutorial "would save me a great deal of time" to get started with my brand new NewIt Meteo Sheevaplug I must admit that I had some doubts...
I connected the plug to my Mandriva Linux box with the provided mini USB cable and to my router.

A few hours later and a lot of Googling, I got as far as getting the prompt "Marvell>>"
chown uucp /dev/ttyUSB0
cu -s 115200 -l /dev/ttyUSB0

I even discovered that if I typed DHCP I got the plug's router IP (which the router refused to tell me for some reason).
I also found out the hard way how to stop the connection with ~z (2 times Alt Gr ~ and z)...

Now, how can I talk further to my plug and get a login prompt for exemple?

ssh root@routerIP is of no help so far.
It answers "ssh: connect to host 192.168.0.5 port 22: No route to host".

Could any one please help me getting some return on my investment.
This Sheevaplug is meant to export meteo data to to my web site .
Logged
peterhodge877
Newbie
*
Posts: 1



WWW
« Reply #12 on: 10 June 2012, 08:25:21 pm »

PuTTY does enable cut as well as paste however it works a lot like Windows CMD Shell because you copy in Windows however you just right click on the computer mouse in PuTTY to paste. You are able to select and also do CTRL+C to copy from PuTTY however once more, one is given virtually no indication you copied it until you paste someplace else.
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!