Oct 5

Since Geany provide a nice wrapper around the cammand line based compiler environment, I guess there will be a simular solution for the commandline based debugger. The first step to take in order to find a nice IDE is than the same as for Geany, in the Applications menu from Ubuntu click the Add/Remove… option. In the search field enter debug and click on the popularity column. The first found graphical user interface for GDB is KDbg, select it and click the Apply button in order to install it. This adds a shortcut in the Applications | Programming menu next to Geany.

After starting KDbg the first thing to do it is to make sure that debugger that will be used is not the PC-based debugger but gdb-cris. The Settings menu has an option Global settings, in the debugger tab an input line is available “How to invoke GDB”. It states gdb –fullname –nx so by default it uses gdb as a debugger. In order to use gdb-cris by default, replace this with /usr/local/gdb-cris/gdb-cris –fullname –nx and press the OK button. I’m not sure what the options mean but they were there so better leave them.

Since the debugger will be called using the Makefile it must be possible to launch it from the command line. Therefor close KDbg and open a terminal. Giving the command kdbg — help shows all available command line options. Specially the -r option for remote debugging via an interface is helpful since it must connect to the FB using gdbserver using a network connection. In the tips page of the KDbg site this is explained in more detail, using the command line kdbg -r FOXBoard:1234 Hello_World should connect to the FB, before giving this command first open a second terminal and start gdbserver 10.0.0.157:1234 Hello_World, the terminal will state that dbserver is listening on port 1234 for remote commands.

Second, navigate to the folder holding the executable Hello_World, in my case /home/jan/FOXBoard/HelloWorld. In this folder now enter the command kdbg -r FOXBoard:1234 Hello_World. This will start KDbg, indeed a connection is made to the FOXBoard since gdbserver reports Remote debugging from host 10.0.0.158, apparently I have a different IP address that previous (158 in stead of 157), but gdbserver does not seem to mind, it accepts any command from any server.

In KDbg, no source file is opened, this is not so nice, I was hoping that main.c was opened automatically. Something to investigate later, for now the file is opened using the File | Open source… menu. By clicking in front of the plus-sign on the line containing int main () a red dot is added indicating a breakpoint has been set. Selecting the Execution | Run menu option shows a green arrow at the first line of the program. Selecting the Execution | Step over or pressing F10 executes one line after another, the output of the Hello_World application is displayed in the terminal from gdbserver. When the end of the application is reached selecting Execution | Run menu or pressing F5 will finish the application, the gdbserver terminal indeed reports that the child has exit with status 0. Nice!

After playing sometime with KDbg, I’m missing some functions. For one, when the application on the FB terminates it would be nice to re-connect to the FB when gdbserver is started again. The only way to connect now it to close KGdb and start it again. All debug commands in KDbg are disabled when the gdbserver terminates. After restarting gdbserver there is a command Execution | Attach available that prompts for the process ID to connect to. Typing FOXBoard:1234 is accepted, all debug commands are enabled but gdbserver does not detect that KGdb is trying to connect. Since no errors are reported it is difficult to see what commands are executed, however there is another command line option available to specify a file that is used for logging all gdb commands.

Close Kdbg and restart it now using the command  kdbg -r FOXBoard:1234 -t Dump.txt Hello_World, after executing and restarting the application with gdbserver now again the command Execution | Attach is given. After this Kgdb is closed and the file Dump.txt is examined using the command gedit Dump.txt, this file indeed shows a lot of messages that were given to gbd. It also shows that the correct version of gdb is used (This GDB was configured as “–host=i386-linux –target=cris”) and many more (usefull) gdb commands. At the end, it states attach FOXBoard:1234 that (I guess) was triggered by my attach action. The response of gdb is “Don’t know how to attach.  Try “help target”.”, so that is why it does not work. Closing Kdbg and starting gdb-cris in a terminal window shows the same responds. After several tries the solution is very simple, in Kdbg simply reload the executable using the File | Recent executables… menu option, after the reload gdbserver replies with Remote debugging from host 10.0.0.158 and debugging starts from the first line again.

