• Home
  • Help
  • Search
  • Login
  • Register
Pages: 1 [2] 3 4 ... 9
Author Topic: Sheevaplug installer - alpha-6 release - Testers needed  (Read 48057 times)
jdonth
Jr. Member
**

Karma: 0
Posts: 75

Azle, Texas


View Profile
« Reply #15 on: June 10, 2009, 06:50:45 AM »

Is there a way to add a post-processing script to the installer?

I want to add the ufw package and a couple of other tweaks.

Thanks,
~Joe

Logged

...I've always depended on the kindness of strangers

jdonth
Jr. Member
**

Karma: 0
Posts: 75

Azle, Texas


View Profile
« Reply #16 on: June 11, 2009, 10:47:58 AM »

Still trying to add a post-processing step to the installer.

The following steps did not work:

1) Un-tar'd the rootfs.tar.gz into /alpha-6/rootfs directory of my Linux box
2) edited the (/alpha-6/rootfs)/etc/rc.local file and added "apt-get -y install wget"
3) tar'd the rootfs back up with: tar -cavf /rootfs.tar.gz /alpha-6/rootfs
4) Copied the new rootfs.tar.gz to the FAT32 usb drive
5) Inserted the usb drive in the SheevaPlug
6) ran ./runme.sh

The SheevaPlug never came "back to life". (See my earlier post about having to wait 5 minutes after the "runme.sh" script finished)

Does anyone know the tar command that was used to build the installer's rootfs.tar.gz?
Any other thoughts or suggestions?

Thanks,
~Joe
Logged

...I've always depended on the kindness of strangers

Rabeeh Khoury
Administrator
Full Member
*****

Karma: 5
Posts: 218


View Profile
« Reply #17 on: June 11, 2009, 10:55:48 AM »

The problem is probably step #3.
You need to make sure that when you untar the archive, the /usr /bin and all other root directories must be in the root directory.

I think in your case it would be in the rootfs directory.
Logged

jdonth
Jr. Member
**

Karma: 0
Posts: 75

Azle, Texas


View Profile
« Reply #18 on: June 11, 2009, 11:40:45 AM »

I hate to bother you but I don't quite understand...

The original "rootfs.tar.gz" has been extracted in /alpha-6 thus the directory structure is:

/alpha-6/bin
...
/alpha-6/var

What tar command should I use to tar the rootfs properly?

Logged

...I've always depended on the kindness of strangers

jdonth
Jr. Member
**

Karma: 0
Posts: 75

Azle, Texas


View Profile
« Reply #19 on: June 11, 2009, 01:59:38 PM »


I have the post-processing logic working. Thanks for all the help.

FYI:
I untar'd the original rootfs.tar.gz into /alpha-6/ of my linux box then performed my changes to the rootfs.
(As a test, I just added "apt-get -y install wget" to the /etc/rc.local file)

then inserted the FAT32 usb drive (on my system it shows up as sdb1) then ran the following script:

Code:
#!/bin/bash
cd /alpha-6
if [ -e /alpha-6/rootfs.tar.gz ]
then
 echo "/alpha-6/rootfs.tar.gz already exists..."
 exit 1
fi

if [ $(mount | grep -c /dev/sdb1) != 0 ]
then
 echo "Umounting /startup"
 umount /startup
fi

echo "Mounting usb drive on /startup"
mount -t vfat -o rw,noauto,nodev,nosuid,noexec,noatime,dmask=000,fmask=111 /dev/sdb1 /startup
if [ $(mount | grep -c /dev/sdb1) == 0 ]
then
 echo "Could not mount /dev/sdb1"
 exit 1
fi

echo "Compressing rootfs.tar.gz..."
tar -caf rootfs.tar.gz *
ls /startup/rootfs.tar.gz -l
if [ -a /startup/rootfs.tar.gz ]
then
 echo "Deleting old rootfs.tar.gz"
 rm /startup/rootfs.tar.gz
fi

echo "Copying new rootfs.tar.gz to usb drive..."
cp /alpha-6/rootfs.tar.gz /startup
ls /startup/rootfs.tar.gz -l

echo "Unmounting usb drive"
umount /startup
Logged

...I've always depended on the kindness of strangers

bpsbr_ernie
Newbie
*

Karma: 0
Posts: 5


View Profile
« Reply #20 on: June 12, 2009, 08:12:00 AM »

