Re: make oldconfig bzImage with GCC 4.9.2 on debian 8

2015-06-06 Thread deloptes
Dhiraj Bhor wrote:

 Is there any clue to proceed with this query?

I compiled many kernels from the 2.6.26 - 2.6.37 in chrooted i386
environment with gcc-4.7

it works pretty well for me.

To me it looks like the patches you apply mess up something.

regards


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/mkuib1$laf$1...@ger.gmane.org



Re: make oldconfig bzImage with GCC 4.9.2 on debian 8

2015-06-03 Thread Sven Arvidsson
On Wed, 2015-06-03 at 10:05 +0530, Dhiraj Bhor wrote:
 Is there any clue to proceed with this query?

No idea.

My suggestion was made after googling your problem for a couple of
minutes.

If this is for a school or uni project, you should really talk to the
people in charge and ask them to use a recent kernel that actually
builds or provide patches themselves.

-- 
Cheers,
Sven Arvidsson
http://www.whiz.se
PGP Key ID 6FAB5CD5




signature.asc
Description: This is a digitally signed message part


Re: make oldconfig bzImage with GCC 4.9.2 on debian 8

2015-06-02 Thread Dhiraj Bhor
Is there any clue to proceed with this query?

On Fri, May 29, 2015 at 9:54 AM, Dhiraj Bhor dhirajbho...@gmail.com wrote:

 Can anyone help me out.


 On Thu, May 28, 2015 at 12:47 PM, Dhiraj Bhor dhirajbho...@gmail.com
 wrote:

 Hi Sven,

 I applied the patch suggested but it did not worked for me.
 I wanted to let you know that i am compiling kernel version 2.6.20 and
 given link has patch applicable for 2.6.27 which is not working for me.

 When i applied the patch, i got following error:

 *  CC  kernel/capability.o*
 *  CC  kernel/ptrace.o*
 *In file included from kernel/ptrace.c:16:0:*
 *include/linux/pagemap.h: In function ‘fault_in_pages_readable’:*
 *include/linux/pagemap.h:222:16: warning: variable ‘c’ set but not used
 [-Wunused-but-set-variable]*
 *  volatile char c;*
 *^*
 *  CC  kernel/timer.o*
 *In file included from include/asm/current.h:4:0,*
 * from include/linux/capability.h:46,*
 * from include/linux/sched.h:46,*
 * from include/asm/irq.h:13,*
 * from include/linux/kernel_stat.h:4,*
 * from kernel/timer.c:22:*
 *include/asm/irq_regs.h: In function ‘set_irq_regs’:*
 *include/asm/pda.h:39:16: warning: variable ‘tmp__’ set but not used
 [-Wunused-but-set-variable]*
 *   if (0) { T__ tmp__; tmp__ = (val); }   \*
 *^*
 *include/asm/pda.h:95:30: note: in expansion of macro ‘pda_to_op’*
 * #define write_pda(field,val) pda_to_op(mov,field,val)*
 *  ^*
 *include/asm/irq_regs.h:22:2: note: in expansion of macro ‘write_pda’*
 *  write_pda(irq_regs, new_regs);*
 *  ^*
 *  CC  kernel/user.o*
 *In file included from include/asm/current.h:4:0,*
 * from include/linux/capability.h:46,*
 * from include/linux/sched.h:46,*
 * from kernel/user.c:12:*
 *include/asm/irq_regs.h: In function ‘set_irq_regs’:*
 *include/asm/pda.h:39:16: warning: variable ‘tmp__’ set but not used
 [-Wunused-but-set-variable]*
 *   if (0) { T__ tmp__; tmp__ = (val); }   \*
 *^*
 *include/asm/pda.h:95:30: note: in expansion of macro ‘pda_to_op’*
 * #define write_pda(field,val) pda_to_op(mov,field,val)*
 *  ^*
 *include/asm/irq_regs.h:22:2: note: in expansion of macro ‘write_pda’*
 *  write_pda(irq_regs, new_regs);*
 *  ^*
 *  CC  kernel/signal.o*
 *  CC  kernel/sys.o*
 *  CC  kernel/kmod.o*
 *kernel/kmod.c: In function ‘call_usermodehelper’:*
 *kernel/kmod.c:134:28: warning: variable ‘old_session’ set but not used
 [-Wunused-but-set-variable]*
 *  struct key *new_session, *old_session;*
 *^*
 *kernel/kmod.c:134:14: warning: variable ‘new_session’ set but not used
 [-Wunused-but-set-variable]*
 *  struct key *new_session, *old_session;*
 *  ^*
 *  CC  kernel/workqueue.o*
 *In file included from include/asm/current.h:4:0,*
 * from include/linux/capability.h:46,*
 * from include/linux/sched.h:46,*
 * from include/linux/utsname.h:35,*
 * from include/asm/elf.h:12,*
 * from include/linux/elf.h:7,*
 * from include/linux/module.h:15,*
 * from kernel/workqueue.c:19:*
 *include/asm/irq_regs.h: In function ‘set_irq_regs’:*
 *include/asm/pda.h:39:16: warning: variable ‘tmp__’ set but not used
 [-Wunused-but-set-variable]*
 *   if (0) { T__ tmp__; tmp__ = (val); }   \*
 *^*
 *include/asm/pda.h:95:30: note: in expansion of macro ‘pda_to_op’*
 * #define write_pda(field,val) pda_to_op(mov,field,val)*
 *  ^*
 *include/asm/irq_regs.h:22:2: note: in expansion of macro ‘write_pda’*
 *  write_pda(irq_regs, new_regs);*
 *  ^*
 *  CC  kernel/pid.o*
 *  CC  kernel/rcupdate.o*
 *In file included from include/asm/current.h:4:0,*
 * from include/linux/wait.h:26,*
 * from include/linux/mmzone.h:9,*
 * from include/linux/gfp.h:4,*
 * from include/linux/slab.h:14,*
 * from include/linux/percpu.h:5,*
 * from include/linux/rcupdate.h:41,*
 * from kernel/rcupdate.c:38:*
 *include/asm/irq_regs.h: In function ‘set_irq_regs’:*
 *include/asm/pda.h:39:16: warning: variable ‘tmp__’ set but not used
 [-Wunused-but-set-variable]*
 *   if (0) { T__ tmp__; tmp__ = (val); }   \*
 *^*
 *include/asm/pda.h:95:30: note: in expansion of macro ‘pda_to_op’*
 * #define write_pda(field,val) pda_to_op(mov,field,val)*
 *  ^*
 *include/asm/irq_regs.h:22:2: note: in expansion of macro ‘write_pda’*
 *  write_pda(irq_regs, new_regs);*
 *  ^*
 *  CC  kernel/extable.o*
 *  CC  kernel/params.o*
 *  CC  kernel/posix-timers.o*
 *In file included from include/asm/current.h:4:0,*
 * from include/linux/capability.h:46,*
 * from 