The second option that I’m missing is to restart the application half way the debugging process. There is a Execution | Restart menu option but this shows the gdbserver is being killed, so no restart. Investigating the file Dump.txt again shows a run command is given in gdb when selecting the restart menu option. Also here checking what gdb-cris does result in a question (after the run command halfway the debugging) that “The program being debugged has been started already. Start it from the beginning? (y or n)”. A very valid question, answering this with y kills the running instance of gdbserver followed by the previous complaint from gdb “Don’t know how to attach.  Try “help target”.”

Since the response is the same, perhaps the solution is the same? Halfway the debugging process in Kgtb the executable is reloaded using the File | Recent executables… menu option. Gdbserver reports that the remote side has terminated the connection and that it will re-open the connection. Not exactly what I was hoping for since the debugging does not start at the beginning but were it has been stopped.

Sep 18

Now that GDB-Server is installed on the FB it is time to see if the Hello_World application can be debugged on my development PC over the network to the FB.

On the Axis developer site there is mentioning of special make commands to compile the target code in such a way that debug information is added to the executable. Since I want to make use of my own make file in order to fully understand how this works the make file must be changed to include more compiler flags. Open Geany, load the HelloWorld project and change the make file as listed below (only the CFLAGS definition changes):

COMPILER = /usr/local/cris/bin/gcc-cris
CFLAGS = -g -fno-omit-frame-pointer -O0 -mlinux -o
SOURCES = main.c MyUnit.c
TARGET = Hello_World
DESTINATION = root@FOXBoard:/mnt/flash/bin/HelloWorld

# top-level rule to create the program, executed by default if no params are provided
all: compile

# Called by pressing the Compile or Build button in Geanny
compile: $(SOURCES)
<TAB>$(COMPILER) $(CFLAGS) $(TARGET) $(SOURCES)

build: compile

<TAB>scp $(TARGET) $(DESTINATION)

Press the execute button in Geany so that the HelloWorld application is compiled with the new settings and copied to the FB. Using a SSH, navigate to /mnt/flash/bin/HelloWorld and execute ./Hello_World to verify if the application works.

In a different terminal, check what IP address is used by the development PC, in my case 10.0.0.157. This needs to be used on the FB in GDB-Server so it knows to whom to listen. In the folder /mnt/flash/bin/HelloWorld on the FB enter the command gdbserver 10.0.0.157:1234 Hello_World, as a response the a process is started for Hello_World and GDB-Server will use port 1234 to listen if 10.0.0.157 sends commands.

In a terminal on the development PC, navigate to /usr/local/gdb-cris and enter the command ./gdb-cris /home/jan/FOXBoard/HelloWorld/Hello_World, this will start GDB and the prompt will change into (gdb). Enter the command target remote FOXBoard:1234, some warnings are given that GDB is not able to debug shared libraries but for now let’s ignore those since in the terminal for the FB a message will appears Remote debugging from host 10.0.0.157 so it seems that communication between host and target has been made.

In order to set a breakpoint on the first line of the main () function, enter the command break main in GDB-Server. The response shows it could set the breakpoint in main.c on line 6, so far so good. Enter the command help running will give a list of possible commands to step through the program. One of them is continue that runs until a breakpoint is encountered. Entering this command shows some errors that /lib/ld.so.1 can not be found, seems that this is the shared library that triggered the previous warning. GDB stops at line 6 showing the source line. Next command is step that executes one line of code. In the FB terminal the Hello world message appears. Use the step command repeatly to step line by line through the code until GDB states the program exited normally and GDB-Server states that the Child exited with retcode 0.

Not bad!

Sep 17

After 5 days of exchanging messages with Jesper from the Axis Customer Service I finally managed to build a distribution with GDBServer enabled. It’s a very long process how to get there, below the steps needed.

Next to the cris compiler and path modifications several packages must be installed in Ubuntu 8.04 using the Synaptic Package Manager. Select below listed packages:

  • GCC
  • bash
  • make
  • wget
  • gawk
  • bc
  • byacc
  • flex
  • perl
  • sed
  • tar
  • zlib1g
  • zlib1g-dev
  • libncurses5
  • libncurses5-dev
  • bison

Since some of the shell scripts used by the Axis build system are not POSIX compliant, the system shell must be able to handle the exceptions. Ubuntu uses by default a shell called “dash” and can not handle the exception; for this reason the shell must be changed to “bash” which can handle them. In a terminal execute below three commands:

  • cd /bin
  • sudo rm sh (followed by your password)
  • ln -s bash sh

When completed you will need to reboot the PC. In order to verify if bash is now used as the default shell enter the command ls -al /bin/sh, this should should result in a line similar like this:

lrwxrwxrwx 1 root root 4 2008-09-15 20:55 /bin/sh -> bash

In order to install the build system, download the file devboard-R2_10.tar.gz by selecting the Install Package Version 2.10 March 9, 2007 and save this in a separate folder (in my case /home/jan/FOXBoard/Install/BuildSystems). Navigate to this folder and enter the command tar xfz devboard-R2_10.tar.gz, this will create a folder devboard-R2_10. Navigate into this folder and execute the command ./configure, this will whole lot of fetching, checking and unpacking messages and finally prompt for a product configuration to use. Enter 5 to select the FOXBoard LX832 and when a question is displayed if you would like to configure the SDK now enter y. A three step overview is displayed on which steps to take in order to build the distribution after which the configure application is stopped.

Enter the command make menuconfig, this will compile a whole bunch of applications on your PC, the process will take several minutes to finish. There are a lot of warnings flying by, these are apparantly ok as long as the process continues and does not display any errors. If so, verify that all packages have been installed as listed above, remove the devboard-R2_10 folder using the rm -r devboard-R2_10 command and extract the folder again using the tar command.

When the process stops a program is launched in the terminal that allows you to select all the options that are available to include in the distribution. For now I’m only interested in adding the GDBServer application that can be found in the Debug Configuration menu option, scroll to this option and press enter, scroll to the Enable GDB server support option and press y in order to select it. Use the right arrow to navigate to the Exit button and again to the Exit button to stop the configuration program. Selecting the yes button will save the configuation and return to the terminal.

On the prompt type again the command ./configure, the same process of fetching, checking and unpacking will start again, only this time with a lot more packages to fetch. Some of them are big so it seems the program hangs but give it a few minutes. The final message should be that the configuration of the SDK is done and the make command must be executed. If you though that all previous step took a long time, this will is even longer. It takes 50 minutes on my mini-ITX board, Axis advices to sit back and drink a cup of coffee, I can only agree.

Also this process should end without any errors. As a result a file called fimage is created in the folder dev_board-R2_10. This is the flash file that needs to be programmed in the FB using programming tools that can be downloaded from the AcmeSystems site, they are called boot_linux and etrax100boot. Save them a separate folder (in my case /home/jan/FOXBoard/Install/Distributions) and in this folder execute the command chmod a+x boot_linux etrax100boot in order to be able to execute them later. Copy the flash file fimage in to this folder using a more descriptive name (in my case fimage832_GDBServer).

Remove the power supply from the FB and place a jumper on the two outer pins of header J8. Switch on the power supply again, due to the jumper the FB will enter a programming state, only the green LED will light up. Navigate to the Distributions folder containing the flash image. In the terminal execute the command arp -n in order to find the ethernet interface of the PC, mine states eth0. This is the interface you will need to use in the next command in combination with the flash file that needs to be programmed: sudo ./boot_linux -F -d eth0 -i fimage832_GDBServer followed by the password of your account on the PC. The boot_linux program will program the FB over the network, when the verify result is OK it will exit with code 0.

At that moment the red LED will start flashing on the FB, the reason for this is that the FB serial number is not configured. In order to fix this a secure shell must be opened, however due to the reflash the IP address of the FB is reset to it’s default address 192.168.0.90. Since my network uses 10.x.x.x the serial RS232 adapter is used with the Serial Port Terminal to get access to the FB.

