I have ran into a strange situation:

Compiling the same Backfire firmware for ar71xx/WNDR3700 produces a functionally different version with Ubuntu 11.04 as the build host, than if I use Ubuntu 11.10 as the host.

The firmware compiled with 11.10 seems to work otherwise quite normally, but if I try to install new packages to it, it crashes within seconds. The crash happens when adding packages wither with LuCI software tab or with opkg commandline. (There might naturally be also other things that cause crashes, but the package install seems to cause it always.)

Installing the same addon packages to the Ubuntu 11.04 compiled version of the firmware works flawlessy.

Background:

I got alerted to the issue by one user of my community build for WNDR3700.
https://forum.openwrt.org/viewtopic.php?pid=150219#p150219

When testing the issue, I found out that the crash happens both for my own add-on packages (compiled at the same time as the firmware) and with rc6 repository packages (which should be compatible).

I then tried to find a regression point and finally got down to old archive versions compiled in October with my old Ubuntu 11.04 build environment. They work ok. That got me thinking about the build environment.

After testing I can say that all versions compiled with Ubuntu 11.10 cause the crash, even the one compiled from the same svn revision as the working October version (built with 11.04).

Debugging so far:

I have now compiled identical versions with both OS.
svn revision Backfire 10.03.SVN (r29461) / LuCI 0.10 Branch (0.10+svn8056+HN7)
Kernel Version 2.6.32.27
The build process actually uses the same local source files, so they are fully identical, including the .config file. Build environment has been completely cleaned with make dirclean between the builds.

And still the same, the one compiled with Ubuntu 11.10 causes the crash when installing packages.

build logs are here:
http://koti.welho.com/hnyman1/Openwrt/Backfire-build-debug/

I have compared the build logs and have noticed a few differences:

1)
For some reason, the 11.10 compiler writes more verbose warnings to the logs, as it always includces the warning code in brackets:
--- D:/FTP/WNDR3700/buildlog.ubuntu1104v2.text  Tue Dec 06 17:44:01 2011
+++ D:/FTP/WNDR3700/buildlog.ubuntu1110v2.text  Tue Dec 06 16:38:36 2011
-LzmaBench.cpp:368:17: warning: format not a string literal and no format arguments +LzmaBench.cpp:368:17: warning: format not a string literal and no format arguments [-Wformat-security]

It also includes more warnings about unused variables. Like this:
warning: variable 't' set but not used [-Wunused-but-set-variable]

Those things cause 99% of the differences between the 11.04 and 11.10 build logs, but make comparing logs difficult.

2)
There might be an actual problem with kernel config with the 11.10 compiled version. Around line 29300-30000 there is the part with scripts/kconfig. And there the 11.04 version log talks about /boot/config-2.6.38-12-generic, while the 11.10 log contains /boot/config-3.0.0-13-generic. That difference then causes several differences for the various kernel build option selections made by the build process. The first lines of the key part of the diff log is below.

Neither of those verions mentioned in the log is actually the 2.6.32.27, which the kernel actually is.
Is the version parsing for the config process failing somehow?

I find it pretty strange, that the build environment can have this kind of effect, between two consecutive versions of the same OS. I am wondering if this can be caused by the compiler included with the OS:ses. Naturally there are differences (e.g. 11.04 has gcc 4.5, while 11.10 has gcc 4.6), but I thought that the actual firmware compiling work is done with the crosscompiler built as part of the toolchain, so the OS tool versions should not have much role there.

Does anybody have debugging advice to offer?




@@ -29327,10 +30068,13 @@
   HOSTCC  scripts/basic/docproc
   HOSTCC  scripts/basic/hash
   HOSTCC  scripts/kconfig/conf.o
+scripts/kconfig/conf.c: In function 'conf_sym':
+scripts/kconfig/conf.c:159:6: warning: variable 'type' set but not used [-Wunused-but-set-variable]
 scripts/kconfig/conf.c: In function 'conf_choice':
-scripts/kconfig/conf.c:307:9: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result +scripts/kconfig/conf.c:231:6: warning: variable 'type' set but not used [-Wunused-but-set-variable] +scripts/kconfig/conf.c:307:9: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result [-Wunused-result]
 scripts/kconfig/conf.c: In function 'conf_askvalue':
-scripts/kconfig/conf.c:105:8: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result +scripts/kconfig/conf.c:105:8: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result [-Wunused-result]
   HOSTCC  scripts/kconfig/kxgettext.o
   SHIPPED scripts/kconfig/zconf.tab.c
   SHIPPED scripts/kconfig/lex.zconf.c
@@ -29338,9 +30082,10 @@
   HOSTCC  scripts/kconfig/zconf.tab.o
   HOSTLD  scripts/kconfig/conf
 scripts/kconfig/conf -o arch/mips/Kconfig
-/boot/config-2.6.38-12-generic:3812:warning: symbol value 'm' invalid for FB_VESA
+/boot/config-3.0.0-13-generic:2182:warning: symbol value 'm' invalid for 
IWL4965
+/boot/config-3.0.0-13-generic:3956:warning: symbol value 'm' invalid for 
FB_VESA
 #
-# using defaults found in /boot/config-2.6.38-12-generic
+# using defaults found in /boot/config-3.0.0-13-generic
 #
 *
 * Restart config...
@@ -29422,9 +30167,9 @@
 High Resolution Timer Support (HIGH_RES_TIMERS) [Y/n/?] y
 Timer frequency
   1. 48 HZ (HZ_48) (NEW)
-> 2. 100 HZ (HZ_100)
+  2. 100 HZ (HZ_100)
   3. 128 HZ (HZ_128) (NEW)