I've tried some of the suggestions like restarting the plug, plugging/unplugging the usb cable, deleting all partitions from the USB drive and reformatting with FAT32, changing the 2000 kHz to 1000 and 500.

Serial connection seems OK, mounts ttyUSB0 and ttyUSB1, can use ttyUSB1 for a console.

Once booted, I can mount the USB stick manually on the plug, so it is detecting it.

Any ideas?  Thanks in advance..

Code:
**** Preparing environment variables file ...
 **** Burning uboot and environment variables ... This will take few minutes ...
Open On-Chip Debugger 0.2.0-in-development (2009-05-17-10:32) svn:1800M


BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS


$URL: http://svn.berlios.de/svnroot/repos/openocd/trunk/src/openocd.c $
1000 kHz
dcc downloads are enabled
Error: JTAG communication failure, check connection, JTAG interface, target power etc.
Error: trying to validate configured JTAG chain anyway...
Error: Could not validate JTAG scan chain, IR mismatch, scan returned 0x00. tap=feroceon.cpu pos=0 expected 0x1 got 0
Warn : Could not validate JTAG chain, continuing anyway...
Warn : value captured during scan didn't pass the requested check:
Warn : captured: 0x00 check_value: 0x01 check_mask: 0x0F
Warn : no telnet port specified, using default port 4444
Warn : no gdb port specified, using default port 3333
Warn : no tcl port specified, using default port 6666
Error: unknown EmbeddedICE version (comms ctrl: 0x00000000)
Error: unexpected Feroceon EICE version signature
Error: timed out while waiting for target halted
Runtime error, file "../scripts-linux/openocd/config/board/sheevaplug.cfg", line 24:
   
 **** openocd FAILED
 **** Is the mini USB cable connected?
 **** Try powering down, then replugging the Sheevaplug
Logged

lloverin
Newbie
*

Karma: 0
Posts: 11


View Profile
« Reply #21 on: June 13, 2009, 07:15:55 AM »

I am a Linux newbie, having last used a system 20 years ago.  I followed the directions, but when I term into the Sheeva, and type "sudo ./runme" I get errors, such as these:

command not found
sudo: unable to execute ./runme.sh: No such file or directory

I am in the USB directory, see all the files, verified that the attributes are executable (rwxr-xr-x)

What am I doing wrong?

-Larry
Logged

jdonth
Jr. Member
**

Karma: 0
Posts: 75

Azle, Texas


View Profile
« Reply #22 on: June 13, 2009, 07:31:59 AM »

Larry,

The ./runme.sh file must be run from a linux box that has the SheevaPlug micro USB port connected to it. --not the SheevaPlug.

If I misunderstood your question, sorry.

~Joe
Logged

...I've always depended on the kindness of strangers

restamp
Global Moderator
Sr. Member
*****

Karma: 4
Posts: 273


View Profile
« Reply #23 on: June 14, 2009, 09:28:04 PM »

Why is it necessary to be root in order to run runme.sh?  Is it only to access the /dev/ttyUSB0 device, or is it needed for some other reason?
Logged

lloverin
Newbie
*

Karma: 0
Posts: 11


View Profile
« Reply #24 on: June 15, 2009, 07:58:56 AM »

quote:
Larry,

The ./runme.sh file must be run from a linux box that has the SheevaPlug micro USB port connected to it. --not the SheevaPlug.

If I misunderstood your question, sorry.

~Joe


So, I cannot use Putty (on a Windows box) through the micro USB port (as serial term) and run the package from the USB drive inserted in the Sheeva?  What difference would it make when I am serial terminal into the Sheeva?

-Larry


Logged

restamp
Global Moderator
Sr. Member
*****

Karma: 4
Posts: 273


View Profile
« Reply #25 on: June 15, 2009, 12:08:40 PM »

I'm a novice with respect to the Sheeva, too, but here is my assessment:

The micro USB port actually presents two devices to the host computer:  One is the Sheeva console (this is actually the second device -- typically /dev/ttyUSB1 on a Linux host), and the other is a device (/dev/ttyUSB0) that interfaces with the JTAG on the Sheeva.  The runme.sh script uses OpenOCD to talk to the JTAG, and OpenOCD uses the JTAG device.

If you connect the micro USB to a Windows box, the JTAG interface will also be on the Windows box, and you'd have to have a rather complete Unix environment plus an OpenOCD that runs on Windows to execute the runme.sh script successfully.