In the serial terminal, navigate to the folder /etc/conf.d folder and enter the command easyedit net.eth0. Modify the IP address and save the file. Next enter the command bootblocktool -a SERNO 00408CCD0000 which will fix the serial number issue although the red LED will continue to flash.

Remove the jumper (very important!) and enter the reboot command or cycle the power. The FB should now boot normal and after a few seconds the ping 10.0.0.180 command will show it’s running the new distribution.

To prevent typing the password when starting the SSH connection you will first need to remove the fingerprint from the old FB distribution on your PC using the command sudo rm /home/jan/.ssh/known_hosts and store the public key of the PC again on the FB. After this the command ssh root@FOXBoard can be given that starts an SSH terminal without requesting the password. Typing the command gdbserver shows now the usage of gdbserver which tells me it is indeed part of the distribution.

Thank you Jesper!

Sep 12

After a post to the Axis support team it seems libncurses5-dev must be installed also. After installing the series of messages changed but still no success in launching the configuration menu. More posts to the Axis team followed and info is needed. A day later, typing make menuconfig to log the messages it miraculously works! It seems a reboot is needed after installing the lib-stuff.

A blue window appears with a user interface that looks like the first applications I build using Turbo Pascal many years ago.  Navigating through the various options I leave all the settings as is except checking all the options in the Debug Configuration menu.

After saving the configuration using the default filename .config and exiting the application the command ./configure must be given. This now completes without any errors, it’s time to test building my own configuration with the command make.

No, not a success. Now only one error appears so progress is made. It states Makefile:96: *** missing separator. Stop. Posting this message to the Axis team result in a comment that the build system is not fully posix compliant, the solution should be to change the system shell. The command echo $SHELL shows I’m already using bash. I posted the feedback and the Makefile to the Axis team for feedback.

Sep 10

In order to debug a remote application two things are required: a debugger running on the development machine and a debug server running on the actual hardware that interfaces between the application and the development machine. The basic debugger for Linux is called GNU Debugger (GDB for short) that provides the basic interfacing with applications to do proper debugging. There are several graphical user interfaces that make use of the GDB engine to make life more easy.

On the FB an application call GDBServer is required that controls the local running application and receives commands from the remove running GDB. According the Axis site this is part of the software distribution but not installed by default. I’m not sure why, but the site states it’s easy to configure this. Let’s try.

It starts with downloading the debugger for cris in the file gdb-cris_6.3.50-cvs20050523-1_i386.deb, since there are instructions how to install it select the save to file option. In a terminal, navigate to the folder in which the file was stored and enter the command sudo dpkg –install gdb-cris_6.3.50-cvs20050523-1_i386.deb, after providing your password it installs the package in /usr/local/gdb-cris. This folder needs to be added to the PATH variable to make the debugger available in the local folder that holds the application to debug.

Next step would be to compile the GDBServer and install it on the FB. For this the file devboard-R2_10.tar.gz must be downloaded. This is stored in the folder /home/jan/FOXBoard/Install/BuildSystem, in this folder the command tar xfz devboard-R2_10.tar.gz is given that creates the folder devboard-R_10. In this folder execute ./configure, this will extract all other files and ask for which board the system needs to be build. Number 5 is for the fox_832 board, type y to configure the SDK now. This creates the different make files.

In order to build the distribution there are three possible options to pass to make. Axis advices to use make menuconfig, this triggers a whole list of commands and finally terminates with an error that Ncurses could not be found. It advices to use make config that does not depend on Ncurses. Typing make config results in a simulair list of command, but (oops) it also results in the same error that Ncursus could not be found.

Using System | Administration | Synaptic Package Manager, typing your password and searching for Ncurses actually indicates that this is installed in Ubuntu 8. Ncurses-bin and Ncurses-hexedit are not, to be sure these two are installed aswell after which the make process is repeated. Still the error.


Sep 7

Since a specific dependency can be passed as parameter when the makefile is called I guess an IDE uses this to execute the required command. For example:

