<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Faster boot: starting Linux directly from AT91bootstrap - Free Electrons blog</title>
	<atom:link href="http://free-electrons.com/blog/at91bootstrap-linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://free-electrons.com/blog/at91bootstrap-linux/</link>
	<description>Embedded Linux Experts</description>
	<lastBuildDate>Mon, 21 May 2012 15:12:23 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>Faster boot: starting Linux directly from AT91bootstrap - Free Electrons blog</title>
		<link>http://free-electrons.com/blog/at91bootstrap-linux/comment-page-1/#comment-34584</link>
		<dc:creator>Jalal</dc:creator>
		<pubDate>Sat, 12 May 2012 10:28:32 +0000</pubDate>
		<guid isPermaLink="false">http://free-electrons.com/?p=1607#comment-34584</guid>
		<description>Hi,
I am trying to implement this for at91sam9g45, when the process switch to Linux kernel, I can see kernel decompressing done correctly through the self decompression image, then when the process is going to switch to the Linux kernel, it is halted and Linux kernel is not coming up, even I can not see the kernel booting process.
Is there any Idea ? 
Regards,
-Jalal</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I am trying to implement this for at91sam9g45, when the process switch to Linux kernel, I can see kernel decompressing done correctly through the self decompression image, then when the process is going to switch to the Linux kernel, it is halted and Linux kernel is not coming up, even I can not see the kernel booting process.<br />
Is there any Idea ?<br />
Regards,<br />
-Jalal</p>
]]></content:encoded>
	</item>
	<item>
		<title>Faster boot: starting Linux directly from AT91bootstrap - Free Electrons blog</title>
		<link>http://free-electrons.com/blog/at91bootstrap-linux/comment-page-1/#comment-34365</link>
		<dc:creator>Michael Opdenacker</dc:creator>
		<pubDate>Thu, 08 Mar 2012 05:18:45 +0000</pubDate>
		<guid isPermaLink="false">http://free-electrons.com/?p=1607#comment-34365</guid>
		<description>Hi Paulo,

Many thanks for sharing this tip!!!