Re: make oldconfig bzImage with GCC 4.9.2 on debian 8

2015-05-28 Thread Dhiraj Bhor
Can anyone help me out.


On Thu, May 28, 2015 at 12:47 PM, Dhiraj Bhor dhirajbho...@gmail.com
wrote:

 Hi Sven,

 I applied the patch suggested but it did not worked for me.
 I wanted to let you know that i am compiling kernel version 2.6.20 and
 given link has patch applicable for 2.6.27 which is not working for me.

 When i applied the patch, i got following error:

 *  CC  kernel/capability.o*
 *  CC  kernel/ptrace.o*
 *In file included from kernel/ptrace.c:16:0:*
 *include/linux/pagemap.h: In function ‘fault_in_pages_readable’:*
 *include/linux/pagemap.h:222:16: warning: variable ‘c’ set but not used
 [-Wunused-but-set-variable]*
 *  volatile char c;*
 *^*
 *  CC  kernel/timer.o*
 *In file included from include/asm/current.h:4:0,*
 * from include/linux/capability.h:46,*
 * from include/linux/sched.h:46,*
 * from include/asm/irq.h:13,*
 * from include/linux/kernel_stat.h:4,*
 * from kernel/timer.c:22:*
 *include/asm/irq_regs.h: In function ‘set_irq_regs’:*
 *include/asm/pda.h:39:16: warning: variable ‘tmp__’ set but not used
 [-Wunused-but-set-variable]*
 *   if (0) { T__ tmp__; tmp__ = (val); }   \*
 *^*
 *include/asm/pda.h:95:30: note: in expansion of macro ‘pda_to_op’*
 * #define write_pda(field,val) pda_to_op(mov,field,val)*
 *  ^*
 *include/asm/irq_regs.h:22:2: note: in expansion of macro ‘write_pda’*
 *  write_pda(irq_regs, new_regs);*
 *  ^*
 *  CC  kernel/user.o*
 *In file included from include/asm/current.h:4:0,*
 * from include/linux/capability.h:46,*
 * from include/linux/sched.h:46,*
 * from kernel/user.c:12:*
 *include/asm/irq_regs.h: In function ‘set_irq_regs’:*
 *include/asm/pda.h:39:16: warning: variable ‘tmp__’ set but not used
 [-Wunused-but-set-variable]*
 *   if (0) { T__ tmp__; tmp__ = (val); }   \*
 *^*
 *include/asm/pda.h:95:30: note: in expansion of macro ‘pda_to_op’*
 * #define write_pda(field,val) pda_to_op(mov,field,val)*
 *  ^*
 *include/asm/irq_regs.h:22:2: note: in expansion of macro ‘write_pda’*
 *  write_pda(irq_regs, new_regs);*
 *  ^*
 *  CC  kernel/signal.o*
 *  CC  kernel/sys.o*
 *  CC  kernel/kmod.o*
 *kernel/kmod.c: In function ‘call_usermodehelper’:*
 *kernel/kmod.c:134:28: warning: variable ‘old_session’ set but not used
 [-Wunused-but-set-variable]*
 *  struct key *new_session, *old_session;*
 *^*
 *kernel/kmod.c:134:14: warning: variable ‘new_session’ set but not used
 [-Wunused-but-set-variable]*
 *  struct key *new_session, *old_session;*
 *  ^*
 *  CC  kernel/workqueue.o*
 *In file included from include/asm/current.h:4:0,*
 * from include/linux/capability.h:46,*
 * from include/linux/sched.h:46,*
 * from include/linux/utsname.h:35,*
 * from include/asm/elf.h:12,*
 * from include/linux/elf.h:7,*
 * from include/linux/module.h:15,*
 * from kernel/workqueue.c:19:*
 *include/asm/irq_regs.h: In function ‘set_irq_regs’:*
 *include/asm/pda.h:39:16: warning: variable ‘tmp__’ set but not used
 [-Wunused-but-set-variable]*
 *   if (0) { T__ tmp__; tmp__ = (val); }   \*
 *^*
 *include/asm/pda.h:95:30: note: in expansion of macro ‘pda_to_op’*
 * #define write_pda(field,val) pda_to_op(mov,field,val)*
 *  ^*
 *include/asm/irq_regs.h:22:2: note: in expansion of macro ‘write_pda’*
 *  write_pda(irq_regs, new_regs);*
 *  ^*
 *  CC  kernel/pid.o*
 *  CC  kernel/rcupdate.o*
 *In file included from include/asm/current.h:4:0,*
 * from include/linux/wait.h:26,*
 * from include/linux/mmzone.h:9,*
 * from include/linux/gfp.h:4,*
 * from include/linux/slab.h:14,*
 * from include/linux/percpu.h:5,*
 * from include/linux/rcupdate.h:41,*
 * from kernel/rcupdate.c:38:*
 *include/asm/irq_regs.h: In function ‘set_irq_regs’:*
 *include/asm/pda.h:39:16: warning: variable ‘tmp__’ set but not used
 [-Wunused-but-set-variable]*
 *   if (0) { T__ tmp__; tmp__ = (val); }   \*
 *^*
 *include/asm/pda.h:95:30: note: in expansion of macro ‘pda_to_op’*
 * #define write_pda(field,val) pda_to_op(mov,field,val)*
 *  ^*
 *include/asm/irq_regs.h:22:2: note: in expansion of macro ‘write_pda’*
 *  write_pda(irq_regs, new_regs);*
 *  ^*
 *  CC  kernel/extable.o*
 *  CC  kernel/params.o*
 *  CC  kernel/posix-timers.o*
 *In file included from include/asm/current.h:4:0,*
 * from include/linux/capability.h:46,*
 * from include/linux/sched.h:46,*
 * from include/linux/mm.h:4,*
 * from kernel/posix-timers.c:33:*
 

