Development logs

From Moonflare Wiki

Jump to: navigation, search

Comparing dependency graphs on apmake

Each time an exec is done, look at the output of make -d for the last "Must remake target". This gives me the target name of the build step. The indentation describes their graph structure (2 spaces per level).

Can do make -d with MIN_LOGGING to interleave the execs and see the correspondence, hopefully.

 grep -E '(Must remake|TID.*starting)' make_-d_with_execs.txt > make_graph.txt
 grep -E 'Blocked reason' make_-d_with_execs.txt > apmake_graph.txt

After recent changes this is what I'm using:

 make clean && ../../src/apmake-gen /usr/bin/make -f Makefile.bad --debug=v > out.txt && perl detect_race.pl out.txt

Building Linux kernel:

 make mrproper && make defconfig && ../../../src/apmake-gen /usr/bin/make --debug=v > out.txt

After further investigation the Linux kernel does not use a simple recursive Make structure, or a simple one-Makefile structure either. It does e.g. this:

 /usr/bin/make -f scripts/Makefile.build obj=scripts/basic

where scripts/basic is the subdirectory that it wants to build in. The makefile scripts/Makefile.build then uses "include" on the Makefile in that subdirectory.

Driver issues with custom-built kernel

On May 22nd I encountered an issue where my custom-built kernel for apmake broke the mouse, wireless, and video drivers on my Ubuntu partition, both of the custom kernel and the one installed through the package manager. Eliminating the video problem was simple by re-running the NVIDIA installer, but this seems to only work with one kernel version at a time. Rebuilding and reinstalling the custom kernel fixed the mouse problem but not the wifi problem, whereas reinstalling the kernel from the package manager fixed all three on that kernel. I upgraded the custom-built kernel to the newest version but that made no difference. The problem was that when I tried to start up the wifi with "sudo ifconfig wlan0 up" (see here) I received the message:

 SIOCSIFFLAGS: No such file or directory

And in the system log (dmesg) I saw this error:

[ 6.163070] iwlagn 0000:02:00.0: firmware: requesting iwlwifi-6000-3.ucode
[ 6.164698] iwlagn 0000:02:00.0: iwlwifi-6000-3.ucode firmware file req failed: -2
[ 6.164702] iwlagn 0000:02:00.0: firmware: requesting iwlwifi-6000-2.ucode
[ 6.168454] iwlagn 0000:02:00.0: iwlwifi-6000-2.ucode firmware file req failed: -2
[ 6.168460] iwlagn 0000:02:00.0: firmware: requesting iwlwifi-6000-1.ucode
[ 6.172092] iwlagn 0000:02:00.0: iwlwifi-6000-1.ucode firmware file req failed: -2
[ 6.172097] iwlagn 0000:02:00.0: Could not read microcode: -2

To fix wifi on the custom built kernel I ended up having to follow these instructions (as pointed to by this thread), reproduced here:

April 15th, 2010    	   #14
ultiva
Just Give Me the Beans!
 
Join Date: Apr 2010
Beans: 46
	
Re: Ubuntu wireless connection does not work
OK. I found that your module is part of compat-wireless. So you will have to try to compile compat-wireless on your system. This way you'll get newest iwlagn module. Here is how:

1. You have to get compat-wireless snapshot
a. http://wireless.kernel.org/en/users/Download - section "Where to download bleeding edge"

b. if you have problem with compiling this, you may try snapshot from my server (5 April 2010) - this one compiles on my Ubuntu, others doesn't.
http://sonylaptop.deimos.org.pl/comp...ss-2.6.tar.bz2

2. Install package build-essential
3. Unpack driver using command: tar -jxvf compat-wireless-2.6.tar.bz2
4. enter newly created directory and type:
./scripts/driver-select iwlwifi
if no errors then type: make
if no errors then type: sudo make install
just to be certain: sudo depmod -a
5. reboot

Remember that if this works you will have to be careful because upgrading your kernel will blow up wifi and you will have to compile driver again beginning from "make clean".

Ps. I've tried to compile on my Ubuntu driver dated 5 April 2010 using your settings (iwlwifi) and it went OK so You should have no problems.
Personal tools