Bear in mind that the installer attempts to install everything from scratch, including a new pristine Uboot and its environment, and it needs the JTAG interface to do this.  If you only want to install an OS, you can probably accomplish this from a Windows box with the proper install script on a USB drive attached to the Sheeva.  You'd have to break out to the Uboot and set up the proper environment manually.
Logged

lloverin
Newbie
*

Karma: 0
Posts: 11


View Profile
« Reply #26 on: June 15, 2009, 12:32:58 PM »

Ok. So, I will check to see which COM ports are open when connected to the Sheeva, and choose that to talk to it and I will be on the JTAG - have I got that correct?  I know that I saw com port 9 open when it is plugged into the Sheeva, so there may be another port open too that is the JTAG.  That's what I will talk to the Sheeva on.

Would it be better that I connect this to a Linux box (I have an Ubuntu install here).  What difference will it make to term to the Sheeva?

Thank you!

-Larry


I'm a novice with respect to the Sheeva, too, but here is my assessment:

The micro USB port actually presents two devices to the host computer:  One is the Sheeva console (this is actually the second device -- typically /dev/ttyUSB1 on a Linux host), and the other is a device (/dev/ttyUSB0) that interfaces with the JTAG on the Sheeva.  The runme.sh script uses OpenOCD to talk to the JTAG, and OpenOCD uses the JTAG device.

If you connect the micro USB to a Windows box, the JTAG interface will also be on the Windows box, and you'd have to have a rather complete Unix environment plus an OpenOCD that runs on Windows to execute the runme.sh script successfully.

Bear in mind that the installer attempts to install everything from scratch, including a new pristine Uboot and its environment, and it needs the JTAG interface to do this.  If you only want to install an OS, you can probably accomplish this from a Windows box with the proper install script on a USB drive attached to the Sheeva.  You'd have to break out to the Uboot and set up the proper environment manually.
Logged

bpsbr_ernie
Newbie
*

Karma: 0
Posts: 5


View Profile
« Reply #27 on: June 15, 2009, 12:50:17 PM »

In my case I see /dev/ttyUSB0 and /dev/ttyUSB1 up.  I connect over serial from a linux box (tried ubunto 8.04 and fedora 11 live cd) and can use the console.

When I run ./runme.sh, I get "Error: JTAG communication failure, check connection, JTAG interface, target power etc.", it tries to continue and fails.

The Sheeva reboots and I can watch on the console.

If I go and do an "ls /dev/*USB*" I only see /dev/ttyUSB1.   

/dev/ttyUSB0 appears to unmount.
Logged

restamp
Global Moderator
Sr. Member
*****

Karma: 4
Posts: 273


View Profile
« Reply #28 on: June 15, 2009, 02:52:04 PM »

Would it be better that I connect this to a Linux box (I have an Ubuntu install here).  What difference will it make to term to the Sheeva?
Unless you want to play around with loading a Unix environment like cygwin (to execute the scripts) under Windows and compiling your own copy of OpenOCD (to access the JTAG, and even then it's anyone's guess whether it would work), I'd suggest trying it with your Ubuntu.

The following instructions are pretty good:

http://www.openplug.org/plugwiki/index.php/Setting_up_Serial_Console_Under_Linux
Logged

lloverin
Newbie
*

Karma: 0
Posts: 11


View Profile
« Reply #29 on: June 16, 2009, 06:29:36 AM »

So that I get this straight (I was a mainframe programmer years ago and console let me compile and run programs over a serial connection).  When I access the serial port on the Sheeva, and access the source of the Alpha6 install on the USB stick, I am not actually running it on the Sheeva as a (root) user?  Why won't the Sheeva environment execute the script?  Please pardon me, I am learning as much as I can about this.

Thank you,

-Larry

 
Would it be better that I connect this to a Linux box (I have an Ubuntu install here).  What difference will it make to term to the Sheeva?
Unless you want to play around with loading a Unix environment like cygwin (to execute the scripts) under Windows and compiling your own copy of OpenOCD (to access the JTAG, and even then it's anyone's guess whether it would work), I'd suggest trying it with your Ubuntu.

The following instructions are pretty good:

http://www.openplug.org/plugwiki/index.php/Setting_up_Serial_Console_Under_Linux
Logged

Pages: 1 [2] 3 4 ... 9
Print
Jump to: