Need "wrapper" to compile the Linux kernel with ICC

Need "wrapper" to compile the Linux kernel with ICC

I am a developer with an idea to start a new kernel source for Gentoo that is specifically for the Intel ICC compiler. Evidentally there is a "wrapper" that is needed to be applied to the kernel source first before ICC can correctly complie the Linux kernel. Where can I get this wrapper? (I have looked all over the web but the only yhing I can find is old documentation)

132 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

You could find 'Linux kernel build white paper with 10.0 compiler' in below URLs. In the bottom of that page, there is another paper discussion the compatibility with GNU Compilers may be also useful for you.

http://www.intel.com/support/performancetools/c/linux/sb/cs-007713.htm

Quoting - zhenhua.zhang

You could find 'Linux kernel build white paper with 10.0 compiler' in below URLs. In the bottom of that page, there is another paper discussion the compatibility with GNU Compilers may be also useful for you.

http://www.intel.com/support/performancetools/c/linux/sb/cs-007713.htm

Yes I have read this paper... it deos not give a link to the wrapper it talks about however. Here is a link that has sme older wrappers:

http://www.pyrillion.org/index.html?showframe=linuxkernelpatch.html

I have not tried them however because I think they are too old to work with a 2.6.2* kernel.

Quoting - thaidog

I am a developer with an idea to stat a new kernel source for Gentoo that is specifically for the Intel ICC compiler. Evidentally there is a "wrapper" that is need to be applied to the kernel source first before ICC can correctly complie the Linux kernel. Wher can I get this wrapper? (I have looked all over the web but the only yhing I can find is old documentation)

--
Nescire autem quid ante quam natus sis acciderit, id est semper esse puerum. Quid enim est aetas hominis, nisi ea memoria rerum veterum cum superiorum aetate contexitur?

Quoting - nanometrics

Looks like your post did not go through...

Quoting - thaidog

I am a developer with an idea to stat a new kernel source for Gentoo that is specifically for the Intel ICC compiler. Evidentally there is a "wrapper" that is need to be applied to the kernel source first before ICC can correctly complie the Linux kernel. Wher can I get this wrapper? (I have looked all over the web but the only yhing I can find is old documentation)

Hi thaidog, were you asking for a wrapper for 2.6.xx kernel on IA32? I can share one for 10.x compiler with you. I didn't test with 11.0 compiler yet.

Quoting - Feilong H (Intel)

Hi thaidog, were you asking for a wrapper for 2.6.xx kernel on IA32? I can share one for 10.x compiler with you. I didn't test with 11.0 compiler yet.

That would be awsome! I am using the 10 version right now since that is what is available in portage. That is the exact one I am looking for... IA32.

The following is an example of wrapper script. Please try it with a newer update of icc 10.1.

#--------------------------------------------------------

# This is a wrapper script for icc 10.1 on IA-32

#--------------------------------------------------------

ARGS=$@

ICCARGS="-fno-builtin"

# For loop to change options of icc

for ARG in $@

do

case $ARG in

-fno-stack-protector )

ICCARGS="$ICCARGS -fno-stack-security-check"

;;

-Wno-pointer-sign | -msoft-float | -ffreestanding )

;;

* )

ICCARGS="$ICCARGS $ARG"

;;

esac

done

icc $ICCARGS

exit $?

Quoting - nanometrics

Bummer.

I tried to compile the linux kernel with ICC and got into a horrible mess. I think it is way too embedded with GCC for it to work but if you managed to get it working, I would be VERY interested.

If you need a hand, please ask.

--
Nescire autem quid ante quam natus sis acciderit, id est semper esse puerum. Quid enim est aetas hominis, nisi ea memoria rerum veterum cum superiorum aetate contexitur?

Quoting - Feilong H (Intel)

The following is an example of wrapper script. Please try it with a newer update of icc 10.1.

#--------------------------------------------------------

# This is a wrapper script for icc 10.1 on IA-32

#--------------------------------------------------------

ARGS=$@

ICCARGS="-fno-builtin"

# For loop to change options of icc

for ARG in $@

do

case $ARG in

-fno-stack-protector )

ICCARGS="$ICCARGS -fno-stack-security-check"

;;

-Wno-pointer-sign | -msoft-float | -ffreestanding )

;;

* )

ICCARGS="$ICCARGS $ARG"

;;

esac

done

icc $ICCARGS

exit $?

Well I've got version 10.0. Not sure where to find 10.1. I got this error when trying to do it with 10.0:

gentoo_x86_32 ~ # cd /usr/src/linux
gentoo_x86_32 linux # nano intelwrapper
gentoo_x86_32 linux # make HOSTCC=intelwrapper CC=intelwrapper
/usr/src/linux-2.6.25-gentoo-r7/scripts/gcc-version.sh: line 25: intelwrapper: command not found
/usr/src/linux-2.6.25-gentoo-r7/scripts/gcc-version.sh: line 26: intelwrapper: command not found
make: intelwrapper: Command not found
CHK include/linux/version.h
CHK include/linux/utsrelease.h
HOSTCC scripts/basic/fixdep
/bin/sh: intelwrapper: command not found
make[1]: *** [scripts/basic/fixdep] Error 127
make: *** [scripts_basic] Error 2
gentoo_x86_32 linux #

EDIT: whoops... I did not put it in my path... that's what that error is.

Quoting - nanometrics

Quoting - nanometrics

Bummer.

I tried to compile the linux kernel with ICC and got into a horrible mess. I think it is way too embedded with GCC for it to work but if you managed to get it working, I would be VERY interested.

If you need a hand, please ask.

A hand would be great. I have version 10 not 10.1. Do you know where to get 10.1? I got the wrapper working... but after a few min it errored:

make[1]: *** [arch/x86/vdso/vdso32-int80.so.dbg] Error 1
make: *** [arch/x86/vdso] Error 2

Other people at the gentoo forums are trying it but they are running in to similar issues.

Login to https://registrationcenter.intel.com, then download 10.1 compiler.

I successfully built a kernel (that is very close to RHEL5 kernel)withthe above wrapper script. A few source code patches are needed. Could you please show me a few more lines in your build log, so that I can see what the problem is?

Let metry to list all patches you might need to apply to your kernel source code.

  • add the following line at the end of include/linux/compiler-intel.h.
    #undef __compiler_offsetof
  • arch/i386/kernel/apm.c, remove "static"
    staticstruct {
    unsigned longoffset;
    unsigned shortsegment;
    }apm_bios_entry;
  • include/linux/module.h, remove "static"
    staticconst unsigned long __kcrctab_##sym
    __attribute_used__
    __attribute__((section("__kcrctab" sec), unused))
    = (unsigned long) &__crc_##sym;
    ...
    #define __EXPORT_SYMBOL(sym, sec)
    extern typeof(sym) sym;
    __CRC_SYMBOL(sym, sec)
    staticconst char __kstrtab_##sym[]
    __attribute__((section("__ksymtab_strings")))
    = MODULE_SYMBOL_PREFIX #sym;
    staticconst struct kernel_symbol __ksymtab_##sym
    __attribute_used__
    __attribute__((section("__ksymtab" sec), unused))
    = { (unsigned long)&sym, __kstrtab_##sym }
  • Makefile, add libirc_s.a as follow.
    --start-group $(vmlinux-main) /opt/intel/cc/10.1.021/lib/libirc_s.a --end-group

Quoting - Feilong H (Intel)

Login to https://registrationcenter.intel.com, then download 10.1 compiler.

I successfully built a kernel (that is very close to RHEL5 kernel)withthe above wrapper script. A few source code patches are needed. Could you please show me a few more lines in your build log, so that I can see what the problem is?

Let metry to list all patches you might need to apply to your kernel source code.

  • add the following line at the end of include/linux/compiler-intel.h.
    #undef __compiler_offsetof
  • arch/i386/kernel/apm.c, remove "static"
    staticstruct {
    unsigned longoffset;
    unsigned shortsegment;
    }apm_bios_entry;
  • include/linux/module.h, remove "static"
    staticconst unsigned long __kcrctab_##sym
    __attribute_used__
    __attribute__((section("__kcrctab" sec), unused))
    = (unsigned long) &__crc_##sym;
    ...
    #define __EXPORT_SYMBOL(sym, sec)
    extern typeof(sym) sym;
    __CRC_SYMBOL(sym, sec)
    staticconst char __kstrtab_##sym[]
    __attribute__((section("__ksymtab_strings")))
    = MODULE_SYMBOL_PREFIX #sym;
    staticconst struct kernel_symbol __ksymtab_##sym
    __attribute_used__
    __attribute__((section("__ksymtab" sec), unused))
    = { (unsigned long)&sym, __kstrtab_##sym }
  • Makefile, add libirc_s.a as follow.
    --start-group $(vmlinux-main) /opt/intel/cc/10.1.021/lib/libirc_s.a --end-group

I got the update to 10.1 but it died again (I have not had a chance to try those changes you added in the post above yet though) Here is the build log about 50 lines to the bottom:

kernel/pid.c(215): warning #1419: external declaration in primary source file
EXPORT_SYMBOL_GPL(put_pid);
^

kernel/pid.c(266): warning #188: enumerated type mixed with another type
for (type = 0; type < PIDTYPE_MAX; ++type)
^

kernel/pid.c(297): error: subscript must be constant
return container_of(pnr, struct pid,
^

kernel/pid.c(302): warning #1419: external declaration in primary source file
EXPORT_SYMBOL_GPL(find_pid_ns);
^

kernel/pid.c(308): warning #1419: external declaration in primary source file
EXPORT_SYMBOL_GPL(find_vpid);
^

kernel/pid.c(314): warning #1419: external declaration in primary source file
EXPORT_SYMBOL_GPL(find_pid);
^

kernel/pid.c(366): error: subscript must be constant
result = hlist_entry(first, struct task_struct, pids[(type)].node);
^

kernel/pid.c(370): warning #1419: external declaration in primary source file
EXPORT_SYMBOL(pid_task);
^

kernel/pid.c(378): warning #188: enumerated type mixed with another type
return pid_task(find_pid_ns(nr, ns), type);
^

kernel/pid.c(381): warning #1419: external declaration in primary source file
EXPORT_SYMBOL(find_task_by_pid_type_ns);
^

kernel/pid.c(387): warning #1419: external declaration in primary source file
EXPORT_SYMBOL(find_task_by_pid);
^

kernel/pid.c(394): warning #1419: external declaration in primary source file
EXPORT_SYMBOL(find_task_by_vpid);
^

kernel/pid.c(400): warning #1419: external declaration in primary source file
EXPORT_SYMBOL(find_task_by_pid_ns);
^

kernel/pid.c(450): warning #1419: external declaration in primary source file
EXPORT_SYMBOL_GPL(pid_vnr);
^

kernel/pid.c(456): warning #1419: external declaration in primary source file
EXPORT_SYMBOL(task_pid_nr_ns);
^

kernel/pid.c(462): warning #1419: external declaration in primary source file
EXPORT_SYMBOL(task_tgid_nr_ns);
^

kernel/pid.c(468): warning #1419: external declaration in primary source file
EXPORT_SYMBOL(task_pgrp_nr_ns);
^

kernel/pid.c(474): warning #1419: external declaration in primary source file
EXPORT_SYMBOL(task_session_nr_ns);
^

kernel/pid.c(494): warning #1419: external declaration in primary source file
EXPORT_SYMBOL_GPL(find_get_pid);
^

kernel/pid.c(501): warning #1418: external function definition with no prior declaration
void __init pidhash_init(void)
^

kernel/pid.c(512): remark #181: argument is incompatible with corresponding format string conversion
pidhash_size * sizeof(struct hlist_head));
^

kernel/pid.c(521): warning #1418: external function definition with no prior declaration
void __init pidmap_init(void)
^

compilation aborted for kernel/pid.c (code 2)
make[1]: *** [kernel/pid.o] Error 2
make: *** [kernel] Error 2

For the following line:

  • arch/i386/kernel/apm.c, remove "static"
    staticstruct {
    unsigned longoffset;
    unsigned shortsegment;
    }apm_bios_entry;

I do not have that directory: /usr/src/linux/arch/i386/kernel/

I have:

/usr/src/linux/arch/i386/boot

(Where bzImage is storred)

I made the other modifications and the kernel seemsed to compile to the very end and then it errored:

compilation aborted for arch/x86/boot/mca.c (code 2)
make[1]: *** [arch/x86/boot/mca.o] Error 2
make: *** [bzImage] Error 2

#################################################################################

Here is build log about 50 lines to the bottom:

static inline int memcmp(const void *s1, const void *s2, size_t len)
^

arch/x86/boot/boot.h(174): remark #593: parameter "len" was set but never used
static inline int memcmp(const void *s1, const void *s2, size_t len)
^

arch/x86/boot/boot.h(182): remark #593: parameter "s1" was set but never used
static inline int memcmp_fs(const void *s1, addr_t s2, size_t len)
^

arch/x86/boot/boot.h(182): remark #593: parameter "s2" was set but never used
static inline int memcmp_fs(const void *s1, addr_t s2, size_t len)
^

arch/x86/boot/boot.h(182): remark #593: parameter "len" was set but never used
static inline int memcmp_fs(const void *s1, addr_t s2, size_t len)
^

arch/x86/boot/boot.h(189): remark #593: parameter "s1" was set but never used
static inline int memcmp_gs(const void *s1, addr_t s2, size_t len)
^

arch/x86/boot/boot.h(189): remark #593: parameter "s2" was set but never used
static inline int memcmp_gs(const void *s1, addr_t s2, size_t len)
^

arch/x86/boot/boot.h(189): remark #593: parameter "len" was set but never used
static inline int memcmp_gs(const void *s1, addr_t s2, size_t len)
^

arch/x86/boot/main.c(66): remark #593: variable "ax" was set but never used
u16 ax = 0x0305;
^

arch/x86/boot/main.c(67): remark #593: variable "bx" was set but never used
u16 bx = 0;
^

arch/x86/boot/main.c(122): warning #1079: return type of function "main" must be "int"
void main(void)
^

IPO: WARNING: File scope asm disables -ipo
CC arch/x86/boot/mca.o
icc: command line warning #10006: ignoring unknown option '-fno-toplevel-reorder'
arch/x86/boot/boot.h(174): remark #593: parameter "s1" was set but never used
static inline int memcmp(const void *s1, const void *s2, size_t len)
^

arch/x86/boot/boot.h(174): remark #593: parameter "s2" was set but never used
static inline int memcmp(const void *s1, const void *s2, size_t len)
^

arch/x86/boot/boot.h(174): remark #593: parameter "len" was set but never used
static inline int memcmp(const void *s1, const void *s2, size_t len)
^

arch/x86/boot/boot.h(182): remark #593: parameter "s1" was set but never used
static inline int memcmp_fs(const void *s1, addr_t s2, size_t len)
^

arch/x86/boot/boot.h(182): remark #593: parameter "s2" was set but never used
static inline int memcmp_fs(const void *s1, addr_t s2, size_t len)
^

arch/x86/boot/boot.h(182): remark #593: parameter "len" was set but never used
static inline int memcmp_fs(const void *s1, addr_t s2, size_t len)
^

arch/x86/boot/boot.h(189): remark #593: parameter "s1" was set but never used
static inline int memcmp_gs(const void *s1, addr_t s2, size_t len)
^

arch/x86/boot/boot.h(189): remark #593: parameter "s2" was set but never used
static inline int memcmp_gs(const void *s1, addr_t s2, size_t len)
^

arch/x86/boot/boot.h(189): remark #593: parameter "len" was set but never used
static inline int memcmp_gs(const void *s1, addr_t s2, size_t len)
^

arch/x86/boot/mca.c(29): error: register "ax" used more than once
: "=acd" (err), "=acdSD" (es), "=b" (bx)
^

arch/x86/boot/mca.c(29): error: register "cx" used more than once
: "=acd" (err), "=acdSD" (es), "=b" (bx)
^

arch/x86/boot/mca.c(29): error: register "dx" used more than once
: "=acd" (err), "=acdSD" (es), "=b" (bx)
^

compilation aborted for arch/x86/boot/mca.c (code 2)
make[1]: *** [arch/x86/boot/mca.o] Error 2
make: *** [bzImage] Error 2

#####################################################################

Also I had to use:

*Makefile, add libirc_s.a as follow.

--start-group $(vmlinux-main) /opt/intel/cc/10.1.018/lib/libirc_s.a --end-group

Instead of:

*Makefile, add libirc_s.a as follow.

--start-group $(vmlinux-main) /opt/intel/cc/10.1.021/lib/libirc_s.a --end-group

I don't have arch/x86/boot/main.c in my source code. It looks the error are coming from an inline assembly code. If you can extractthat piece of codeand create a small test case for me to reproduce the error, that'll be great.
If there is no way to create a smaller test case, could you please preprocess it with proper command line and upload the preprocessed code, so that I can look into it?
In order to extract the command line for arch/x86/boot/main.c, just issue "make HOSTCC=intelwrapper CC=intelwrapper V=1". It will printcommand lines along with various warnings & errors. Find the command line for arch/x86/boot/main.c and replace -c with -E. Re-run the command line and the compiler will print preprocessedC code.

Quoting - Feilong H (Intel)

I don't have arch/x86/boot/main.c in my source code. It looks the error are coming from an inline assembly code. If you can extractthat piece of codeand create a small test case for me to reproduce the error, that'll be great.
If there is no way to create a smaller test case, could you please preprocess it with proper command line and upload the preprocessed code, so that I can look into it?
In order to extract the command line for arch/x86/boot/main.c, just issue "make HOSTCC=intelwrapper CC=intelwrapper V=1". It will printcommand lines along with various warnings & errors. Find the command line for arch/x86/boot/main.c and replace -c with -E. Re-run the command line and the compiler will print preprocessedC code.

Are these the lines you are talking about?

arch/x86/boot/main.c(66): remark #593: variable "ax" was set but never used
u16 ax = 0x0305;
^

arch/x86/boot/main.c(67): remark #593: variable "bx" was set but never used
u16 bx = 0;
^

arch/x86/boot/main.c(122): warning #1079: return type of function "main" must be "int"
void main(void)
^
############################################

I did a: cat arch/x86/boot/main.c but I did not see a -c to replace with the -E

Maybe I am not understanding you correcty?

EDIT: If you would like I can give you access to the development box via ssh and sudo acct?

thaidog,
You need to do "make HOSTCC=intelwrapper CC=intelwrapper V=1". In the build log, try to finda command line like
intelwrapper arch/x86/boot/main.c
change -c to -E in the above command line and append > main-prep.c at the end. Re-run it. main-prep.c should contain preprocessed source code, which is what I need.

intelwrapper -E arch/x86/boot/main.c > main-prep.c
Thanks,
Feilong

Quoting - Feilong H (Intel)

thaidog,
You need to do "make HOSTCC=intelwrapper CC=intelwrapper V=1". In the build log, try to finda command line like
intelwrapper arch/x86/boot/main.c
change -c to -E in the above command line and append > main-prep.c at the end. Re-run it. main-prep.c should contain preprocessed source code, which is what I need.

intelwrapper -E arch/x86/boot/main.c > main-prep.c
Thanks,
Feilong

I do not see that line from your command - here is the output:

gentoo_x86_32 bin # cd /usr/src/linux
gentoo_x86_32 linux # make HOSTCC=intelwrapper CC=intelwrapper V=1
/usr/src/linux-2.6.25-gentoo-r7/scripts/gcc-version.sh: line 25: intelwrapper: command not found
/usr/src/linux-2.6.25-gentoo-r7/scripts/gcc-version.sh: line 26: intelwrapper: command not found
make: intelwrapper: Command not found
rm -f include/config/kernel.release
echo 2.6.25-gentoo-r7 > include/config/kernel.release
set -e; :; mkdir -p include/linux/; (echo #define LINUX_VERSION_CODE 132633; echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';) < /usr/src/linux-2.6.25-gentoo-r7/Makefile > include/linux/version.h.tmp; if [ -r include/linux/version.h ] && cmp -s include/linux/version.h include/linux/version.h.tmp; then rm -f include/linux/version.h.tmp; else :; mv -f include/linux/version.h.tmp include/linux/version.h; fi
set -e; :; mkdir -p include/linux/; if [ `echo -n "2.6.25-gentoo-r7" | wc -c ` -gt 64 ]; then echo '"2.6.25-gentoo-r7" exceeds 64 characters' >&2; exit 1; fi; (echo #define UTS_RELEASE "2.6.25-gentoo-r7";) < include/config/kernel.release > include/linux/utsrelease.h.tmp; if [ -r include/linux/utsrelease.h ] && cmp -s include/linux/utsrelease.h include/linux/utsrelease.h.tmp; then rm -f include/linux/utsrelease.h.tmp; else :; mv -f include/linux/utsrelease.h.tmp include/linux/utsrelease.h; fi
set -e; asmlink=`readlink include/asm | cut -d '-' -f 2`;
if [ -L include/asm ]; then
if [ "$asmlink" != "x86" ]; then
echo "ERROR: the symlink include/asm points to asm-$asmlink but asm-x86 was expected";
echo " set ARCH or save .config and run 'make mrproper' to fix it";
exit 1;
fi;
else
echo ' SYMLINK include/asm -> include/asm-x86';
if [ ! -d include ]; then
mkdir -p include;
fi;
ln -fsn asm-x86 include/asm;
fi
mkdir -p .tmp_versions ; rm -f .tmp_versions/*
make -f scripts/Makefile.build obj=scripts/basic
(cat /dev/null; ) > scripts/basic/modules.order
make -f scripts/Makefile.build obj=.
(cat /dev/null; ) > modules.order
mkdir -p arch/x86/kernel/
intelwrapper -Wp,-MD,arch/x86/kernel/.asm-offsets.s.d -nostdinc -isystem -D__KERNEL__ -Iinclude -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Os -msoft-float -mregparm=3 -freg-struct-return -march=i686 -ffreestanding -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -Iinclude/asm-x86/mach-generic -Iinclude/asm-x86/mach-default -fno-omit-frame-pointer -fno-optimize-sibling-calls -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(asm_offsets)" -D"KBUILD_MODNAME=KBUILD_STR(asm_offsets)" -fverbose-asm -S -o arch/x86/kernel/asm-offsets.s arch/x86/kernel/asm-offsets.c
/bin/sh: intelwrapper: command not found
make[1]: *** [arch/x86/kernel/asm-offsets.s] Error 127
make: *** [prepare0] Error 2
gentoo_x86_32 linux #

Obviously the filename of your wrapper is not intelwrapper. Please replace intelwrapper with the full path name of your wrapper script.

$ make HOSTCC=intelwrapper CC=intelwrapper V=1

Quoting - Feilong H (Intel)

Obviously the filename of your wrapper is not intelwrapper. Please replace intelwrapper with the full path name of your wrapper script.

$ make HOSTCC=intelwrapper CC=intelwrapper V=1

That is the name of it and it was already in my path... I copied over again and got this:

http://www.tyler.mcadams.com/build.txt

http://www.tyler.mcadams.com/kernellog.txt

http://www.tyler.mcadams.com/kernellog2.txt

Could not find anything exactly line like you are looking for... the only thing that ends in main.c are lines like this:

drivers/net/e1000/e1000_main.c(258): remark #177: function "__check_debug" was declared but never referenced
module_param(debug, int, 0);

Could be easier if I just give you a logon. You can e-mail me at: tyler@mcadams.com

I looked at http://www.tyler.mcadams.com/build.txt. It looks that the error occured at arch/x86/boot/mca.c. I copied the command line and changed -c to -E. Please run the following command line and upload mca-prep.c for me.
intelwrapper -Wp,-MD,arch/x86/boot/.mca.o.d -nostdinc -isystem /usr/lib/gcc/i686-pc-linux-gnu/4.3.2/include -D__KERNEL__ -Iinclude -include include/linux/autoconf.h -Iinclude -include include/linux/autoconf.h -g -Os -D_SETUP -D__KERNEL__ -Wall -Wstrict-prototypes -march=i386 -mregparm=3 -include /usr/src/linux-2.6.25-gentoo-r7/arch/x86/boot/code16gcc.h -fno-strict-aliasing -fomit-frame-pointer -ffreestanding -fno-toplevel-reorder -fno-stack-protector -m32 -D__BIG_KERNEL__ -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(mca)" -D"KBUILD_MODNAME=KBUILD_STR(mca)" -E arch/x86/boot/mca.c > mca-prep.c

ps. Due to the corporate firewall, I can't logon to your machine from Intel network...

Quoting - Feilong H (Intel)

I looked at http://www.tyler.mcadams.com/build.txt. It looks that the error occured at arch/x86/boot/mca.c. I copied the command line and changed -c to -E. Please run the following command line and upload mca-prep.c for me.
intelwrapper -Wp,-MD,arch/x86/boot/.mca.o.d -nostdinc -isystem /usr/lib/gcc/i686-pc-linux-gnu/4.3.2/include -D__KERNEL__ -Iinclude -include include/linux/autoconf.h -Iinclude -include include/linux/autoconf.h -g -Os -D_SETUP -D__KERNEL__ -Wall -Wstrict-prototypes -march=i386 -mregparm=3 -include /usr/src/linux-2.6.25-gentoo-r7/arch/x86/boot/code16gcc.h -fno-strict-aliasing -fomit-frame-pointer -ffreestanding -fno-toplevel-reorder -fno-stack-protector -m32 -D__BIG_KERNEL__ -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(mca)" -D"KBUILD_MODNAME=KBUILD_STR(mca)" -E arch/x86/boot/mca.c > mca-prep.c

ps. Due to the corporate firewall, I can't logon to your machine from Intel network...

http://www.tyler.mcadams.com/mca-prep.c.txt

http://www.tyler.mcadams.com/mca-prep.c

Thanks!

PS- I thought you might want to look at this - it is what I am trying to get going (as part of a bigger project)

http://www.tyler.mcadams.com/intel_linux_gaming.doc

Only half way done (obviously) so far but the benchmarks with gcc are already smashing Windows! What do you think?

here is a screenhot of what could be the gui: http://www.tyler.mcadams.com/optimized.png

I will give you full credit for all your gracious help on this project! I just talked with Fabio Erculiani the inventor of Sabayon Linux and he is very interested in this little project also. (Sabayon is a Getnoo Linux based distro)

Also, if you get a chance, can you post the older redhat kernel that you got to compile? I'd like to download it and try it also if possible.

It looks that the problem is coming from the inline assembly code in the function query_mca(). Could you please upload the original arch/x86/boot/mca.c (don't preprocess) and the object file compiled with gcc (arch/x86/boot/mca.o)? Probablywe need to do some small modificationtothat piece ofinline asm code.
I didn't keep the RH kernel built with icc. It will take some time if I need to re-compile one. And will it fit into your OS? I don't think so...

ps. Your projectsounds cool. :)

Quoting - thaidog

Also, if you get a chance, can you post the older redhat kernel that you got to compile? I'd like to download it and try it also if possible.

thaidog, I hope it doesn't hurt to ask one obvious thing -- have you succesfully compiled the kernel with gcc on your computer before trying to compile with icc? Do you use patched gentoo kernel source or you are compiling vanilla kernel source tree? Which gcc and glibc versions you use? Perhaps that info will help.

Regards,
Igor Levicki

Quoting - Igor Levicki

Quoting - thaidog

Also, if you get a chance, can you post the older redhat kernel that you got to compile? I'd like to download it and try it also if possible.

thaidog, I hope it doesn't hurt to ask one obvious thing -- have you succesfully compiled the kernel with gcc on your computer before trying to compile with icc? Do you use patched gentoo kernel source or you are compiling vanilla kernel source tree? Which gcc and glibc versions you use? Perhaps that info will help.

Oh yeah... I've got kernel after kernel that I have been optimizing with gcc 4.3.2 ad 4.3.1. I think I'll zip the /usr/src/linux up so you guys and check it out your self. One thing I did though is over the weekend I downloaded the latest vanilla-sources version in an attmept to see if it was just the gentoo-sources patches that was screwing everything up, but they did not compile with ICC either... I could have missed something though. I'll zip up the kernel-2.6.25-7 with all the mods we made to it so that you guys have better access to it. Right now it is pretty much striped bare... I dorpped everything I could in an attempt to see if "bleeding edge" stuff was causing issues. this is it: www.tyler.mcadams.com/linux-2.6.25-gentoo-r7.tar.gz It's 12:15EST - give it about 20min to upload. It has the current .config and all the previous changes we made to the verious files to see if that woud help as well. If you want an particular kernel for me to build with gcc or any already built I can give those too if it would help.

Quoting - Feilong H (Intel)

It looks that the problem is coming from the inline assembly code in the function query_mca(). Could you please upload the original arch/x86/boot/mca.c (don't preprocess) and the object file compiled with gcc (arch/x86/boot/mca.o)? Probablywe need to do some small modificationtothat piece ofinline asm code.
I didn't keep the RH kernel built with icc. It will take some time if I need to re-compile one. And will it fit into your OS? I don't think so...

ps. Your projectsounds cool. :)

Thanks man... us gentoo users are always looking for that speed edge... your contribution could make waves in the community! We just love it when we can drop in something that will keep us the nost optimized.

So to for the original arch/x86/boot/mca.c - can I take it out of what source we have been working on or do I need to install and extract from a clean origninal source? So for the second file... do you just need arch/x86/boot/*mca.o* ?

Yeah I know the other would probably not work... I tried and old vanilla 2.6.18 and it did not work.

It might be hard to get gentoo-sources 2.6.25-r7 now - they just upgraded to r9 ... make be it will work though.

Again obvious and stupid question -- did you do make mrproper and make config/menuconfig/whatever way you configure it?

I am asking because if I remember correctly mrproper should set up some platform specific stuff in 386 and asm folders.

Another thing to consider is that you perhaps have incompatible version of linux-headers.

Regards,
Igor Levicki

Quoting - Igor Levicki

Again obvious and stupid question -- did you do make mrproper and make config/menuconfig/whatever way you configure it?

I am asking because if I remember correctly mrproper should set up some platform specific stuff in 386 and asm folders.

Another thing to consider is that you perhaps have incompatible version of linux-headers.

Yes we did. We also tried the exact same thing with the vanilla kernel right of of kernel.org so I do not think it's a kernel or header issue.

Quoting - Feilong H (Intel)

It looks that the problem is coming from the inline assembly code in the function query_mca(). Could you please upload the original arch/x86/boot/mca.c (don't preprocess) and the object file compiled with gcc (arch/x86/boot/mca.o)? Probablywe need to do some small modificationtothat piece ofinline asm code.
I didn't keep the RH kernel built with icc. It will take some time if I need to re-compile one. And will it fit into your OS? I don't think so...

ps. Your projectsounds cool. :)

gentoo_x86_32 x86 # cat /usr/src/linux-2.6.25-gentoo-r7/arch/x86/boot/mca.c
/* -*- linux-c -*- ------------------------------------------------------- *
*
* Copyright (C) 1991, 1992 Linus Torvalds
* Copyright 2007 rPath, Inc. - All Rights Reserved
*
* This file is part of the Linux kernel, and is made available under
* the terms of the GNU General Public License version 2.
*
* ----------------------------------------------------------------------- */

/*
* arch/i386/boot/mca.c
*
* Get the MCA system description table
*/

#include "boot.h"

int query_mca(void)
{
u8 err;
u16 es, bx, len;

asm("pushw %%es ; "
"int $0x15 ; "
"setc %0 ; "
"movw %%es, %1 ; "
"popw %%es"
: "=acd" (err), "=acdSD" (es), "=b" (bx)
: "a" (0xc000));

if (err)
return -1; /* No MCA present */

set_fs(es);
len = rdfs16(bx);

if (len > sizeof(boot_params.sys_desc_table))
len = sizeof(boot_params.sys_desc_table);

copy_from_fs(&boot_params.sys_desc_table, bx, len);
return 0;
}

################################################################################

mca.o:

http://www.tyler.mcadams.com/mca.o

*** Those were copied directly from the kernel directory we have been working in (kernel-2.6.25-gentoo-r7) Or did you need a fresh source to extract those from?

Quoting - thaidog

I am a developer with an idea to start a new kernel source for Gentoo that is specifically for the Intel ICC compiler. Evidentally there is a "wrapper" that is needed to be applied to the kernel source first before ICC can correctly complie the Linux kernel. Where can I get this wrapper? (I have looked all over the web but the only yhing I can find is old documentation)

Oh and here is the kernel-2.6.25-gentoo-r7 compressed with lzma for less downlod time:

www.tyler.mcadams.com/linux-2.6.25-gentoo-r7.tar.lzma (it was all the mods to the c you asked for so far)

Quoting - thaidog

gentoo_x86_32 x86 # cat /usr/src/linux-2.6.25-gentoo-r7/arch/x86/boot/mca.c
/* -*- linux-c -*- ------------------------------------------------------- *
*
* Copyright (C) 1991, 1992 Linus Torvalds
* Copyright 2007 rPath, Inc. - All Rights Reserved
*
* This file is part of the Linux kernel, and is made available under
* the terms of the GNU General Public License version 2.
*
* ----------------------------------------------------------------------- */

/*
* arch/i386/boot/mca.c
*
* Get the MCA system description table
*/

#include "boot.h"

int query_mca(void)
{
u8 err;
u16 es, bx, len;

asm("pushw %%es ; "
"int $0x15 ; "
"setc %0 ; "
"movw %%es, %1 ; "
"popw %%es"
: "=acd" (err), "=acdSD" (es), "=b" (bx)
: "a" (0xc000));

if (err)
return -1; /* No MCA present */

set_fs(es);
len = rdfs16(bx);

if (len > sizeof(boot_params.sys_desc_table))
len = sizeof(boot_params.sys_desc_table);

copy_from_fs(&boot_params.sys_desc_table, bx, len);
return 0;
}

################################################################################

mca.o:

http://www.tyler.mcadams.com/mca.o

*** Those were copied directly from the kernel directory we have been working in (kernel-2.6.25-gentoo-r7) Or did you need a fresh source to extract those from?

Thank you Thaidog. Sorry for my slow response.I wasvery busy in these days. I'll try to look at the .o file you uploaded tomorrow (my time). I'll check what gcc generated for the inline asm code. Probably need to modify the code a little bit in order that icc can compile it.

Quoting - Feilong H (Intel)

Thank you Thaidog. Sorry for my slow response.I wasvery busy in these days. I'll try to look at the .o file you uploaded tomorrow (my time). I'll check what gcc generated for the inline asm code. Probably need to modify the code a little bit in order that icc can compile it.

No problem... I thank you for any time you can help! Also, I got a stage 1 gentoo to compile with ICC last night... very exciting!

I'm not an expert of writting inline asm code. Anyway, I modified the code a little bit. Hopefully this will work. See below.
asm("pushw %%es ; "
"int $0x15 ; "
"setc %0 ; "
"movw %%es, %1 ; "
"popw %%es"
: "=m" (err), "=D" (es), "=b" (bx)
: "a" (0xc000));

Quoting - Feilong H (Intel)

I'm not an expert of writting inline asm code. Anyway, I modified the code a little bit. Hopefully this will work. See below.
asm("pushw %%es ; "
"int $0x15 ; "
"setc %0 ; "
"movw %%es, %1 ; "
"popw %%es"
: "=m" (err), "=D" (es), "=b" (bx)
: "a" (0xc000));

The compile failed with the followng error:

IPO: WARNING: File scope disables -ipo

LD arch/x86/boot/setup.elf

arch/x86/boot/main.o: In function 'main':

/usr/src/linux-2.6.25-gentoo-r7/arch/x86/boot/maiin.c: 123: undefined reference to

'__intel_new_proc_init'

make[1]: ***[arch/x86/boot/setup.elf] Error 1

make: *** [bzImage] Error 2

Quoting - thaidog

The compile failed with the followng error:

IPO: WARNING: File scope disables -ipo

LD arch/x86/boot/setup.elf

arch/x86/boot/main.o: In function 'main':

/usr/src/linux-2.6.25-gentoo-r7/arch/x86/boot/maiin.c: 123: undefined reference to

'__intel_new_proc_init'

make[1]: ***[arch/x86/boot/setup.elf] Error 1

make: *** [bzImage] Error 2

__intel_new_proc_init is defined in /opt/intel/cc/10.1.xxx/lib/libirc_s.a, where 10.1.xxx is your icc version number. You need to link the library. Open the /Makefile in the kernel source code, modify it according to the following patch. Please let me know if this works.

quiet_cmd_vmlinux__ ?= LD $@
cmd_vmlinux__ ?= $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) -o $@
-T $(vmlinux-lds) $(vmlinux-init)
- --start-group $(vmlinux-main) --end-group
+ --start-group $(vmlinux-main) /opt/intel/cc/10.1.xxx/lib/libirc_s.a --end-group
$(filter-out $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) FORCE ,$^)

Quoting - Feilong H (Intel)

__intel_new_proc_init is defined in /opt/intel/cc/10.1.xxx/lib/libirc_s.a, where 10.1.xxx is your icc version number. You need to link the library. Open the /Makefile in the kernel source code, modify it according to the following patch. Please let me know if this works.

quiet_cmd_vmlinux__ ?= LD $@
cmd_vmlinux__ ?= $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) -o $@
-T $(vmlinux-lds) $(vmlinux-init)
- --start-group $(vmlinux-main) --end-group
+ --start-group $(vmlinux-main) /opt/intel/cc/10.1.xxx/lib/libirc_s.a --end-group
$(filter-out $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) FORCE ,$^)

