IPCop-Forum.de

www.ipcop-forum.de


IPCop-Community
CL-Systems
Home Home   Doku Doku   Links Links   Downloads Downloads
UnIPCop Der (Un)IPCop   IFS IPCop-ForumSpy
CopTime CopTime   Galerie IPCop-Galerie   IPCop Userkarte Userkarte
Aktuelle Zeit: 28.05.2018, 03:36

Alle Zeiten sind UTC+02:00




Ein neues Thema erstellen  Auf das Thema antworten  [ 7 Beiträge ] 
Autor Nachricht
BeitragVerfasst: 13.09.2015, 18:43 
Offline
Rookie
Themenstarter
Rookie

Registriert: 12.09.2015
Beiträge: 7
Background
I know, USB stands for “UnStable Broadband” ;-) Anyway, I have a StarTech USB 3.0 to Gigabit Ethernet NIC Network, product ID: USB31000SW. It is based on ASIX_AX88179. And I want it to work on a Asus VivoPC VM42 (https://www.asus.com/Mini-PCs/VivoPC_VM42/ ). If I run lsusb it say:
Code:
lsusb
Bus 001 Device 002: ID 8087:8000 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0b95:1790 ASIX Electronics Corp.
Bus 001 Device 004: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 005: ID 0b05:17dc ASUSTek Computer, Inc.
Bus 001 Device 006: ID 192f:0416 Avago Technologies, Pte. ADNS-5700 Optical Mouse Controller (3-button)
Bus 001 Device 007: ID 04f2:0404 Chicony Electronics Co., Ltd


If I look in https://sourceforge.net/p/ipcop/wiki/Hardware2/ and the USB ID, it seems like 0b95:1790 is not supported. So I guess I need to add drivers to IPCopy for this NIC.

Resources I have found.
Building IPCop 2 and to compile additional code
http://sourceforge.net/p/ipcop/wiki/HowTo%20build/
http://sourceforge.net/p/ipcop/wiki/How ... al%20code/

IPCop build cache
http://www.cobin.de/ipcopbuildcache.php
http://www.linuxfromscratch.org/lfs/vie ... kages.html
http://www.linuxfromscratch.org/lfs/pac ... l#packages
http://archive.apache.org/dist/httpd/

Building the current and stable IPCop v1.4.x
http://freedommafia.net/clanmain/ipcop-69
To list differences between your working copy and the CVS repository, use this command:
cd ipcop (or whatever directory you rename the tree received)
cvs diff -u (-u is not mandatory but output is more readable)

IPCop v1.4.x addon for XName
http://www.chbcp.net/~pat/ipcop/xname.html

How to compile additional kernel modules into IPCop?
http://ipcop-devel.narkive.com/TkRPR6yC ... into-ipcop
If it is a patch to the kernel, you need to modify lfs/linux and config/kernel/kernel.config.x
If the module is an independant package, add a new lfs script that you call from make.sh ( compile like usb adsl modem driver). Then add the result of the log/(your package target) to src/ROOTFILES and comment the files that you don't want to include in the iso.

IPCop & USB to Gigabit Adapter (ASIX AX88179), and some building errors
viewtopic.php?f=58&t=31597

How to install a new driver / Installing the 3ware 9500/9550 driver
http://sourceforge.net/p/ipcop/mcdailma ... /14975306/
  • 4. run ./make.sh build the first time through to set up the kernel directory under build/usr/src
  • 5. It now helps if you copy and install the same base kernel from the cache directory to another directory so that you can test and modify any files needed by the new driver(s).
  • 6) This is where it gets a little tricky.
    You need to modify the build/usr/src/linux/drivers/xxx files. I modified the scsi directory to add the 3w-9xxx driver. I added a line to the Makefile and I added a line to the Config.in file for the 3w-9xxx driver. Then I added a line to the defconfig file in build/usr/src/linux/arch/i386/for the 3w-9xxx driver
    Then I changed the 3 files in ipcop-1.4.15/config/kernel that are used to build the 3 different kernel .config files so that they build the 3w-9xxx.o driver module during the kernel build process.
  • 7) You now need to make these modifcations to a bare untar'ed kernel tree and re-tar.gz the kernel, run md5sum on the kernel and take that value and insert it into the file ipcop-1.4.15/lfs/linux
  • 8) Copy the new linux-x.x.x.tar.gz file to the ipcop-1.4.15/cache directory.
  • 9) run ./make.sh clean then ./make.sh build and your new driver should be there in the install.
  • I now have an IPCop iso that supports all the 3ware PCI based cards.

Drivers for my USB3 ethernet
http://www.asix.com.tw/download.php?sub ... ItemID=131
http://www.asix.com.tw/FrootAttach/driv ... RCE.tar.gz
http://www.startech.com/Networking-IO/u ... 00SW#dnlds

EDIT:
HOWTO
I guess a HOWTO for adding a driver would look like this. If you want to know how I came up with this, read the posts under this :wink:

Create a building environment
  1. Installed debian-8.2.0-i386-DVD-1.iso on a VirtualBox PC. PS. Don’t install on a 8GB drive (like I did on my first try), it’s to small, use 20GB or bigger.
  2. I read at http://sourceforge.net/p/ipcop/wiki/HowTo%20build/ So I go to /home/raffe/Desktop/
  3. First install stuff we need and make a work directory
    Code:
    apt-get install build-essential realpath sudo zypper bison gcc make texinfo subversion cifs-utils 
    mkdir ipcopworks
    cd ipcopworks
  4. Now we get the svn files. You can see at http://sourceforge.net/p/ipcop/svn/HEAD/tree/ipcop/ what you want. If you want the latest, don't write the "--revision 7814 " part.
    Code:
    svn checkout --revision 7814 http://svn.code.sf.net/p/ipcop/svn/ipcop/trunk
  5. First time you need to change your sudo settings. First you do a ./make.sh prefetch to get the error text with what is missing. Then copy it to the end of the sudo conf file.
    Code:
    cd trunk
    ./make.sh prefetch
    su
    visudo
    exit
  6. This time when I tried again ./make.sh prefetch But I got read problem on directory log_i486 so I delete log_i486 as root and the create it as raffe
    Code:
    su
    rm  log_i486 -rf
    exit
    mkdir log_i486
  7. I try again ./make.sh prefetch but stuff is missing. Check the error list and download files from from http://www.cobin.de/ipcopbuildcache.php to /home/raffe/Desktop/ipcopwork/trunk/cache.
  8. I check the file /home/raffe/Desktop/ipcopwork/trunk/lfs/udev. There I see it also say stuff about udev-166-testfiles.tar.bz2 and I don’t have that file So I download udev-166-testfiles.tar.bz2 from Cobin.de to cache
  9. I check the file /home/raffe/Desktop/ipcopwork/trunk/lfs/apache and in http://archive.apache.org/dist/httpd/ I find 2.2.29. So I change in the file to
    Code:
    #DL_FROM = http://apache.org/dist/httpd 
    DL_FROM = http://archive.apache.org/dist/httpd
  10. After all stuff is downloaded I finally get
    Code:
    Attempted to download 205 of 215 packages                                   [ INFO ] 
     *** All packages successfully downloaded with correct md5 sums
  11. According to https://sourceforge.net/p/ipcop/wiki/HowTo%20build/ next step is ./make.sh gettoolchain so we do it
    Code:
    ./make.sh gettoolchain

    I get:
    Code:
    FINISHED --2015-09-12 14:13:44-- 
    Total wall clock time: 22s Downloaded: 2 files, 40M in 5.3s (7.54 MB/s)                     [ DONE ]
    Toolchain md5 ok
  12. I try to build the first time
    Code:
    ./make.sh build

    After 2½ hours
    Code:
    Skip usb images to save time 
    No MD5 all-files-list for 2.1.9 found, no comparison.                  [ INFO ]
    ... and all this hard work for:
    63M     /home/raffe/Desktop/ipcopwork/trunk/ipcop-2.2.0-install-cd.i486.iso
    25M     /home/raffe/Desktop/ipcopwork/trunk/ipcop-2.2.0-update.i486.tgz
    ... which took: 210 minutes and 21 seconds

    I also want USB images, so I create and open .config in trunk directory and add
    Code:
    SKIP_USB_IMAGES=No
  13. If you get an error check log_i486/_latest_interrupt.log for errors. One time isdn4k-utils_ippp-filter.patch was missing in src/patches/
  14. If you want to do a clean build, use
    Code:
    ./make.sh clean 
    ./make.sh build