COMPILER = /usr/local/cris/bin/gcc-cris
CFLAGS = -mlinux -o
SOURCES = main.c
TARGET = Hello_World
DESTINATION = root@FOXBoard:/mnt/flash/bin/HelloWorld

# top-level rule to create the program, executed by default if no params are provided
all: compile

# Called by pressing the Compile or Build button in Geanny
compile: $(SOURCES)
<TAB>$(COMPILER) $(CFLAGS) $(TARGET) $(SOURCES)

build: compile

<TAB>scp $(TARGET) $(DESTINATION)

When the command make compile is executed, the code is only compiled. When the command make build it first executes the compile dependency and than copies the executable to the target. I would expect that the IDE provides the basic menu structure and allows the programmer to enter the command to execute when the menu item is selected. In that case, it’s easy to integrate custom compilers or special target needs in the default IDE.

After spending a hour searching how this works in Anjuta I could not find how to make this work. It might be that Anjuta is already to complex for what I want, it is designed for working with huge open source projects, in my case it will be a couple of local files that need to be managed.

Searching the internet for a simple Linux IDE results in several hits refering to Geany. The home page states “It was developed to provide a small and fast IDE, which has only a few dependencies from other packages”. Sounds like this is what I’m looking for. Using the Applications | Add/Remove… menu in Ubuntu shows that Geany can automaticly be installed.

After installation and starting Geany it is easy to find your way in this program. First guess is that I will be needing to setup a new project, using the Project | New menu option. It asks for a project name (HelloWorld), the file to store the project settings in (HelloWorld.geany) and the base folder of the project (/home/jan/FOXBoard/HelloWorld). After pressing the create button I can open the files that I already created before manually (main.c).

After opening the main.c file the Build menu options are enabled. Selection the Build | Compile menu command shows that gcc is used for compiling the application and that no errors are found. Nice, but I don’t want gcc but I want gcc-cris to be used, or actually I want that make is called with my own parameter.

In the Build menu there is an option available Set includes and arguments, selecting this option shows a dialog that offers three input fields to enter commands for Compile, Build and Execute. Here the gcc command is listed, I guess these commands are indeed given to Linux to execute so entering make compile in the Compile field, make build in the Build field and make build in the Execute field should do the trick. After pressing the OK button and selecting Build | Compile the Compiler shows in blue the execute command (make compile (in directory:/home/jan/FOXBoard/HelloWorld)) and the output of the make program (/usr/local/cris/bin/gcc-cris -mlinux -o Hello_World main.c). After a second a blue message indicates that the Compilation finished successfully. The Build | Build menu command or the Build | Execute command does the same with the addition of executing the secure copy as well.

In the Edit | Preferences menu you can select in the Toolbar tab the option to display a Compile and Run button. These buttons call the Build | Compile menu (and so make compile) and the Build | Execute menu (and so make build) to make life even more easy.

On purpose a mistake is made in main.c to check how errors are handled. The printf is replaced by pri ntf, after pressing compile it shows an error in the Compiler tab and highlights the error in main.c. Very, very nice! It looks like I found my base for the developing code, next step would be to include a debugger as well.

Sep 6

Since sshfs and NFS are both not working I’m stuck with copying any executable program to the FB using the scp command. This not very convenient since the executable is expected to change many times during development.

In order to compile and link C-programs normally a MAKE file is used, this is also the case when using Anjuta. A make file is in principle nothing else than a batch file containing several commands that are executed depending the current state of any source file. They look very complex, but when the programs remain simple using only a couple of privatly controlled source files than the complexity reduces very quickly. It might be an option to create my own make file and include all required actions that need to take place after compiling.

In that case the work flow would be:

  • Start an ssh terminal ones and leave it running during the development session
  • Create the code, execute the make file that compiles, links and copies the result to the FB
  • In the ssh a new file is available that can be executed to see the results
  • If not OK, switch back to the editor, change the code and run make again

This can only work if all commands that must be executed do not requeire any user input during the execution. The scp command however does prompt for a password, so this must be fixed first.