Michael.</description>
		<content:encoded><![CDATA[<p>Hi Paulo,</p>
<p>Many thanks for sharing this tip!!!</p>
<p>Michael.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Faster boot: starting Linux directly from AT91bootstrap - Free Electrons blog</title>
		<link>http://free-electrons.com/blog/at91bootstrap-linux/comment-page-1/#comment-34344</link>
		<dc:creator>Paulo Costa</dc:creator>
		<pubDate>Tue, 28 Feb 2012 23:04:01 +0000</pubDate>
		<guid isPermaLink="false">http://free-electrons.com/?p=1607#comment-34344</guid>
		<description>This has been a very useful tip for me!
It saved me about 8s on boot, making my users much happier =)

The only problem I had was with ethernet connection not working (Linux displayed it as &quot;up&quot;, but not &quot;running&quot;). Some initializations from U-Boot are required before the Linux kernel can use it (on the method at91sam9260ek_macb_hw_init() )

I have isolated and replicated the required initialization for AT91Bootstrap in the following code:

Please note reading the mac address from flash and seting it&#039;s registers (SA1L and SA1H) is not required - Linux will create a new random mac address if you don&#039;t

#define AT91_RSTC_KEY		0xA5000000
#define AT91_RSTC_MR_ERSTL_MASK	0x0000FF00
#define AT91_RSTC_MR_ERSTL(x)	((x &amp; 0xf) &lt;&lt; 8)
#define AT91_RSTC_CR_EXTRST	0x00000008
#define AT91_RSTC_SR_NRSTL	0x00010000
static void mac_init() {
	//Read the MAC address from NAND
	unsigned long* MAC = (long*) JUMP_ADDR;
	long erstl;
	load_nandflash(CONFMAC_ADDRESS, CONFMAC_SIZE, (unsigned long)MAC);
	
	//Store the MAC address on it&#039;s registers
	writel(1 &lt;&lt; AT91C_ID_EMAC, AT91C_PMC_PCER);
	writel(MAC[0], AT91C_EMACB_SA1L);
	writel(MAC[1], AT91C_EMACB_SA1H);
	
	//Reset MACB Controoler. copied from U-boot method at91sam9260ek_macb_hw_init()
	writel(
		AT91C_PIO_PA14 &#124; 
		AT91C_PIO_PA15 &#124; 
		AT91C_PIO_PA17 &#124; 
		AT91C_PIO_PA25 &#124; 
		AT91C_PIO_PA26 &#124; 
		AT91C_PIO_PA28,
		AT91C_PIOA_PPUDR);
	
	erstl = readl(AT91C_RSTC_RMR) &amp; AT91_RSTC_MR_ERSTL_MASK;

	writel(AT91_RSTC_KEY &#124; AT91_RSTC_MR_ERSTL(13) &#124; AT91C_RSTC_URSTEN, AT91C_RSTC_RMR);

	writel(AT91_RSTC_KEY &#124; AT91_RSTC_CR_EXTRST, AT91C_RSTC_RCR);

	while (  !  (readl(AT91C_RSTC_RSR) &amp; AT91_RSTC_SR_NRSTL)  )
	{  }
	
	writel(AT91_RSTC_KEY &#124; erstl &#124; AT91C_RSTC_URSTEN, AT91C_RSTC_RMR);
}


I hope this tip will be useful for someone else

Paulo</description>
		<content:encoded><![CDATA[<p>This has been a very useful tip for me!<br />
It saved me about 8s on boot, making my users much happier =)</p>
<p>The only problem I had was with ethernet connection not working (Linux displayed it as &#8220;up&#8221;, but not &#8220;running&#8221;). Some initializations from U-Boot are required before the Linux kernel can use it (on the method at91sam9260ek_macb_hw_init() )</p>
<p>I have isolated and replicated the required initialization for AT91Bootstrap in the following code:</p>
<p>Please note reading the mac address from flash and seting it&#8217;s registers (SA1L and SA1H) is not required &#8211; Linux will create a new random mac address if you don&#8217;t</p>
<p>#define AT91_RSTC_KEY		0xA5000000<br />
#define AT91_RSTC_MR_ERSTL_MASK	0x0000FF00<br />
#define AT91_RSTC_MR_ERSTL(x)	((x &amp; 0xf) &lt;&lt; <img src='http://free-electrons.com/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /><br />
#define AT91_RSTC_CR_EXTRST	0&#215;00000008<br />
#define AT91_RSTC_SR_NRSTL	0&#215;00010000<br />
static void mac_init() {<br />
	//Read the MAC address from NAND<br />
	unsigned long* MAC = (long*) JUMP_ADDR;<br />
	long erstl;<br />
	load_nandflash(CONFMAC_ADDRESS, CONFMAC_SIZE, (unsigned long)MAC);</p>
<p>	//Store the MAC address on it&#039;s registers<br />
	writel(1 &lt;&lt; AT91C_ID_EMAC, AT91C_PMC_PCER);<br />
	writel(MAC[0], AT91C_EMACB_SA1L);<br />
	writel(MAC[1], AT91C_EMACB_SA1H);</p>
<p>	//Reset MACB Controoler. copied from U-boot method at91sam9260ek_macb_hw_init()<br />
	writel(<br />
		AT91C_PIO_PA14 |<br />
		AT91C_PIO_PA15 |<br />
		AT91C_PIO_PA17 |<br />
		AT91C_PIO_PA25 |<br />
		AT91C_PIO_PA26 |<br />
		AT91C_PIO_PA28,<br />
		AT91C_PIOA_PPUDR);</p>
<p>	erstl = readl(AT91C_RSTC_RMR) &amp; AT91_RSTC_MR_ERSTL_MASK;</p>
<p>	writel(AT91_RSTC_KEY | AT91_RSTC_MR_ERSTL(13) | AT91C_RSTC_URSTEN, AT91C_RSTC_RMR);</p>
<p>	writel(AT91_RSTC_KEY | AT91_RSTC_CR_EXTRST, AT91C_RSTC_RCR);</p>
<p>	while (  !  (readl(AT91C_RSTC_RSR) &amp; AT91_RSTC_SR_NRSTL)  )<br />
	{  }</p>
<p>	writel(AT91_RSTC_KEY | erstl | AT91C_RSTC_URSTEN, AT91C_RSTC_RMR);<br />
}</p>
<p>I hope this tip will be useful for someone else</p>
<p>Paulo</p>
]]></content:encoded>
	</item>
</channel>
</rss>