make oldconfig bzImage with GCC 4.9.2 on debian 8

2015-05-26 Thread Dhiraj Bhor
Hi all,

I am compiling
https://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.20.tar.bz2
I have gcc 4.9.2 installed on my Debbian 8.0. I have compiled
linux-kernel-2.6.32 on this box. Somebody may point out that this is old
version and i do not waste time in compile but this is requirement and i
have to do it.
Currently  i have applied following patches to this kernel:

*diff -Narup linux-2.6.20-orig/arch/i386/boot/compressed/misc.c
linux-2.6.20/arch/i386/boot/compressed/misc.c*
*--- linux-2.6.20-orig/arch/i386/boot/compressed/misc.c 2007-02-04
11:44:54.0 -0700*
*+++ linux-2.6.20/arch/i386/boot/compressed/misc.c 2007-02-09
12:04:46.0 -0700*
*@@ -372,8 +372,8 @@ asmlinkage void decompress_kernel(void **
* #endif*

*  makecrc();*
*- putstr(Uncompressing Linux... );*
*+ putstr(Starting... );*
*  gunzip();*
*- putstr(Ok, booting the kernel.\n);*
*+ //putstr(Ok, booting the kernel.\n);*
*  return;*
* }*
*diff -Narup linux-2.6.20-orig/kernel/printk.c linux-2.6.20/kernel/printk.c*
*--- linux-2.6.20-orig/kernel/printk.c 2007-02-04 11:44:54.0 -0700*
*+++ linux-2.6.20/kernel/printk.c 2007-02-09 12:04:24.0 -0700*
*@@ -115,6 +115,8 @@ static int preferred_console = -1;*
* /* Flag: console code may call schedule() */*
* static int console_may_schedule;*