Add a driver
  1. I download the drivers from http://www.asix.com.tw/FrootAttach/driv ... RCE.tar.gz and check the MD5
    Code:
    cd /home/raffe/Desktop/ipcopwork 
    wget http://www.asix.com.tw/FrootAttach/driver/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE.tar.gz
    md5sum AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE.tar.gz
    6eff642a7dbe3e01a9f27f622bb86fc5  AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE.tar.gz
    cp AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE.tar.gz trunk/cache/
    rm AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE.tar.gz
  2. I add AX88179_178A to make.su
    nano make.sh
    Under "chroot_make 3c5x9setup" and above "} # End of ipcop_build()", line 1968, I add
    chroot_make AX88179_178A
    So it looks something like this
    Code:
    ...
    ...
            chroot_make 3c5x9setup
            chroot_make AX88179_178A
    } # End of ipcop_build()
    ...
    ...
  3. Create the file AX88179_178A in the lfs directory with this content
    Code:
    ###############################################################################
    # This file is part of the IPCop Firewall.                                    #
    #                                                                             #
    # IPCop is free software; you can redistribute it and/or modify               #
    # it under the terms of the GNU General Public License as published by        #
    # the Free Software Foundation; either version 2 of the License, or           #
    # (at your option) any later version.                                         #
    #                                                                             #
    # IPCop is distributed in the hope that it will be useful,                    #
    # but WITHOUT ANY WARRANTY; without even the implied warranty of              #
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
    # GNU General Public License for more details.                                #
    #                                                                             #
    # You should have received a copy of the GNU General Public License           #
    # along with IPCop; if not, write to the Free Software                        #
    # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA    #
    #                                                                             #
    # Makefiles are based on LFSMake, which is                                    #
    # Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com>                        #
    #                                                                             #
    # Modifications by:                                                           #
    # ??-12-2003 Mark Wormgoor < mark@wormgoor.com>                               #
    #          - Modified Makefile for IPCop build                                #
    #                                                                             #
    # $Id: linux-atm 5711 2011-06-27 20:10:40Z gespinasse $
    #                                                                             #
    ###############################################################################

    ###############################################################################
    # Definitions
    ###############################################################################

    include Config

    PKG_NAME   = AX88179_178A_LINUX_DRIVER
    VER        = 1.14.2
    HOST_ARCH  = all
    OTHER_SRC  = yes
    THISAPP    = $(PKG_NAME)_v$(VER)_SOURCE
    DL_FILE    = $(THISAPP).tar.gz
    DL_FROM    = http://www.asix.com.tw/FrootAttach/driver
    DIR_APP    = $(DIR_SRC)/$(THISAPP)
    TARGET     = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP)

    ###############################################################################
    # Top-level Rules
    ###############################################################################

    objects = $(DL_FILE)
    $(DL_FILE)         = $(DL_FROM)/$(DL_FILE)
    $(DL_FILE)_MD5         = 6eff642a7dbe3e01a9f27f622bb86fc5
    install : $(TARGET)
    check : $(patsubst %,$(DIR_CHK)/%,$(objects))
    download :$(patsubst %,$(DIR_DL)/%,$(objects))
    md5 : $(subst %,%_MD5,$(objects))

    ###############################################################################
    # Downloading, checking, md5sum
    ###############################################################################

    $(patsubst %,$(DIR_CHK)/%,$(objects)) :
       @$(CHECK)

    $(patsubst %,$(DIR_DL)/%,$(objects)) :
       @$(LOAD)

    $(subst %,%_MD5,$(objects)) :
       @$(MD5)

    ###############################################################################
    # Installation Details
    ###############################################################################

    $(TARGET) : $(firstword $(MAKEFILE_LIST)) $(patsubst %,$(DIR_DL)/%,$(objects)) $(DIR_SRC)/config/kernel/kernel.config.$(MACHINE)
       @$(PREBUILD)
       @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)

       cp $(DIR_SRC)/config/kernel/kernel.config.$(MACHINE) $(DIR_APP)/.config
       make -C /lib/modules/$(KVER)/build SUBDIRS=$(DIR_APP) modules
       cd $(DIR_APP) && gzip -fn9 ax88179_178a.ko
       cd $(DIR_APP) && install -m 0644 ax88179_178a.ko.gz /lib/modules/$(KVER)/kernel/drivers/net/usb

       @rm -rf $(DIR_APP)
       @$(POSTBUILD)
  4. And build
    Code:
    ./make.sh build 


Zuletzt geändert von raffe1234 am 03.10.2015, 12:09, insgesamt 4-mal geändert.

Nach oben
   
BeitragVerfasst: 13.09.2015, 18:59 
Offline
Rookie
Themenstarter
Rookie