A typical makefile contains lines of the following types:

  • Comments, any line beginning with a “#” sign, or any line that contains only white-space

For example:

# This is a makefile for the Hello_World application

  • Variable Definitions, these lines define values for variables

For example:

CFLAGS = -mlinux -o
SRCS = main.c file1.c file2.c
CC = gcc-cris
TARGET = Hello_World

  • Dependency Rules, these lines define under what conditions a given file (or a type of file) needs to be re-compiled, and how to compile it

For example:

main.o: main.c
gcc-cris -mlinux -o Hello_World main.c

This rule means that main.o has to be recompiled whenever main.c is modified. The rule continues to tell us that in order to compile main.o, the command gcc-cris -mlinux -o Hello_World main.c needs to be executed. Note that each line in the commands list must begin with a TAB character. Make is quite picky about the makefile’s syntax.

The definited variables can be used in any statement using $(variable name), the previous example of the main.o dependancy can be rewritten as follows:

main.o: main.c
$(CC) $(CFLAGS) $(TARGET) main.c

The benefit of this is clear, when multiple source files are use a change in the compiler flags only needs to be made in one place. Also it is very easy to change the compiler into gcc so that the output is now compiled for the development PC.

As a result, the basic makefile for the HelloWorld application is:

COMPILER = gcc-cris
CFLAGS = -mlinux -o
SOURCES = main.c
TARGET = Hello_World

# top-level rule to create the program, executed by default if no parameters are provided
all: compile

# compiling the source file.
compile: $(SOURCES)
<TAB>$(COMPILER) $(CFLAGS) $(TARGET) $(SOURCES)

Save the file in the same folder as the source files using the filename Makefile. In a terminal window navigate to the folder in which the makefile was stored and enter the command make. Since no parameter is given, make executes the first dependency it finds; in this case all. Since this depends compile is searches for the compile dependency. Compile depends on the variable SOURCES (main.c) and the associated command is executed.

Next the copy command is included:

COMPILER = gcc-cris
CFLAGS = -mlinux -o
SOURCES = main.c MyUnit.c
TARGET = Hello_World
DESTINATION = root@FOXBoard:/mnt/flash/bin/HelloWorld

# top-level rule to create the program, executed by default if no params are provided
all: compile

# compiling the source file.

compile: $(SOURCES)

<TAB>$(COMPILER) $(CFLAGS) $(TARGET) $(SOURCES)
<TAB>scp $(TARGET) $(DESTINATION)

When executed, the application is now compiled and copied to the FB and the really cool part is that if during execution of the commands an error is detected all next commands are ignored! This might happen if (by accident of course) an error is made in the source code. The compiler than exits with a non-zero exit value, this prevents make from executing all other commands.

Sep 6

During every secure transaction with the FB the root password is requested. This is because the FB does not trust the public key of the development PC that is passed to the FB during any secure operation (e.g. ssh or scp). To prevent typing the password all the time the public key of the development PC can be added to the list of key that are authorized by the FB to gain access.

On the development PC, make sure you are logged in as the user that will also be used for development of FB applications. In a terminal window, enter the command ssh-keygen -t rsa, this will generate a public and private key pair. When prompted for the file in which the key will be save, press enter. Same for the prompts to enter a passphrase and to enter it for confirmation. This will generate the file id_rsa.pub in the /home/jan/.ssh folder. Copy this file to the FB using the scp /home/jan/.ssh/id_rsa.pub root@FOXBoard:/root/.ssh command. Now you still need to enter the password pass. In a second terminal, start a ssh terminal to the FB. In the folder /root/.ssh add the id_rsa.pub file to the file containing all authorization keys using the command cat id_rsa.pub >> authorized_keys. When finished, remove the public key using the command rm id_rsa.pub.

Now all secure actions should no longer ask for a password (e.g ssh and scp). This can be tested by closing the ssh terminal using the exit command and starting again the terminal using ssh root@FOXBoard, indeed, it is started without the password prompt.

Aug 31