It seems to already have that in it but the end line is a little different:

quiet_cmd_vmlinux__ ?= LD $@
cmd_vmlinux__ ?= $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) -o $@
-T $(vmlinux-lds) $(vmlinux-init)
--start-group $(vmlinux-main) /opt/intel/cc/10.1.018/lib/libirc_s.a --end-group
$(filter-out $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) vmlinux.o FORCE ,$^)

I thnk we already added this line in one of the other posts... but vmlinux.o is not in the bottom line of your matching code.

Try this please.
In ./scripts/Makefile.build,
cmd_link_multi-y = $(LD) $(ld_flags) -r -o $@ $(link_multi_deps)

quiet_cmd_link_multi-m = LD [M] $@
-cmd_link_multi-m = $(LD) $(ld_flags) $(LDFLAGS_MODULE) -o $@ $(link_multi_deps)
+cmd_link_multi-m = $(LD) $(ld_flags) $(LDFLAGS_MODULE) -o $@ $(link_multi_deps) /opt/intel/cc/10.1.018/lib/libirc_s.a

In ./scripts/Makefile.modpost,

# Step 6), final link of the modules
quiet_cmd_ld_ko_o = LD [M] $@
cmd_ld_ko_o = $(LD) $(LDFLAGS) $(LDFLAGS_MODULE) -o $@
- $(filter-out FORCE,$^)
+ $(filter-out FORCE,$^) /opt/intel/cc/10.1.018/lib/libirc_s.a

