修正内核无法编译 Nvidia 闭源驱动的 Bug
这个 Bug 其实是我将内核从 2.6.31 升级到 2.6.35 时由 spec 文档带进来的原因是 2.6.35 及以后的内核在编译安装最后的 %install 段时你会发现根本不存在 $asmdir
当时我直接将不存在的 蓝字 那一段注释掉,编译就正常结束了,但是这里面可能就会出现一些差异,到现在我还没找到导致编译驱动不正常的直接差异,对比 Fedora 的 SPEC 文档,发现他们在处理这里的做法是不同的,采用后 Bug 解除。
我把修正的代码也放上来,并把新的配置和 spec 档上传,新的 config 配置希望有能力的朋友进行修正不足。
alsa-driver 编译仍然无法进行,目前 alsa-driver 一直没有更新,可以安装使用内核编译出的 alsa 声卡驱动。
这么一个小错误导致反复编译了数十次内核实在是不值得。。。 :oops:
if [ -d arch/%{_arch}/include ]; then
cp -a --parents arch/%{_arch}/include $RPM_BUILD_ROOT/lib/modules/%_realver/build/
fi
mkdir -p $RPM_BUILD_ROOT/lib/modules/%_realver/build/include
cd include
cp -a acpi config crypto keys linux math-emu media mtd net pcmcia rdma rxrpc scsi sound trace video drm asm-generic $RPM_BUILD_ROOT/lib/modules/%_realver/build/include
#asmdir=$(readlink asm)
#cp -a $asmdir $RPM_BUILD_ROOT/lib/modules/%_realver/build/include/
#pushd $RPM_BUILD_ROOT/lib/modules/%_realver/build/include
#ln -s $asmdir asm
#popd
# Make sure the Makefile and version.h have a matching timestamp so that
# external modules can be built
touch -r $RPM_BUILD_ROOT/lib/modules/%_realver/build/Makefile $RPM_BUILD_ROOT/lib/modules/%_realver/build/include/linux/version.h
touch -r $RPM_BUILD_ROOT/lib/modules/%_realver/build/.config $RPM_BUILD_ROOT/lib/modules/%_realver/build/include/linux/autoconf.h
# Copy .config to include/config/auto.conf so "make prepare" is unnecessary.
cp $RPM_BUILD_ROOT/lib/modules/%_realver/build/.config $RPM_BUILD_ROOT/lib/modules/%_realver/build/include/config/auto.conf
cd .. if [ -d arch/%{_arch}/include ]; then
cp -a --parents arch/%{_arch}/include $RPM_BUILD_ROOT/lib/modules/%_realver/build/
fi
cp -a include $RPM_BUILD_ROOT/lib/modules/%_realver/build/
#asmdir=$(readlink asm)
#cp -a $asmdir $RPM_BUILD_ROOT/lib/modules/%_realver/build/include/
#pushd $RPM_BUILD_ROOT/lib/modules/%_realver/build/include
#ln -s $asmdir asm
#popd
# Make sure the Makefile and version.h have a matching timestamp so that
# external modules can be built
[ 本帖最后由 haulm 于 2010-12-18 12:37 编辑 ] 默认开启 squashfs 的 lzo 解压,lzma 暂时还不支持 mount 解压,因为 lzma 被定位成非主流,内核开启支持必需打补丁。
Compressors available:
gzip (default)
lzma
lzo
# mksquashfs v8.log lzop.fs -comp lzo
Parallel mksquashfs: Using 2 processors
Creating 4.0 filesystem on lzop.fs, block size 131072.
Exportable Squashfs 4.0 filesystem, lzo compressed, data block size 131072
compressed data, compressed metadata, compressed fragments, compressed xattrs
duplicates are removed
Filesystem size 0.19 Kbytes (0.00 Mbytes)
88.05% of uncompressed filesystem size (0.22 Kbytes)
Inode table size 48 bytes (0.05 Kbytes)
72.73% of uncompressed inode table size (66 bytes)
Directory table size 22 bytes (0.02 Kbytes)
78.57% of uncompressed directory table size (28 bytes)
Number of duplicate files found 1
Number of inodes 2
Number of files 1
Number of fragments 0
Number of symbolic links0
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 1
Number of ids (unique uids + gids) 1
Number of uids 1
root (0)
Number of gids 1
root (0)
# mkdir a
# mount -o loop lzop.fs a
# ls a
v8.log 尝试编译 squashfs 的 lzma 支持和 aufs2 支持,提交两个网上搜集的
可用于 2.6.36 内核的补丁
页:
[1]