Benutzer-Werkzeuge

Webseiten-Werkzeuge


becki:linux:wago_750-860_tips

Dies ist eine alte Version des Dokuments!


Tips zum Linux-FBK 750-860

Howto update the System

Sources:

  1. DENX U-Boot and Linux Guide (DULG) → 5.9. U-Boot Command Line Interface

This guide is based on the manual → 5.10 File System and Linux Kernel Update

  1. Boot, log in as root and set the date/time with date MMDDhhmm[[CC]YY]. According to the manual 4.3.2 date is part of Busybox and sets the realtimeclock, so that the hwclock command is not necessary.
  2. Type printenv to check the environment variables and correct the ipaddresses of the FBK and the server if required:
    setenv ipaddr 192.168.xxx.yyy
    setenv serverip 192.168.xxx.zzz
  3. Compare all other variables with the actual manual and correct them if required. Especially check update-rootfs, update-kernel & update-ub. (E.g. printenv update-kernel)
  4. Type saveenv to save the modifications into the flash.
  5. Start TFTP with /tftpboot as TFTP source directory (uncomment and modify the line in /etc/inetd.conf accordingly; make /etc/rc.d/rc.inetd runnable and start it with /etc/rc.d/rc.inetd restart)
  6. Mount the toolchain.iso and copy linux.flashme and jffs2.img to /tftpboot
  7. Update:
    run update-kernel
    run update-rootfs

    Dont use a managed Hub; if you encounter problems with your hub or switch, use a crosslink cable!

FIXME After update to kernel 2.6 no login prompt appears any more on the serial connection!

Allgemeines

  • Allgemeine Wago-Produkte-Doku / Links to Data Sheet & Manual
  • Wago stellt eine Support-Cd, diese wird im Folgendem CD_Linux_Controller genannt
  • Telnet und Ftp-Zugang mit root/wago
  • Ip-Adresse ändern mit wagoset
  • Bootstrap: /etc/inittab startet ua. /etc/startwago startet ua. /bin/mb_tcp (modbus)

Installation der Toolchain

… auf Slackware 10.2. Generelle Vorgehensweise gemäß Wago Linux Programmierhandbuch

Arm-elf-tools installieren

arm-elf-tools-20030314.sh ausführen. Erhältlich von http://www.uclinux.org/pub/uClinux/m68k-elf-tools/ oder CD_Linux_Controller/toolchain/linux/ Dies installiert:

/usr/local/bin/arm-elf-*
/usr/local/bin/elf2flt
/usr/local/bin/genromfs
/usr/local/bin/flthdr
/usr/local/lib/gcc-lib/arm-elf/
/usr/local/man/man1/arm-elf-*
/usr/local/arm-elf/

/usr/bin/mkimage installieren

  1. rpm2tgz mkimage-0.3.0-1.i386.rpm
  2. installpkg mkimage-0.3.0-1.i386.tgz

Dies installiert /usr/bin/mkimage . Das Rpm gibts hier: Gibts CD_Linux_Controller/toolchain/linux/

Benutzerrechte für mknod ändern

  1. visudo aufrufen und fogendes eintragen (Ändert /etc/sudoers):

%users ALL = NOPASSWD: /bin/mknod

Anlegen der Transferverzeichnisse

  1. mkdir /tftpboot; chmod a+w /tftpboot
  2. mkdir /targetfs; chmod a+w /targetfs

uClinux Kernel-Quellcode installieren

Installation als normaler user!

/mnt/CD_Linux_Controller/sources/linux$ ./linux-kernel.sh
~/uClinux$ make menuconfig (alle Dialoge abbrechen)
~/uClinux$ make dep 
~/uClinux$ make

Eine neue Applikation erstellen

Am Beispiel der App „tester“

  • mkdir ~/uClinux/user/testdir
  • ~/uClinux/user/testdir/tester.c schreiben
  • ~/uClinux/user/Makefile: dir_y = kbusapi … testdir (einfügen)
  • ~/uClinux/user/testdir/Makefile erstellen. ~/uClinux/user/wagoset/Makefile als Vorlage benutzen!
  • Aufruf von make user von ~/uClinux aus! Dies compiliert offensichtlich alle ~/uClinux/user/*/*.c :?:
  • Programm tester per FTP übertragen

Was wird includiert?

$(CFLAGS) beinhaltet als ersten -I Schalter den Pfad ~/uClinux/lib/uClibc/include , was tatsächlich auf ~/uClinux/uClibc/include zeigt. Hier liegen alle gängigen Header-Dateien.

Auch asm/types.h wird hier gefunden, jedoch löst das der asm-Symlink tatsächlich nach ~/uClinux/linux-2.4.x/include/asm/types.h auf.

Io-Api

  • /proc/driver/kbus/pab gibt Auskunft über die gesteckten IO-Module und deren Byte-Adressen
  • kbusdemo liegt in entgegen dem Manual in user/wagokbusdemo

Todo

  • NFS benutzen

Offene Fragen

  • Ist eine Austauschplattform (Wiki, Forum, FAQ's) zum 750-860 im Internet vorhanden?
  • Shortcut zum Wiederholen des letzten Befehls in der Konsole?
  • Anzeige der Prozessorlast? (der Befehl top fehlt)
  • Compiler: Woher kommen die Datentypen __u16, __u8, ...
  • c++-code mit /usr/local/bin/arm-elf-g++ verwendbar? Mit welchen Paramtern aufzurufen?
  • Was ist /usr/local/bin/arm-elf-c++ ?
Cookies helfen bei der Bereitstellung von Inhalten. Diese Website verwendet Cookies. Mit der Nutzung der Website erklären Sie sich damit einverstanden, dass Cookies auf Ihrem Computer gespeichert werden. Außerdem bestätigen Sie, dass Sie unsere Datenschutzerklärung gelesen und verstanden haben. Wenn Sie nicht einverstanden sind, verlassen Sie die Website. Weitere Information
becki/linux/wago_750-860_tips.1244566131.txt.gz · Zuletzt geändert: 2009-06-09 16:48 von becki

Impressum - Datenschutzerklärung