Quoting - Feilong H (Intel)

Try this please.
In ./scripts/Makefile.build,
cmd_link_multi-y = $(LD) $(ld_flags) -r -o $@ $(link_multi_deps)

quiet_cmd_link_multi-m = LD [M] $@
-cmd_link_multi-m = $(LD) $(ld_flags) $(LDFLAGS_MODULE) -o $@ $(link_multi_deps)
+cmd_link_multi-m = $(LD) $(ld_flags) $(LDFLAGS_MODULE) -o $@ $(link_multi_deps) /opt/intel/cc/10.1.018/lib/libirc_s.a

In ./scripts/Makefile.modpost,

# Step 6), final link of the modules
quiet_cmd_ld_ko_o = LD [M] $@
cmd_ld_ko_o = $(LD) $(LDFLAGS) $(LDFLAGS_MODULE) -o $@
- $(filter-out FORCE,$^)
+ $(filter-out FORCE,$^) /opt/intel/cc/10.1.018/lib/libirc_s.a

My ./scripts/Makefile.build looks different:

#
# Rule to link composite objects
#
# Composite objects are specified in kbuild makefile as follows:
# -objs :=
# or
# -y :=
link_multi_deps =
$(filter $(addprefix $(obj)/,
$($(subst $(obj)/,,$(@:.o=-objs)))
$($(subst $(obj)/,,$(@:.o=-y)))), $^)