In the case of sshfs a folder from my development PC is mapped on top of a folder of the FB. Since this does not work, another option to use is NFS (Network File System). In this case a folder on the development PC is setup so it can be shared over the network and the FB will create a local mapping of the folder, similar like the share function in Windows.

First thing to do is setting up the development PC as an NFS server. In order to do so edit /etc/exports as a minimum. To build in more security, also /etc/hosts.allow and /etc/hosts.deny can be edited, but for testing if it works I only work with /etc/exports.

In a terminal give the command sudo gedit /etc/exports, after entering your password add the following statement at the end of the file:

/home/jan/FOXBoard 10.0.0.151(rw) 10.0.0.180(rw)

This will give my second development PC (at 10.0.0.151) and the FB (at 10.0.0.180) read and write access to the folder /home/jan/FOXBoard on my main development PC (10.0.0.157). Save and close the file, than for nfsd to re-read the file using the exportfs -ra command.

On the second development PC (10.0.0.151) I want to map the remote folder in /mnt/Remote. For this the folder Remote needs to be created using the command sudo mkdit /mnt/Remote

The mapping of the remote folder is done using the sudo mount 10.0.0.157:/home/jan/FOXBoard /mnt/Remote command. Indeed, when listing the content of the /mnt/Remote folder I see the different hello world applications.

To unmount the folder, first leave the Remote folder and type the command umount /mnt/Remote (it is indeed umount and not unmount).

Now let’s see if this also works on the FB. Using ssh a sesion is started, in the folder /mnt there are already several folders (0, 1, 2, 3 and flash). They are all read-only except the flash folder, so create the folder in the flash location using the mkdir /mnt/flash/Remote command. Next the mapping command mount 10.0.0.157:/home/jan/FOXBoard /mnt/flash/Remote is entered. Several errors are listed, the most important one is mount: 10.0.0.157:/home/jan/FOXBoard failed, reason given by server: Permission denied

Some Googleing shows a command to verify if nfs is available by viewing filesystems file in the folder /proc (cat /proc/filesystems). This should contain a line with nfs in it. On the development PC this is the case (nfs and nfs4). On the FB however there is no nfs entry.

Damm.

Aug 26

In order to have easier access to the file system of the FB I want to map the internal flash drive to a folder on my Ubuntu PC. Some Googleing later I found the command sshfs which is basically nothing else than mapping a remote folder to a local folder using ssh as the underlying channel.

The internal flash of the FB is available in the folder /mnt/flash, this folder should be mapped on /home/jan/FOXBoard. In order to do so the command should be:

sshfs root@10.0.0.180:/mnt/flash /home/jan/FOXBoard

After pressing enter the password for root access on the FOXBoard is requested, typing pass and enter results in a second delay after which the message remote host has disconnected is displayed. Tripple checking the command does not show any error, it might be that the FB does not support the command.

In order to verify if the command is indeed 100% correct I will take some drastic measures: install Ubuntu on my Windows XP machine. Not by replacing Windows but installing it next to Windows as a dual boot system. This sounds complex but it is fully taken care of by the installation CD of Ubuntu. After inserting the CD and restarting this is one of the options in the installation menu. After installing and restarting the PC option 1 is Windows XP and option 2 is Ubuntu. Ubuntu is selected and all packages are installed so that in theory I have a same setup as on the mini ITX system that only holds Ubuntu.

The second Ubuntu PC is available at 10.0.0.151, after creating a folder /home/jan/Remote on this PC below command is executed:

sshfs jan@10.0.0.151:/home/jan/Remote /home/jan/FOXBoard

Also here the password is requested and after providing it no message is displayed other than the normal prompt. Copying the hello_host application on the ITX to the /home/jan/FOXBoard folder works, switching to the second Ubuntu PC indeed shows the file is available in /home/jan/Remote. It can be executed and deleted, after deleting the ITX indeed shows its gone aswell. Closing the mapping is done using the fusermount -u /home/jan/Remote.

So apparently the command was correct and the FB does not support sshfs.

« Previous Entries Next Entries »