?? 00000010.htm
字號:
<?xml version="1.0" encoding="gb2312"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"/><title>linux for ppc chapter 10 jacobw </title></head><body><center><h1>BBS 水木清華站∶精華區</h1></center><a name="top"></a>發信人: plato (純真年代), 信區: Embedded <br />標 題: linux for ppc chapter 10 <br />發信站: BBS 水木清華站 (Wed May 30 23:16:14 2001) <br /> <br />Next Previous Contents <br />---------------------------------------------------------------------------- <br />---- <br />10. Kernel <br />10.1 Series <br />You will need to decide whether to use a tried-and-tested stable series kern <br />el, or a development kernel. The choice will depend on your project requirme <br />nts, and how much work you want to do to port and maintain the kernel on you <br />r hardware. For any non-trivial project, you can expect several major kernel <br /> releases during the project's life. Consider the availability of the featur <br />es you need, how leading edge you want to be, and the likely status of each <br />kernel series by the time you're ready to ship. <br />You are probably best off using the stable version, unless you want to activ <br />ely participate in future development of Linux itself, or require features a <br />nd/or board support only present in the development series. <br />Stable <br />Montavista <br />The latest stable kernel from the MontaVista Hard Hat Linux kit is probably <br />your best bet. <br />Also, check for later updates in: <a href="ftp://ftp.mvista.com/pub/CDK/updates/,">ftp://ftp.mvista.com/pub/CDK/updates/,</a> <br />or for the very latest work-in-progress, see: <a href="ftp://ftp.mvista.com/pub/CDK/w">ftp://ftp.mvista.com/pub/CDK/w</a> <br />ip/ppc_8xx/RPMS <br />Denx Software Engineering <br /><a href="ftp://ftp.denx.de/pub/LinuxPPC/usr/src/">ftp://ftp.denx.de/pub/LinuxPPC/usr/src/</a> <br />Development <br />FSMLabs <br /><a href="http://www.fsmlabs.com/linuxppcbk.html.">http://www.fsmlabs.com/linuxppcbk.html.</a> <br />The latest up-to-the-minute development kernel for PowerPC devices can be ac <br />cessed via a number of methods. <br />Official Sources <br /><a href="http://www.kernel.org/">http://www.kernel.org/</a> <br />Work is ongoing to merge the embedded PowerPC changes into the current devel <br />opment tree, but the latest PPC changes take some time to propagate here. <br />10.2 Memory Map <br />The boot loader is responsible for configuring the memory map before jumping <br /> to the Linux kernel. Embedded PowerPC processors provide extreme flexibilit <br />y for address mapping of internal and external devices. You should use this <br />flexibitily to configure the memory map of your board to match the needs of <br />the Linux kernel, rather than modify the Linux kernel MMU handling to match <br />some arbitrary addressing scheme. <br />See: <a href="http://lists.linuxppc.org/listarcs/linuxppc-embedded/200005/msg00157.ht">http://lists.linuxppc.org/listarcs/linuxppc-embedded/200005/msg00157.ht</a> <br />ml also check out Documentation/IO-mapping.txt in the kernel source tree. <br />10.3 Porting <br />Provided that the CPU you are using is already supported in the kernel, most <br /> of the work involved in porting Linux to a new platform actually involves c <br />hanges to the ROM startup code, rather than the kernel itself. The other maj <br />or kernel effort required is in device drivers for new hardware devices. <br />10.4 Patches <br />Once you've got something working, there's an abundance of kernel patches av <br />ailable on the 'net which can help customise the kernel to your application. <br /> Patches are generally issued against a particular kernel version, but can o <br />ften be applied against other versions either automatically or with manual a <br />ssistance. <br />For a number of embedded-system related patches including kernel size optimi <br />sations, see: <a href="http://members.xoom.com/greyhams/linux/patches/">http://members.xoom.com/greyhams/linux/patches/</a> <br />Peter Allworth has some kernel patches at: <a href="http://www.zeta.org.au/~linsol/">http://www.zeta.org.au/~linsol/</a> <br />10.5 Contributing <br />The people who actively contribute to open source development are also the o <br />nes that benefit the most from it, so it makes sense to actively contribute <br />wherever you can. <br />Virtually all the existing embedded Linux code is covered by the GPL, which <br />requires you to redistribute any changes you make. Contributing your work of <br />fers an invaluable opportunity for peer review far beyond what is normally p <br />ossible within a single organisation, and can save countless hours of unnece <br />ssary debugging. <br />10.6 Submitting Patches <br />In general, patches should be submitted in unidiff format to the mailing lis <br />t. Even if you submit them directly to the maintainer, remember to cc: a cop <br />y to the mailing list, to keep everyone else informed of what's going on. If <br /> it's large, put it up for ftp and post a pointer instead. <br />10.7 Coding Style <br />When working on an existing code base, you should always use whatever coding <br /> style is used in the existing code. Consistency here is better than your su <br />bjective notion of correctness. <br />When working on the kernel, follow the guidelines in Documentation/CodingSty <br />le. <br />When working on other GNU software, follow the guidelines at <a href="http://www.gnu.">http://www.gnu.</a> <br />org/prep/standards_toc.html. <br />And remember, you don't have to like the guidelines, you just have to follow <br /> them. <br />---------------------------------------------------------------------------- <br />---- <br />Next Previous Contents <br /> <br />-- <br /> <br />※ 來源:·BBS 水木清華站 smth.org·[FROM: 166.111.161.8] <br /><a href="00000009.htm">上一篇</a><a href="javascript:history.go(-1)">返回上一頁</a><a href="index.htm">回到目錄</a><a href="#top">回到頁首</a><a href="00000011.htm">下一篇</a></h1></center><center><h1>BBS 水木清華站∶精華區</h1></center></body></html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -