diff options
| author | Miguel <m.i@gmx.at> | 2018-10-10 21:54:10 +0200 |
|---|---|---|
| committer | Miguel <m.i@gmx.at> | 2018-10-10 21:54:10 +0200 |
| commit | e2005fda57ea4da12754d67ba127b09508125395 (patch) | |
| tree | 959aec5c5847bec7c2a404dc9be0fba80b95faf1 /ref/Porting_Newlib.html | |
| parent | e9495844291a85a1f7ba3c76742a0dd1bf574e5f (diff) | |
cross compiling struggles
Diffstat (limited to 'ref/Porting_Newlib.html')
| -rw-r--r-- | ref/Porting_Newlib.html | 694 |
1 files changed, 694 insertions, 0 deletions
diff --git a/ref/Porting_Newlib.html b/ref/Porting_Newlib.html new file mode 100644 index 0000000..0f4fe17 --- /dev/null +++ b/ref/Porting_Newlib.html @@ -0,0 +1,694 @@ +<!DOCTYPE html> +<html lang="en" dir="ltr" class="client-nojs"> +<head> +<title>Porting Newlib - OSDev Wiki</title> +<meta charset="UTF-8" /> +<meta name="generator" content="MediaWiki 1.18.0" /> +<link rel="shortcut icon" href="/favicon.ico" /> +<link rel="search" type="application/opensearchdescription+xml" href="/opensearch_desc.php" title="OSDev Wiki (en)" /> +<link rel="EditURI" type="application/rsd+xml" href="https://wiki.osdev.org/api.php?action=rsd" /> +<link rel="alternate" type="application/atom+xml" title="OSDev Wiki Atom feed" href="/index.php?title=Special:RecentChanges&feed=atom" /> +<link rel="stylesheet" href="/load.php?debug=false&lang=en&modules=mediawiki.legacy.commonPrint%2Cshared%7Cskins.vector&only=styles&skin=vector&*" /> +<meta name="ResourceLoaderDynamicStyles" content="" /> +<link rel="stylesheet" href="/load.php?debug=false&lang=en&modules=site&only=styles&skin=vector&*" /> +<style>a:lang(ar),a:lang(ckb),a:lang(fa),a:lang(kk-arab),a:lang(mzn),a:lang(ps),a:lang(ur){text-decoration:none}a.new,#quickbar a.new{color:#ba0000} + +/* cache key: wikidb:resourceloader:filter:minify-css:4:c88e2bcd56513749bec09a7e29cb3ffa */ +</style> +<script src="/load.php?debug=false&lang=en&modules=startup&only=scripts&skin=vector&*"></script> +<script>if(window.mw){ + mw.config.set({"wgCanonicalNamespace": "", "wgCanonicalSpecialPageName": false, "wgNamespaceNumber": 0, "wgPageName": "Porting_Newlib", "wgTitle": "Porting Newlib", "wgCurRevisionId": 22427, "wgArticleId": 2126, "wgIsArticle": true, "wgAction": "view", "wgUserName": null, "wgUserGroups": ["*"], "wgCategories": ["Level 3 Tutorials", "Tutorials"], "wgBreakFrames": false, "wgRestrictionEdit": [], "wgRestrictionMove": []}); +} +</script><script>if(window.mw){ + mw.loader.load(["mediawiki.page.startup"]); +} +</script> +<style type="text/css">/*<![CDATA[*/ +.source-bash {line-height: normal;} +.source-bash li, .source-bash pre { + line-height: normal; border: 0px none white; +} +/** + * GeSHi Dynamically Generated Stylesheet + * -------------------------------------- + * Dynamically generated stylesheet for bash + * CSS class: source-bash, CSS id: + * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann + * (http://qbnz.com/highlighter/ and http://geshi.org/) + * -------------------------------------- + */ +.bash.source-bash .de1, .bash.source-bash .de2 {font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;} +.bash.source-bash {font-family:monospace;} +.bash.source-bash .imp {font-weight: bold; color: red;} +.bash.source-bash li, .bash.source-bash .li1 {font-weight: normal; vertical-align:top;} +.bash.source-bash .ln {width:1px;text-align:right;margin:0;padding:0 2px;vertical-align:top;} +.bash.source-bash .li2 {font-weight: bold; vertical-align:top;} +.bash.source-bash .kw1 {color: #000000; font-weight: bold;} +.bash.source-bash .kw2 {color: #c20cb9; font-weight: bold;} +.bash.source-bash .kw3 {color: #7a0874; font-weight: bold;} +.bash.source-bash .co0 {color: #666666; font-style: italic;} +.bash.source-bash .co1 {color: #800000;} +.bash.source-bash .co2 {color: #cc0000; font-style: italic;} +.bash.source-bash .co3 {color: #000000; font-weight: bold;} +.bash.source-bash .co4 {color: #666666;} +.bash.source-bash .es1 {color: #000099; font-weight: bold;} +.bash.source-bash .es2 {color: #007800;} +.bash.source-bash .es3 {color: #007800;} +.bash.source-bash .es4 {color: #007800;} +.bash.source-bash .es5 {color: #780078;} +.bash.source-bash .es_h {color: #000099; font-weight: bold;} +.bash.source-bash .br0 {color: #7a0874; font-weight: bold;} +.bash.source-bash .sy0 {color: #000000; font-weight: bold;} +.bash.source-bash .st0 {color: #ff0000;} +.bash.source-bash .st_h {color: #ff0000;} +.bash.source-bash .nu0 {color: #000000;} +.bash.source-bash .re0 {color: #007800;} +.bash.source-bash .re1 {color: #007800;} +.bash.source-bash .re2 {color: #007800;} +.bash.source-bash .re4 {color: #007800;} +.bash.source-bash .re5 {color: #660033;} +.bash.source-bash .ln-xtra, .bash.source-bash li.ln-xtra, .bash.source-bash div.ln-xtra {background-color: #ffc;} +.bash.source-bash span.xtra { display:block; } + +/*]]>*/ +</style> +<style type="text/css">/*<![CDATA[*/ +@import "/index.php?title=MediaWiki:Geshi.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000"; +/*]]>*/ +</style><style type="text/css">/*<![CDATA[*/ +.source-autoconf {line-height: normal;} +.source-autoconf li, .source-autoconf pre { + line-height: normal; border: 0px none white; +} +/** + * GeSHi Dynamically Generated Stylesheet + * -------------------------------------- + * Dynamically generated stylesheet for autoconf + * CSS class: source-autoconf, CSS id: + * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann + * (http://qbnz.com/highlighter/ and http://geshi.org/) + * -------------------------------------- + */ +.autoconf.source-autoconf .de1, .autoconf.source-autoconf .de2 {font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;} +.autoconf.source-autoconf {font-family:monospace;} +.autoconf.source-autoconf .imp {font-weight: bold; color: red;} +.autoconf.source-autoconf li, .autoconf.source-autoconf .li1 {font-weight: normal; vertical-align:top;} +.autoconf.source-autoconf .ln {width:1px;text-align:right;margin:0;padding:0 2px;vertical-align:top;} +.autoconf.source-autoconf .li2 {font-weight: bold; vertical-align:top;} +.autoconf.source-autoconf .kw1 {color: #00ffff;} +.autoconf.source-autoconf .co1 {color: #666666;} +.autoconf.source-autoconf .co2 {color: #339900;} +.autoconf.source-autoconf .co3 {color: #666666;} +.autoconf.source-autoconf .coMULTI {color: #ff0000; font-style: italic;} +.autoconf.source-autoconf .es0 {color: #000099;} +.autoconf.source-autoconf .es1 {color: #000099;} +.autoconf.source-autoconf .es2 {color: #660099;} +.autoconf.source-autoconf .es3 {color: #660099;} +.autoconf.source-autoconf .es4 {color: #660099;} +.autoconf.source-autoconf .es5 {color: #006699;} +.autoconf.source-autoconf .br0 {color: #008000;} +.autoconf.source-autoconf .sy0 {color: #008000;} +.autoconf.source-autoconf .sy1 {color: #000080;} +.autoconf.source-autoconf .sy2 {color: #000040;} +.autoconf.source-autoconf .sy3 {color: #000040;} +.autoconf.source-autoconf .sy4 {color: #008080;} +.autoconf.source-autoconf .st0 {color: #996600;} +.autoconf.source-autoconf .nu0 {color: #0000dd;} +.autoconf.source-autoconf .nu6 {color: #208080;} +.autoconf.source-autoconf .nu8 {color: #208080;} +.autoconf.source-autoconf .nu12 {color: #208080;} +.autoconf.source-autoconf .nu16 {color:#800080;} +.autoconf.source-autoconf .nu17 {color:#800080;} +.autoconf.source-autoconf .nu18 {color:#800080;} +.autoconf.source-autoconf .nu19 {color:#800080;} +.autoconf.source-autoconf .me1 {color: #202020;} +.autoconf.source-autoconf .me2 {color: #202020;} +.autoconf.source-autoconf .ln-xtra, .autoconf.source-autoconf li.ln-xtra, .autoconf.source-autoconf div.ln-xtra {background-color: #ffc;} +.autoconf.source-autoconf span.xtra { display:block; } + +/*]]>*/ +</style> +<style type="text/css">/*<![CDATA[*/ +@import "/index.php?title=MediaWiki:Geshi.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000"; +/*]]>*/ +</style><style type="text/css">/*<![CDATA[*/ +.source-c {line-height: normal;} +.source-c li, .source-c pre { + line-height: normal; border: 0px none white; +} +/** + * GeSHi Dynamically Generated Stylesheet + * -------------------------------------- + * Dynamically generated stylesheet for c + * CSS class: source-c, CSS id: + * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann + * (http://qbnz.com/highlighter/ and http://geshi.org/) + * -------------------------------------- + */ +.c.source-c .de1, .c.source-c .de2 {font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;} +.c.source-c {font-family:monospace;} +.c.source-c .imp {font-weight: bold; color: red;} +.c.source-c li, .c.source-c .li1 {font-weight: normal; vertical-align:top;} +.c.source-c .ln {width:1px;text-align:right;margin:0;padding:0 2px;vertical-align:top;} +.c.source-c .li2 {font-weight: bold; vertical-align:top;} +.c.source-c .kw1 {color: #b1b100;} +.c.source-c .kw2 {color: #000000; font-weight: bold;} +.c.source-c .kw3 {color: #000066;} +.c.source-c .kw4 {color: #993333;} +.c.source-c .co1 {color: #666666; font-style: italic;} +.c.source-c .co2 {color: #339933;} +.c.source-c .coMULTI {color: #808080; font-style: italic;} +.c.source-c .es0 {color: #000099; font-weight: bold;} +.c.source-c .es1 {color: #000099; font-weight: bold;} +.c.source-c .es2 {color: #660099; font-weight: bold;} +.c.source-c .es3 {color: #660099; font-weight: bold;} +.c.source-c .es4 {color: #660099; font-weight: bold;} +.c.source-c .es5 {color: #006699; font-weight: bold;} +.c.source-c .br0 {color: #009900;} +.c.source-c .sy0 {color: #339933;} +.c.source-c .st0 {color: #ff0000;} +.c.source-c .nu0 {color: #0000dd;} +.c.source-c .nu6 {color: #208080;} +.c.source-c .nu8 {color: #208080;} +.c.source-c .nu12 {color: #208080;} +.c.source-c .nu16 {color:#800080;} +.c.source-c .nu17 {color:#800080;} +.c.source-c .nu18 {color:#800080;} +.c.source-c .nu19 {color:#800080;} +.c.source-c .me1 {color: #202020;} +.c.source-c .me2 {color: #202020;} +.c.source-c .ln-xtra, .c.source-c li.ln-xtra, .c.source-c div.ln-xtra {background-color: #ffc;} +.c.source-c span.xtra { display:block; } + +/*]]>*/ +</style> +<style type="text/css">/*<![CDATA[*/ +@import "/index.php?title=MediaWiki:Geshi.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000"; +/*]]>*/ +</style><style type="text/css">/*<![CDATA[*/ +.source-make {line-height: normal;} +.source-make li, .source-make pre { + line-height: normal; border: 0px none white; +} +/** + * GeSHi Dynamically Generated Stylesheet + * -------------------------------------- + * Dynamically generated stylesheet for make + * CSS class: source-make, CSS id: + * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann + * (http://qbnz.com/highlighter/ and http://geshi.org/) + * -------------------------------------- + */ +.make.source-make .de1, .make.source-make .de2 {font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;} +.make.source-make {font-family:monospace;} +.make.source-make .imp {font-weight: bold; color: red;} +.make.source-make li, .make.source-make .li1 {font-weight: normal; vertical-align:top;} +.make.source-make .ln {width:1px;text-align:right;margin:0;padding:0 2px;vertical-align:top;} +.make.source-make .li2 {font-weight: bold; vertical-align:top;} +.make.source-make .kw1 {color: #666622; font-weight: bold;} +.make.source-make .kw2 {color: #990000;} +.make.source-make .co1 {color: #339900; font-style: italic;} +.make.source-make .co2 {color: #000099; font-weight: bold;} +.make.source-make .es0 {color: #000099; font-weight: bold;} +.make.source-make .br0 {color: #004400;} +.make.source-make .sy0 {color: #004400;} +.make.source-make .st0 {color: #CC2200;} +.make.source-make .nu0 {color: #CC2200;} +.make.source-make .re0 {color: #000088; font-weight: bold;} +.make.source-make .re1 {color: #0000CC; font-weight: bold;} +.make.source-make .re2 {color: #000088;} +.make.source-make .ln-xtra, .make.source-make li.ln-xtra, .make.source-make div.ln-xtra {background-color: #ffc;} +.make.source-make span.xtra { display:block; } + +/*]]>*/ +</style> +<style type="text/css">/*<![CDATA[*/ +@import "/index.php?title=MediaWiki:Geshi.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000"; +/*]]>*/ +</style><!--[if lt IE 7]><style type="text/css">body{behavior:url("/skins/vector/csshover.min.htc")}</style><![endif]--></head> +<body class="mediawiki ltr sitedir-ltr ns-0 ns-subject page-Porting_Newlib action-view skin-vector"> + <div id="mw-page-base" class="noprint"></div> + <div id="mw-head-base" class="noprint"></div> + <!-- content --> + <div id="content"> + <a id="top"></a> + <div id="mw-js-message" style="display:none;"></div> + <!-- firstHeading --> + <h1 id="firstHeading" class="firstHeading">Porting Newlib</h1> + <!-- /firstHeading --> + <!-- bodyContent --> + <div id="bodyContent"> + <!-- tagline --> + <div id="siteSub">From OSDev Wiki</div> + <!-- /tagline --> + <!-- subtitle --> + <div id="contentSub"></div> + <!-- /subtitle --> + <!-- jumpto --> + <div id="jump-to-nav"> + Jump to: <a href="#mw-head">navigation</a>, + <a href="#p-search">search</a> + </div> + <!-- /jumpto --> + <!-- bodycontent --> + <div lang="en" dir="ltr" class="mw-content-ltr"><table style="font-size:95%; line-height:1.5em; padding:0.25em; float:right; margin: 0 0 8px 15px; clear:right; border:1px solid #aaaaaa; background:#eee; text-align:center;;"><tr><th>Difficulty level</th></tr><tr><td><a href="/File:Difficulty_3.png" class="image"><img alt="Difficulty 3.png" src="/images/c/c1/Difficulty_3.png" width="46" height="14" /></a><br />Advanced</td></tr></table> +<p>Newlib is a C library intended for use on embedded systems available under a free software license. It is known for being simple to port to new operating systems. Allegedly, it's coding practices are sometimes questionable. This tutorial follows <a href="/OS_Specific_Toolchain" title="OS Specific Toolchain">OS Specific Toolchain</a> and completes it using newlib rather than using another <a href="/C_Library" title="C Library">C Library</a> such as <a href="/Creating_a_C_Library" title="Creating a C Library">your own</a>. +</p><p>Porting newlib is one of the easiest ways to get a simple C library into your operating system without an excessive amount of effort. As an added bonus, once complete you can port the toolchain (GCC/binutils) to your OS - and who wouldn't want to do that? +</p> +<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div> +<ul> +<li class="toclevel-1 tocsection-1"><a href="#Introduction"><span class="tocnumber">1</span> <span class="toctext">Introduction</span></a></li> +<li class="toclevel-1 tocsection-2"><a href="#Preparation"><span class="tocnumber">2</span> <span class="toctext">Preparation</span></a> +<ul> +<li class="toclevel-2 tocsection-3"><a href="#Download_source_code_of_Automake_and_Autoconf"><span class="tocnumber">2.1</span> <span class="toctext">Download source code of Automake and Autoconf</span></a></li> +</ul> +</li> +<li class="toclevel-1 tocsection-4"><a href="#System_Calls"><span class="tocnumber">3</span> <span class="toctext">System Calls</span></a></li> +<li class="toclevel-1 tocsection-5"><a href="#Porting_Newlib"><span class="tocnumber">4</span> <span class="toctext">Porting Newlib</span></a> +<ul> +<li class="toclevel-2 tocsection-6"><a href="#config.sub"><span class="tocnumber">4.1</span> <span class="toctext">config.sub</span></a></li> +<li class="toclevel-2 tocsection-7"><a href="#newlib.2Fconfigure.host"><span class="tocnumber">4.2</span> <span class="toctext">newlib/configure.host</span></a></li> +<li class="toclevel-2 tocsection-8"><a href="#newlib.2Flibc.2Fsys.2Fconfigure.in"><span class="tocnumber">4.3</span> <span class="toctext">newlib/libc/sys/configure.in</span></a></li> +<li class="toclevel-2 tocsection-9"><a href="#newlib.2Flibc.2Fsys.2Fmyos"><span class="tocnumber">4.4</span> <span class="toctext">newlib/libc/sys/myos</span></a></li> +<li class="toclevel-2 tocsection-10"><a href="#newlib.2Flibc.2Fsys.2Fmyos.2Fcrt0.c"><span class="tocnumber">4.5</span> <span class="toctext">newlib/libc/sys/myos/crt0.c</span></a></li> +<li class="toclevel-2 tocsection-11"><a href="#newlib.2Flibc.2Fsys.2Fmyos.2Fsyscalls.c"><span class="tocnumber">4.6</span> <span class="toctext">newlib/libc/sys/myos/syscalls.c</span></a></li> +<li class="toclevel-2 tocsection-12"><a href="#newlib.2Flibc.2Fsys.2Fmyos.2Fconfigure.in"><span class="tocnumber">4.7</span> <span class="toctext">newlib/libc/sys/myos/configure.in</span></a></li> +<li class="toclevel-2 tocsection-13"><a href="#newlib.2Flibc.2Fsys.2Fmyos.2FMakefile.am"><span class="tocnumber">4.8</span> <span class="toctext">newlib/libc/sys/myos/Makefile.am</span></a></li> +<li class="toclevel-2 tocsection-14"><a href="#Signal_handling"><span class="tocnumber">4.9</span> <span class="toctext">Signal handling</span></a></li> +</ul> +</li> +<li class="toclevel-1 tocsection-15"><a href="#Compiling"><span class="tocnumber">5</span> <span class="toctext">Compiling</span></a></li> +<li class="toclevel-1 tocsection-16"><a href="#Conclusion"><span class="tocnumber">6</span> <span class="toctext">Conclusion</span></a></li> +<li class="toclevel-1 tocsection-17"><a href="#See_Also"><span class="tocnumber">7</span> <span class="toctext">See Also</span></a> +<ul> +<li class="toclevel-2 tocsection-18"><a href="#Articles"><span class="tocnumber">7.1</span> <span class="toctext">Articles</span></a></li> +</ul> +</li> +</ul> +</td></tr></table> +<h2> <span class="mw-headline" id="Introduction"> Introduction </span></h2> +<p>I decided that after an incredibly difficult week of trying to get newlib ported to my own OS that I would write a tutorial that outlines the requirements for porting newlib and how to actually do it. I'm assuming you can already load binaries from somewhere and that these binaries are compiled C code. I also assume you have a syscall interface setup already. Why wait? Let's get cracking! +</p> +<h2> <span class="mw-headline" id="Preparation"> Preparation </span></h2> +<p>Download newlib source (I'm using 2.5.0) from <a rel="nofollow" class="external text" href="ftp://sources.redhat.com/pub/newlib/index.html">this ftp server</a>. +</p><p><br /> +</p> +<h3> <span class="mw-headline" id="Download_source_code_of_Automake_and_Autoconf"> Download source code of Automake and Autoconf </span></h3> +<p>Acquire Automake (v1.12) and Autoconf (v2.65) from here: +<a rel="nofollow" class="external autonumber" href="https://ftp.gnu.org/gnu/automake/automake-1.12.tar.gz">[1]</a> +<a rel="nofollow" class="external autonumber" href="https://ftp.gnu.org/gnu/autoconf/autoconf-2.65.tar.gz">[2]</a> +</p><p><br /> +Untar both of the archives: +</p> +<div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="bash source-bash"><pre class="de1"><span class="kw2">tar</span> xvf automake-<span class="nu0">1.12</span>.tar.gz +<span class="kw2">tar</span> xvf autoconf-<span class="nu0">2.65</span>.tar.gz</pre></div></div> +<p>Create a destination folder: +</p> +<div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="bash source-bash"><pre class="de1"><span class="kw2">mkdir</span> ~<span class="sy0">/</span>bin</pre></div></div> +<p>Create a build folder: +</p> +<div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="bash source-bash"><pre class="de1"><span class="kw2">mkdir</span> build +<span class="kw3">cd</span> build</pre></div></div> +<p>Configure automake first: +</p> +<div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="bash source-bash"><pre class="de1">..<span class="sy0">/</span>automake-<span class="nu0">1.12</span><span class="sy0">/</span>configure <span class="re5">--prefix</span>=<span class="st0">"~/bin"</span></pre></div></div> +<p>Make and install +</p> +<div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="bash source-bash"><pre class="de1"><span class="kw2">make</span> <span class="sy0">&&</span> <span class="kw2">make</span> <span class="kw2">install</span></pre></div></div> +<p>Now lets configure autoconf +</p> +<div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="bash source-bash"><pre class="de1">..<span class="sy0">/</span>autoconf-<span class="nu0">2.65</span><span class="sy0">/</span>configure <span class="re5">--prefix</span>=~<span class="sy0">/</span>bin</pre></div></div> +<p>Then make and install: +</p> +<div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="bash source-bash"><pre class="de1"><span class="kw2">make</span> <span class="sy0">&&</span> <span class="kw2">make</span> <span class="kw2">install</span></pre></div></div> +<p>You should now have the proper binaries in ~/bin! +</p><p>To add these binaries to your path temporarily +</p> +<div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="bash source-bash"><pre class="de1"><span class="kw3">export</span> <span class="re2">PATH</span>=~<span class="sy0">/</span>bin:<span class="re1">$PATH</span></pre></div></div> +<h2> <span class="mw-headline" id="System_Calls"> System Calls </span></h2> +<p>First of all you need to support a set of 17 system calls that act as 'glue' between newlib and your OS. These calls are the typical "_exit", "open", "read/write", "execve" (et al). See the <a rel="nofollow" class="external text" href="http://sourceware.org/newlib/libc.html#Syscalls">Red Hat newlib C library</a> documentation. +</p><p>My kernel exposes all the system calls on interrupt 0x80 (128d) so I just had to put a bit of inline assembly into each stub to do what I needed it to do. It's up to you how to implement them in relation to your kernel. +</p> +<h2> <span class="mw-headline" id="Porting_Newlib"> Porting Newlib </span></h2> +<h3> <span class="mw-headline" id="config.sub"> config.sub </span></h3> +<p>Same as for binutils in <a href="/OS_Specific_Toolchain" title="OS Specific Toolchain">OS Specific Toolchain</a>. +</p> +<h3> <span class="mw-headline" id="newlib.2Fconfigure.host"> newlib/configure.host </span></h3> +<p>Tell newlib which system-specific directory to use for our particular target. In the section starting 'Get the source directories to use for the host ... case "${host}" in', add a section: +</p> +<div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="bash source-bash"><pre class="de1">i<span class="br0">[</span><span class="nu0">3</span>-<span class="nu0">7</span><span class="br0">]</span><span class="nu0">86</span>-<span class="sy0">*</span>-myos<span class="sy0">*</span><span class="br0">)</span> + <span class="re2">sys_dir</span>=myos + <span class="sy0">;;</span></pre></div></div> +<h3> <span class="mw-headline" id="newlib.2Flibc.2Fsys.2Fconfigure.in"> newlib/libc/sys/configure.in </span></h3> +<p>Tell the newlib build system that it also needs to configure our myos-specific host directory. In the <tt>case ${sys_dir} in</tt> list, simply add +</p> +<div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="autoconf source-autoconf"><pre class="de1"> myos<span class="br0">)</span> <span class="kw1">AC_CONFIG_SUBDIRS</span><span class="br0">(</span>myos<span class="br0">)</span> <span class="sy0">;;</span></pre></div></div> +<p><b>Note:</b> After this, you need to run <tt>autoconf (precisely version 2.64)</tt> in the libc/sys directory. +</p> +<h3> <span class="mw-headline" id="newlib.2Flibc.2Fsys.2Fmyos"> newlib/libc/sys/myos </span></h3> +<p>This is a directory that we need to create where we put our OS-specific extensions to newlib. We need to create a minimum of 4 files. You can easily add more files to this directory to define your own os-specific library functions, if you want them to be included in libc.a (and so linked in to every application by default). +</p> +<h3> <span class="mw-headline" id="newlib.2Flibc.2Fsys.2Fmyos.2Fcrt0.c"> newlib/libc/sys/myos/crt0.c </span></h3> +<p>This file creates crt0.o, which is included in every application. It should define the symbol _start, and then call the main() function, possibly after setting up process-space segment selectors and pushing argc and argv onto the stack. A simple implementation is: +</p> +<div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="c source-c"><pre class="de1"><span class="co2">#include <fcntl.h></span> +  +<span class="kw2">extern</span> <span class="kw4">void</span> <span class="kw3">exit</span><span class="br0">(</span><span class="kw4">int</span> code<span class="br0">)</span><span class="sy0">;</span> +<span class="kw2">extern</span> <span class="kw4">int</span> main <span class="br0">(</span><span class="br0">)</span><span class="sy0">;</span> +  +<span class="kw4">void</span> _start<span class="br0">(</span><span class="br0">)</span> <span class="br0">{</span> + <span class="kw4">int</span> ex <span class="sy0">=</span> main<span class="br0">(</span><span class="br0">)</span><span class="sy0">;</span> + <span class="kw3">exit</span><span class="br0">(</span>ex<span class="br0">)</span><span class="sy0">;</span> +<span class="br0">}</span></pre></div></div> +<p><b>Note:</b> add in argc and argv support based on how you handle them in your OS +</p> +<h3> <span class="mw-headline" id="newlib.2Flibc.2Fsys.2Fmyos.2Fsyscalls.c"> newlib/libc/sys/myos/syscalls.c </span></h3> +<p>This file should contain the implementations for each glue function newlib requires. +</p> +<div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="c source-c"><pre class="de1"><span class="coMULTI">/* note these headers are all provided by newlib - you don't need to provide them */</span> +<span class="co2">#include <sys/stat.h></span> +<span class="co2">#include <sys/types.h></span> +<span class="co2">#include <sys/fcntl.h></span> +<span class="co2">#include <sys/times.h></span> +<span class="co2">#include <sys/errno.h></span> +<span class="co2">#include <sys/time.h></span> +<span class="co2">#include <stdio.h></span> +  +<span class="kw4">void</span> _exit<span class="br0">(</span><span class="br0">)</span><span class="sy0">;</span> +<span class="kw4">int</span> close<span class="br0">(</span><span class="kw4">int</span> file<span class="br0">)</span><span class="sy0">;</span> +<span class="kw4">char</span> <span class="sy0">**</span>environ<span class="sy0">;</span> <span class="coMULTI">/* pointer to array of char * strings that define the current environment variables */</span> +<span class="kw4">int</span> execve<span class="br0">(</span><span class="kw4">char</span> <span class="sy0">*</span>name<span class="sy0">,</span> <span class="kw4">char</span> <span class="sy0">**</span>argv<span class="sy0">,</span> <span class="kw4">char</span> <span class="sy0">**</span>env<span class="br0">)</span><span class="sy0">;</span> +<span class="kw4">int</span> fork<span class="br0">(</span><span class="br0">)</span><span class="sy0">;</span> +<span class="kw4">int</span> fstat<span class="br0">(</span><span class="kw4">int</span> file<span class="sy0">,</span> <span class="kw4">struct</span> stat <span class="sy0">*</span>st<span class="br0">)</span><span class="sy0">;</span> +<span class="kw4">int</span> getpid<span class="br0">(</span><span class="br0">)</span><span class="sy0">;</span> +<span class="kw4">int</span> isatty<span class="br0">(</span><span class="kw4">int</span> file<span class="br0">)</span><span class="sy0">;</span> +<span class="kw4">int</span> kill<span class="br0">(</span><span class="kw4">int</span> pid<span class="sy0">,</span> <span class="kw4">int</span> sig<span class="br0">)</span><span class="sy0">;</span> +<span class="kw4">int</span> link<span class="br0">(</span><span class="kw4">char</span> <span class="sy0">*</span>old<span class="sy0">,</span> <span class="kw4">char</span> <span class="sy0">*</span>new<span class="br0">)</span><span class="sy0">;</span> +<span class="kw4">int</span> lseek<span class="br0">(</span><span class="kw4">int</span> file<span class="sy0">,</span> <span class="kw4">int</span> ptr<span class="sy0">,</span> <span class="kw4">int</span> dir<span class="br0">)</span><span class="sy0">;</span> +<span class="kw4">int</span> open<span class="br0">(</span><span class="kw4">const</span> <span class="kw4">char</span> <span class="sy0">*</span>name<span class="sy0">,</span> <span class="kw4">int</span> flags<span class="sy0">,</span> ...<span class="br0">)</span><span class="sy0">;</span> +<span class="kw4">int</span> read<span class="br0">(</span><span class="kw4">int</span> file<span class="sy0">,</span> <span class="kw4">char</span> <span class="sy0">*</span>ptr<span class="sy0">,</span> <span class="kw4">int</span> len<span class="br0">)</span><span class="sy0">;</span> +caddr_t sbrk<span class="br0">(</span><span class="kw4">int</span> incr<span class="br0">)</span><span class="sy0">;</span> +<span class="kw4">int</span> stat<span class="br0">(</span><span class="kw4">const</span> <span class="kw4">char</span> <span class="sy0">*</span>file<span class="sy0">,</span> <span class="kw4">struct</span> stat <span class="sy0">*</span>st<span class="br0">)</span><span class="sy0">;</span> +clock_t times<span class="br0">(</span><span class="kw4">struct</span> tms <span class="sy0">*</span>buf<span class="br0">)</span><span class="sy0">;</span> +<span class="kw4">int</span> unlink<span class="br0">(</span><span class="kw4">char</span> <span class="sy0">*</span>name<span class="br0">)</span><span class="sy0">;</span> +<span class="kw4">int</span> wait<span class="br0">(</span><span class="kw4">int</span> <span class="sy0">*</span>status<span class="br0">)</span><span class="sy0">;</span> +<span class="kw4">int</span> write<span class="br0">(</span><span class="kw4">int</span> file<span class="sy0">,</span> <span class="kw4">char</span> <span class="sy0">*</span>ptr<span class="sy0">,</span> <span class="kw4">int</span> len<span class="br0">)</span><span class="sy0">;</span> +<span class="kw4">int</span> gettimeofday<span class="br0">(</span><span class="kw4">struct</span> timeval <span class="sy0">*</span>p<span class="sy0">,</span> <span class="kw4">struct</span> timezone <span class="sy0">*</span>z<span class="br0">)</span><span class="sy0">;</span></pre></div></div> +<p><b>Note</b>: You may split this up into multiple files, just don't forget to link against all of them in Makefile.am. +</p> +<h3> <span class="mw-headline" id="newlib.2Flibc.2Fsys.2Fmyos.2Fconfigure.in"> newlib/libc/sys/myos/configure.in </span></h3> +<p>Configure script for our system directory. +</p> +<div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="bash source-bash"><pre class="de1">AC_PREREQ<span class="br0">(</span><span class="nu0">2.59</span><span class="br0">)</span> +AC_INIT<span class="br0">(</span><span class="br0">[</span>newlib<span class="br0">]</span>, <span class="br0">[</span>NEWLIB_VERSION<span class="br0">]</span><span class="br0">)</span> +AC_CONFIG_SRCDIR<span class="br0">(</span><span class="br0">[</span>crt0.c<span class="br0">]</span><span class="br0">)</span> +AC_CONFIG_AUX_DIR<span class="br0">(</span>..<span class="sy0">/</span>..<span class="sy0">/</span>..<span class="sy0">/</span>..<span class="br0">)</span> +NEWLIB_CONFIGURE<span class="br0">(</span>..<span class="sy0">/</span>..<span class="sy0">/</span>..<span class="br0">)</span> +AC_CONFIG_FILES<span class="br0">(</span><span class="br0">[</span>Makefile<span class="br0">]</span><span class="br0">)</span> +AC_OUTPUT</pre></div></div> +<h3> <span class="mw-headline" id="newlib.2Flibc.2Fsys.2Fmyos.2FMakefile.am"> newlib/libc/sys/myos/Makefile.am </span></h3> +<p>A Makefile template for this directory: +</p> +<div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="make source-make"><pre class="de1">AUTOMAKE_OPTIONS <span class="sy0">=</span> cygnus +INCLUDES <span class="sy0">=</span> <span class="sy0">$</span><span class="br0">(</span><span class="re2">NEWLIB_CFLAGS</span><span class="br0">)</span> <span class="sy0">$</span><span class="br0">(</span><span class="re2">CROSS_CFLAGS</span><span class="br0">)</span> <span class="sy0">$</span><span class="br0">(</span><span class="re2">TARGET_CFLAGS</span><span class="br0">)</span> +AM_CCASFLAGS <span class="sy0">=</span> <span class="sy0">$</span><span class="br0">(</span><span class="re2">INCLUDES</span><span class="br0">)</span> +  +noinst_LIBRARIES <span class="sy0">=</span> lib<span class="sy0">.</span>a +  +if MAY_SUPPLY_SYSCALLS +extra_objs <span class="sy0">=</span> syscalls<span class="sy0">.</span>o <span class="co1"># add more object files here if you split up</span> +<span class="kw1">else</span> <span class="co1"># syscalls.c into multiple files in the previous step</span> +extra_objs <span class="sy0">=</span> +<span class="kw1">endif</span> +  +lib_a_SOURCES <span class="sy0">=</span> +lib_a_LIBADD <span class="sy0">=</span> <span class="sy0">$</span><span class="br0">(</span><span class="re2">extra_objs</span><span class="br0">)</span> +EXTRA_lib_a_SOURCES <span class="sy0">=</span> syscalls<span class="sy0">.</span>c crt0<span class="sy0">.</span>c <span class="co1"># add more source files here if you split up</span> +lib_a_DEPENDENCIES <span class="sy0">=</span> <span class="sy0">$</span><span class="br0">(</span><span class="re2">extra_objs</span><span class="br0">)</span> <span class="co1"># syscalls.c into multiple files</span> +lib_a_CCASFLAGS <span class="sy0">=</span> <span class="sy0">$</span><span class="br0">(</span><span class="re2">AM_CCASFLAGS</span><span class="br0">)</span> +lib_a_CFLAGS <span class="sy0">=</span> <span class="sy0">$</span><span class="br0">(</span><span class="re2">AM_CFLAGS</span><span class="br0">)</span> +  +if MAY_SUPPLY_SYSCALLS +all<span class="sy0">:</span> crt0<span class="sy0">.</span>o +<span class="kw1">endif</span> +  +ACLOCAL_AMFLAGS <span class="sy0">=</span> <span class="sy0">-</span>I <span class="sy0">../../..</span> +CONFIG_STATUS_DEPENDENCIES <span class="sy0">=</span> <span class="sy0">$</span><span class="br0">(</span><span class="re2">newlib_basedir</span><span class="br0">)</span><span class="sy0">/</span>configure<span class="sy0">.</span>host</pre></div></div> +<p><b>Note</b>: After this, you need to run <tt>autoconf</tt> in the newlib/libc/sys/ directory, and <tt>autoreconf</tt> in the newlib/libc/sys/myos directory. +</p> +<h3> <span class="mw-headline" id="Signal_handling"> Signal handling </span></h3> +<p>Newlib has two different mechanisms for dealing with UNIX signals (see the man pages for signal()/raise()). In the first, it provides its own emulation, where it maintains a table of signal handlers in a per-process manner. If you use this method, then you will only be able to respond to signals sent from within the current process. In order to support it, all you need to do is make sure your crt0 calls '_init_signal' before it calls main, which sets up the signal handler table. +</p><p>Alternatively, you can provide your own implementation. To do this, you need to define your own version of signal() in syscalls.c. A typical implementation would register the handler somewhere in kernel space, so that issuing a signal from another process causes the corresponding function to be called in the receiving process (this will also require some nifty stack-playing in the receiving process, as you are basically interrupting the program flow in the middle). You then need to provide a kill() function in syscalls.c which actually sends signals to another process. Newlib will still define a raise() function for you, but it is just a stub which calls kill() with the current process id. To switch newlib to this mode, you need to #define the SIGNAL_PROVIDED macro when compiling. A simple way to do this is to add the line: +</p> +<div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="bash source-bash"><pre class="de1"><span class="re2">newlib_cflags</span>=<span class="st0">"<span class="es3">${newlib_cflags}</span> -DSIGNAL_PROVIDED"</span></pre></div></div> +<p>to your host's entry in <tt>configure.host</tt>. It would probably also make sense to provide sigaction(), and provide signal() as a wrapper for it. Note that <a rel="nofollow" class="external text" href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/sigaction.html">the Open Group's</a> definition of sigaction states that 1) sigaction supersedes signal, and 2) an application designed shouldn't use both to manipulate the same signal. +</p> +<h2> <span class="mw-headline" id="Compiling"> Compiling </span></h2> +<p>You can build newlib in this manner: +Newlib is very pesky about the compiler, and you probably haven't built your own i686-myos-gcc toolchain yet, meaning that configure will not be happy when you set target to i686-myos. So use this hack to get it to work (it worked fine for me). +</p><p><b>Note:</b> there must be a better way then this. +</p> +<div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="bash source-bash"><pre class="de1"><span class="co0"># newlib setup</span> +<span class="re2">CURRDIR</span>=$<span class="br0">(</span><span class="kw3">pwd</span><span class="br0">)</span> +  +<span class="co0"># make symlinks (a bad hack) to make newlib work</span> +<span class="kw3">cd</span> ~<span class="sy0">/</span>cross<span class="sy0">/</span>bin<span class="sy0">/</span> <span class="co0"># this is where the bootstrapped generic cross compiler toolchain (i686-elf-xxx) is installed in,</span> + <span class="co0"># change this based on your development environment.</span> +<span class="kw2">ln</span> i686-elf-ar i686-myos-ar +<span class="kw2">ln</span> i686-elf-as i686-myos-as +<span class="kw2">ln</span> i686-elf-gcc i686-myos-gcc +<span class="kw2">ln</span> i686-elf-gcc i686-myos-cc +<span class="kw2">ln</span> i686-elf-ranlib i686-myos-ranlib +  +<span class="co0"># return</span> +<span class="kw3">cd</span> <span class="re1">$CURRDIR</span></pre></div></div> +<p>Then run the following commands to build newlib +</p> +<div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="bash source-bash"><pre class="de1"><span class="kw2">mkdir</span> build-newlib +<span class="kw3">cd</span> build-newlib +..<span class="sy0">/</span>newlib-x.y.z<span class="sy0">/</span>configure <span class="re5">--prefix</span>=<span class="sy0">/</span>usr <span class="re5">--target</span>=i686-myos +<span class="kw2">make</span> all +<span class="kw2">make</span> <span class="re2">DESTDIR</span>=<span class="co1">${SYSROOT}</span> <span class="kw2">install</span></pre></div></div> +<p><b>Note:</b> SYSROOT is where all your OS-specific toolchains will be installed in. It will look like a miniature version of the Linux filesystem, but have your OS-specific toolchains in; I am using ~/myos as my SYSROOT directory. +</p><p>For some reason, the newer versions of newlib (at least for me) didn't put the libraries in a location where other utilities like binutils could find. +So here's another hack to fix this: +</p> +<div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="bash source-bash"><pre class="de1"><span class="kw2">cp</span> <span class="re5">-ar</span> <span class="re1">$SYSROOT</span><span class="sy0">/</span>usr<span class="sy0">/</span>i386-myos<span class="sy0">/*</span> <span class="re1">$SYSROOT</span><span class="sy0">/</span>usr<span class="sy0">/</span></pre></div></div> +<p>After building all of this, your freshly built libc will be installed in your SYSROOT directory! Now you can progress to building your own <a href="/OS_Specific_Toolchain" title="OS Specific Toolchain">OS Specific Toolchain</a>. +</p><p><b>Important Note:</b> I found that for newlib to properly work, you have to link against libc, libg, libm, and libnosys - hence when porting gcc, in +</p> +<div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="c source-c"><pre class="de1"><span class="co2">#define LIB_SPEC ...</span></pre></div></div> +<p>in gcc/config/myos.h, +</p><p>make sure you put +</p> +<div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="c source-c"><pre class="de1"><span class="co2">#define LIB_SPEC "-lc -lg -lm -lnosys"</span></pre></div></div> +<p>at the bare minimum. +</p><p>I highly recommend rebuilding the library with your <a href="/OS_Specific_Toolchain" title="OS Specific Toolchain">OS Specific Toolchain</a> after you are done porting one. (don't forget to remove the symlinks, too.) +</p> +<h2> <span class="mw-headline" id="Conclusion"> Conclusion </span></h2> +<p>Well, you've done it. You've ported newlib to your OS! With this you can start creating user mode programs with ease! You may now also add in new functions to newlib, such as dlopen(), dlclose(), dlsym(), and dlerror() for dynamic linking support. Your operating system has a bright road ahead! You can now port the toolchain and run binutils and GCC on your own OS. Almost self-hosting, how do you feel? +</p><p>Good luck! +</p><p>Last Updated by <b>0fb1d8</b> for compatibility with newer versions of newlib and the <a href="/OS_Specific_Toolchain" title="OS Specific Toolchain">OS Specific Toolchain</a> tutorial. +</p><p><b>Note:</b> I used a lot of hacks in this article, if you find a better way to do something, please contribute to the page. Thank you. +</p> +<h2> <span class="mw-headline" id="See_Also"> See Also </span></h2> +<h3> <span class="mw-headline" id="Articles"> Articles </span></h3> +<ul><li> <a href="/GCC_Cross-Compiler" title="GCC Cross-Compiler">GCC Cross-Compiler</a> +</li><li> <a href="/OS_Specific_Toolchain" title="OS Specific Toolchain">OS Specific Toolchain</a> +</li></ul> + +<!-- +NewPP limit report +Preprocessor node count: 399/1000000 +Post-expand include size: 372/2097152 bytes +Template argument size: 84/2097152 bytes +Expensive parser function count: 0/100 +--> + +<!-- Saved in parser cache with key wikidb:pcache:idhash:2126-0!*!0!!en!2!* and timestamp 20181010182943 --> +</div> <!-- /bodycontent --> + <!-- printfooter --> + <div class="printfooter"> + Retrieved from "<a href="https://wiki.osdev.org/index.php?title=Porting_Newlib&oldid=22427">https://wiki.osdev.org/index.php?title=Porting_Newlib&oldid=22427</a>" </div> + <!-- /printfooter --> + <!-- catlinks --> + <div id='catlinks' class='catlinks'><div id="mw-normal-catlinks"><a href="/Special:Categories" title="Special:Categories">Categories</a>: <ul><li><a href="/Category:Level_3_Tutorials" title="Category:Level 3 Tutorials">Level 3 Tutorials</a></li><li><a href="/Category:Tutorials" title="Category:Tutorials">Tutorials</a></li></ul></div></div> <!-- /catlinks --> + <div class="visualClear"></div> + <!-- debughtml --> + <!-- /debughtml --> + </div> + <!-- /bodyContent --> + </div> + <!-- /content --> + <!-- header --> + <div id="mw-head" class="noprint"> + +<!-- 0 --> +<div id="p-personal" class=""> + <h5>Personal tools</h5> + <ul> + <li id="pt-login"><a href="/index.php?title=Special:UserLogin&returnto=Porting_Newlib" title="You are encouraged to log in; however, it is not mandatory [o]" accesskey="o">Log in</a></li> + </ul> +</div> + +<!-- /0 --> + <div id="left-navigation"> + +<!-- 0 --> +<div id="p-namespaces" class="vectorTabs"> + <h5>Namespaces</h5> + <ul> + <li id="ca-nstab-main" class="selected"><span><a href="/Porting_Newlib" title="View the content page [c]" accesskey="c">Page</a></span></li> + <li id="ca-talk"><span><a href="/Talk:Porting_Newlib" title="Discussion about the content page [t]" accesskey="t">Discussion</a></span></li> + </ul> +</div> + +<!-- /0 --> + +<!-- 1 --> +<div id="p-variants" class="vectorMenu emptyPortlet"> + <h5><span>Variants</span><a href="#"></a></h5> + <div class="menu"> + <ul> + </ul> + </div> +</div> + +<!-- /1 --> + </div> + <div id="right-navigation"> + +<!-- 0 --> +<div id="p-views" class="vectorTabs"> + <h5>Views</h5> + <ul> + <li id="ca-view" class="selected"><span><a href="/Porting_Newlib" >Read</a></span></li> + <li id="ca-viewsource"><span><a href="/index.php?title=Porting_Newlib&action=edit" title="This page is protected. You can view its source [e]" accesskey="e">View source</a></span></li> + <li id="ca-history" class="collapsible"><span><a href="/index.php?title=Porting_Newlib&action=history" title="Past revisions of this page [h]" accesskey="h">View history</a></span></li> + </ul> +</div> + +<!-- /0 --> + +<!-- 1 --> +<div id="p-cactions" class="vectorMenu emptyPortlet"> + <h5><span>Actions</span><a href="#"></a></h5> + <div class="menu"> + <ul> + </ul> + </div> +</div> + +<!-- /1 --> + +<!-- 2 --> +<div id="p-search"> + <h5><label for="searchInput">Search</label></h5> + <form action="/index.php" id="searchform"> + <input type='hidden' name="title" value="Special:Search"/> + <input type="search" name="search" title="Search OSDev Wiki [f]" accesskey="f" id="searchInput" /> <input type="submit" name="go" value="Go" title="Go to a page with this exact name if exists" id="searchGoButton" class="searchButton" /> <input type="submit" name="fulltext" value="Search" title="Search the pages for this text" id="mw-searchButton" class="searchButton" /> </form> +</div> + +<!-- /2 --> + </div> + </div> + <!-- /header --> + <!-- panel --> + <div id="mw-panel" class="noprint"> + <!-- logo --> + <div id="p-logo"><a style="background-image: url(/skins/common/images/osdev.png);" href="/Main_Page" title="Visit the main page"></a></div> + <!-- /logo --> + +<!-- navigation --> +<div class="portal" id='p-navigation'> + <h5>Navigation</h5> + <div class="body"> + <ul> + <li id="n-mainpage"><a href="/Main_Page" title="Visit the main page [z]" accesskey="z">Main Page</a></li> + <li id="n-portal"><a href="http://forum.osdev.org/" rel="nofollow" title="About the project, what you can do, where to find things">Forums</a></li> + <li id="n-FAQ"><a href="/Category:FAQ">FAQ</a></li> + <li id="n-OS-Projects"><a href="/Projects">OS Projects</a></li> + <li id="n-randompage"><a href="/Special:Random" title="Load a random page [x]" accesskey="x">Random page</a></li> + </ul> + </div> +</div> + +<!-- /navigation --> + +<!-- about --> +<div class="portal" id='p-about'> + <h5>About</h5> + <div class="body"> + <ul> + <li id="n-This-site"><a href="/OSDevWiki:About">This site</a></li> + <li id="n-Joining"><a href="/OSDevWiki:Joining">Joining</a></li> + <li id="n-Editing-help"><a href="/OSDevWiki:Editing">Editing help</a></li> + <li id="n-recentchanges"><a href="/Special:RecentChanges" title="A list of recent changes in the wiki [r]" accesskey="r">Recent changes</a></li> + </ul> + </div> +</div> + +<!-- /about --> + +<!-- SEARCH --> + +<!-- /SEARCH --> + +<!-- TOOLBOX --> +<div class="portal" id='p-tb'> + <h5>Toolbox</h5> + <div class="body"> + <ul> + <li id="t-whatlinkshere"><a href="/Special:WhatLinksHere/Porting_Newlib" title="A list of all wiki pages that link here [j]" accesskey="j">What links here</a></li> + <li id="t-recentchangeslinked"><a href="/Special:RecentChangesLinked/Porting_Newlib" title="Recent changes in pages linked from this page [k]" accesskey="k">Related changes</a></li> + <li id="t-specialpages"><a href="/Special:SpecialPages" title="A list of all special pages [q]" accesskey="q">Special pages</a></li> + <li><a href="/index.php?title=Porting_Newlib&printable=yes" rel="alternate">Printable version</a></li> + <li id="t-permalink"><a href="/index.php?title=Porting_Newlib&oldid=22427" title="Permanent link to this revision of the page">Permanent link</a></li> + </ul> + </div> +</div> + +<!-- /TOOLBOX --> + +<!-- LANGUAGES --> + +<!-- /LANGUAGES --> + </div> + <!-- /panel --> + <!-- footer --> + <div id="footer"> + <ul id="footer-info"> + <li id="footer-info-lastmod"> This page was last modified on 5 June 2018, at 08:43.</li> + <li id="footer-info-viewcount">This page has been accessed 93,161 times.</li> + </ul> + <ul id="footer-places"> + <li id="footer-places-privacy"><a href="/OSDev_Wiki:Privacy_policy" title="OSDev Wiki:Privacy policy">Privacy policy</a></li> + <li id="footer-places-about"><a href="/OSDev_Wiki:About" title="OSDev Wiki:About">About OSDev Wiki</a></li> + <li id="footer-places-disclaimer"><a href="/OSDev_Wiki:General_disclaimer" title="OSDev Wiki:General disclaimer">Disclaimers</a></li> + </ul> + <ul id="footer-icons" class="noprint"> + <li id="footer-poweredbyico"> + <a href="http://www.mediawiki.org/"><img src="/skins/common/images/poweredby_mediawiki_88x31.png" alt="Powered by MediaWiki" width="88" height="31" /></a> + </li> + </ul> + <div style="clear:both"></div> + </div> + <!-- /footer --> + <!-- fixalpha --> + <script type="text/javascript"> if ( window.isMSIE55 ) fixalpha(); </script> + <!-- /fixalpha --> + <script src="/load.php?debug=false&lang=en&modules=skins.vector&only=scripts&skin=vector&*"></script> +<script>if(window.mw){ + mw.loader.load(["mediawiki.user", "mediawiki.util", "mediawiki.page.ready", "mediawiki.legacy.wikibits", "mediawiki.legacy.ajax"]); +} +</script> +<script src="/load.php?debug=false&lang=en&modules=site&only=scripts&skin=vector&*"></script> +<script>if(window.mw){ + mw.user.options.set({"ccmeonemails":0,"cols":80,"date":"default","diffonly":0,"disablemail":0,"disablesuggest":0,"editfont":"default","editondblclick":0,"editsection":1,"editsectiononrightclick":0,"enotifminoredits":0,"enotifrevealaddr":0,"enotifusertalkpages":1,"enotifwatchlistpages":0,"extendwatchlist":0,"externaldiff":0,"externaleditor":0,"fancysig":0,"forceeditsummary":0,"gender":"unknown","hideminor":0,"hidepatrolled":0,"highlightbroken":1,"imagesize":2,"justify":0,"math":1,"minordefault":0,"newpageshidepatrolled":0,"nocache":0,"noconvertlink":0,"norollbackdiff":0,"numberheadings":0,"previewonfirst":0,"previewontop":1,"quickbar":5,"rcdays":7,"rclimit":50,"rememberpassword":0,"rows":25,"searchlimit":20,"showhiddencats":0,"showjumplinks":1,"shownumberswatching":1,"showtoc":1,"showtoolbar":1,"skin":"vector","stubthreshold":0,"thumbsize":2,"underline":2,"uselivepreview":0,"usenewrc":0,"watchcreations":0,"watchdefault":0,"watchdeletion":0,"watchlistdays":3,"watchlisthideanons":0, + "watchlisthidebots":0,"watchlisthideliu":0,"watchlisthideminor":0,"watchlisthideown":0,"watchlisthidepatrolled":0,"watchmoves":0,"wllimit":250,"variant":"en","language":"en","searchNs0":true,"searchNs1":false,"searchNs2":false,"searchNs3":false,"searchNs4":false,"searchNs5":false,"searchNs6":false,"searchNs7":false,"searchNs8":false,"searchNs9":false,"searchNs10":false,"searchNs11":false,"searchNs12":false,"searchNs13":false,"searchNs14":false,"searchNs15":false});;mw.user.tokens.set({"editToken":"+\\","watchToken":false});;mw.loader.state({"user.options":"ready","user.tokens":"ready"}); + + /* cache key: wikidb:resourceloader:filter:minify-js:4:19a4b18a9ac79a6b8c60b24af4668814 */ +} +</script><!-- Served in 0.040 secs. --> + </body> +</html> |