Registriert: 12.09.2015
Beiträge: 7
First I build a standard IPCop

  1. Installed debian-8.2.0-i386-DVD-1.iso on a VirtualBox PC. PS. Don’t install on a 8GB drive (like I did on my first try), it’s to small, use 20GB or bigger.
  2. I read at http://sourceforge.net/p/ipcop/wiki/HowTo%20build/ So I made directory /home/raffe/Desktop/ipcopwork/ and went there
  3. There I run
    Code:
    apt-get install build-essential realpath sudo 
    apt-get install zypper bison gcc make texinfo
    apt-get install subversion
    svn checkout http://svn.code.sf.net/p/ipcop/svn/ipcop/trunk
    cd trunk
  4. I try ./make.sh prefetch But I get problems with sudo, so with su and visudo I add *** IPCop configuration *** text, e.g:
    Code:
    # *** IPCop configuration ***
    User_Alias IPCOP_BUILDER = raffe
    Cmnd_Alias BIND = /bin/mount --bind /dev* /home/raffe/Desktop/ipcopwork/trunk/build_i486/ipcop/dev*, \
                    /bin/mount --bind /proc /home/raffe/Desktop/ipcopwork/trunk/build_i486/ipcop/proc, \
                    /bin/mount --bind /sys /home/raffe/Desktop/ipcopwork/trunk/build_i486/ipcop/sys, \
                    /bin/mount --bind /home/raffe/Desktop/ipcopwork/trunk/* /home/raffe/Desktop/ipcopwork/trunk/build_$
    Cmnd_Alias CHMOD = /bin/chmod [0-9]* /home/raffe/Desktop/ipcopwork/trunk/build_i486/ipcop/*
    Cmnd_Alias DU = /usr/bin/du -skx /home/raffe/Desktop/ipcopwork/trunk
    Cmnd_Alias LN = /bin/ln -sf * /home/raffe/Desktop/ipcopwork/trunk/build_i486/ipcop/*, \
                    /bin/ln -sf /home/raffe/Desktop/ipcopwork/trunk/build_i486/tools_i486 /
    Cmnd_Alias LOSETUP = /sbin/losetup -d /dev/loop*
    Cmnd_Alias MKDIR = /bin/mkdir -p /home/raffe/Desktop/ipcopwork/trunk/build_i486/ipcop/*, \
                    /bin/mkdir -p /home/raffe/Desktop/ipcopwork/trunk/build_i486/installer
    Cmnd_Alias MKNOD = /bin/mknod /home/raffe/Desktop/ipcopwork/trunk/build_i486/ipcop/dev/*
    Cmnd_Alias MV = /bin/mv /home/raffe/Desktop/ipcopwork/trunk/build_i486/ipcop/tmp/* \
                                    /home/raffe/Desktop/ipcopwork/trunk/build_i486/ipcop/tmp/*, \
                    /bin/mv /home/raffe/Desktop/ipcopwork/trunk/build_i486/installer/images/ipcop-* \
                                    /home/raffe/Desktop/ipcopwork/trunk/
    Cmnd_Alias NICECMD = /usr/bin/nice * /usr/sbin/chroot /home/raffe/Desktop/ipcopwork/trunk/build_i486/ipcop *
    Cmnd_Alias RM = /bin/rm -fr /home/raffe/Desktop/ipcopwork/trunk/*, \
                    /bin/rm -fr /tools_i486
    Cmnd_Alias UMOUNT = /bin/umount /home/raffe/Desktop/ipcopwork/trunk/build_i486/ipcop/*, \
                    /bin/umount /dev/loop*, \
                    /bin/umount /run/shm
    IPCOP_BUILDER   ALL = NOPASSWD: BIND,CHMOD,DU,LN,LOSETUP,MKDIR,MKNOD,MV,NICECMD,RM,UMOUNT
    log_i486
    # *** End of IPCop configuration ***
  5. I try again ./make.sh prefetch But I get read problem on directory log_i486
  6. I delete log_i486 as root and the create it as raffe I try again ./make.sh prefetch Goes better, but I get:
    Code:
    *** Retrying failed files                                                                          wget    md5sum
    apache (Attempt: 3)                                                                              [ FAIL ] [ FAIL ]
    ez-ipupdate (Attempt: 3)                                                                         [ FAIL ] [ FAIL ]
    linux-firmware (Attempt: 3)                                                                      [ FAIL ] [ FAIL ]
    lsof (Attempt: 3)                                                                                [ FAIL ] [ FAIL ]
    man (Attempt: 3)                                                                                 [ FAIL ] [ FAIL ]
    net-tools (Attempt: 3)                                                                           [ FAIL ] [ FAIL ]
    pcmciautils (Attempt: 3)                                                                         [ FAIL ] [ FAIL ]
    squid-langpack (Attempt: 3)                                                                      [ FAIL ] [ FAIL ]
    udev (Attempt: 3)                                                                                [ FAIL ] [ FAIL ]
    Attempted to download 205 of 215 packages                                                                 [ INFO ]
    *** 9 package(s) could not be downloaded
    *** 9 package(s) had incorrect md5sum
    *** google for files no more found in original URL, that's safe when md5 remain the same
    Some files in /home/raffe/Desktop/ipcopwork/trunk/cache failed to download or have incorrect md5 sums     [ WARN ]
  7. So I get the files above from http://www.cobin.de/ipcopbuildcache.php to /home/raffe/Desktop/ipcopwork/trunk/cache But I don’t find apache, and the udev I get from http://www.cobin.de/ipcopbuildcache.php seems to be the wrong one.
  8. I look in http://www.linuxfromscratch.org/lfs/vie ... kages.html but no apache or udev there.
  9. I read “change the MD5 checksum of the new package in the lfs/<package file=""> script in the $(DL_FILE)_MD5= line” at https://sourceforge.net/p/ipcop/wiki/Ho ... al%20code/ so I check the file /home/raffe/Desktop/ipcopwork/trunk/lfs/udev. There I see it also say stuff about udev-166-testfiles.tar.bz2 and I don’t have that file So I download udev-166-testfiles.tar.bz2 from Cobin.se to cache. Now I again try ./make.sh prefetch Goes better, now only apache is missing.
  10. OK, apache. I check the file /home/raffe/Desktop/ipcopwork/trunk/lfs/apache and it say
    Code:
    PKG_NAME = apache 
    VER = 2.2.29
    HOST_ARCH = all
    OTHER_SRC = yes
    THISAPP = httpd-$(VER)
    DL_FILE = $(THISAPP).tar.bz2
    DL_FROM = http://apache.org/dist/httpd
    #DL_FROM = http://archive.apache.org/dist/httpd
    DIR_APP = $@(DIR_SRC)$(THISAPP)

    I look in http://apache.org/dist/httpd/ and there is no 2.2.29 there, but in http://archive.apache.org/dist/httpd/ I find 2.2.29. So I change to
    Code:
    #DL_FROM = http://apache.org/dist/httpd 
    DL_FROM = http://archive.apache.org/dist/httpd

    Now I again try ./make.sh prefetch And I finally get
    Code:
    Attempted to download 205 of 215 packages                                   [ INFO ] 
     *** All packages successfully downloaded with correct md5 sums

    According to https://sourceforge.net/p/ipcop/wiki/HowTo%20build/ next step is
    Code:
    ./make.sh gettoolchain

    I get:
    Code:
    FINISHED --2015-09-12 14:13:44-- 
    Total wall clock time: 22s Downloaded: 2 files, 40M in 5.3s (7.54 MB/s)                     [ DONE ]
    Toolchain md5 ok
  11. I get some more inspiration from http://freedommafia.net/clanmain/ipcop-69 and http://sourceforge.net/p/ipcop/mailman/ ... /14975306/ and finally try to build (start 14.26):
    Code:
    ./make.sh build
  12. After 2½ hours
    Code:
    Skip usb images to save time 
    No MD5 all-files-list for 2.1.9 found, no comparison.                  [ INFO ]
    ... and all this hard work for:
    63M     /home/raffe/Desktop/ipcopwork/trunk/ipcop-2.2.0-install-cd.i486.iso
    25M     /home/raffe/Desktop/ipcopwork/trunk/ipcop-2.2.0-update.i486.tgz
    ... which took: 210 minutes and 21 seconds
  13. I create and open .config in trunk directory and add
    Code:
    SKIP_USB_IMAGES=No

Need to start from the beginning
About here I discover that my 8GB virtual drive is full, *sigh*. I realise that rezising the drive probably will take longer time than making a backup of the trunk directory and reinstall Debian on a virtual 20GB disc. I turn off the virtual Debian and make a backup copy of the virtual drive. Then I start it up again and do this:
Code:
apt-get install cifs-utils 
su
mount //192.168.111.200/Backup /mnt -o username=raffe
cd /home/raffe/Desktop
tar -cvzf /mnt/IPcopBuildEnv.tgz ipcopwork/

IPcopBuildEnv.tgz is about 1,5GB. After that I reinstall Debian, now with a 20GB disc, and run
Code:
su 
apt-get install build-essential realpath sudo zypper bison gcc make texinfo subversion cifs-utils
mount //192.168.111.200/Backup /mnt -o username=raffe
cd /home/raffe/Desktop
cp /mnt/IPcopBuildEnv.tgz .
tar -zxvf IPcopBuildEnv.tgz
visudo (I add the *** IPCop configuration *** text)
exit
cd /home/raffe/Desktop/ipcopwork/trunk
./make.sh build

Nice, it still works. I also tried raising the virtual PC’a RAM 2GB to 4GB and from 1 CPU to 4. After that I tried:
Code:
./make.sh clean 
./make.sh build

That took 66 minutes. OK, lets continue…


Zuletzt geändert von raffe1234 am 14.09.2015, 09:32, insgesamt 4-mal geändert.

Nach oben
   
BeitragVerfasst: 13.09.2015, 19:52 
Offline
Rookie
Themenstarter
Rookie

Registriert: 12.09.2015
Beiträge: 7
Now I try to figure out how to add my drivers
  • I read http://sourceforge.net/p/ipcop/mcdailma ... /14975306/ that “You need to modify the build/usr/src/linux/drivers/xxx files. I modified the scsi directory to add the 3w-9xxx driver. I added a line to the Makefile and I added a line to the Config.in file for the 3w-9xxx driver.” and on my PC I find the directory /home/raffe/Desktop/ipcopwork/trunk/build_i486/ipcop/usr/src/linux-3.10-1/drivers/usb. There I find the file Makefile
  • But then he says “Then I added a line to the defconfig file in build/usr/src/linux/arch/i386/for the 3w-9xxx driver”, but I did’nt find any defconfig “in build/usr/src/linux/arch/i386/” or /home/raffe/Desktop/ipcopwork/trunk/build_i486/ipcop/usr/src/linux-3.10-1/arch/i386cd or elsewhere.
  • And he also say “Then I changed the 3 files in ipcop-1.4.15/config/kernel that are used to build the 3 different kernel .config files so that they build the 3w-9xxx.o driver module during the kernel build process.”. I don’t find that either
  • So I read at https://sourceforge.net/p/ipcop/wiki/Ho ... al%20code/ instead. There I can read that “package needs to be added in make.sh, probably at the end of make.sh buildstage3”. I guess “buildstage3” is stage “ipcop” as it has STAGE_ORDER=03.
  • I read in http://freedommafia.net/clanmain/ipcop-69 that instead of making a ./make.sh clean to rebuild a whole 2½ hour ./make.sh build “It is possible to hack and rebuild quicker one part of the process. If, for instance, you know that one cgi script for the web interface has been changed, delete the apache log file, and run the build process again”: rm log/apache_1.3.* ./make.sh build Maybe this is the "same" folder as trunk/log_i486?

Lets try
  1. I download the drivers from http://www.asix.com.tw/FrootAttach/driv ... RCE.tar.gz
    Code:
    cd /home/raffe/Desktop/ipcopwork 
    wget http://www.asix.com.tw/FrootAttach/driver/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE.tar.gz
  2. I put the files where I think they should be
    Code:
    tar -zxvf AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE.tar.gz 
    mv AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE AX88179_178A
    su
    mv AX88179_178A trunk/build_i486/ipcop/usr/src/linux-3.10-1/drivers/usb
    exit
    rm AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE.tar.gz
  3. As su I edit trunk/build_i486/ipcop/usr/src/linux-3.10-1/drivers/usb/Makefile and add
    Code:
    obj-$(CONFIG_USB_AX88179_NIC)   += AX88179_178A/
  4. Not really sure what to do now, so I try to build
    Code:
    ./make.sh build
  5. I try to install ipcop-2.2.0-install-cd.i486.iso

I install my build
  • The new IPCop with my own build actually finds the USB3 NIC and it works as RED :-)
  • But at the same time I can not connect to GREEN (worked with 2.1.8) via https://192.168.111.1:8443 :-(
  • I don't know if any above is because of it is version 2.2.0
I think I need to get version 2.1.8 and try build it and test to install the driver there also...


Nach oben
   
BeitragVerfasst: 14.09.2015, 13:24 
Offline
Rookie
Themenstarter
Rookie

Registriert: 12.09.2015
Beiträge: 7
Building 2.1.8
The page http://sourceforge.net/p/ipcop/svn/HEAD/tree/ipcop/ say 2.1.8 revision number is 7814, so now I will backup 2.2.0 trunk to trunk2 and then get the 2.1.8 trunk
Code:
cd /home/raffe/Desktop/ipcopwork
mv trunk trunk2
svn checkout --revision 7814 http://svn.code.sf.net/p/ipcop/svn/ipcop/trunk


When I try ./make.sh prefetch this time in the 2.1.8 trunk directory, these are missing, and mpfr has wrong MB5:
Code:
URI (Attempt: 3)                               [ FAIL ] [ FAIL ]
XML-Parser (Attempt: 3)                        [ FAIL ] [ FAIL ]
apache (Attempt: 3)                            [ FAIL ] [ FAIL ]
iana-etc (Attempt: 3)                          [ FAIL ] [ FAIL ]
isdn4k-utils (Attempt: 3)                      [ FAIL ] [ FAIL ]
klibc (Attempt: 3)                             [ FAIL ] [ FAIL ]
lsof (Attempt: 3)                              [ FAIL ] [ FAIL ]
mklibs (Attempt: 3)                            [ FAIL ] [ FAIL ]
net-tools (Attempt: 3)                         [ FAIL ] [ FAIL ]
ppp (Attempt: 3)                               [ FAIL ] [ FAIL ]


Like above, after Googling, downloading, fixing and trixing, like getting lfs/isdn4k-utils and lfs/mpfr from the 2.2.0 trunk2/lfs directory (they needed diff files that can't be found anymore, the new lfs files did'nt try to download the diffs anymore, without the 2.2.0 trunk I wonder if I would have known how to fix this), I finally get "All packages successfully downloaded with correct md5 sums" with ./make.sh prefetch. Now I do
Code:
./make.sh gettoolchain
./make.sh build

As this will take about 2 hours, I will go to sleep now and continue tomorrow...
...
...
Now with a good night's sleep I feel better. A New sun, a Fresh day, a cool greeting asking you to forget all your worries sorrows & tears and whispers from gentle winds that wants to see you happy...
Until I see that I have got a build FAIL on isdn4k-utils.
Code:
...
...
isdn4k-utils                                      [     v3.2p1 ] [         1 ] [ FAIL ]

ERROR: Building isdn4k-utils                                                   [ FAIL ]
Check log_i486/_latest_interrupt.log for errors if applicable

So I check log_i486/_latest_interrupt.log for errors
Code:
raffe@debian:~/Desktop/ipcopwork/trunk$ cat log_i486/_latest_interrupt.log 

+ cd /usr/src/lfs
+ make -f isdn4k-utils LFS_BASEDIR=/usr/src install
====================================== Installing isdn4k-utils.v3.2p1 ...
Install started; saving file list to /usr/src/lsalr ...
cd /usr/src/isdn4k-utils && patch -Np1 -i /usr/src/src/patches/isdn4k-utils_ippp-filter.patch
patch: **** Can't open patch file /usr/src/src/patches/isdn4k-utils_ippp-filter.patch : No such file or directory
isdn4k-utils:83: recipe for target '/usr/src/files_i486/03_ipcop/isdn4k-utils.v3.2p1' failed
make: *** [/usr/src/files_i486/03_ipcop/isdn4k-utils.v3.2p1] Error 2

I look in trunk/src/patches
Code:
raffe@debian:~/Desktop/ipcopwork/trunk$ ls src/patches/is*
src/patches/isdn4k-utils-gcc4.patch            src/patches/isdn4k-utils-v3.2p1-c89.patch     src/patches/isdn4k-utils-v3.2p1-gcc34.patch
src/patches/isdn4k-utils-parallel-build.patch  src/patches/isdn4k-utils-v3.2p1-config.patch

The isdn4k-utils_ippp-filter.patch is missing, but I find the patch in trunk/src/patches
Code:
raffe@debian:/home/raffe/Desktop/ipcopwork/trunk2# ls src/patches/is*
src/patches/isdn4k-utils-gcc4.patch         src/patches/isdn4k-utils-parallel-build.patch  src/patches/isdn4k-utils-v3.2p1-config.patch
src/patches/isdn4k-utils_ippp-filter.patch  src/patches/isdn4k-utils-v3.2p1-c89.patch      src/patches/isdn4k-utils-v3.2p1-gcc34.patch

So I copy isdn4k-utils_ippp-filter.patch from the 2.2.0 trunk2/src/patches directory to the 2.1.8 trunk/src/patches directory and I try building again
Code:
cp ../trunk2/src/patches/isdn4k-utils_ippp-filter.patch src/patches/
./make.sh build

This time it goes better
Code:
*** Building packages                      options            version     time (sec)    status
fix-up                                                    [   svn-7664 ] [         0 ] [ DONE ]
ipcop-installer                                           [   svn-7542 ] [         5 ] [ DONE ]
ipcop-initramfs                                           [   svn-7592 ] [        20 ] [ DONE ]
Skip floppy images
Skip avm drivers
ipcop-update                              [ PASS=2.1.8 ]  [   svn-7551 ] [         6 ] [ DONE ]
ipcop-boot-cd                                             [   svn-7583 ] [        30 ] [ DONE ]
ipcop-boot-net                                            [   svn-7540 ] [         0 ] [ DONE ]
check_files                                               [   svn-7798 ] [         2 ] [ DONE ]
ipcop-boot-usb                                            [   svn-7595 ] [        14 ] [ DONE ]
No MD5 all-files-list for 2.1.7 found, no comparison.                                  [ INFO ]

... and all this hard work for:
62M     /home/raffe/Desktop/ipcopwork/trunk/ipcop-2.1.8-install-cd.i486.iso
58M     /home/raffe/Desktop/ipcopwork/trunk/ipcop-2.1.8-install-usb-fdd.i486.img.gz
58M     /home/raffe/Desktop/ipcopwork/trunk/ipcop-2.1.8-install-usb-hdd.i486.img.gz
13M     /home/raffe/Desktop/ipcopwork/trunk/ipcop-2.1.8-update.i486.tgz

Now I will try to add my USB3 NIC driver to 2.1.8, but first I make a backup of the ISO file
Code:
mv ipcop-2.1.8-install-cd.i486.iso ipcop-2.1.8-install-cd.i486.ver1.iso

I copy the drivers from the 2.2.0 trunk2 to the 2.1.8 trunk
Code:
su
mkdir build_i486/ipcop/usr/src/linux-3.4-3/drivers/usb/AX88179_178A
cp ../trunk2/build_i486/ipcop/usr/src/linux-3.10-1/drivers/usb/AX88179_178A/* build_i486/ipcop/usr/src/linux-3.4-3/drivers/usb/AX88179_178A
exit

As su I edit trunk/build_i486/ipcop/usr/src/linux-3.4-3/drivers/usb/Makefile and add
Code:
obj-$(CONFIG_USB_AX88179_NIC)   += AX88179_178A/

And I try to build again
Code:
./make.sh build

It worked, but... Hmm, wait. Maybe I need to do a ./make clean first? I think so, so I do
Code:
mv ipcop-2.1.8-install-cd.i486.iso ipcop-2.1.8-install-cd.i486.ver2.noclean.iso
./make clean
./make.sh build

Iget
Code:
.. and all this hard work for:
62M     /home/raffe/Desktop/ipcopwork/trunk/ipcop-2.1.8-install-cd.i486.iso
58M     /home/raffe/Desktop/ipcopwork/trunk/ipcop-2.1.8-install-usb-fdd.i486.img.gz
58M     /home/raffe/Desktop/ipcopwork/trunk/ipcop-2.1.8-install-usb-hdd.i486.img.gz
13M     /home/raffe/Desktop/ipcopwork/trunk/ipcop-2.1.8-update.i486.tgz
... which took: 41 minutes and 55 seconds

When I check the ISO files with ls it seems like they are all exactly the same size
Code:
raffe@debian:~/Desktop/ipcopwork/trunk$ ls -ls ipcop-2.1.8-*
63180 -rw-r--r-- 1 root root 65011712 Sep 14 12:14 ipcop-2.1.8-install-cd.i486.iso
63176 -rw-r--r-- 1 root root 65011712 Sep 14 09:40 ipcop-2.1.8-install-cd.i486.ver1.iso
63176 -rw-r--r-- 1 root root 65011712 Sep 14 11:29 ipcop-2.1.8-install-cd.i486.ver2.noclean.iso
 9236 -rw-r--r-- 1 root root  9457162 Sep 14 12:14 ipcop-2.1.8-install-netboot.i486.tgz
58904 -rw-r--r-- 1 root root 60312086 Sep 14 12:14 ipcop-2.1.8-install-usb-fdd.i486.img.gz
58840 -rw-r--r-- 1 root root 60249702 Sep 14 12:14 ipcop-2.1.8-install-usb-hdd.i486.img.gz
12440 -rw-r--r-- 1 root root 12737343 Sep 14 12:14 ipcop-2.1.8-update.i486.tgz

But when I check the MD5 of the ISOs it still seems like they are different
Code:
raffe@debian:~/Desktop/ipcopwork/trunk$ md5sum ipcop-2.1.8-install-cd.i486.*
6d9a95f1d19488cc11c2ffb5202cf7b5  ipcop-2.1.8-install-cd.i486.iso
9d5fb35907588ef74435654f73dedd30  ipcop-2.1.8-install-cd.i486.ver1.iso
24af8ef39c8a164fe59abd148a2391b8  ipcop-2.1.8-install-cd.i486.ver2.noclean.iso

Just to see what happens, I try
Code:
raffe@debian:~/Desktop/ipcopwork/trunk$ mv ipcop-2.1.8-install-cd.i486.iso ipcop-2.1.8-install-cd.i486.ver3.withclean.iso
raffe@debian:~/Desktop/ipcopwork/trunk$ ./make.sh build
raffe@debian:~/Desktop/ipcopwork/trunk$ md5sum ipcop-2.1.8-install-cd.i486.*
6977f38c697b6822f257ea1d40d36a9d  ipcop-2.1.8-install-cd.i486.iso
9d5fb35907588ef74435654f73dedd30  ipcop-2.1.8-install-cd.i486.ver1.iso
24af8ef39c8a164fe59abd148a2391b8  ipcop-2.1.8-install-cd.i486.ver2.noclean.iso
6d9a95f1d19488cc11c2ffb5202cf7b5  ipcop-2.1.8-install-cd.i486.ver3.withclean.iso

Then I also try
Code:
raffe@debian:~/Desktop/ipcopwork/trunk$ mv ipcop-2.1.8-install-cd.i486.iso ipcop-2.1.8-install-cd.i486.ver4.SameAsVer3.iso
raffe@debian:~/Desktop/ipcopwork/trunk$ ./make.sh clean
raffe@debian:~/Desktop/ipcopwork/trunk$ ./make.sh build
raffe@debian:~/Desktop/ipcopwork/trunk$ md5sum ipcop-2.1.8-install-cd.i486.*
0504f0db4d5c3892b9fa80df263945ab  ipcop-2.1.8-install-cd.i486.iso
9d5fb35907588ef74435654f73dedd30  ipcop-2.1.8-install-cd.i486.ver1.iso
24af8ef39c8a164fe59abd148a2391b8  ipcop-2.1.8-install-cd.i486.ver2.noclean.iso
6d9a95f1d19488cc11c2ffb5202cf7b5  ipcop-2.1.8-install-cd.i486.ver3.withclean.iso
6977f38c697b6822f257ea1d40d36a9d  ipcop-2.1.8-install-cd.i486.ver4.SameAsVer3.iso

Well, I guess I just have to try them...

Or not, now I see that there is no build_i486/ipcop/usr/src/linux-3.4-3/drivers/usb/AX88179_178A directory and the file trunk/build_i486/ipcop/usr/src/linux-3.4-3/drivers/usb/Makefile don't contain the code obj-$(CONFIG_USB_AX88179_NIC) += AX88179_178A/ anymore. I seem like ./make.sh clean deletes the build_i486 directory (and all directories in it). That means I'm putting my drivers in the wrong directory.

Lets start from the beginning...


Nach oben
   
BeitragVerfasst: 14.09.2015, 15:52 
Offline
Rookie
Themenstarter
Rookie

Registriert: 12.09.2015
Beiträge: 7
Building 2.1.8, try 2
So, what should I try this time?
  1. 1. So if I can put a file in cache directory that builds the driver it could work?
    2. Then add a chroot_make AX88179_178A to make.sh under stage “ipcop”?
    3. And create a AX88179_178A file in the lfs directory?
  2. Or maybe add my driver to linux-3.4.tar.xz and change the Makefile inside it? I think the files in trunk/build_i486/ipcop/usr/src/linux-3.4-3/drivers/usb/ comes from the file cache/linux-3.4.tar.xz.
  3. According to http://sourceforge.net/p/ipcop/mcdailma ... /14975306/ I can also add my driver AFTER I have first done a build, and then build again
  4. As it worked with 2.2.0 (and it wasn't "my" driver), why did the 2.2.0 find my driver? It must have been linux-3.10-1.tar.xz! Maybe just replace 3.4-3 with 3.10-1?

I need to think about this...
...
...
I think D would be easiest, but then I don't learn how to do this. So I will try A.

First I get the drivers
Code:
cd ~/Desktop/ipcopwork
wget http://www.asix.com.tw/FrootAttach/driver/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE.tar.gz
cp AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE.tar.gz trunk/cache/
cd trunk


Now I will edit make.sh, so I do
Code:
nano make.sh

Under "chroot_make 3c5x9setup" and above "} # End of ipcop_build()", line 1968, I add
Code:
chroot_make AX88179_178A


So it looks like this
Code:
...
...
        chroot_make 3c5x9setup
        chroot_make AX88179_178A
} # End of ipcop_build()
...
...


I check the MD5 of the driver file
Code:
raffe@debian:~/Desktop/ipcopwork$ md5sum AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE.tar.gz 
6eff642a7dbe3e01a9f27f622bb86fc5  AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE.tar.gz


That was the easy part, now I will try to make a AX88179_178A file in the lfs directory. I will try to use the file for beep as a guide
Code:
###############################################################################
# This file is part of the IPCop Firewall.                                    #
#                                                                             #
# IPCop is free software; you can redistribute it and/or modify               #
# it under the terms of the GNU General Public License as published by        #
# the Free Software Foundation; either version 2 of the License, or           #
# (at your option) any later version.                                         #
#                                                                             #
# IPCop is distributed in the hope that it will be useful,                    #
# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
# GNU General Public License for more details.                                #
#                                                                             #
# You should have received a copy of the GNU General Public License           #
# along with IPCop; if not, write to the Free Software                        #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA    #
#                                                                             #
# Makefiles are based on LFSMake, which is                                    #
# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com>                        #
#                                                                             #
# Modifications by:                                                           #
# ??-12-2003 Mark Wormgoor < mark@wormgoor.com>                               #
#          - Modified Makefile for IPCop build                                #
#                                                                             #
# $Id: beep 6722 2012-07-30 15:55:00Z gespinasse $
#                                                                             #
###############################################################################

###############################################################################
# Definitions
###############################################################################

include Config

PKG_NAME   = beep
VER        = 1.3
HOST_ARCH  = all
OTHER_SRC  = yes

THISAPP    = $(PKG_NAME)-$(VER)
DL_FILE    = $(THISAPP).tar.gz
DL_FROM    = http://www.johnath.com/beep
DIR_APP    = $(DIR_SRC)/$(THISAPP)
TARGET     = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP)

###############################################################################
# Top-level Rules
###############################################################################

objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 49c340ceb95dbda3f97b2daafac7892a
install : $(TARGET)
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
download :$(patsubst %,$(DIR_DL)/%,$(objects))
md5 : $(subst %,%_MD5,$(objects))

###############################################################################
# Downloading, checking, md5sum
###############################################################################

$(patsubst %,$(DIR_CHK)/%,$(objects)) :
        @$(CHECK)
$(patsubst %,$(DIR_DL)/%,$(objects)) :
        @$(LOAD)
$(subst %,%_MD5,$(objects)) :
        @$(MD5)

###############################################################################
# Installation Details
###############################################################################

$(TARGET) : $(firstword $(MAKEFILE_LIST)) $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)

        # FLAGS= is required to set the optimization level or -O0 is used and FORTIFY does not apply
        cd $(DIR_APP) && make FLAGS="$(CFLAGS) -Wall"
        cd $(DIR_APP) && install -m 0755 beep /usr/bin

        @rm -rf $(DIR_APP)
        @$(POSTBUILD)

The Makefile for beep

Code:
CC=gcc
FLAGS=-Wall
EXEC_NAME=beep
INSTALL_DIR=/usr/bin
MAN_FILE=beep.1.gz
MAN_DIR=/usr/man/man1

default : beep

clean :
    rm ${EXEC_NAME}

beep : beep.c
    ${CC} ${FLAGS} -o ${EXEC_NAME} beep.c

install :
    cp ${EXEC_NAME} ${INSTALL_DIR}
    # rm -f /usr/man/man1/beep.1.bz2
    cp ${MAN_FILE} ${MAN_DIR}

The Makefile for ax88179_178
Code:
CURRENT    = $(shell uname -r)
#TARGET    = usbnet
#OBJS    = usbnet.o
TARGET    = ax88179_178a
OBJS    = ax88179_178a.o
MDIR    = drivers/net/usb
KDIR    = /lib/modules/$(CURRENT)/build
#KDIR    = /root/Desktop/Android/UBIQCONN/android-3.0
SUBLEVEL= $(shell uname -r | cut -d '.' -f 3 | cut -d '.' -f 1 | cut -d '-' -f 1 | cut -d '_' -f 1)
USBNET    = $(shell find $(KDIR)/include/linux/usb/* -name usbnet.h)

ifneq (,$(filter $(SUBLEVEL),14 15 16 17 18 19 20 21))
MDIR = drivers/usb/net
#USBNET    = $(shell find $(KDIR)/$(MDIR)/* -name usbnet.h)
endif

#ifneq (,$(filter $(SUBLEVEL),21 22 23 24))
#USBNET    = $(shell find $(KDIR)/$(MDIR)/* -name usbnet.h)
#endif

#$(if $(USBNET),,$(error $(KDIR)/$(MDIR)/usbnet.h not found. please refer to readme file for the detailed description))

EXTRA_CFLAGS = -DEXPORT_SYMTAB
PWD = $(shell pwd)
DEST = /lib/modules/$(CURRENT)/kernel/$(MDIR)

obj-m      := $(TARGET).o

default:
    make -C $(KDIR) SUBDIRS=$(PWD) modules

$(TARGET).o: $(OBJS)
    $(LD) $(LD_RFLAG) -r -o $@ $(OBJS)

install:
    su -c "cp -v $(TARGET).ko $(DEST) && /sbin/depmod -a"

clean:
    $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) clean

.PHONY: modules clean

-include $(KDIR)/Rules.make


Time to rest, I continue tomorrow...
...
...
Maybe like this?
Code:
###############################################################################
# This file is part of the IPCop Firewall.                                    #
#                                                                             #
# IPCop is free software; you can redistribute it and/or modify               #
# it under the terms of the GNU General Public License as published by        #
# the Free Software Foundation; either version 2 of the License, or           #
# (at your option) any later version.                                         #
#                                                                             #
# IPCop is distributed in the hope that it will be useful,                    #
# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
# GNU General Public License for more details.                                #
#                                                                             #
# You should have received a copy of the GNU General Public License           #
# along with IPCop; if not, write to the Free Software                        #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA    #
#                                                                             #
# Makefiles are based on LFSMake, which is                                    #
# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com>                        #
#                                                                             #
# Modifications by:                                                           #
# ??-12-2003 Mark Wormgoor < mark@wormgoor.com>                               #
#          - Modified Makefile for IPCop build                                #
#                                                                             #
# $Id: linux-atm 5711 2011-06-27 20:10:40Z gespinasse $
#                                                                             #
###############################################################################

###############################################################################
# Definitions
###############################################################################

include Config

PKG_NAME   = AX88179_178A_LINUX_DRIVER
VER        = 1.14.2
HOST_ARCH  = all
OTHER_SRC  = yes

THISAPP    = $(PKG_NAME)_v$(VER)_SOURCE
DL_FILE    = $(THISAPP).tar.gz
DL_FROM    = http://www.asix.com.tw/FrootAttach/driver
DIR_APP    = $(DIR_SRC)/$(THISAPP)
TARGET     = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP)

# This silent 12 strick-aliasing warnings (and debian squeeze use that)
#CFLAGS += -fno-strict-aliasing

###############################################################################
# Top-level Rules
###############################################################################

objects = $(DL_FILE)

$(DL_FILE)                      = $(DL_FROM)/$(DL_FILE)

$(DL_FILE)_MD5                  = 6eff642a7dbe3e01a9f27f622bb86fc5

install : $(TARGET)

check : $(patsubst %,$(DIR_CHK)/%,$(objects))

download :$(patsubst %,$(DIR_DL)/%,$(objects))

md5 : $(subst %,%_MD5,$(objects))

###############################################################################
# Downloading, checking, md5sum
###############################################################################

$(patsubst %,$(DIR_CHK)/%,$(objects)) :
        @$(CHECK)

$(patsubst %,$(DIR_DL)/%,$(objects)) :
        @$(LOAD)

$(subst %,%_MD5,$(objects)) :
        @$(MD5)

###############################################################################
# Installation Details
###############################################################################

$(TARGET) : $(firstword $(MAKEFILE_LIST)) $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
        #cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)_misc-warnings.patch

        #cd $(DIR_APP) && make -j $(PARALLELISM)
        #cd $(DIR_APP) && make -C FLAGS="$(CFLAGS) -DEXPORT_SYMTAB" modules
        cd $(DIR_APP) && make
        #cd $(DIR_APP) && make install
        # Avoid make install as we don't want depmod to run against host kernel
        mkdir -p /lib/modules/$(KVER)/kernel/drivers/usb/net
        cd $(DIR_APP) && install -m 0644 ax88179_178a.ko.gz /lib/modules/$(KVER)/kernel/drivers/usb/net

        # not needed
        #rm /usr/lib/libatm.la

        @rm -rf $(DIR_APP)
        @$(POSTBUILD)

No, it don't work. In log_i486/_latest_interrupt.log I get
Code:
====================================== Installing AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE ...
Install started; saving file list to /usr/src/lsalr ...
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && patch -Np1 -i /usr/src/src/patches/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE_misc-warnings.patch
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && make -j 3
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && make -C FLAGS="-Os -march=i486 -mtune=pentium -pipe -fomit-frame-pointer -DEXPORT_SYMTAB" modules
cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && make
make[1]: Entering directory '/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE'
make -C /lib/modules/3.16.0-4-686-pae/build SUBDIRS=/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE modules
make[2]: Entering directory '/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE'
make[2]: *** /lib/modules/3.16.0-4-686-pae/build: No such file or directory.  Stop.
make[2]: Leaving directory '/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE'
Makefile:30: recipe for target 'default' failed
make[1]: *** [default] Error 2
make[1]: Leaving directory '/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE'
AX88179_178A:85: recipe for target '/usr/src/files_i486/03_ipcop/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE' failed
make: *** [/usr/src/files_i486/03_ipcop/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE] Error 2

I also tried
Code:
cd $(DIR_APP) && make -C FLAGS="$(CFLAGS)" modules

But I got
Code:
+ cd /usr/src/lfs
+ make -f AX88179_178A LFS_BASEDIR=/usr/src install
====================================== Installing AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE ...
Install started; saving file list to /usr/src/lsalr ...
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && patch -Np1 -i /usr/src/src/patches/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE_misc-warnings.patch
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && make -j 3
mkdir -p /lib/modules/3.4-3/kernel/drivers/usb/net
cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && make -C FLAGS="-Os -march=i486 -mtune=pentium -pipe -fomit-frame-pointer" modules
make[1]: *** FLAGS=-Os -march=i486 -mtune=pentium -pipe -fomit-frame-pointer: No such file or directory.  Stop.
AX88179_178A:85: recipe for target '/usr/src/files_i486/03_ipcop/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE' failed
make: *** [/usr/src/files_i486/03_ipcop/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE] Error 2

I think I will rest now...


Nach oben
   
BeitragVerfasst: 15.09.2015, 21:38 
Offline
Rookie
Themenstarter
Rookie

Registriert: 12.09.2015
Beiträge: 7
Building ax88179_178a

Hmm, I tried
Code:
tar zxf AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE.tar.gz
cd AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/
make

And I get
Code:
make -C /lib/modules/3.16.0-4-686-pae/build SUBDIRS=/home/raffe/Desktop/ipcopwork/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE modules
make[1]: *** /lib/modules/3.16.0-4-686-pae/build: No such file or directory.  Stop.
Makefile:30: recipe for target 'default' failed
make: *** [default] Error 2

I read at http://askubuntu.com/questions/441491/r ... 179-driver that I need linux-headers. But a apt-get install linux-headers don't work. But I read http://murga-linux.com/puppy/viewtopic. ... c408acb5b6 and as su I do
Code:
apt-get install linux-headers-$(uname -r)

I try again
Code:
root@debian:/home/raffe/Desktop/ipcopwork/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE# make
make -C /lib/modules/3.16.0-4-686-pae/build SUBDIRS=/home/raffe/Desktop/ipcopwork/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE modules
make[1]: Entering directory '/usr/src/linux-headers-3.16.0-4-686-pae'
Makefile:10: *** mixed implicit and normal rules: deprecated syntax
make[1]: Entering directory `/usr/src/linux-headers-3.16.0-4-686-pae'
  CC [M]  /home/raffe/Desktop/ipcopwork/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/ax88179_178a.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/raffe/Desktop/ipcopwork/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/ax88179_178a.mod.o
  LD [M]  /home/raffe/Desktop/ipcopwork/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/ax88179_178a.ko
make[1]: Leaving directory '/usr/src/linux-headers-3.16.0-4-686-pae'
root@debian:/home/raffe/Desktop/ipcopwork/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE# ls -ls
total 668
 56 -rw-r--r-- 1 raffe raffe  55989 Jul 22 11:37 ax88179_178a.c
 12 -rw-r--r-- 1 raffe raffe  11967 Dec 22  2014 ax88179_178a.h
288 -rw-r--r-- 1 root  root  291456 Sep 15 21:25 ax88179_178a.ko
  8 -rw-r--r-- 1 root  root    4304 Sep 15 21:25 ax88179_178a.mod.c
 52 -rw-r--r-- 1 root  root   50140 Sep 15 21:25 ax88179_178a.mod.o
240 -rw-r--r-- 1 root  root  244296 Sep 15 21:25 ax88179_178a.o
  4 -rw-r--r-- 1 raffe raffe   1153 Oct 26  2014 Makefile
  4 -rw-r--r-- 1 root  root      94 Sep 15 21:25 modules.order
  0 -rw-r--r-- 1 root  root       0 Sep 15 21:25 Module.symvers
  4 -rw-r--r-- 1 raffe raffe   3220 Oct 26  2014 readme
root@debian:/home/raffe/Desktop/ipcopwork/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE#


Maybe the ipcop build will work now? In lfs/AX88179_178A I use
Code:
        cd $(DIR_APP) && make
        #cd $(DIR_APP) && make install
        # Avoid make install as we don't want depmod to run against host kernel
        cd $(DIR_APP) && install -m 0644 ax88179_178a.ko.gz /lib/modules/$(KVER)/kernel/drivers/usb/net

In the log I get
Code:
 cd /usr/src/lfs
+ make -f AX88179_178A LFS_BASEDIR=/usr/src install
====================================== Installing AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE ...
Install started; saving file list to /usr/src/lsalr ...
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && patch -Np1 -i /usr/src/src/patches/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE_misc-warnings.patch
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && make -j 3
#mkdir -p /lib/modules/3.4-3/kernel/drivers/usb/net
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && make FLAGS="-Os -march=i486 -mtune=pentium -pipe -fomit-frame-pointer" ax88179_178a.c
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && cc -O -Os -march=i486 -mtune=pentium -pipe -fomit-frame-pointer -o ax88179_178a ax88179_178a.c
cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && make
make[1]: Entering directory '/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE'
make -C /lib/modules/3.16.0-4-686-pae/build SUBDIRS=/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE modules
make[2]: Entering directory '/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE'
make[2]: *** /lib/modules/3.16.0-4-686-pae/build: No such file or directory.  Stop.
make[2]: Leaving directory '/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE'
Makefile:30: recipe for target 'default' failed
make[1]: *** [default] Error 2
make[1]: Leaving directory '/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE'
AX88179_178A:85: recipe for target '/usr/src/files_i486/03_ipcop/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE' failed
make: *** [/usr/src/files_i486/03_ipcop/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE] Error 2


Maybe add /lib/modules/3.16.0-4-686-pae/build to visudo?... Well, maybe I try more tomorrow.

I think I will start with copying /lib/modules/3.16.0-4-686-pae/build to build_i486/ipcop/
Code:
su
cd build_i486/ipcop/
mkdir lib/modules/3.16.0-4-686-pae
mkdir lib/modules/3.16.0-4-686-pae/build
cp /lib/modules/3.16.0-4-686-pae/build/* lib/modules/3.16.0-4-686-pae/build/ -r
exit

I try ./make.sh build
+
Code:
 cd /usr/src/lfs
+ make -f AX88179_178A LFS_BASEDIR=/usr/src install
====================================== Installing AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE ...
Install started; saving file list to /usr/src/lsalr ...
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && patch -Np1 -i /usr/src/src/patches/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE_misc-warnings.patch
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && make -j 3
#mkdir -p /lib/modules/3.4-3/kernel/drivers/usb/net
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && make FLAGS="-Os -march=i486 -mtune=pentium -pipe -fomit-frame-pointer" ax88179_178a.c
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && cc -O -Os -march=i486 -mtune=pentium -pipe -fomit-frame-pointer -o ax88179_178a ax88179_178a.c
cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && make
make[1]: Entering directory '/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE'
make -C /lib/modules/3.16.0-4-686-pae/build SUBDIRS=/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE modules
make[2]: Entering directory '/lib/modules/3.16.0-4-686-pae/build'
Makefile:10: *** mixed implicit and normal rules: deprecated syntax
make[3]: Entering directory '/lib/modules/3.16.0-4-686-pae/build'
make[3]: *** /usr/src/linux-headers-3.16.0-4-common: No such file or directory.  Stop.
make[3]: Leaving directory '/lib/modules/3.16.0-4-686-pae/build'
Makefile:8: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/lib/modules/3.16.0-4-686-pae/build'
Makefile:30: recipe for target 'default' failed
make[1]: *** [default] Error 2
make[1]: Leaving directory '/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE'
AX88179_178A:85: recipe for target '/usr/src/files_i486/03_ipcop/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE' failed
make: *** [/usr/src/files_i486/03_ipcop/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE] Error 2

OK, now /usr/src/linux-headers-3.16.0-4-common is missing
Code:
su
cd build_i486/ipcop/
mkdir usr/src/linux-headers-3.16.0-4-common
cp /usr/src/linux-headers-3.16.0-4-common/* usr/src/linux-headers-3.16.0-4-common/ -r
exit

I try ./make.sh build
Code:
+ cd /usr/src/lfs
+ make -f AX88179_178A LFS_BASEDIR=/usr/src install
====================================== Installing AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE ...
Install started; saving file list to /usr/src/lsalr ...
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && patch -Np1 -i /usr/src/src/patches/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE_misc-warnings.patch
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && make -j 3
#mkdir -p /lib/modules/3.4-3/kernel/drivers/usb/net
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && make FLAGS="-Os -march=i486 -mtune=pentium -pipe -fomit-frame-pointer" ax88179_178a.c
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && cc -O -Os -march=i486 -mtune=pentium -pipe -fomit-frame-pointer -o ax88179_178a ax88179_178a.c
cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && make
make[1]: Entering directory '/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE'
make -C /lib/modules/3.16.0-4-686-pae/build SUBDIRS=/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE modules
make[2]: Entering directory '/lib/modules/3.16.0-4-686-pae/build'
Makefile:10: *** mixed implicit and normal rules: deprecated syntax
make[1]: Entering directory `/usr/src/linux-headers-3.16.0-4-686-pae'
/usr/src/linux-headers-3.16.0-4-common/Makefile:322: /usr/src/linux-headers-3.16.0-4-common/scripts/Kbuild.include: No such file or directory
/bin/sh: /usr/src/linux-headers-3.16.0-4-common/scripts/gcc-goto.sh: No such file or directory
/usr/src/linux-headers-3.16.0-4-common/Makefile:759: /usr/src/linux-headers-3.16.0-4-common/scripts/Makefile.extrawarn: No such file or directory
make[4]: *** No rule to make target '/usr/src/linux-headers-3.16.0-4-common/scripts/Makefile.extrawarn'.  Stop.
Makefile:181: recipe for target 'sub-make' failed
make[3]: *** [sub-make] Error 2
Makefile:8: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/lib/modules/3.16.0-4-686-pae/build'
Makefile:30: recipe for target 'default' failed
make[1]: *** [default] Error 2
make[1]: Leaving directory '/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE'
AX88179_178A:85: recipe for target '/usr/src/files_i486/03_ipcop/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE' failed
make: *** [/usr/src/files_i486/03_ipcop/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE] Error 2

OK, it don't like that /usr/src/linux-headers-3.16.0-4-common/is a link
Code:
su
cd build_i486/ipcop/
mkdir usr/lib/linux-kbuild-3.16
cp /usr/lib/linux-kbuild-3.16/* usr/lib/linux-kbuild-3.16/ -r
exit

I try ./make.sh build
Code:
+ cd /usr/src/lfs
+ make -f AX88179_178A LFS_BASEDIR=/usr/src install
====================================== Installing AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE ...
Install started; saving file list to /usr/src/lsalr ...
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && patch -Np1 -i /usr/src/src/patches/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE_misc-warnings.patch
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && make -j 3
#mkdir -p /lib/modules/3.4-3/kernel/drivers/usb/net
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && make FLAGS="-Os -march=i486 -mtune=pentium -pipe -fomit-frame-pointer" ax88179_178a.c
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && cc -O -Os -march=i486 -mtune=pentium -pipe -fomit-frame-pointer -o ax88179_178a ax88179_178a.c
cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && make
make[1]: Entering directory '/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE'
make -C /lib/modules/3.16.0-4-686-pae/build SUBDIRS=/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE modules
make[2]: Entering directory '/lib/modules/3.16.0-4-686-pae/build'
Makefile:10: *** mixed implicit and normal rules: deprecated syntax
make[1]: Entering directory `/usr/src/linux-headers-3.16.0-4-686-pae'

  ERROR: Kernel configuration is invalid.
         include/generated/autoconf.h or include/config/auto.conf are missing.
         Run 'make oldconfig && make prepare' on kernel src to fix it.


  WARNING: Symbol version dump ./Module.symvers
           is missing; modules will have no dependencies and modversions.

  CC [M]  /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/ax88179_178a.o
/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/ax88179_178a.c:1: error: code model 'kernel' not supported in the 32 bit mode
/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/ax88179_178a.c:1: sorry, unimplemented: 64-bit mode not compiled in
/usr/src/linux-headers-3.16.0-4-common/scripts/Makefile.build:268: recipe for target '/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/ax88179_178a.o' failed
make[5]: *** [/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/ax88179_178a.o] Error 1
/usr/src/linux-headers-3.16.0-4-common/Makefile:1350: recipe for target '_module_/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE' failed
make[4]: *** [_module_/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE] Error 2
Makefile:181: recipe for target 'sub-make' failed
make[3]: *** [sub-make] Error 2
Makefile:8: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/lib/modules/3.16.0-4-686-pae/build'
Makefile:30: recipe for target 'default' failed
make[1]: *** [default] Error 2
make[1]: Leaving directory '/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE'
AX88179_178A:85: recipe for target '/usr/src/files_i486/03_ipcop/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE' failed
make: *** [/usr/src/files_i486/03_ipcop/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE] Error 2

I try
Code:
cd $(DIR_APP) && make FLAGS="$(CFLAGS) -m32"

But I get the same. I try
Code:
su
cd build_i486/ipcop/
mkdir usr/src/linux-headers-3.16.0-4-686-pae/include
cp lib/modules/3.16.0-4-686-pae/build/include/generated/* usr/src/linux-headers-3.16.0-4-686-pae/include -r
exit

I try
Code:
cd $(DIR_APP) && make FLAGS="$(CFLAGS) -m32 M=$PWD"

Same error. I think I copied to the wrong place...
I try
Code:
su
cd build_i486/ipcop/
mkdir usr/src/linux-headers-3.16.0-4-686-pae/include/generated
cp lib/modules/3.16.0-4-686-pae/build/include/generated/* usr/src/linux-headers-3.16.0-4-686-pae/include/generated -r
exit

Nope. I try
Code:
install module-assistant

No. I try to change lfs/linux and add
Code:
       cd $(DIR_APP) && make oldconfig
        cd $(DIR_APP) && make prepare
        cd $(DIR_APP) && make scripts

And build and then
Code:
su
cd build_i486/ipcop/
cp usr/src/linux-3.4-3/include/generated/ usr/src/linux-headers-3.16.0-4-686-pae/include/generated -r
exit

No
Code:
cp usr/src/linux-3.4-3/include/generated/ lib/modules/3.16.0-4-686-pae/build/include/generated/ -r

Nope, still
Code:
 cd /usr/src/lfs
+ make -f AX88179_178A LFS_BASEDIR=/usr/src install
====================================== Installing AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE ...
Install started; saving file list to /usr/src/lsalr ...
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && patch -Np1 -i /usr/src/src/patches/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE_misc-warnings.patch
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && make -j 3
#mkdir -p /lib/modules/3.4-3/kernel/drivers/usb/net
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && make FLAGS="-Os -march=i486 -mtune=pentium -pipe -fomit-frame-pointer" ax88179_178a.c
cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && make -j 3 FLAGS="-Os -march=i486 -mtune=pentium -pipe -fomit-frame-pointer -m32"
make[1]: Entering directory '/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE'
make -C /lib/modules/3.16.0-4-686-pae/build SUBDIRS=/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE modules
make[2]: Entering directory '/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE'
make[2]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
Makefile:10: *** mixed implicit and normal rules: deprecated syntax
make[1]: Entering directory `/usr/src/linux-headers-3.16.0-4-686-pae'

  ERROR: Kernel configuration is invalid.
         include/generated/autoconf.h or include/config/auto.conf are missing.
         Run 'make oldconfig && make prepare' on kernel src to fix it.


  WARNING: Symbol version dump ./Module.symvers
           is missing; modules will have no dependencies and modversions.

  CC [M]  /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/ax88179_178a.o
/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/ax88179_178a.c:1: error: code model 'kernel' not supported in the 32 bit mode
/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/ax88179_178a.c:1: sorry, unimplemented: 64-bit mode not compiled in
/usr/src/linux-headers-3.16.0-4-common/scripts/Makefile.build:268: recipe for target '/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/ax88179_178a.o' failed
make[5]: *** [/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/ax88179_178a.o] Error 1
/usr/src/linux-headers-3.16.0-4-common/Makefile:1350: recipe for target '_module_/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE' failed
make[4]: *** [_module_/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE] Error 2
Makefile:181: recipe for target 'sub-make' failed
make[3]: *** [sub-make] Error 2
Makefile:8: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/lib/modules/3.16.0-4-686-pae/build'
Makefile:30: recipe for target 'default' failed
make[1]: *** [default] Error 2
make[1]: Leaving directory '/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE'
AX88179_178A:85: recipe for target '/usr/src/files_i486/03_ipcop/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE' failed
make: *** [/usr/src/files_i486/03_ipcop/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE] Error 2


I need a rest now...


Nach oben
   
BeitragVerfasst: 20.09.2015, 14:06 
Offline
Rookie
Themenstarter
Rookie

Registriert: 12.09.2015
Beiträge: 7
OK, breaktrough!

In lfs/AX88179_178A I manually write
Code:
make -C /lib/modules/3.4-3/build SUBDIRS=/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE modules

And now I finally get
Code:
 make -f AX88179_178A LFS_BASEDIR=/usr/src install
====================================== Installing AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE ...
Install started; saving file list to /usr/src/lsalr ...
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && patch -Np1 -i /usr/src/src/patches/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE_misc-warnings.patch
# Cleanup kernel source
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && make mrproper
cp /usr/src/config/kernel/kernel.config.i486 /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/.config
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && make oldconfig
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && make clean
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && make -j 3
#mkdir -p /lib/modules/3.4-3/kernel/drivers/usb/net
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && make FLAGS="-Os -march=i486 -mtune=pentium -pipe -fomit-frame-pointer" ax88179_178a.c
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && make -j 3 CC="gcc -fno-PIE"
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && make -j 3 FLAGS="-Os -march=i486 -mtune=pentium -pipe -fomit-frame-pointer -m32"
make -C /lib/modules/3.4-3/build SUBDIRS=/usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE modules
make[1]: Entering directory '/usr/src/linux-3.4-3'
  CC [M]  /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/ax88179_178a.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/ax88179_178a.mod.o
  LD [M]  /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/ax88179_178a.ko
make[1]: Leaving directory '/usr/src/linux-3.4-3'
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && cc -O -Os -march=i486 -mtune=pentium -pipe -fomit-frame-pointer -o ax88179_178a ax88179_178a.c
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && make
#cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && make install
# Avoid make install as we don't want depmod to run against host kernel
cd /usr/src/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE && install -m 0644 ax88179_178a.ko.gz /lib/modules/3.4-3/kernel/drivers/usb/net
install: cannot stat 'ax88179_178a.ko.gz': No such file or directory
AX88179_178A:85: recipe for target '/usr/src/files_i486/03_ipcop/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE' failed
make: *** [/usr/src/files_i486/03_ipcop/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE] Error 1

Nice! So I try
Code:
make -C /lib/modules/3.4-3/build SUBDIRS=$(DIR_APP) modules

It still work, so I try
Code:
make -C /lib/modules/$(KVER)/build SUBDIRS=$(DIR_APP) modules

Works. Now I think I need to make a gz of ax88179_178a.ko to install it. Or? I try
Code:
cd $(DIR_APP) && install -m 0644 ax88179_178a.ko /lib/modules/$(KVER)/kernel/drivers/usb/net

It actually seems to works, or at least the build goes all the way. But no files in /lib/modules/$(KVER)/kernel/drivers/usb/net. And all other drivers are gz.
I try
Code:
cd $(DIR_APP) && gzip -fn9 ax88179_178a.ko
cd $(DIR_APP) && install -m 0644 ax88179_178a.ko.gz /lib/modules/$(KVER)/kernel/drivers/net/usb

That seems to work better. The ax88179_178a.ko.gz file is now in /lib/modules/$(KVER)/kernel/drivers/net/usb

Also when I look into the ISO (unzipped with 7z) on my Win PC I see \ipcop-2.1.8-install-cd.i486\ipcop-2.1.8.tar\ipcop-2.1.8\lib\modules\3.4-3\kernel\drivers\net\usb\ax88179_178a.ko.gz. I guess I need to test the ISO to know if it works...


Nach oben
   
Beiträge der letzten Zeit anzeigen:  Sortiere nach  
Ein neues Thema erstellen  Auf das Thema antworten  [ 7 Beiträge ] 

Alle Zeiten sind UTC+02:00


Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast


Du darfst keine neuen Themen in diesem Forum erstellen.
Du darfst keine Antworten zu Themen in diesem Forum erstellen.
Du darfst deine Beiträge in diesem Forum nicht ändern.
Du darfst deine Beiträge in diesem Forum nicht löschen.

Suche nach:
Gehe zu Forum:  
cron
Powered by phpBB® Forum Software © phpBB Limited
Deutsche Übersetzung durch phpBB.de