⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 00000021.htm

📁 水木社区 embeded 版精华区 下载
💻 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 20               jacobw </title></head><body><center><h1>BBS 水木清华站∶精华区</h1></center><a name="top"></a>发信人:&nbsp;plato&nbsp;(纯真年代),&nbsp;信区:&nbsp;Embedded&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />标&nbsp;&nbsp;题:&nbsp;linux&nbsp;for&nbsp;ppc&nbsp;chapter&nbsp;20&nbsp;<br />发信站:&nbsp;BBS&nbsp;水木清华站&nbsp;(Wed&nbsp;May&nbsp;30&nbsp;23:24:22&nbsp;2001)&nbsp;<br />&nbsp;<br />Next&nbsp;Previous&nbsp;Contents&nbsp;<br />----------------------------------------------------------------------------&nbsp;<br />----&nbsp;<br />20.&nbsp;Common&nbsp;Mistakes&nbsp;and&nbsp;Problems&nbsp;<br />Many&nbsp;new&nbsp;developers&nbsp;are&nbsp;likely&nbsp;to&nbsp;encounter&nbsp;at&nbsp;least&nbsp;half&nbsp;of&nbsp;the&nbsp;following&nbsp;c&nbsp;<br />ommon&nbsp;problems,&nbsp;which&nbsp;are&nbsp;raised&nbsp;often&nbsp;on&nbsp;the&nbsp;mailing&nbsp;list.&nbsp;Keep&nbsp;this&nbsp;sectio&nbsp;<br />n&nbsp;in&nbsp;mind&nbsp;to&nbsp;refer&nbsp;to&nbsp;when&nbsp;you&nbsp;spot&nbsp;the&nbsp;symptom.&nbsp;<br />20.1&nbsp;Changing&nbsp;KERNELBASE/KERNELLOAD&nbsp;<br />You&nbsp;don't&nbsp;ever&nbsp;want&nbsp;to&nbsp;change&nbsp;KERNELLOAD&nbsp;or&nbsp;KERNELBASE,&nbsp;otherwise&nbsp;the&nbsp;virtua&nbsp;<br />l&nbsp;memory&nbsp;and&nbsp;MMU&nbsp;code&nbsp;will&nbsp;all&nbsp;break.&nbsp;Search&nbsp;for&nbsp;KERNELBASE.&nbsp;<br />20.2&nbsp;Leaving&nbsp;the&nbsp;Watchdog&nbsp;enabled&nbsp;<br />The&nbsp;watchdog&nbsp;is&nbsp;enabled&nbsp;by&nbsp;default,&nbsp;and&nbsp;needs&nbsp;to&nbsp;be&nbsp;disabled&nbsp;at&nbsp;reset&nbsp;for&nbsp;an&nbsp;<br />ything&nbsp;including&nbsp;BDM&nbsp;to&nbsp;work.&nbsp;<br />20.3&nbsp;Mixing&nbsp;code&nbsp;compiled&nbsp;for&nbsp;software&nbsp;and&nbsp;hardware&nbsp;floating&nbsp;point&nbsp;<br />The&nbsp;usual&nbsp;non-obvious&nbsp;cause&nbsp;of&nbsp;this&nbsp;is&nbsp;combining&nbsp;executables&nbsp;compiled&nbsp;with&nbsp;-&nbsp;<br />fsoft-float&nbsp;and&nbsp;shared&nbsp;libraries&nbsp;compiled&nbsp;with&nbsp;-fhard-float,&nbsp;or&nbsp;vice-versa.&nbsp;&nbsp;<br />See&nbsp;floating&nbsp;point.&nbsp;<br />20.4&nbsp;Using&nbsp;an&nbsp;unmodified&nbsp;glibc&nbsp;<br />In&nbsp;particular,&nbsp;remember&nbsp;to&nbsp;remove&nbsp;(or&nbsp;correct&nbsp;the&nbsp;cache&nbsp;line&nbsp;assumptions&nbsp;in)&nbsp;<br />&nbsp;sysdeps/powerpc/memset.S&nbsp;before&nbsp;building&nbsp;glibc-2.1.3.&nbsp;<br />20.5&nbsp;&quot;Kernel&nbsp;Mode&nbsp;Software&nbsp;FPU&nbsp;Emulation&quot;&nbsp;panic&nbsp;<br />This&nbsp;has&nbsp;little&nbsp;to&nbsp;do&nbsp;with&nbsp;floating&nbsp;point.&nbsp;Nearly&nbsp;all&nbsp;instructions&nbsp;the&nbsp;proce&nbsp;<br />ssor&nbsp;can't&nbsp;decode&nbsp;are&nbsp;vectored&nbsp;to&nbsp;this&nbsp;function.&nbsp;It&nbsp;assumes&nbsp;the&nbsp;primary&nbsp;reas&nbsp;<br />on&nbsp;you&nbsp;are&nbsp;here&nbsp;is&nbsp;to&nbsp;emulate&nbsp;floating&nbsp;point&nbsp;instructions.&nbsp;If&nbsp;the&nbsp;function&nbsp;c&nbsp;<br />an't&nbsp;decode&nbsp;the&nbsp;instruction&nbsp;as&nbsp;a&nbsp;floating&nbsp;point&nbsp;operation,&nbsp;it&nbsp;is&nbsp;really&nbsp;some&nbsp;<br />thing&nbsp;the&nbsp;processor&nbsp;can't&nbsp;execute,&nbsp;so&nbsp;the&nbsp;panic&nbsp;message&nbsp;spews&nbsp;forth.&nbsp;<br />This&nbsp;can&nbsp;be&nbsp;either&nbsp;a&nbsp;software&nbsp;or&nbsp;hardware&nbsp;bug.&nbsp;If&nbsp;it&nbsp;is&nbsp;a&nbsp;software&nbsp;bug,&nbsp;just&nbsp;<br />&nbsp;unravel&nbsp;the&nbsp;stack&nbsp;backtrace&nbsp;and&nbsp;debug&nbsp;it.&nbsp;It&nbsp;could&nbsp;be&nbsp;a&nbsp;trashed&nbsp;stack&nbsp;frame&nbsp;<br />,&nbsp;resulting&nbsp;in&nbsp;a&nbsp;bad&nbsp;function&nbsp;return&nbsp;address,&nbsp;or&nbsp;some&nbsp;indirect&nbsp;function&nbsp;call&nbsp;<br />&nbsp;that&nbsp;was&nbsp;not&nbsp;properly&nbsp;computed.&nbsp;<br />It&nbsp;could&nbsp;also&nbsp;happen&nbsp;because&nbsp;of&nbsp;a&nbsp;hardware&nbsp;bug&nbsp;while&nbsp;fetching&nbsp;instructions&nbsp;f&nbsp;<br />rom&nbsp;memory.&nbsp;Verify&nbsp;the&nbsp;NIP&nbsp;instruction&nbsp;that&nbsp;it&nbsp;tried&nbsp;to&nbsp;decode&nbsp;is&nbsp;what&nbsp;is&nbsp;re&nbsp;<br />ally&nbsp;supposed&nbsp;to&nbsp;be&nbsp;at&nbsp;that&nbsp;location&nbsp;in&nbsp;memory.&nbsp;This&nbsp;is&nbsp;a&nbsp;typical&nbsp;failure&nbsp;wh&nbsp;<br />en&nbsp;the&nbsp;UPM&nbsp;is&nbsp;not&nbsp;programmed&nbsp;correctly.&nbsp;On&nbsp;a&nbsp;custom&nbsp;board&nbsp;in&nbsp;particular,&nbsp;ver&nbsp;<br />ify&nbsp;all&nbsp;memory&nbsp;cycles&nbsp;an&nbsp;a&nbsp;logic&nbsp;analyser.&nbsp;Disable&nbsp;the&nbsp;cache&nbsp;and&nbsp;try&nbsp;again,&nbsp;&nbsp;<br />you&nbsp;will&nbsp;probably&nbsp;get&nbsp;a&nbsp;different&nbsp;result.&nbsp;<br />20.6&nbsp;NFS&nbsp;gives&nbsp;&quot;neighbour&nbsp;table&nbsp;overflow&quot;&nbsp;<br />This&nbsp;message&nbsp;is&nbsp;the&nbsp;result&nbsp;of&nbsp;some&nbsp;changes&nbsp;to&nbsp;the&nbsp;IP&nbsp;stack&nbsp;software&nbsp;in&nbsp;Linux&nbsp;<br />&nbsp;version&nbsp;2.2.x&nbsp;+.&nbsp;This&nbsp;simply&nbsp;means&nbsp;that&nbsp;you&nbsp;are&nbsp;unable&nbsp;to&nbsp;connect&nbsp;to&nbsp;your&nbsp;N&nbsp;<br />FS&nbsp;server.&nbsp;It&nbsp;may&nbsp;be&nbsp;related&nbsp;to&nbsp;the&nbsp;driver,&nbsp;but&nbsp;it&nbsp;may&nbsp;also&nbsp;be&nbsp;related&nbsp;to&nbsp;ot&nbsp;<br />her&nbsp;issues,&nbsp;such&nbsp;as&nbsp;NFS&nbsp;server&nbsp;not&nbsp;running&nbsp;or&nbsp;incorrectly&nbsp;installed,&nbsp;no&nbsp;phys&nbsp;<br />ical&nbsp;connectivity&nbsp;to&nbsp;NFS&nbsp;server,&nbsp;etc.&nbsp;Check&nbsp;the&nbsp;configuration&nbsp;of&nbsp;your&nbsp;NFS&nbsp;se&nbsp;<br />rver&nbsp;and&nbsp;IP&nbsp;network&nbsp;before&nbsp;diving&nbsp;into&nbsp;the&nbsp;driver.&nbsp;<br />20.7&nbsp;&quot;Kernel&nbsp;panic:&nbsp;No&nbsp;init&nbsp;found...&quot;&nbsp;on&nbsp;startup&nbsp;<br />Either&nbsp;you&nbsp;don't&nbsp;have&nbsp;an&nbsp;init&nbsp;program&nbsp;of&nbsp;some&nbsp;type&nbsp;(even&nbsp;/bin/sh)&nbsp;in&nbsp;your&nbsp;ro&nbsp;<br />ot&nbsp;filesystem,&nbsp;or&nbsp;you&nbsp;don't&nbsp;have&nbsp;enough&nbsp;shared&nbsp;libraries&nbsp;and&nbsp;the&nbsp;program&nbsp;can&nbsp;<br />'t&nbsp;be&nbsp;loaded&nbsp;properly,&nbsp;although&nbsp;you&nbsp;often&nbsp;get&nbsp;messages&nbsp;about&nbsp;not&nbsp;able&nbsp;to&nbsp;loa&nbsp;<br />d&nbsp;some&nbsp;.so.&nbsp;Usually&nbsp;the&nbsp;problem&nbsp;is&nbsp;missing&nbsp;or&nbsp;misplaced&nbsp;shared&nbsp;libraries.&nbsp;<br />To&nbsp;start&nbsp;up&nbsp;/bin/sh,&nbsp;which&nbsp;is&nbsp;a&nbsp;good&nbsp;thing&nbsp;to&nbsp;try&nbsp;initially,&nbsp;you&nbsp;need&nbsp;the&nbsp;en&nbsp;<br />tire&nbsp;set&nbsp;of&nbsp;glibc&nbsp;shared&nbsp;libraries&nbsp;and&nbsp;libtermcap.so.&nbsp;If&nbsp;you're&nbsp;using&nbsp;the&nbsp;Mo&nbsp;<br />ntaVista&nbsp;CDK,&nbsp;you&nbsp;get&nbsp;these&nbsp;from&nbsp;the&nbsp;glibc&nbsp;and&nbsp;termcap&nbsp;RPMs,&nbsp;and&nbsp;remember&nbsp;yo&nbsp;<br />u&nbsp;also&nbsp;need&nbsp;that&nbsp;funky&nbsp;sym&nbsp;link:&nbsp;/opt/hardhat/devkit/ppc/8xx/powerpc-hardhat&nbsp;<br />-linux&nbsp;-&gt;&nbsp;/&nbsp;in&nbsp;the&nbsp;target&nbsp;filesystem.&nbsp;<br />You&nbsp;can&nbsp;find&nbsp;out&nbsp;which&nbsp;shared&nbsp;libraries&nbsp;any&nbsp;binary&nbsp;requires&nbsp;using&nbsp;ldd(1),&nbsp;bu&nbsp;<br />t&nbsp;it&nbsp;only&nbsp;runs&nbsp;on&nbsp;the&nbsp;target&nbsp;and&nbsp;isn't&nbsp;much&nbsp;use&nbsp;if&nbsp;you're&nbsp;cross&nbsp;developing&nbsp;a&nbsp;<br />nd&nbsp;can't&nbsp;even&nbsp;start&nbsp;a&nbsp;shell&nbsp;yet.&nbsp;A&nbsp;shell&nbsp;script&nbsp;which&nbsp;runs&nbsp;on&nbsp;the&nbsp;host&nbsp;and&nbsp;d&nbsp;<br />oes&nbsp;much&nbsp;the&nbsp;same&nbsp;thing&nbsp;is&nbsp;available&nbsp;at:&nbsp;<a href="http://lists.linuxppc.org/listarcs/">http://lists.linuxppc.org/listarcs/</a>&nbsp;<br />linuxppc-embedded/200102/msg00011.html.&nbsp;<br />----------------------------------------------------------------------------&nbsp;<br />----&nbsp;<br />Next&nbsp;Previous&nbsp;Contents&nbsp;&nbsp;<br />&nbsp;<br />--&nbsp;<br />&nbsp;<br />※&nbsp;来源:·BBS&nbsp;水木清华站&nbsp;smth.org·[FROM:&nbsp;166.111.161.8]&nbsp;<br /><a href="00000020.htm">上一篇</a><a href="javascript:history.go(-1)">返回上一页</a><a href="index.htm">回到目录</a><a href="#top">回到页首</a><a href="00000022.htm">下一篇</a></h1></center><center><h1>BBS 水木清华站∶精华区</h1></center></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -