个人工具
登录
查看“UbuntuHelp:RocketRaid”的源代码 - Ubuntu中文
UbuntuHelp
讨论
查看源代码
历史
搜索
导航
首页
最近更改
随机页面
页面分类
帮助
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息
查看“UbuntuHelp:RocketRaid”的源代码
来自Ubuntu中文
←
UbuntuHelp:RocketRaid
跳转至:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{From|https://help.ubuntu.com/community/RocketRaid}} {{Languages|UbuntuHelp:RocketRaid}} == Highpoint RocketRaid Driver Mini-HowTo == === Notice === This is wiki page is in its infancy. Please feel free to modify or offer suggestions if possible. Currently a lot of this was done from memory and notes, and should therefore be tested again. === Purpose === This mini-howto is intended to help others avoid the frustration I went through when updating kernels and having my root partition on a RocketRaid mirrored drive. While not complete, this mini-howto should get most users the ability to have the driver automatically compile and install on a kernel update. === Prerequisites === Ubuntu 9.04 / 9.10 RocketRaid 26xx RAID Card Kernel Tools and Headers DKMS Internet Access Root/sudo Permission === Setup === First, install the build tools: <pre><nowiki> sudo apt-get install build-essential </nowiki></pre> "Note: Need to make sure kernel headers are installed" Download the driver source from Highpoint: "I recommend verifying this link is the most recent before downloading" <pre><nowiki> lwp-download http://www.support-highpoint-tech.com/Main/rr26xx/264x/Linux/opensrc/rr2640-linux-src-v1.2-090925-0932.tar.gz </nowiki></pre> Extract the tar: <pre><nowiki> tar zxvf rr2640-linux-src-v1.2-090925-0932.tar.gz </nowiki></pre> <pre><nowiki> cd rr2640-linux-src-v1.2 </nowiki></pre> Make sure DKMS is installed: <pre><nowiki> sudo aptitude install dkms </nowiki></pre> Create the DKMS configuration file: <pre><nowiki> cat >dkms.conf </nowiki></pre> Cut and Paste the following text: <pre><nowiki> BUILT_MODULE_NAME=rr26xx DEST_MODULE_LOCATION=/kernel/drivers/scsi PACKAGE_NAME=rr26xx PACKAGE_VERSION=1.2 AUTOINSTALL=yes POST_BUILD="do_Module.symvers rr26xx save $dkms_tree/$module/$module_version/build/Module.symvers" </nowiki></pre> Hit "Control-D" (as in Dog) to close the file. Copy the Makefile and Config files up to the top directory: <pre><nowiki> cp product/rr2640/linux/* . mv Makefile Makefile_orig </nowiki></pre> Modify the HPT_ROOT in the Makefile: <pre><nowiki> sed 's/HPT_ROOT := ..\/..\/../HPT_ROOT := \/var\/lib\/dkms\/rr26xx\/1.2\/build/' Makefile_orig >Makefile </nowiki></pre> Move the source into /usr/src for DKMS: <pre><nowiki> cd .. mv rr2640-linux-src-v1.2 /usr/src/rr26xx-1.2 </nowiki></pre> "Todo: Should probably verify permissions here..." "Note: For some reason dkms will not copy object files (.o) when doing builds, so we need to fool it below." Trick dkms into looking in the /usr/src directory for the precompiled RocketRaid object code: <pre><nowiki> mv /usr/src/rr26xx-1.2/lib /usr/src/rr26xx-1.2/real_lib ln -s /usr/src/rr26xx-1.2/real_lib /usr/src/rr26xx-1.2/lib </nowiki></pre> "Note: Above symbolic link must be complete (absolute) path!" Add the source to DKMS: <pre><nowiki> sudo dkms add -m rr26xx -v 1.2 </nowiki></pre> Build the module: <pre><nowiki> sudo dkms build -k 2.6.31-14-generic -m rr26xx -v 1.2 </nowiki></pre> This should hopefully compile correctly. If not send an email to "rocketraid at mark.org" with the output from the file "/var/lib/dkms/rr26xx/1.2/build/make.log" Next install the module: <pre><nowiki> sudo dkms install -k 2.6.31-14-generic -m rr26xx -v 1.2 </nowiki></pre> Finally, create the boot image: <pre><nowiki> sudo mkinitramfs -o /boot/initrd.img-2.6.31-14-generic 2.6.31-14-generic </nowiki></pre> This should install it into the named kernel listed above (2.6.31-14 in this example). It will also use DKMS to compile the module for future kernel update automatically. Please see note below. === Running mkinitramfs === The directions above seem to automatically recompile and install the module whenever a new kernel update comes out (at least for 9.04 and 9.10). However, so far it does not automatically add it to the boot image. If after a kernel upgrade you reboot and it can't find the rr26xx module, then reboot in an old working kernel and run this: <pre><nowiki> sudo mkinitramfs -o /boot/initrd.img-2.6.31-14-generic 2.6.31-14-generic </nowiki></pre> Obviously, replace "2.6.31-14-generic" with the kernel that was just updated. I'm looking for a way to do this post DKMS (maybe POST_BUILD???). If anyone has any suggestions, please let me know! I'm currently experimenting with adding the file /etc/kernel/postinst.d/rr26xx with the following contents: vi /etc/kernel/postinst.d/rr26xx <pre><nowiki> #!/bin/bash # We're passed the version of the kernel being installed inst_kern=$1 echo "Trying mkinitramfs -o /boot/initrd.img-${inst_kern} ${inst_kern}..." mkinitramfs -o /boot/initrd.img-$inst_kern $inst_kern exit 0 </nowiki></pre> in theory this should work, but I haven't tested it yet (will with next kernel upgrade) [[category:UbuntuHelp]]
该页面使用的模板:
模板:From
(
查看源代码
)
模板:Languages
(
查看源代码
)(受保护)
模板:Languages/Lang
(
查看源代码
)(受保护)
返回至
UbuntuHelp:RocketRaid
。