How to install cygwin unix2dos

installation

Freetz provides some scripts for modifying an original firmware. Because of license issues the distribution of original or modified firmware images is forbidden.

the installation of a modified firmware invalidates the manufacturer's warranty! In case of problems, do NOT contact AVM support.

Speed ​​ports: (see sp2fritz). From script version 2.2.2008 the use of speed2fritz is possible.

Newbies: Please read 'Freetz for Beginners' first!

Virtual LINUX: FriBoLi / StinkyLinux / Freetz-Linux

StinkyLinux (formerly FriBoLi) is a virtual Linux operating system for building FritzBox firmware images on Windows. Unfortunately, support for StinkyLinux was discontinued some time ago. This means it cannot be used for freetz anymore without hassle with updates.

Because of that, a new build environment Freetz-Linux was created by Silent-Tears (cinereous), who also maintains it. The use of this environment is strongly recommended if no native Linux can be used.

The following instructions were initially adopted from Saphir, but have grown over time and were completed and / or edited by many different users. We try to keep these up-to-date and adapt it to the current versions of VM and freetz. However, the steps below can (with some minor limitations) be used for every freetz-VM.

Preparation

See also:

Installing Freetz-Linux

Installing StinkyLinux (!!! obsolete !!!)

Installing Freetz and Speed-to-Fritz (SpeedPort users only)

StinkyLinux Homepage (Attention! Instructions and images there are out of date!)

Execution

  1. Needed files:
  2. Unpack Freetz-Linux under Windows using 7-Zip or WinRAR.
  3. Run VMWare Player. Leave all settings as they are; the player will be able to connect to the Internet by itself. If not, you can set up internet access manually like so: ifconfig eth0 192.168.178.xx netmask 255.255.255.0 broadcast 192.168.178.255 (where might have to be replaced with your configured network interface. "ifconfig -a" will list all network interfaces available to your virtual machine.)
  4. In VMWare Player, log on as user freetz with password freetz.

    From here, there are several ways to work with Freetz-Linux and to exchange files between Freetz-Linux and the rest of the world. One might work on Freetz-Linux 'console, for example.
    • SSH / SCP: One might also connect to the VM using an SSH / SCP connection. Windows clients include putty and WinSCP. Enter the VM's hostname (or IP-Address) under "Server name". For "name" and "password" please use the credentials indicated above.
    • SAMBA: It is also possible to exchange data between Windows and Freetz-Linux via SAMBA. To do that, enter "
      Freetz Linux "or"
      Freetz-Linuxs-IP-Address "in Explorer's address bar and you get a listing of files and folders present in your VM. Then, you can move and copy them around as usual.

      All those connection options have been pre-set in Freetz-Linux and should work out-of-the-box. If problems occur, please verify your network connection (s), and your firewall settings (if applicable). Also, don't forget to verify VMWare Player's network connection settings. By default, VMWare Player uses Bridged mode. To start with, run inside Command Prompt.
  5. Depending on your preferred choice, you proceed with one of the following:
    • SSH / TELNET: (the preferred method) svn co http://svn.freetz.org/tags/freetz-1.1.x freetz-1.1.x

You can replace with any other valid tag, or use the development if you wish.

  1. Optional: Apply patch (es) (see Howto)
  2. Change into the freetz directory you just checked out (or unpacked into): cd freetz - * /
  3. Configure freetz. It is possible to do this using a ncurses interface, the same one being used to configure the Linux kernel. For a detailed description, see menuconfig. make menuconfig
  4. Modify firmware. In this step, the original firmware and packages matching your configuration as well as the necessary build tools are being downloaded automatically and a new one is being built, according to your configuration, in three distinct steps. The first run through will take a little while, so you might want to have some coffee or tea in the meantime. unset CFLAGS CXXCFLAGS make
  1. In, you'll find your newly built firmware (e.g.).
  2. Upload the image as Firmware Update to your FritzBox. After successful upload, you can access a secondary web interface on port 81 of your box, offering detailed instructions to finalize installation. Should your Box be unreachable even though INFO-LED stopped flashing several minutes ago - especially if, in regular intervals, all LEDs light up), you can recover your box 'original firmware on most box types. For details, see this Howto.

Linux

Necessary packages

Knoppix can also be used to create the firmware, which does not require a Linux installation. It is important that no FAT or NTFS partition is used to compile the mod under Linux. The following instructions are required for