quiet_cmd_link_multi-y = LD $@
cmd_link_multi-y = $(LD) $(ld_flags) -r -o $@ $(link_multi_deps) $(cmd_secanalysis)

quiet_cmd_link_multi-m = LD [M] $@
cmd_link_multi-m = $(cmd_link_multi-y)

# We would rather have a list of rules like
# foo.o: $(foo-objs)
# but that's not so easy, so we rather make all composite objects depend
# on the set of all their parts
$(multi-used-y) : %.o: $(multi-objs-y) FORCE
$(call if_changed,link_multi-y)

$(multi-used-m) : %.o: $(multi-objs-m) FORCE
$(call if_changed,link_multi-m)
@{ echo $(@:.o=.ko); echo $(link_multi_deps); } > $(MODVERDIR)/$(@F:.o=.mod)

targets += $(multi-used-y) $(multi-used-m)

Quoting - thaidog

Quoting - Feilong H (Intel)

Try this please.
In ./scripts/Makefile.build,
cmd_link_multi-y = $(LD) $(ld_flags) -r -o $@ $(link_multi_deps)

quiet_cmd_link_multi-m = LD [M] $@
-cmd_link_multi-m = $(LD) $(ld_flags) $(LDFLAGS_MODULE) -o $@ $(link_multi_deps)
+cmd_link_multi-m = $(LD) $(ld_flags) $(LDFLAGS_MODULE) -o $@ $(link_multi_deps) /opt/intel/cc/10.1.018/lib/libirc_s.a

