Results 1 to 6 of 6

Thread: Compiling kernel from 7.1/7.2 sources

  1. #1
    Join Date
    May 2004
    Location
    Ohio
    Posts
    17

    Compiling kernel from 7.1/7.2 sources

    Good day,

    I am trying to build a kernel from the 7.1/7.2 sources and I've run into a couple of issues and wanted to see if anyone could provide some assistance.

    The first problem I ran into was an issue with include/asm-mips/kmap_types.h. This problem is in both 7.1 and 7.2. I'm not sure if this was a typo, but the enum in that file has KM_BIO_IRQ and the C code is looking for KM_BH_IRQ. I can post a patch if anyone is interested.

    The second issue I ran into was the arch/mips/Makefile with 7.2. On of the GCCFLAGS for CONFIG_CPU_R5432 is -mtune=vr5000 which isn't a valid switch for the cc1 compiler. I tried -mtune=r5000 and that didn't work either. I finally switched it to -mcpu=r5000 and I received no errors. I have another patch for that file as well.

    I changed all that code and now I'm getting further in the build process however when the process tries to compile arch/mips/tivo/bcm-int.S it errors out because it's trying to find a local file called asm-offsets.h:

    bcm-int.S:23:25: asm-offsets.h: No such file or directory

    I've Googled all over the place and can't seem to find this file. I've also checked in older versions of the kernel from Tivo and can't find it. I've found some asm_offsets.h, but only in different arch directories on other platforms. Could Tivo have "forgotten" to put this file in the tarball?

    Since the include is a local include (uses double quotes instead of brackets), I believe ths file should be provided in the tarball, but it's no where to be found.

    Here's my make command:

    make ROOT=~/tivo/cmd/root/ CROSS_COMPILE=~/tivo/usr/local/mips-tivo/bin/ TIVO_SYSTEM=release-mips CC=~/tivo/usr/local/mips-tivo/bin/gcc HOSTCC=/usr/bin/gcc ARCH=mips CROSS_DIR=~/tivo/usr/local/mips-tivo/

    7.2 Build process
    -------------------------
    tar zvxf TiVo-linux-2.4.tar.gz
    cd linux-2.4
    apply my kmaps patch (patch -p1 < linux-2.4.20-TiVo-7.1-kmaps.patch.txt)
    apply my Makefile patch (patch -p1 < linux-2.4.20-TiVo-7.2-mips-Makefile.patch.txt)
    cp arch/mips/prodconf-Series2 .config
    make oldconfig
    make dep
    make vmlinux

    I'm using the cross compile tarball from tivoutils.sf.net on a Fedora Core 4 workstation.

    Any help is much appreciated. If this question should be posted in the Development forum, please let me know and I'll post it there.

    Thanks,
    Flux.

  2. #2
    Join Date
    Aug 2004
    Posts
    4,075
    Quote Originally Posted by djflux
    I am trying to build a kernel from the 7.1/7.2 sources and I've run into a couple of issues and wanted to see if anyone could provide some assistance.
    I've built the 7.2 tivo kernel sources. I used gcc 3.3.4, the same version of gcc tivo uses for 7.2 kernels.

    The missing asm-offsets.h issue has been around a while. The solution is simple: comment out the include. You might want to look at ADH's 5.4 kernel patches in this thread. I know that patch is in there.

    I don't recall running into the other issue you mentioned.

  3. #3
    Join Date
    May 2004
    Location
    Ohio
    Posts
    17
    Jamie,

    What is the process by which you compile your kernels? Which config do you copy or do you make your own?

    I ran into another issue after I commented the asm-offsets.h out - for some reason when I run make dep it doesn't make tivo-monotime.o a build requirement in arch/mips/tivo so when the linker tries to link together vmlinux it bombs with undefined symbols. I had to add tivo-monotime.o to export-objs and to obj-y in arch/mips/tivo/Makefile.

    Once I did that everything builds just fine. I haven't tried the compiled kernel yet, but it appears everything built OK.

  4. #4
    Join Date
    Aug 2004
    Posts
    4,075
    Quote Originally Posted by djflux
    What is the process by which you compile your kernels? Which config do you copy or do you make your own?...
    I'll walk through the process again and see if I can put together a list of required patches. I can also post notes on the 3.3.4 toolchain build process. Might be a few days before I can get to it.

  5. #5
    Join Date
    May 2004
    Location
    Ohio
    Posts
    17
    No problem. Thanks for the assistance.

  6. #6
    Join Date
    Aug 2004
    Posts
    4,075
    See this thread for the build scripts and patches I used.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •