随笔分类 -  Linux

上一页 1 2 3 4 5 6 ··· 22 下一页
摘要:start_kernel函数的最后一行:rest_init,调用了init程序。看代码就很清楚了。有个地方值得注意的是,优先被调用的是initramfs中的init程序(可以通过rdinit=xxx来设定)。然后才会去检查"init="的设置。如果这两个都没有设置的话,kernel就会挨个去尝试/sbin/init, /bin/init, /bin/sh...这些都没有那就panic了 阅读全文
posted @ 2013-01-30 22:14 super119 阅读(353) 评论(0) 推荐(0) 编辑
摘要:zImage不是标准的gzip文件,需要自己strip掉开头的一些东西才可以gunzip。基本上的思路就是找gzip的magic number "1f 8b 08"。具体步骤:$ mkdir -p /tmp/kernel-uncompressed/; cd /tmp/kernel-uncompressed/$ cp /boot/vmlinuz-`uname -r` .$ od -t x1 -A d vmlinuz-2.6.18-128.el5.uvm6PAE | grep "1f 8b 08"0008320 1b 00 1f 8b 08 00 d5 c2 阅读全文
posted @ 2013-01-30 17:57 super119 阅读(1198) 评论(0) 推荐(0) 编辑
摘要:Gentoo将bash completion单独做成了一个package。而且安装完成之后,可以用:eselect bashcomp list -- 查询所有支持bash completion的模块,比如我们最常用的git, git-prompteselect bashcomp enable <module>所以,非常的方便。一定要安装,否则git就没有bash completion了。看了一下大概的原理,当bash-completion被安装之后,在/etc/profile.d目录下会生成一个文件:bash-completion.sh当一个module被enable了之后(假设不 阅读全文
posted @ 2013-01-22 23:52 super119 阅读(379) 评论(0) 推荐(0) 编辑
摘要:比如说现在的project就是一个git repo,在这个project中我们有一些参考的project的源代码,也是git repo的形式。这样就会有问题,git push的时候,子git repo就没法push到server上(不知道为什么)。所以这样的子git repo就需要去掉.git目录,一般来说,下载该project的release package解开即可。我想这也可能是repo出现的原因吧。如果上述的情况git可以handle,就不需要repo了吧。 阅读全文
posted @ 2013-01-21 22:05 super119 阅读(325) 评论(0) 推荐(0) 编辑
摘要:# Add "--global" if you want this config to be globallygit config alias.cs "commit -s"git config user.name "<your name>"git config user.email "<your mail>"So after that, use "git cs" instead of "git commit". 阅读全文
posted @ 2013-01-21 17:43 super119 阅读(391) 评论(0) 推荐(0) 编辑
摘要:编辑/etc/ssh/sshd_config:X11Forwarding yesX11DisplayOffset 10X11UseLocalhost yes 阅读全文
posted @ 2013-01-20 22:04 super119 阅读(710) 评论(0) 推荐(0) 编辑
摘要:重新编译kernel,就直接make menuconfig, make即可。只是编译完成之后,将.config拷贝到/etc/kernels目录下,这是genkernel用来保存它配置的kernel config文件的地方。将arch/x86_64/boot/bzImage拷贝到/boot下,覆盖相应文件。将System.map拷贝到/boot下,覆盖相应文件。至于initramfs,则直接运行:genkernel initramfs即可 阅读全文
posted @ 2013-01-17 10:46 super119 阅读(1951) 评论(0) 推荐(0) 编辑
摘要:From: Documentation/SubmittingPatches2) #ifdefs are uglyCode cluttered with ifdefs is difficult to read and maintain. Don't doit. Instead, put your ifdefs in a header, and conditionally define'static inline' functions, or macros, which are used in the code.Let the compiler optimize away 阅读全文
posted @ 2013-01-14 16:32 super119 阅读(264) 评论(0) 推荐(0) 编辑
摘要:From: Documentation/email-clients.txtThunderbird (GUI)Thunderbird is an Outlook clone that likes to mangle text, but there are waysto coerce it into behaving.- Allows use of an external editor: The easiest thing to do with Thunderbird and patches is to use an "external editor" extension an 阅读全文
posted @ 2013-01-14 16:13 super119 阅读(225) 评论(0) 推荐(0) 编辑
摘要:gentoo-china-overlay和gentoo-taiwan-overlay目前合并成了gentoo-zh,并且这三个overlay都已经进入了gentoo官方layman数据库。所以:- sudo emerge -avt layman- sudo layman -L 可以查询overlay列表- sudo layman -a gentoo-zh- 编辑/etc/portage/make.conf,添加:source /var/lib/layman/make.conf(需要至少添加了一个overlay之后才会有这个make.conf)事实上,emerge layman之后,就会有一些打 阅读全文
posted @ 2013-01-09 23:24 super119 阅读(2131) 评论(0) 推荐(0) 编辑
摘要:现在使用类似github这样的service,一般来说都会配置ssh key认证。所以使用ssh-agent来管理私钥就变的必要。在Gentoo下是这么配置的:- sudo emerge -avt keychain- 编辑.bashrc,加入keychain <private key 1 path> ... <private key n path>- 编辑.bashrc,在上面一句之后,加入:source $HOME/.keychain/$HOSTNAME-sh 类似ssh-add这样的工具,需要SSH_AUTO_SOCK这样的环境变量去知道ssh-agent的信息,k 阅读全文
posted @ 2013-01-09 22:27 super119 阅读(602) 评论(0) 推荐(0) 编辑
摘要:转自BitBucket的FAQ,写的很好就不修改了。From:https://confluence.atlassian.com/pages/viewpage.action?pageId=271943168Typically, if you are working with multiple accounts and/or multiple machines, you benefit from creating multiple SSH identities. In Mac OSX, GitBash, and Linux you can use the three ssh- commands t 阅读全文
posted @ 2013-01-07 20:06 super119 阅读(3150) 评论(0) 推荐(0) 编辑
摘要:Check here:http://files.cnblogs.com/super119/NetworkInstallLinux-Hacking-initrd.img.doc.zip 阅读全文
posted @ 2013-01-07 10:29 super119 阅读(126) 评论(0) 推荐(0) 编辑
摘要:http://dvdhrm.wordpress.com/2012/09/13/linux-drm-mode-setting-apihttp://dvdhrm.wordpress.com/2012/12/21/advanced-drm-mode-setting-apiTheDirect Rendering Manager(DRM) is a subsystem of the linux kernel that manages access to graphics cards (GPUs). It is the main video API used byX.org‘sxserverand the 阅读全文
posted @ 2013-01-04 16:18 super119 阅读(10118) 评论(2) 推荐(0) 编辑
摘要:比如:repo init -u git://xxx/xxx/manifest.git -b <BRANCH> -m <MANIFEST>这里-m和-b的含义是:1. 注意到manifest.git本身也是一个git project2. 所以,-b指定的是使用#1中这个git project的哪个branch3. -m指定的是,下载该git project中的哪个文件(应该是首先切换了branch,然后再下载该文件)。repo init这样做过了之后,其实本地就建立起来了一个.repo目录,里面核心文件就是manifest.xml,这个xml中就定义了:- 包含哪些git 阅读全文
posted @ 2013-01-02 18:16 super119 阅读(2476) 评论(0) 推荐(0) 编辑
摘要:E.g:repo forall -C "git checkout -b r11 tag-r11"repo help forall有全部解释。 阅读全文
posted @ 2012-12-28 16:05 super119 阅读(1117) 评论(0) 推荐(0) 编辑
摘要:From:http://www.cnblogs.com/zzx1045917067/archive/2012/12/26/2834310.htmlGDB是GNU开源组织发布的一个强大的UNIX下的程序调试工具。它是一种强大的命令行调试工具。一般来说,调试器的功能:能够运行程序,设置所有能影响程序运行的参数;能够让程序在指定条件下停止运行;能够在程序停止时检查所有参数的情况;能够根据指定条件改变程序的运行。gdb调试源代码流程:1)进入GDB #gdb test只需输入GDB和要调试的可执行文件即可,在GDB的启动画面中指出了GDB的版本号、遵循的许可等信息,接下来就进入了由"(gdb 阅读全文
posted @ 2012-12-27 10:18 super119 阅读(170) 评论(0) 推荐(0) 编辑
摘要:Check here:/Files/super119/linuxgraphicsdrivers.pdfWill keep updating if the book updates. 阅读全文
posted @ 2012-12-25 17:14 super119 阅读(199) 评论(0) 推荐(0) 编辑
摘要:加上命令行选项:--kiosk即可。发现另外一个option也可以:--app=<URL>。这个option也是启动全屏,而且会自动打开指定的URL。Quote:http://www.kaoshijuan.net/blog/经过不懈的查找,终于在stackoverflow上找到一个人的帖子,描述了他用一种奇怪的方法来解决这个问题,也就是chrome的kiosk模式和kiosk printing模式。当浏览器启动的时候,在后面加上–kiosk –kiosk-printing的参数,就能进入该模式,在该模式下,除了页面内容之外,其他的诸如地址栏,工具栏按钮神马的,都不见了,并且只能通过 阅读全文
posted @ 2012-12-22 21:01 super119 阅读(14148) 评论(0) 推荐(0) 编辑
摘要:1. 屏蔽grub的信息Gentoo上amd64 grub的版本是0.97-r12,需要修改源码来屏蔽屏幕打印。- 创建本地overlay:/usr/local/portage/xxx-overlay,添加内容:PORTDIR_OVERLAY="/usr/local/portage/xxx-overlay"到/etc/make.conf- 在本地overlay目录下创建:sys-boot-xxx/grub,将grub-0.97-r12.ebuild(来自gentoo官方portage树)和metadata.xml拷贝到这里- 修改ebuild,因为我们要加入自己的patch 阅读全文
posted @ 2012-12-21 22:59 super119 阅读(639) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 ··· 22 下一页