I am now moving step by step my infos from http://cavebeat.blogspot.co.at/ to this wiki. ( — cave)
|Model||Version||Current Release||Firmware OpenWrt Install||Firmware OpenWrt Upgrade||Firmware OEM Stock|
on FSG from shell (without serial console)
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.
for this, access to console is necessary (serial mod)
Manual - Configuring the RedBoot Environment
__RedBoot> version__ RedBoot(tm) 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>
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 " <code> and set //boot_timeout// to 5 - 10 seconds Boot Timeout is necessary to Spin up the Harddisk properly after power on. <code>+ Network NOT initialized! Press FSG Emergency Button during power up to initialize network RedBoot(tm) 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>
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 easily 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
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.
exec -c “console=ttyS0,115200 root=/dev/sda2 init=/etc/preinit ”
for second 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.
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!!!
|CPU||XScale-IXP4xx/IXC11xx rev 1 (v5b)||266Mhz|
|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|
|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
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
/ # 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”
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>
The IXP422 CPU has 16 General Purpose Input/Output (GPIO) pins which are used to interface to external hardware. In the case of the FSG3, the GPIO pins are used to monitor the buttons, control the LEDs, connect to the RTC, IDE controller and USB 2.0 controller.
Note that the LEDs are controlled by some external controller - they are not directly connected to GPIOs.
Regarding to the HowTo Exchange HDD there should be 4 partitions on HDD:
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 switches the rootfilesystem to /dev/sda2
At this point i will suggest to increase the systempartitions and the swap partitions sizes.
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
As described here fstab&block-mount for the right amount of SWAP you should increase /dev/sda3-swap
SWAP = double RAM for machines with 512MiB of RAM or less, and same amount as RAM for machines with more
SWAP = RAM x 2 = 64MB x 2 = 128MB or more
For repartitioning you can use programs like Parted Magic or Paragon Partition Manager or something similar.
After installing with MoD's tutorial as linked on this page. The partitions will show up as followed
|/dev/sda1||133MB+||reiserfs||rootfs for OpenWrt|
|/dev/sda2||133MB+||reiserfs||backup system with Freecom Firmware|
I am running my FSG with following partitions.
|/dev/sda1||300MB||ext3||rootfs for OpenWrt|
|/dev/sda2||300MB||ext3||second testing partition|
For this layout it is necessary to add the package “kmod-fs-ext4” in “make menuconfig” or install it with opkg
The fan is a little bit noisy when used in living rooms, but 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:
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):
The file /etc/rc.local is usefull to slow down the fan at startup.
There are also 3 temperature sensors.
At the moment the output from these sensors is showing wrong values.
Temperature and fan control is done by Winbond w83782d chip, which is connected via GPIO and I2C to the CPU.
The Wi-Fi Version from the FSG-3 ships with a Marvell chipset which is not well recognized and only one antenna is available and connected to the card. For Diversity it is better to use more than one antenna. HowTo Second Antenna Mod.
Post about Marvell Card It is not recommended to use this card.
Characteristics of Marvell MINI PCI card
Vendor: pci 0x11ab “Marvell Technology Group Ltd..”
Device: pci 0x1faa “88w8335 [Libertas] 802.11b / g wireless
modules alias” pci: v000011AB00001FAAsv000011ABsd00001FAAbc02sc00i00
Working Card: Gigabit GN-WIAG02 is working with kmod-ath5k driver.
Problem Working Cards: TP-Link TL-WN861n rev. 2 - which should be possible with the kmod-ath9k driver, but isnt't recognized by the PCI scan.
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
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: 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 -
$wget -O - http://mp3stream1.apasf.apa.at:8000/ | madplay -
$ wget -O - http://hirschmilch.de:7000/psytrance.mp3 | madplay -
PulseAudio seems not to be working in the newest version of OpenWrt because of some library dependencies.
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 is an Audio Server for playing Music on the Soundcard of the Backend. 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:
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
Some Web Clients are:
http://ampache.org/ - WIP
List the dependencies for the opkg pyload package.
root@openwrt:/# opkg update
root@openwrt:/# opkg info pyload | grep Depends
Depends: libc, python, pyopenssl, python-curl, python-crypto, python-django, python-expat, python-imaging-library, python-sqlite3, js, tesseract, unrar
Install the needed packages with
root@fsg3:/# opkg install
For installation of the newest version, download the current “Source Code - Platform Independent” File from http://pyload.org/download
unzip and place it somewhere on your Filesystem. get into the created pyload directory
To show other necessary packages use the systemCheck.py file.
root@openwrt:/# python systemCheck.py
Then run the file pyLoadCore the first time as described in the README File.
To start the Configuration.
root@openwrt:/# python pyLoadCore.py
swapon -sdisplay summary about used swap devices and exit