In ./scripts/Makefile.modpost,

# Step 6), final link of the modules
quiet_cmd_ld_ko_o = LD [M] $@
cmd_ld_ko_o = $(LD) $(LDFLAGS) $(LDFLAGS_MODULE) -o $@
- $(filter-out FORCE,$^)
+ $(filter-out FORCE,$^) /opt/intel/cc/10.1.018/lib/libirc_s.a

My ./scripts/Makefile.build looks different:

#
# Rule to link composite objects
#
# Composite objects are specified in kbuild makefile as follows:
# -objs :=
# or
# -y :=
link_multi_deps =
$(filter $(addprefix $(obj)/,
$($(subst $(obj)/,,$(@:.o=-objs)))
$($(subst $(obj)/,,$(@:.o=-y)))), $^)

quiet_cmd_link_multi-y = LD $@
cmd_link_multi-y = $(LD) $(ld_flags) -r -o $@ $(link_multi_deps) $(cmd_secanalysis)

quiet_cmd_link_multi-m = LD [M] $@
cmd_link_multi-m = $(cmd_link_multi-y)

# We would rather have a list of rules like
# foo.o: $(foo-objs)
# but that's not so easy, so we rather make all composite objects depend
# on the set of all their parts
$(multi-used-y) : %.o: $(multi-objs-y) FORCE
$(call if_changed,link_multi-y)

$(multi-used-m) : %.o: $(multi-objs-m) FORCE
$(call if_changed,link_multi-m)
@{ echo $(@:.o=.ko); echo $(link_multi_deps); } > $(MODVERDIR)/$(@F:.o=.mod)

targets += $(multi-used-y) $(multi-used-m)

Let's try another way,edit arch/x86/boot/Makefile,find these lines:

LDFLAGS_setup.elf := -T
$(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE
$(call if_changed,ld)

Then add /opt/intel/cc/10.1.021/lib/libirc_s.a after "FORCE".

I compiled the kernel successfully by using the instructions,but I cannot boot it.I noticed a line from grub like this:

[Linux-bzImage, setup=0x3a00, size=0x17b810]

I remembered that the vaule of "setup=" in which the kernel compiled by gcc is 0x4000 but here is 0x3a00.

I still don't know what cause the problem.I can't provide more information because the system just halt at the grub command line.

Quoting - newper

Let's try another way,edit arch/x86/boot/Makefile,find these lines:

LDFLAGS_setup.elf := -T
$(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE
$(call if_changed,ld)

Then add /opt/intel/cc/10.1.021/lib/libirc_s.a after "FORCE".

I compiled the kernel successfully by using the instructions,but I cannot boot it.I noticed a line from grub like this:

[Linux-bzImage, setup=0x3a00, size=0x17b810]

I remembered that the vaule of "setup=" in which the kernel compiled by gcc is 0x4000 but here is 0x3a00.

I still don't know what cause the problem.I can't provide more information because the system just halt at the grub command line.

Confirmed. It appears that the kernel builds successfully with this modification. But I get stuck loading the kernel at a similar place:

root (hd0,0)

filesystem type is ext2fs, partition type 0x83

kernel /boot/kernel-2.6.25-intel-r7 root=/dev/hdb2

[Linux-bzImage, setup=0x3c00, size=0x2a5b64]

also, at the end of the make I never saw any output about making the bzImage

Well this project is starting to get some attention over at the Gentoo Forums. some people want to help, some people want to hate. They think we can't pull it off!

I was talking with Daneil Robbins, creator of Gentoo Linux, and he said that we should try dailing down the ICC optimizations.

How do we do that when compiling the kernel?

Quoting - thaidog

Confirmed. It appears that the kernel builds successfully with this modification. But I get stuck loading the kernel at a similar place:

root (hd0,0)

filesystem type is ext2fs, partition type 0x83

kernel /boot/kernel-2.6.25-intel-r7 root=/dev/hdb2

[Linux-bzImage, setup=0x3c00, size=0x2a5b64]

also, at the end of the make I never saw any output about making the bzImage

I'm afraid that it's hard to debug this runtime problem "remotely". Could you please post the first few lines (like above) from gcc kernel? Maybe we may find some obvious problem.

Quoting - Feilong H (Intel)

Quoting - thaidog

Confirmed. It appears that the kernel builds successfully with this modification. But I get stuck loading the kernel at a similar place:

root (hd0,0)

filesystem type is ext2fs, partition type 0x83

kernel /boot/kernel-2.6.25-intel-r7 root=/dev/hdb2

[Linux-bzImage, setup=0x3c00, size=0x2a5b64]

also, at the end of the make I never saw any output about making the bzImage

I'm afraid that it's hard to debug this runtime problem "remotely". Could you please post the first few lines (like above) from gcc kernel? Maybe we may find some obvious problem.

gcc: [Linux-bzImage, setup=0x2a00, size=0x12c890]
icc: [Linux-bzImage, setup=0x3a00, size=0x163e90]

These two kernels are compiled with the same config file,the kernel version is 2.6.28,the gcc one works well,but the icc one can't boot.

Quoting - newper

gcc: [Linux-bzImage, setup=0x2a00, size=0x12c890]
icc: [Linux-bzImage, setup=0x3a00, size=0x163e90]

These two kernels are compiled with the same config file,the kernel version is 2.6.28,the gcc one works well,but the icc one can't boot.

Thanks, and how do you get that info? I've been looking for a way to get that info.

Quoting - thaidog

Quoting - newper

gcc: [Linux-bzImage, setup=0x2a00, size=0x12c890]
icc: [Linux-bzImage, setup=0x3a00, size=0x163e90]

These two kernels are compiled with the same config file,the kernel version is 2.6.28,the gcc one works well,but the icc one can't boot.

Thanks, and how do you get that info? I've been looking for a way to get that info.

I only use grub, like
grub
root (hd0,0)
kernel /boot/bzImage

Quoting - newper

Quoting - thaidog

Quoting - newper

gcc: [Linux-bzImage, setup=0x2a00, size=0x12c890]
icc: [Linux-bzImage, setup=0x3a00, size=0x163e90]

These two kernels are compiled with the same config file,the kernel version is 2.6.28,the gcc one works well,but the icc one can't boot.

Thanks, and how do you get that info? I've been looking for a way to get that info.

I only use grub, like
grub
root (hd0,0)
kernel /boot/bzImage

I could never see it... it scrolled by to fast!

Quoting - thaidog

I could never see it... it scrolled by to fast!

Well anyone on ideas as to what is causing this error?

Quoting - thaidog

Quoting - thaidog

I could never see it... it scrolled by to fast!

Well anyone on ideas as to what is causing this error?

I find a way,it's very bad,but it works well on my machine.
I noticed that we changed mca.c for a little before,and I also noticed that the 2.6.18 kernel could be compiled well by the icc.But the 2.6.18 one doesn't have mca.c in that directory.I findout that the kernel doesn't contain mca.c in arch/i386/boot until 2.6.23.So I compiled the kernel using the following steps:
I download 2.6.22.19 version (the last stable version of 2.6.22 branch) and 2.6.28.2 (current stable version)
Unpack them and make some changes (only on the first page of this thread).
Generate config file for both kernels.
Run make HOSTCC=intelwraper CC=intelwrapper AR=xiar LD=xild vmlinux for these two kernels.
Then replace the vmlinux in 2.6.22 kernel directory with the one in 2.6.28 kernel directory.
Run make in 2.6.22 kernel directory ,the bzImage will be created.

I test it with icc 10.1.021

Quoting - newper

Quoting - thaidog

Quoting - thaidog

I could never see it... it scrolled by to fast!

Well anyone on ideas as to what is causing this error?

I find a way,it's very bad,but it works well on my machine.
I noticed that we changed mca.c for a little before,and I also noticed that the 2.6.18 kernel could be compiled well by the icc.But the 2.6.18 one doesn't have mca.c in that directory.I findout that the kernel doesn't contain mca.c in arch/i386/boot until 2.6.23.So I compiled the kernel using the following steps:
I download 2.6.22.19 version (the last stable version of 2.6.22 branch) and 2.6.28.2 (current stable version)
Unpack them and make some changes (only on the first page of this thread).
Generate config file for both kernels.
Run make HOSTCC=intelwraper CC=intelwrapper AR=xiar LD=xild vmlinux for these two kernels.
Then replace the vmlinux in 2.6.22 kernel directory with the one in 2.6.28 kernel directory.
Run make in 2.6.22 kernel directory ,the bzImage will be created.

I test it with icc 10.1.021

Now that's a cool hack! Did the kernel actually boot this time?

Pages

Leave a Comment

Please sign in to add a comment. Not a member? Join today