-  4. 250 HZ (HZ_250)
+> 4. 250 HZ (HZ_250)
   5. 256 HZ (HZ_256) (NEW)
   6. 1000 HZ (HZ_1000)
   7. 1024 HZ (HZ_1024) (NEW)
@@ -29453,7 +30198,20 @@
 Auditing support (AUDIT) [Y/n/?] y
 Kernel .config support (IKCONFIG) [N/m/y/?] n
 Kernel log buffer size (16 => 64KB, 17 => 128KB) (LOG_BUF_SHIFT) [18] 18
-Group CPU scheduler (GROUP_SCHED) [N/y/?] (NEW) enable deprecated sysfs features which may confuse old userspace tools (SYSFS_DEPRECATED_V2) [N/y/?] (NEW) Kernel->user space relay support (formerly relayfs) (RELAY) [Y/?] y
+Group CPU scheduler (GROUP_SCHED) [N/y/?] (NEW) *
+* Control Group support
+*
+Control Group support (CGROUPS) [Y/n/?] y
+  Example debug cgroup subsystem (CGROUP_DEBUG) [N/y/?] n
+ Namespace cgroup subsystem (CGROUP_NS) [N/y/?] (NEW) Freezer cgroup subsystem (CGROUP_FREEZER) [Y/n/?] y
+  Device controller for cgroups (CGROUP_DEVICE) [Y/n/?] y
+  Cpuset support (CPUSETS) [Y/n/?] y
+    Include legacy /proc/<pid>/cpuset file (PROC_PID_CPUSET) [Y/n] y
+  Simple CPU accounting cgroup subsystem (CGROUP_CPUACCT) [Y/n/?] y
+  Resource counters (RESOURCE_COUNTERS) [Y/n/?] y
+ Memory Resource Controller for Control Groups (CGROUP_MEM_RES_CTLR) [Y/n/?] y + Memory Resource Controller Swap Extension(EXPERIMENTAL) (CGROUP_MEM_RES_CTLR_SWAP) [Y/n/?] y +enable deprecated sysfs features which may confuse old userspace tools (SYSFS_DEPRECATED_V2) [N/y/?] (NEW) Kernel->user space relay support (formerly relayfs) (RELAY) [Y/?] y
 Namespaces support (NAMESPACES) [Y/n/?] y
   UTS namespace (UTS_NS) [Y/n/?] y
   IPC namespace (IPC_NS) [Y/n/?] y
@@ -29466,6 +30224,26 @@
   Support initial ramdisks compressed using bzip2 (RD_BZIP2) [Y/n/?] y
   Support initial ramdisks compressed using LZMA (RD_LZMA) [Y/n/?] y
 Optimize for size (CC_OPTIMIZE_FOR_SIZE) [N/y/?] n
+*
+* Configure standard kernel features (for small systems)
+*
+Configure standard kernel features (for small systems) (EMBEDDED) [Y/?] y
+  Sysctl syscall support (SYSCTL_SYSCALL) [Y/n/?] y
+  Load all symbols for debugging/ksymoops (KALLSYMS) [Y/n/?] y
+    Include all symbols in kallsyms (KALLSYMS_ALL) [Y/n/?] y
+ Do an extra kallsyms pass (KALLSYMS_EXTRA_PASS) [N/y/?] (NEW) Support for hot-pluggable devices (HOTPLUG) [Y/n/?] y
+  Enable support for printk (PRINTK) [Y/n/?] y
+  BUG() support (BUG) [Y/n/?] y
+  Enable ELF core dumps (ELF_CORE) [Y/n/?] y
+  Enable PC-Speaker support (PCSPKR_PLATFORM) [Y/n/?] y
+  Enable full-sized data structures for core (BASE_FULL) [Y/n/?] y
+  Enable futex support (FUTEX) [Y/n/?] y
+  Enable eventpoll support (EPOLL) [Y/n/?] y
+  Enable signalfd() system call (SIGNALFD) [Y/n/?] y
+  Enable timerfd() system call (TIMERFD) [Y/n/?] y
+  Enable eventfd() system call (EVENTFD) [Y/n/?] y
+  Use full shmem filesystem (SHMEM) [Y/n/?] y
+  Enable AIO support (AIO) [Y/n/?] y
 Enable VM event counters for /proc/vmstat (VM_EVENT_COUNTERS) [Y/n/?] y
 Enable SLUB debugging support (SLUB_DEBUG) [Y/n/?] y
 Disable heap randomization (COMPAT_BRK) [N/y/?] n
@@ -29505,6 +30283,16 @@
Write ELF core dumps with partial segments (CORE_DUMP_DEFAULT_ELF_HEADERS) [N/y/?] n
 Kernel support for MISC binaries (BINFMT_MISC) [M/n/y/?] m
Kernel support for Linux/MIPS 32-bit binary compatibility (MIPS32_COMPAT) [N/y/?] (NEW) *
+* Power management options
+*
+Power Management support (PM) [Y/n/?] y
+  Power Management Debug Support (PM_DEBUG) [Y/n/?] y
+ Verbose Power Management debugging (PM_VERBOSE) [N/y/?] (NEW) Suspend to RAM and standby (SUSPEND) [Y/n/?] y
+  Test suspend/resume and wakealarm during bootup (PM_TEST_SUSPEND) [Y/n/?] y
+Hibernation (aka 'suspend to disk') (HIBERNATION) [Y/n/?] y
+  Default resume partition (PM_STD_PARTITION) []
+Run-time PM core functionality (PM_RUNTIME) [Y/n/?] y
+*
 * Networking options
 *
 Packet socket (PACKET) [Y/n/m/?] y


_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to