*+static int printk_dots = 1;*
*+*
* #ifdef CONFIG_PRINTK*

* static char __log_buf[__LOG_BUF_LEN];*
*@@ -122,6 +124,14 @@ static char *log_buf = __log_buf;*
* static int log_buf_len = __LOG_BUF_LEN;*
* static unsigned long logged_chars; /* Number of chars produced since last
read+clear operation */*

*+static int __init printk_dots_setup(char *str)*
*+{*
*+printk_dots = simple_strtoul(str, NULL, 10);*
*+return 1;*
*+}*
*+*
*+__setup(printk_dots=, printk_dots_setup);*
*+*
* static int __init log_buf_len_setup(char *str)*
* {*
*  unsigned long size = memparse(str, str);*
*@@ -359,7 +369,16 @@ static void _call_console_drivers(unsign*
*  log_buf_len);*
*  __call_console_drivers(0, end  LOG_BUF_MASK);*
*  } else {*
*- __call_console_drivers(start, end);*
*+ if (msg_log_level = 2 /* KERN_CRIT, KERN_ALERT, KERN_EMERG */*
*+|| printk_dots == 0) {*
*+ __call_console_drivers(start, end);*
*+ }*
*+ else {*
*+ char orig = LOG_BUF(start);*
*+ LOG_BUF(start) = '.';*
*+ __call_console_drivers(start, start + 1);*
*+ LOG_BUF(start) = orig;*
*+ }*
*  }*
*  }*
* }*

*Index: linux-2.6.20.4/Makefile*
*===*
*--- linux-2.6.20.4.orig/Makefile*
*+++ linux-2.6.20.4/Makefile*
*@@ -412,10 +412,12 @@ ifeq ($(config-targets),1)*
* include $(srctree)/arch/$(ARCH)/Makefile*
* export KBUILD_DEFCONFIG*

*-config %config: scripts_basic outputmakefile FORCE*
*+config: scripts_basic outputmakefile FORCE*
*+ $(Q)mkdir -p include/linux include/config*
*+ $(Q)$(MAKE) $(build)=scripts/kconfig $@*
*+%config: scripts_basic outputmakefile FORCE*
*  $(Q)mkdir -p include/linux include/config*
*  $(Q)$(MAKE) $(build)=scripts/kconfig $@*
*-*
* else*
* #
===*
* # Build targets only - this includes vmlinux, arch specific targets,
clean*
*@@ -1439,7 +1441,7 @@ endif*
*  $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)*

* # Modules*
*-/ %/: prepare scripts FORCE*
*+/: prepare scripts FORCE*
*  $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \*
*  $(build)=$(build-dir)*
* %.ko: prepare scripts FORCE*

*Index: linux-2.6.20.4/scripts/mod/sumversion.c*
*===*
*--- linux-2.6.20.4.orig/scripts/mod/sumversion.c*
*+++ linux-2.6.20.4/scripts/mod/sumversion.c*
*@@ -8,6 +8,7 @@*
* #include errno.h*
* #include string.h*
* #include modpost.h*
*+#include linux/limits.h*

* /**
*  * Stolen form Cryptographic API.*

*--- ../linux/arch/i386/kernel/Makefile  2007-03-23 13:52:51.0
-0600*
*+++ arch/i386/kernel/Makefile   2015-05-26 08:54:54.206372389 -0600*
*@@ -56,7 +56,7 @@*

* # The DSO images are built using a special linker script.*
* quiet_cmd_syscall = SYSCALL $@*
*-  cmd_syscall = $(CC) -m elf_i386 -nostdlib $(SYSCFLAGS_$(@F)) \*
*+  cmd_syscall = $(CC) -m32 -nostdlib $(SYSCFLAGS_$(@F)) \*
*  -Wl,-T,$(filter-out FORCE,$^) -o $@*

* export CPPFLAGS_vsyscall.lds += -P -C -U$(ARCH)*


After this i got some error while make bzImage as follows:

*  LD  arch/i386/lib/built-in.o*
*  CC  arch/i386/lib/bitops.o*
*  AS  arch/i386/lib/checksum.o*
*  CC  arch/i386/lib/delay.o*
*  AS  arch/i386/lib/getuser.o*
*  CC  arch/i386/lib/memcpy.o*
*  AS  arch/i386/lib/putuser.o*
*  AS  arch/i386/lib/semaphore.o*
*  CC  arch/i386/lib/strstr.o*
*  CC  arch/i386/lib/usercopy.o*
*In file included from include/linux/blkdev.h:10:0,*
* from arch/i386/lib/usercopy.c:10:*
*include/linux/pagemap.h: In function ‘fault_in_pages_readable’:*
*include/linux/pagemap.h:222:16: warning: variable ‘c’ set but not used

Re: make oldconfig bzImage with GCC 4.9.2 on debian 8

2015-05-26 Thread Sven Arvidsson
On Tue, 2015-05-26 at 16:37 +0530, Dhiraj Bhor wrote:
 After this i got some error while make bzImage as follows:
[...]
 *kernel/built-in.o: In function `mutex_lock':*
 *(.sched.text+0xea5): undefined reference to `__mutex_lock_slowpath'*
 *kernel/built-in.o: In function `mutex_unlock':*
 *(.sched.text+0xeb5): undefined reference to `__mutex_unlock_slowpath'*
 *Makefile:744: recipe for target 'vmlinux' failed*
 *make: *** [vmlinux] Error 1*
 

I'm guessing you need to do something like:
http://www.brunni.de/linux_kernel_2.6.27.62_with_gcc_4.6.3.html

-- 
Cheers,
Sven Arvidsson
http://www.whiz.se
PGP Key ID 6FAB5CD5




signature.asc
Description: This is a digitally signed message part