Download Embedded Linux Primer: A Practical, Real-World
Transcript
14.3.7.MagicSysReqKey This useful debugging aid is invoked through a series of special predefined key sequences that send messages directly to the kernel. For many target architectures and boards, you use a simple terminalemulatoronaserialportasasystemconsole.Forthesearchitectures,theMagicSysReqkey isdefinedasabreakcharacterfollowedbyacommandcharacter.Consultthedocumentationonthe terminalemulatoryouuseforhowtosendabreakcharacter.ManyLinuxdevelopersusetheminicom terminalemulator.Forminicom,thebreakcharacterissentbytypingCtl-AF.Aftersendingthebreak inthismanner,youhave5secondstoenterthecommandcharacterbeforethecommandtimesout. Thisusefulkerneltoolcanbeveryhelpfulfordevelopmentanddebugging,butitcanalsocause datalossandsystemcorruption.Indeed,thebcommandimmediatelyrebootsyoursystemwithoutany notificationorpreparation.Openfilesarenotclosed,disksarenotsynced,andfilesystemsarenot unmounted.Whenthereboot(b)commandisissued,controlisimmediatelypassedtotheresetvector ofyourarchitectureinamostabruptandstunningmanner.Usethispowerfultoolatyourownperil! ThisfeatureiswelldocumentedintheLinuxkerneldocumentationsubdirectoryinafilecalled sysrq.txt. There you find the details for many architectures and the description of available commands. For example, another way to set the kernel loglevel just discussed is to use the Magic SysReq key.Thecommandisanumberfrom0through9,whichresultsinthedefaultloglevelbeingsettothe numberofthecommand.Fromminicom,pressCtl-AFfollowedbyanumber,suchas9.Hereishow itlooksontheterminal: $SysRq:ChangingLoglevel Loglevelsetto9 Commandscanbeusedtodumpregisters,shutdownyoursystem,rebootyoursystem,dumpalist of processes, dump current memory information to your console, and more. See the documentation fileinanyrecentLinuxkernelforthedetails. This feature is most commonly used when something causes your system to lock up. Often the MagicSysReqkeyprovidesawaytolearnsomethingfromanotherwisedeadsystem.
Related documents
Embedded.Linux.Primer
TurboDemo - Help File
- Pearsoncmg
bdiGDB User Manual
Installation Manual for SMDK6410 (Windows
UEIPAC 600 Product Manual - United Electronic Industries
AquaFlow User Manual 0303
MPC5200 Quick Start - Freescale Semiconductor
Application Note - Freescale Semiconductor
RO-DRIP® User Manual - TRICKL-EEZ
Manuel d`utilisation de TurboDemo
Linux on the PowerPC 4xx