FSG-3
I am now moving step by step my infos from http://cavebeat.blogspot.com/ to this wiki. ( — cave)
This is a WIP for the Freecom FSG-3
I want to sum up all infos and Tricks for the FSG-3 which are available on the net when running openWRT.
Hardware Specs
| Type | Description | Info |
|---|---|---|
| CPU | XScale-IXP4xx/IXC11xx rev 1 (v5b) | 266Mhz |
| RAM | 64 MB | |
| Flash | 4 MB | 0x00400000 = 4096KB |
| HDD | 80GB - 500GB | builtin PATA drive |
| Ethernet | 1 - WAN port and 3 - LAN ports | eth1/NPE-C and eth0/NPE-B |
| WLAN | miniPCI | optional |
| USB | 4 x USB2.0 | 2 front, 2 rear |
| E-SATA | 1 x E-SATA | on back |
| SATA | 1 x SATA internal | needs soldering on PCB pads |
| UART | 2 x serial Port | Con400, console on Con401 |
| JTAG | pads on PCB | no infos about JTAG available |
Thread in the openWRT forum regarding the FSG-3 https://forum.openwrt.org/viewtopic.php?id=5828
fis list / Flash Image System
factory defaults
RedBoot> fis list
Name FLASH addr Mem addr Length Entry point
RedBoot 0x50000000 0x50000000 0x00040000 0x00000000
kern1 0x50080000 0x00700000 0x00180000 0x00700000
kern2 0x50200000 0x00700000 0x00180000 0x00700000
RedBoot config 0x503C0000 0x503C0000 0x00020000 0x00000000
FIS directory 0x503E0000 0x503E0000 0x00020000 0x00000000
RedBoot>
http://www.nslu2-linux.org/wiki/FSG3/FisList
/ # cat /proc/mtd
dev: size erasesize name
mtd0: 00040000 00020000 "RedBoot"
mtd1: 00180000 00020000 "kern1"
mtd2: 00180000 00020000 "kern2"
mtd3: 00020000 00020000 "RedBoot config"
mtd4: 00020000 00020000 "FIS directory"
Flash for OpenWRT
For running openWRT there is an additionally microcode partition necessary. There should be the microcode for the Network Processing Engine (NPE-B and NPE-C) placed. as described here: https://forum.openwrt.org/viewtopic.php?id=12770
after adding the microcode partition the partitions should look like this:
RedBoot> fis list
Name FLASH addr Mem addr Length Entry point
RedBoot 0x50000000 0x50000000 0x00040000 0x00000000
kern1 0x50080000 0x00700000 0x00180000 0x00700000
kern2 0x50200000 0x00700000 0x00180000 0x00700000
microcode 0x503A0000 0x00000000 0x00020000 0x00000000
RedBoot config 0x503C0000 0x503C0000 0x00020000 0x00000000
FIS directory 0x503E0000 0x503E0000 0x00020000 0x00000000
RedBoot>
HDD Partitions
freecom factory defaults
regarding to the HowTo Exchange HDD there should be 4 partitions on HDD
| name | size | filesystem | description |
|---|---|---|---|
| /dev/sda1 | 133MB+ | reiserfs | systempartition |
| /dev/sda2 | 133MB+ | reiserfs | backup system |
| /dev/sda3 | 70MB+ | LinuxSwap2 | |
| /dev/sda4 | residual | reiserfs | user/home |
using recovery tool from freecom ensures mtd1/kern1 is used for kernel and /dev/sda1-hda1 is used for root-filesystem. when updating the same firmware with web interface it swithches the rootfilesystem to /dev/sda2
suggestion for partition sizes
At this point i will suggest to increase the systempartitions and the swap partitions sizes.
systempartitions
sda1 and sda2 from 133MB to 150MB/200MB or 256MB if u want to install more opkg packages or files, maybe its not necessary or if u want to store some backups on the systempartitions or just in case
SWAP
As described here fstab&block-mount for the right amount of SWAP you should increase /dev/sda3-swap
general rule:
SWAP = double RAM for machines with 512MiB of RAM or less, and same amount as RAM for machines with more
FSG-3
SWAP = RAM x 2 = 64MB x 2 = 128MB or more
for repartitioning you can use some programs like Parted Magic or Paragon Partition Manager or something similar
changes for OpenWRT
After installing with MoD's tutorial as linked on this page. The partitions will show up as followed
| name | size | filesystem | description |
|---|---|---|---|
| /dev/sda1 | 133MB+ | reiserfs | rootfs for OpenWRT |
| /dev/sda2 | 133MB+ | reiserfs | backup system with Freecom Firmware |
| /dev/sda3 | 70MB+ | LinuxSwap2 | |
| /dev/sda4 | residual | reiserfs | user/home |
HowTo - Adding a serial Port
The FSG-3 has two serial Ports on the PCB (CON400 and CON 401,ttyS0,115200). The RedBoot console is configured to the CON401 with Baudrate 115200 8N1 (8N1 == 8-bits per character, no parity, and 1 stop bit) Best Practice is using a USB/UART-TTL Bridge wich is providing the needed 3,3V level. As described in the link above it is necessary to solder 3 wires(GND, RxD and TxD) on the Con401.
The mod is described here HowTo serialmod
http://cavebeat.blogspot.com/2012/01/fsg-3-serial-mod.html
HowTo - install OpenWRT
on FSG from shell (without serial console)
Thanks to MoD for this tutorial
https://forum.openwrt.org/viewtopic.php?id=12770
Tutorial on openFSG-wiki
When i tried this, there were some problems with the Redboot configuration. I was not able to change the boot_script and boot_timeout via shell. But it is possible to change it via serial console in Redboot with fconfig
RedBoot Configuration
for this, access to console is necessary (serial mod)
Manual - Configuring the RedBoot Environment
http://ecos.sourceware.org/docs-latest/redboot/configuring-the-redboot-environment.html
useful commands
- verison - shows the version from RedBoot
- fconfig -l - lists RedBoot configurations
- fconfig - change the redboot config
RedBoot factory defaults
RedBoot> version
RedBoot™ bootstrap and debug environment [ROM]
Red Hat certified release, version 1.94 - built 11:47:48, Jun 10 2005
Platform: Freecom Storage Gateway (FSG) (XScale) BE
Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
RAM: 0x00000000-0x04000000, 0x0001db58-0x03fd1000 available
FLASH: 0x50000000 - 0x50400000, 32 blocks of 0x00020000 bytes each.
RedBoot> fconfig -l
Run script at boot: true
Boot script:
.. fis load kern1
.. exec -c "console=ttyS0,115200 root=/dev/hda1 mem=64M@0x00000000"
Boot script timeout (1000ms resolution): 1
Use BOOTP for network configuration: true
Console baud rate: 115200
DNS server IP address: 0.0.0.0
GDB connection port: 9000
Force console for special debug messages: false
Network debug at boot time: false
Default network device: npe_eth0
Network hardware address [MAC] for NPE eth0: 0x00:0x01:0xDB:0x00:0xA6:0x02
Network hardware address [MAC] for NPE eth1: 0x00:0x01:0xDB:0x00:0xA6:0x03
RedBoot>
OpenWRT boot config
If there are boot problems because there are missing configurations.
connect to serial console to RedBoot (hitting ^C stops boot_timeout and bootscript) and run fconfig to change the boot parameters
set boot_script true
add following lines to the boot_script_data
fis load kern1
exec -c "console=ttyS0,115200 root=/dev/sda1 init=/etc/preinit "
and set boot_timeout to 5 - 10 seconds Boot Timeout is necessary to Spin up the Harddisk properly after power on.
+
Network NOT initialized!
Press FSG Emergency Button during power up to initialize network
RedBoot™ bootstrap and debug environment [ROM]
Red Hat certified release, version 1.94 - built 11:47:48, Jun 10 2005
Platform: Freecom Storage Gateway (FSG) (XScale) BE
Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
RAM: 0x00000000-0x04000000, 0x0001db58-0x03fd1000 available
FLASH: 0x50000000 - 0x50400000, 32 blocks of 0x00020000 bytes each.
== Executing boot script in 6.000 seconds - enter ^C to abort
^C
RedBoot> fconfig
Run script at boot: true
Boot script:
.. fis load kern1
.. exec -c "console=ttyS0,115200 root=/dev/sda1 init=/etc/preinit "
Enter script, terminate with empty line
»
Boot script timeout (1000ms resolution): 6
Use BOOTP for network configuration: true
Console baud rate: 115200
DNS server IP address:
GDB connection port: 9000
Force console for special debug messages: false
Network debug at boot time: false
Default network device: npe_eth0
Network hardware address [MAC] for NPE eth0: 0x00:0x00:0x83:0x20:0x50:0x02
Network hardware address [MAC] for NPE eth1: 0x00:0x00:0x83:0x48:0x50:0x01
Update RedBoot non-volatile configuration - continue (y/n)? n
RedBoot>
Dual Boot
if you install OpenWRT like in the tutorial from MoD: https://forum.openwrt.org/viewtopic.php?id=12770 Then there should be the OpenWRT kernel on kern1 partition with belonging root-filesystem on /dev/sda1 and backuped freecom firmware kernel on kern2 partition with belonging rootfilesystem on /dev/sda2
If you crashed your OpenWRT it is easyly possible to start your FSG-3 with attached console, Hit ^C when waiting for boot_timeout, and start the freecom firmware by command line. Then the system should boot the backup and you can repair or restore your FSG-3 as described in the link: http://cavebeat.blogspot.com/2012/01/reset-openwrt-firmware-with-fsg-3.html
Boot in command line
If there is no proper Boot configuration, RedBoot stays in the command line and waits for commands from the console.
It is possible to boot openWRT by hand with this commands.
RedBoot>
RedBoot> fis load kern1
RedBoot> exec -c "console=ttyS0,115200 root=/dev/sda1 init=/etc/preinit "
In this example I flashed the openWRT Kernel on Flash partition mtd1/kern1 and the Root-filesystem is on the first HDD Partition.
Freecom firmware needs following lines to boot
RedBoot> fis load kern2
RedBoot> exec -c "console=ttyS0,115200 root=/dev/hda2 mem=64M@0x00000000"
In this example the freecom firmware kernel stays on the mtd2/kern2 partition. And the root partition is on /dev/sda2
HowTo - debricking/reset
to factory defaults with Freecom recovery Firmware from tutorial FSG-3 recovery from bad Flash
This should work also after openWRT installation. afterwards there should be vanilla Freecom firmware up and running and all flash-layout back to factory defaults. Partition 4 from HDD should not be touched.
If you don't want to run openWRT anymore, it is possible to initialize the Flash (except the redboot partition) and run the FSG-3 recovery tool to restore to factory defaults.
I seems to work stable, but I (— cave) have tested it only once. I had screwed up my Flash partitions and no chance to repair it otherwise, so it was necessary to repair them with fis init -f command.
This only works if the first flash partition/mtd0, the Redboot partition is not touched or destroyed.
NEVER touch the RedBoot partition!!!
HowTo - Fan control
The fan is a little bit noisy when used in living rooms. So it is possible to control the speed http://cavebeat.blogspot.com/2012/01/fsg-3-fan-control.html It depends on which kernel is in use.
at the moment, for OpenWRT ATTITUDE ADJUSTMENT (bleeding edge, r29846) following commands showed up as working:
read speed:
cat /sys/devices/platform/i2c-gpio.0/i2c-0/0-0028/fan1_input
set pwm level (0-255):
echo '65 1 1' > /sys/devices/platform/i2c-gpio.0/i2c-0/0-0028/pwm1
read pwm level (0-255):
cat /sys/devices/platform/i2c-gpio.0/i2c-0/0-0028/pwm1
Temp sensors
There are also 3 temperature sensors.
At the moment the output from these sensors is showing wrong values.
cat /sys/devices/platform/i2c-gpio.0/i2c-0/0-0028/temp1_input
cat /sys/devices/platform/i2c-gpio.0/i2c-0/0-0028/temp2_input
cat /sys/devices/platform/i2c-gpio.0/i2c-0/0-0028/temp3_input
from http://www.openfsg.com/forum/viewtopic.php?p=10686#10686
Music Box
Using the USB Ports from the FSG-3 with a external Soundcard.
I bought a few years ago
SPEEDLINK UltraPortable Audio Card with chip SL-8850,
which is recognized well in linux.
I've installed the needed packages as told in the howto: http://wiki.openwrt.org/doc/howto/usb.audio
installed opkg packages: kmod-usb-audio, kmod-sound-core and madplay
to try simple output, madplay is playing a mp3 file: $ mdplay file.mp3
It is also possible to play webradio Streams, here three as an example.
$ wget -O - http://u11aw.di.fm:80/di_goapsy | madplay -
or
$wget -O - http://mp3stream1.apasf.apa.at:8000/ | madplay -
or
$ wget -O - http://hirschmilch.de:7000/psytrance.mp3 | madplay -
PulseAudio seems not to be working in the newest version of OpenWRT cause of some library dependencies.
root@OpenWrt:/proc/asound# ls
card0 cards default devices hwdep modules oss pcm seq timers version
root@OpenWrt:/proc/asound# cat cards
0 [default ]: USB-Audio - C-Media USB Headphone Set
C-Media USB Headphone Set at usb-0000:00:0e.0-3.1, full speed
MPD - Music Player Daemon
MPD is an Audio Server for playing Music on the Soundcard of the Backend.
http://mpd.wikia.com/wiki/Configuration
http://mpd.wikia.com/wiki/OpenWRT_FullInstall
It can be controlled with several Clients.
$ opkg update
$ opkg install mpd-full
$ vi /etc/mpd.conf
$ /usr/bin/mpd /etc/mpd.conf « to start the MPD Server
The ALSA output works out of the box, but there are problems with the samplerate. It seems that the chip supports only 48kHz, but the music is 44,1kHz. MPD trys to convert the samplerate and fires all the CPU-Power out. And the Sound starts crackling. http://mpd.wikia.com/wiki/Tuning
# An example of an ALSA output:
#
audio_output {
type "alsa"
name "My ALSA Device"
device "hw:0,0" # optional
format "44100:16:2" # optional
## mixer_type "hardware" # optional
## mixer_device "default" # optional
## mixer_control "PCM" # optional
## mixer_index "0" # optional
auto_resample "no"
}
Some Web Clients are:
http://ampache.org/ http://phpmpreloaded.sourceforge.net/ http://somegas.de/wordpress/projekte/mpd-webinterface/
Other Informations
Freecom FSG-3 community wiki and forum http://www.openfsg.com/index.php/Main_Page
NSLU Info Page for FSG-3 http://www.nslu2-linux.org/wiki/FSG3/HomePage
Running Debian on FSG-3 http://wpkg.org/Running_Debian_on_Freecom_FSG-3
TAGS:
toh/freecom/fsg-3.txt · Last modified: 2012/03/22 20:50 by cave