Telem-GW6Lin filesystem: Difference between revisions
m (Lehekülg "Telem-GW6Lin-filesystem" teisaldatud pealkirja "Telem-GW6Lin filesystem" alla) |
No edit summary |
||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
= Preparations = | == File system overview == | ||
== Connecting to gateway through serial console == | === Root of the file system consists of the following files and folders === | ||
This file system is in flash memory of the DIMM module | |||
<pre>roland@spirit:~/Projects/Telem-GW6Lin/gw6fs/rootfs$ ls -l --classify --human-readable | |||
total 44K | |||
drwxr-xr-x 2 root root 4.0K 2009-08-13 12:53 bin/ | |||
drwxr-xr-x 2 root root 4.0K 2009-08-14 18:02 dev/ | |||
drwxr-xr-x 7 root root 4.0K 2009-08-14 18:13 etc/ | |||
lrwxrwxrwx 1 root root 11 2009-08-10 16:22 init -> bin/busybox* | |||
drwxr-xr-x 2 root root 4.0K 2009-08-11 20:30 lib/ | |||
drwxr-xr-x 3 root root 4.0K 2009-08-11 15:13 mnt/ | |||
drwxr-xr-x 2 root root 4.0K 2009-03-05 15:13 proc/ | |||
drwxr-xr-x 2 root root 4.0K 2009-08-12 18:37 root/ | |||
drwxr-xr-x 2 root root 4.0K 2009-08-13 13:23 sbin/ | |||
drwxr-xr-x 2 root root 4.0K 2009-03-05 15:10 sys/ | |||
lrwxrwxrwx 1 root root 7 2009-08-10 16:22 tmp -> var/tmp | |||
drwxr-xr-x 5 root root 4.0K 2009-08-10 18:14 usr/ | |||
drwxr-xr-x 2 root root 4.0K 2009-08-12 13:39 var/</pre> | |||
=== Available applications === | |||
==== [http://www.busybox.net/ Busybox]: The Swiss Army Knife of Embedded Linux ==== | |||
BusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides replacements for most of the utilities you usually find in GNU fileutils, shellutils, etc. The utilities in BusyBox generally have fewer options than their full-featured GNU cousins; however, the options that are included provide the expected functionality and behave very much like their GNU counterparts. BusyBox provides a fairly complete environment for any small or embedded system. | |||
BusyBox has been written with size-optimization and limited resources in mind. It is also extremely modular so you can easily include or exclude commands (or features) at compile time. This makes it easy to customize your embedded systems. To create a working system, just add some device nodes in /dev, a few configuration files in /etc, and a Linux kernel. | |||
<pre>root@Gateway6: busybox | |||
BusyBox v1.14.1 (2009-08-10 18:33:54 EEST) multi-call binary | |||
Copyright (C) 1998-2008 Erik Andersen, Rob Landley, Denys Vlasenko | |||
and others. Licensed under GPLv2. | |||
See source distribution for full notice. | |||
Usage: busybox [function] [arguments]... | |||
or: function [arguments]... | |||
BusyBox is a multi-call binary that combines many common Unix | |||
utilities into a single executable. Most people will create a | |||
link to busybox for each function they wish to use and BusyBox | |||
will act like whatever it was invoked as! | |||
Currently defined functions: | |||
[, [[, acpid, addgroup, adduser, adjtimex, ar, arp, arping, ash, awk, basename, blkid, brctl, bunzip2, bzcat, bzip2, cal, cat, catv, chat, | |||
chattr, chgrp, chmod, chown, chpasswd, chpst, chroot, chrt, chvt, cksum, clear, cmp, comm, cp, cpio, crond, crontab, cryptpw, cttyhack, cut, | |||
date, dc, dd, deallocvt, delgroup, deluser, depmod, devmem, df, dhcprelay, diff, dirname, dmesg, dnsd, dos2unix, du, dumpkmap, dumpleases, | |||
echo, ed, egrep, eject, env, envdir, envuidgid, ether-wake, expand, expr, fakeidentd, false, fbset, fbsplash, fdflush, fdformat, fdisk, fgrep, | |||
find, findfs, fold, free, freeramdisk, fsck, fsck.minix, ftpd, ftpget, ftpput, fuser, getopt, getty, grep, gunzip, gzip, halt, hd, hdparm, | |||
head, hexdump, hostid, hostname, httpd, hush, hwclock, id, ifconfig, ifdown, ifenslave, ifup, inetd, init, insmod, install, ionice, ip, ipaddr, | |||
ipcalc, ipcrm, ipcs, iplink, iproute, iprule, iptunnel, kbd_mode, kill, killall, killall5, klogd, last, length, less, linux32, linux64, linuxrc, | |||
ln, loadfont, loadkmap, logger, login, logname, logread, losetup, lpd, lpq, lpr, ls, lsattr, lsmod, lzmacat, makedevs, makemime, man, md5sum, | |||
mdev, mesg, microcom, mkdir, mkdosfs, mkfifo, mkfs.minix, mkfs.vfat, mknod, mkpasswd, mkswap, mktemp, modprobe, more, mount, mountpoint, | |||
msh, mt, mv, nameif, nc, netstat, nice, nmeter, nohup, nslookup, od, openvt, passwd, patch, pgrep, pidof, ping, ping6, pipe_progress, pivot_root, | |||
pkill, popmaildir, poweroff, printenv, printf, ps, pscan, pwd, raidautorun, rdate, rdev, readahead, readlink, readprofile, realpath, reboot, | |||
reformime, renice, reset, resize, rm, rmdir, rmmod, route, rtcwake, run-parts, runlevel, runsv, runsvdir, rx, script, sed, sendmail, seq, | |||
setarch, setconsole, setfont, setkeycodes, setlogcons, setsid, setuidgid, sh, sha1sum, sha256sum, sha512sum, showkey, slattach, sleep, softlimit, | |||
sort, split, start-stop-daemon, stat, strings, stty, su, sulogin, sum, sv, svlogd, swapoff, swapon, switch_root, sync, sysctl, syslogd, tac, | |||
tail, tar, tcpsvd, tee, telnet, telnetd, test, tftp, tftpd, time, timeout, top, touch, tr, traceroute, true, tty, ttysize, tunctl, udhcpc, | |||
udhcpd, udpsvd, umount, uname, uncompress, unexpand, uniq, unix2dos, unlzma, unzip, uptime, usleep, uudecode, uuencode, vconfig, vi, vlock, | |||
watch, watchdog, wc, wget, which, who, whoami, xargs, yes, zcat, zcip</pre> | |||
==== Gateway 6 application ==== | |||
== Preparations == | |||
=== Connecting to gateway through serial console === | |||
# Connect Gateway to your computer | # Connect Gateway to your computer | ||
# Open up a terminal: gnome-terminal / ssherminator / xterm / any other | # Open up a terminal: gnome-terminal / ssherminator / xterm / any other | ||
Line 28: | Line 87: | ||
Voila, you're in console | Voila, you're in console | ||
== Setting up U-Boot == | === Setting up U-Boot === | ||
To see current environment variables type | To see current environment variables type | ||
* printenv | * printenv | ||
Line 57: | Line 116: | ||
*save | *save | ||
= Flashing filesystem = | == Flashing filesystem == | ||
*Paste to u-boot | * Set up tftp server on your computer | ||
* Connect gateway to network | |||
* Paste to u-boot | |||
u-boot> erase 1:12-;set bootargs console=ttyS0,38400 tftproot=10.0.0.16:rootfs.tar.gz;tftp zImage-144u.bin;wtags;go | u-boot> erase 1:12-;set bootargs console=ttyS0,38400 tftproot=10.0.0.16:rootfs.tar.gz;tftp zImage-144u.bin;wtags;go | ||
*Restart device when asked | * Restart device when asked | ||
== When it doesn't work == | === When it doesn't work === | ||
=== Warning: gatewayip needed but not set === | ==== Warning: gatewayip needed but not set ==== | ||
While in U-Boot type: | While in U-Boot type: | ||
* | * Set gatewayip 10.0.0.42 | ||
* | * Save |
Latest revision as of 13:31, 22 December 2011
File system overview
Root of the file system consists of the following files and folders
This file system is in flash memory of the DIMM module
roland@spirit:~/Projects/Telem-GW6Lin/gw6fs/rootfs$ ls -l --classify --human-readable total 44K drwxr-xr-x 2 root root 4.0K 2009-08-13 12:53 bin/ drwxr-xr-x 2 root root 4.0K 2009-08-14 18:02 dev/ drwxr-xr-x 7 root root 4.0K 2009-08-14 18:13 etc/ lrwxrwxrwx 1 root root 11 2009-08-10 16:22 init -> bin/busybox* drwxr-xr-x 2 root root 4.0K 2009-08-11 20:30 lib/ drwxr-xr-x 3 root root 4.0K 2009-08-11 15:13 mnt/ drwxr-xr-x 2 root root 4.0K 2009-03-05 15:13 proc/ drwxr-xr-x 2 root root 4.0K 2009-08-12 18:37 root/ drwxr-xr-x 2 root root 4.0K 2009-08-13 13:23 sbin/ drwxr-xr-x 2 root root 4.0K 2009-03-05 15:10 sys/ lrwxrwxrwx 1 root root 7 2009-08-10 16:22 tmp -> var/tmp drwxr-xr-x 5 root root 4.0K 2009-08-10 18:14 usr/ drwxr-xr-x 2 root root 4.0K 2009-08-12 13:39 var/
Available applications
Busybox: The Swiss Army Knife of Embedded Linux
BusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides replacements for most of the utilities you usually find in GNU fileutils, shellutils, etc. The utilities in BusyBox generally have fewer options than their full-featured GNU cousins; however, the options that are included provide the expected functionality and behave very much like their GNU counterparts. BusyBox provides a fairly complete environment for any small or embedded system.
BusyBox has been written with size-optimization and limited resources in mind. It is also extremely modular so you can easily include or exclude commands (or features) at compile time. This makes it easy to customize your embedded systems. To create a working system, just add some device nodes in /dev, a few configuration files in /etc, and a Linux kernel.
root@Gateway6: busybox BusyBox v1.14.1 (2009-08-10 18:33:54 EEST) multi-call binary Copyright (C) 1998-2008 Erik Andersen, Rob Landley, Denys Vlasenko and others. Licensed under GPLv2. See source distribution for full notice. Usage: busybox [function] [arguments]... or: function [arguments]... BusyBox is a multi-call binary that combines many common Unix utilities into a single executable. Most people will create a link to busybox for each function they wish to use and BusyBox will act like whatever it was invoked as! Currently defined functions: [, [[, acpid, addgroup, adduser, adjtimex, ar, arp, arping, ash, awk, basename, blkid, brctl, bunzip2, bzcat, bzip2, cal, cat, catv, chat, chattr, chgrp, chmod, chown, chpasswd, chpst, chroot, chrt, chvt, cksum, clear, cmp, comm, cp, cpio, crond, crontab, cryptpw, cttyhack, cut, date, dc, dd, deallocvt, delgroup, deluser, depmod, devmem, df, dhcprelay, diff, dirname, dmesg, dnsd, dos2unix, du, dumpkmap, dumpleases, echo, ed, egrep, eject, env, envdir, envuidgid, ether-wake, expand, expr, fakeidentd, false, fbset, fbsplash, fdflush, fdformat, fdisk, fgrep, find, findfs, fold, free, freeramdisk, fsck, fsck.minix, ftpd, ftpget, ftpput, fuser, getopt, getty, grep, gunzip, gzip, halt, hd, hdparm, head, hexdump, hostid, hostname, httpd, hush, hwclock, id, ifconfig, ifdown, ifenslave, ifup, inetd, init, insmod, install, ionice, ip, ipaddr, ipcalc, ipcrm, ipcs, iplink, iproute, iprule, iptunnel, kbd_mode, kill, killall, killall5, klogd, last, length, less, linux32, linux64, linuxrc, ln, loadfont, loadkmap, logger, login, logname, logread, losetup, lpd, lpq, lpr, ls, lsattr, lsmod, lzmacat, makedevs, makemime, man, md5sum, mdev, mesg, microcom, mkdir, mkdosfs, mkfifo, mkfs.minix, mkfs.vfat, mknod, mkpasswd, mkswap, mktemp, modprobe, more, mount, mountpoint, msh, mt, mv, nameif, nc, netstat, nice, nmeter, nohup, nslookup, od, openvt, passwd, patch, pgrep, pidof, ping, ping6, pipe_progress, pivot_root, pkill, popmaildir, poweroff, printenv, printf, ps, pscan, pwd, raidautorun, rdate, rdev, readahead, readlink, readprofile, realpath, reboot, reformime, renice, reset, resize, rm, rmdir, rmmod, route, rtcwake, run-parts, runlevel, runsv, runsvdir, rx, script, sed, sendmail, seq, setarch, setconsole, setfont, setkeycodes, setlogcons, setsid, setuidgid, sh, sha1sum, sha256sum, sha512sum, showkey, slattach, sleep, softlimit, sort, split, start-stop-daemon, stat, strings, stty, su, sulogin, sum, sv, svlogd, swapoff, swapon, switch_root, sync, sysctl, syslogd, tac, tail, tar, tcpsvd, tee, telnet, telnetd, test, tftp, tftpd, time, timeout, top, touch, tr, traceroute, true, tty, ttysize, tunctl, udhcpc, udhcpd, udpsvd, umount, uname, uncompress, unexpand, uniq, unix2dos, unlzma, unzip, uptime, usleep, uudecode, uuencode, vconfig, vi, vlock, watch, watchdog, wc, wget, which, who, whoami, xargs, yes, zcat, zcip
Gateway 6 application
Preparations
Connecting to gateway through serial console
- Connect Gateway to your computer
- Open up a terminal: gnome-terminal / ssherminator / xterm / any other
- Start minicom
- Settings: 38400 8N1 flow control: none
- Connect external power to gateway
- Press any key when asked
- You will only have a second
You will see(With DIMM module 27M-DMM-144):
NAND X-Loader 1.22 U-Boot 1.1.2-vpac4 (Feb 26 2009 - 18:20:24) U-Boot code: 5C010000 -> 5C01D9C8 BSS: -> 5C0214D8 RAM Configuration: Bank #0: a0000000 64 MB Bank #1: 80000000 0 kB OneNAND: Scanning device for bad blocks Flash: 64 MB dm9000 i/o: 0x8000300 (32bit), id: 0x90000a46 MAC: 00:0d:15:00:72:31 Hit any key to stop autoboot: 0 u-boot>
Voila, you're in console
Setting up U-Boot
To see current environment variables type
- printenv
It returns something like this:
u-boot> printenv bootdelay=3 baudrate=38400 bootcmd=one read a1000000 40000 160000;wtags;go ethaddr=00:0d:15:00:72:31 filesize=11f11c fileaddr=A1000000 netmask=255.255.255.0 serverip=10.0.0.16 ipaddr=192.168.1.200 bootargs=console=ttyS0,38400 tftproot=10.0.0.16:rootfs.tar.gz gatewayip=10.0.0.42 Environment size: 279/2044 bytes u-boot>
Now:
- set gatewayip 10.0.0.42
- set ipaddr 10.0.0.23
- this needs to be unused, ping it if unsure
- ping 10.0.0.23
- this needs to be unused, ping it if unsure
- save
Flashing filesystem
- Set up tftp server on your computer
- Connect gateway to network
- Paste to u-boot
u-boot> erase 1:12-;set bootargs console=ttyS0,38400 tftproot=10.0.0.16:rootfs.tar.gz;tftp zImage-144u.bin;wtags;go
- Restart device when asked
When it doesn't work
Warning: gatewayip needed but not set
While in U-Boot type:
- Set gatewayip 10.0.0.42
- Save