freetz-1.0

  • gcc - GNU C compiler
  • g ++ - GNU C ++ compiler
  • binutils - GNU assembler, linker and binary tools
  • autoconf - Generator for configuration scripts according to the GNU standard upstream of the make; helps to prepare platform-independent programmed software for a platform-specific build
  • automake from version 1.10 - Makefile generator according to GNU standard; is not required for all DS-Mod packages, but e.g. for privoxy; Package Manager usually installs autoconf as a dependent package
  • automake-1.9 - Version that is additionally specially made by tools is needed
  • libtool - helps create static and dynamic libraries; can e.g. when calling autoreconf become necessary
  • GNU make from version 3.81 - scripted build system
  • bzip2 - (Un) packing of software archives
  • libncurses5-dev - Developer library for ncurses (creation of comfortable text-based user interfaces, cf.)
  • zlib1g-dev - Developer library for gzip compression
  • flex - lex compatible generator for lexical analysis
  • bison - YACC compatible parser generator
  • patch - Program to apply patches
  • texinfo - Generate online / print documentation from a common source
  • tofrodos - File conversion DOS ↔ UNIX (what is this needed for?)
  • gettext - Internationalize texts in programs
  • pkg-config - auxiliary tool which is necessary for building binaries and libraries; necessary for packages ntfs? and transmission
  • ecj-bootstrap - Eclipse Java Compiler (possibly also libecj-java and ecj in newer distributions); only necessary for package classpath from 0.95 or ds26-14.5
  • pearl - Perl interpreter; necessary for
  • libstring-crc32-perl - Perl module for calculating CRC32 checksums; necessary for
  • intltool -

freetz-1.3

  • xz-utils - (Un) packing of software archives in xz format

current developer version and special packages

These need in addition to already under freetz-1.0 the following packages:

  • svn - Subversion to check out the current Freetz versions
  • ruby1.8 - object-oriented scripting language (version 1.8.6); only necessary for package ruby (from freetz-devel) - strangely enough, the crosscompile is required for ruby-1.8.6 an installed version of himself as a requirement. To make matters worse, it could be that you have something in the package, but not the binary name required by the Makefile ruby. In the above example or the execution of the command as a user helps root.
  • gawk - GNU awk; necessary for the script (from freetz-devel), if you e.g. disassemble a Recover-EXE, i.e. urlader.image and kernel.image want to extract. The ones in others awk-Variants nonexistent function strtonum is used in one place.
  • python - Python interpreter; necessary to remove unused symbols from libraries via to save space (from freetz-devel)
  • libusb-dev - Development library for USB applications in user space; only necessary for SANE if, for example, multifunction printer / scanner are to be connected to the FritzBox. See also forum post on this.
  • realpath - is only required by developers who, starting with ds26-15, are within fwmod Use the patch auto-fixing during the build (AUTO_FIX_PATCHES in the environment). If you don't know what we're talking about, you don't need it either.
  • fastjar - Implementation of the Java jar utils; only necessary for package classpath
  • graphicsmagick - contains with which images can be combined; only necessary if you want to "tag" the AVM web interface

old developer versions

The following is also required here:

  • automake-1.8 - Version that is also specially designed by libid3tag is needed. No longer required from Freetz 1.0.
  • jikes - Java Byte Code Compiler; only necessary for package classpath up to 0.93 or ds26-14.4

Installation of the required packages

An easy way to install the packages you need is to run this code in the console:

sudo apt-get -y update sudo apt-get -y upgrade sudo apt-get -y dist-upgrade # Adapted e.g. to Ubuntu 9.04 (no automake 1.8, "ecj" instead of "ecj-bootstrap"): sudo apt-get - y install imagemagick subversion gcc g ++ binutils autoconf automake automake1.9 libtool make bzip2 libncurses5-dev libreadline-dev zlib1g-dev flex bison patch texinfo tofrodos gettext pkg-config jikes ecj fastjar realpath perl libstring-crc32-perl ruby ​​ruby -dev unzip intltool libglib2.0-dev xz-utils git-core libacl1-dev libattr1-dev libcap-dev # Ubuntu 9.10, 10.xx, 11.xx and 12.04 sudo apt-get -y install imagemagick subversion gcc g ++ bzip2 binutils automake patch autoconf libtool pkg-config make libncurses5-dev libreadline-dev zlib1g-dev flex bison patch texinfo tofrodos gettext pkg-config ecj fastjar realpath perl libstring-crc32-perl ruby ​​ruby1.8 gawk python libusb-dev unzip intltool dev xz-utils git-core libacl1-dev libattr1-dev libcap-dev #Ubuntu 13.04 and 14.04 sudo apt-get -y install graphicsmagick subversion gcc g ++ binutils autoconf automake automake1.9 libtool make bzip2 libncurses5-dev libreadline-dev zlib1g-dev flex bison patch texinfo tofrodos gettext pkg-config ecj fastjar realpath perl libstring-crc32-perl libusb ruby1.8 -dev unzip intltool libacl1-dev libcap-dev # Since Debian Jessie or Ubuntu 15.04 (vivid) the libtool-bin package is also required: sudo apt-get -y install libtool-bin # The following packages are also available on 64-bit systems to install: sudo apt-get -y install libc6-dev-i386 lib32ncurses5-dev gcc-multilib lib32stdc ++ 6

Creation & installation

  1. Open the shell, change to the directory and unzip it
  2. Optional: Import patch (see howto)
  3. Change to the directory of the unpacked Freetz with
  4. Select configuration. This is possible via an ncurses interface, which is known, for example, from the configuration of the Linux kernel. Details and descriptions of the options can be found in the description of the make menuconfig.
  5. Modify firmware. In this step, the original firmware and packages that match the selected configuration, as well as sources for the required tools, are downloaded fully automatically and the modified firmware is generated in three steps. This does a simple one.
  6. Upload a firmware update to the box. After a successful upload, another web interface is now available on port 81, which contains instructions for completing the installation. If the box is no longer accessible after the firmware has been uploaded, minutes after the info LED has stopped flashing (typically lights up periodically all LEDs on again and again), the original firmware can be restored for most box types, as described in this Howto.

coLinux / andLinux / speedLinux

See also: Install andlinux under Vista

Alternatively, coLinux can also be used, it is a bit more resource-saving than the vmware player. With speedLinux everything is prepared for freetz or speed-to-fritz. With ./freetz all necessary preparations and installations are carried out. current status October 25, 2009

Comment from Alexander Kriegisch (kriegaex), February 24th, 2008: Yes, I have been using this since yesterday, specifically the version preconfigured with Ubuntu Gutsy and XFCE (optionally also KDE) AndLinuxthat can be started either as a service or as an application and is supplied with a simple installer. Seems a bit slower than a pure Linux, but it's pretty cool to have Linux windows natively next to Windows windows. The supplied X-Server Xming (for Windows) makes it possible. By the way, I don't even use an X-Terminal, I log in "headless", so to speak, via SSH (putty). Every now and then I run Synaptic or as X-Editor SciTE, which I installed afterwards. I am currently building all Freetz packages "from scratch" including download, it works just like in VMware or native Linux, so Linux package list see above.

Disadvantages of coLinux / andLinux / speedLinux:

  • with multicore processors only one core is used
  • no 64bit support
  • Serious system adjustments (special kernel, etc.) are necessary when the system is updated.

Advantages of coLinux / andLinux / speedLinux:

  • gets by with less RAM than VMWare (lower resource requirements)
  • native windows windows

Cygwin

Freetz definitely works under Cygwin Not, and Linux is also recommended for ds-0.2.9 (kernel 2.4) because there can be problems with Cygwin and it also has a huge Loss of build speed (multiple build times) means using Cygwin.

Since Freetz cannot be built under Cygwin anyway, only the description for ds-mod follows:

A howto from dsl123 to compile the ds-mod under Cygwin can be found here. To unzip the file under Windows exclusively use the Cygwin tar - as described in the instructions:

  1. Download and run the Cygwin Installer from http://www.cygwin.com/
  2. Install Cygwin with the following packages:
    • Archive> unzip
    • Devel> gcc, libncurses-devel, make, patchutils
    • Interpreters> perl
    • Web> wget
  3. Download to the Cygwin home directory (depending on the installation, for example)
  4. Open Cygwin Shell and unzip the ds-mod
  5. Optional: Import patch (see howto)
  6. Change to the directory of the unzipped ds-mod
  7. Select configuration. This is possible via an ncurses interface, which is known, for example, from the configuration of the Linux kernel. Details and descriptions of the options can be found in the description of the menuconfig.
  8. Modify firmware. In this step, the original firmware and packages that match the selected configuration, as well as sources for the required tools, are downloaded fully automatically and the modified firmware is generated in three steps.
  9. Upload a firmware update to the box. After a successful upload, another web interface is now available on port 81, which contains instructions for completing the installation. Should the box no longer be accessible after the firmware has been uploaded even minutes after the info LED has stopped flashing (typically lit. periodically all LEDs on again and again), the original firmware can be restored with the help of the AVM.

Mac OS X

In principle and with a few patches, a current ds-mod also works under Mac OS X. At least I managed to persuade ds-0.2.9_26-14.2 to work under Mac OS X.

First of all, the following requirements must be met:

  1. Create a data partition in which the HFS + case sensitive is configured.
  2. Install Xcode. This gives suitable versions of inter alia.
    • gcc
    • g ++
    • autoconf
    • automake
    • make
    • Ncurses
    • zlib
    • flex
    • bison

In addition, some (GNU) utilities are required, which can be installed e.g. via Darwin Ports:

  • gettext
  • texinfo
  • dos2unix
  • gawk
  • coreutils
  • findutils
  • gsed

And probably a few more if you select the appropriate packages.

The additional utilities are usually installed under names that begin with g so as not to conflict with the native Mac OS X utilities. However, some configuration scripts require the properties of GNU utilities, even if they are called under the standard name. Therefore I created a directory in which symlinks of the standard names point to the GNU Utilities. To work with ds-mod, this directory must be included in the search path:

~ / gnubin $ ls -l total 64 -rwxr-xr-x 1 enrik enrik 106 20 Mar 17:23 as lrwxr-xr-x 1 enrik enrik 19 20 Mar 17:18 awk -> / opt / local / bin / gawk lrwxr-xr-x 1 enrik enrik 18 20 Mar 18:32 cp -> / opt / local / bin / gcp lrwxr-xr-x 1 enrik enrik 22 11 Apr 10:11 cpp -> / usr / local / bin / cpp -3.3 lrwxr-xr-x 1 enrik enrik 20 11 Apr 10:11 find -> / opt / local / bin / gfind lrwxr-xr-x 1 enrik enrik 23 20 Mar 17:18 install -> / opt / local / bin / ginstall -rwxr-xr-x 1 enrik enrik 106 20 Mar 17:24 ld lrwxr-xr-x 1 enrik enrik 21 20 Mar 17:18 sed -> / opt / local / bin / gnused

The pseudo commands and are only used here to trick glibc into believing that the binutils are suitable for the kernel compiler, which is created using crosstool. The two files look like this:

~ / gnubin $ cat as #! / bin / sh # fake as version for crosstool ["$ 1" = -v] && echo GNU assembler 2.13 || / usr / bin / as "$ @"
~ / gnubin $ cat ld #! / bin / sh # fake ld version for crosstool ["$ 1" = --version] && echo GNU ld 2.13 || / usr / bin / ld "$ @"
~ / gnubin $ PATH = $ HOME / gnubin: $ PATH

In addition, a patch for ds-mod is required, which can be downloaded here:

The whole thing is little tested, in particular I have not yet tried an image created in this way.

Freetz So now runs great on the box, and has been for a long time. It inevitably happens that AVM brings out a new firmware version, and that too Freetz-Development has continued. In short: Of course, you would like to benefit from the new features and bug fixes. So how do you bring Freetz on the box up to date?

The answer is quite simple: "See above". An update takes place in exactly the same way as the first installation: You build a new one Freetz-Image and then uses the "firmware update" of the box.

If you have used a repository version for the installation, bring it up to date beforehand by switching to the source directory and ...

# Change to the directory in which the "checked out" Freetz is: cd freetz # Update source files svn up # If necessary, check the package selection, change it, activate new patches, etc. make menuconfig # Build image make

And now the finished image on the box.

AVM firmware is not found

  1. FAQ

Danger: The FAQ's should be displayed in German. If this is not the case, please note this tip.

Image too big

  1. FAQ

Danger: The FAQ's should be displayed in German. If this is not the case, please note this tip.

Other problems or error messages

  1. FAQ

Danger: The FAQ's should be displayed in German. If this is not the case, please note this tip.