<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Felix Titling";
        panose-1:4 6 5 5 6 2 2 2 10 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Greetings All,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am trying to boot multi-OS on P1022RDK platform. As per my understating I only need to partition peripherals in DTS file of both kernels and configure memory start address of the kernel and load each kernel from uboot. No specific kernel
 configuration is required or any specific patch is required for this. <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Given is my configuration<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Core0: Linux kernel 1<o:p></o:p></p>
<p class="MsoNormal">Core1: Linux kernel 2<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I compiled two different kernels with following configuration (rest is default for P1022RDK comes in LTIB)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Core 0 kernel<o:p></o:p></p>
<p class="MsoNormal">CONFIG_LOWMEM_SIZE = 0x10000000<o:p></o:p></p>
<p class="MsoNormal">CONFIG_PHYSICAL_START = 0x00000000<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Core 1 kernel<o:p></o:p></p>
<p class="MsoNormal">CONFIG_LOWMEM_SIZE = 0x10000000<o:p></o:p></p>
<p class="MsoNormal">CONFIG_PHYSICAL_START = 0x10000000<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">In the DTS file I have partitioned peripherals & cpu to each kernel. Cpu 0 to Core 0 kernel & cpu 1 to Core 1 kernel and compiled DTS file with –b 1 switch of Core 1 DTB. My DTS files are attached. Given is my Uboot script which I am using
 to boot both cores.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">-------------- Uboot load script -----------------<o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:"Courier New""># General environment setting<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">setenv consoledev0   ttyS0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""># Set kernel loading environment<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">setenv core1kernelbase     0x00000000<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">setenv core0kernelbase     0x10000000<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">setenv kernelsize          0x10000000<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">setenv kerneloffset        0x1000000<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">setenv fdtoffset           0x00c00000<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">setexpr load0addr          $core0kernelbase + $kerneloffset    
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">setexpr fdt0addr           $core0kernelbase + $fdtoffset<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">setexpr load1addr          $core1kernelbase + $kerneloffset<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">setexpr fdt1addr           $core1kernelbase + $fdtoffset<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">setenv core0kernel   uImage-custom-mel-p1022rdk-core0.bin<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">setenv core1kernel   uImage-custom-ltib-p1022rdk-core1.bin<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">setenv core0fdt      p1022rdk-core0.dtb<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">setenv core1fdt      p1022rdk-core1.dtb<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">setenv core0rootfs   /home/farshad/melfs/core0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">setenv core1rootfs   /home/farshad/melfs/core1<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""># Boot from NFS<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">setenv core0nfsbootargs root=/dev/nfs nfsroot=$serverip:/$core0rootfs ip=<dev_ip>::<nfs_server_ip>:::eth0:off rw debug console=$consoledev0,$baudrate maxcpus=1
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">setenv core1nfsbootargs root=/dev/nfs nfsroot=$serverip:/$core1rootfs ip=<dev_ip_2>::<nfs_server_ip>:::eth0:off rw debug console=$consoledev0,$baudrate maxcpus=1<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">echo == Transfer images on board ==<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">tftp $load0addr $core0kernel<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">tftp $fdt0addr  $core0fdt<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">tftp $load1addr $core1kernel<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">tftp $fdt1addr  $core1fdt<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">echo == Start loading Core 1 with LTIB Kernel ==<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">setenv bootm_low $core1kernelbase<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">setenv bootm_size $kernelsize<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">setenv bootargs $core1nfsbootargs<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">interrupts off<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">bootm start $load1addr - $fdt1addr<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">bootm loados<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">bootm fdt<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">fdt boardsetup<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">fdt chosen<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">bootm prep<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">cpu 1 release $load1addr - $fdt1addr -<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">echo == Start loading Core 0 with MEL Kernel ==<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">setenv bootargs $core0nfsbootargs<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">setenv bootm_low $core0kernelbase<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">setenv bootm_size $kernelsize<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">bootm $load0addr - $fdt0addr<o:p></o:p></span></p>
<p class="MsoNormal">-------------- Uboot load script ends -----------------<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">My problem is Core 0 kernel is booting successfully but Core 1 kernel hangs after uncompressing kernel image, and after that I don’t see anything on the console.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Any thoughts on what I am missing or doing incorrect?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Best Regards<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Felix Titling";color:#943634">Farrukh</span></b><b><span style="font-size:10.0pt;font-family:"Felix Titling""> Arshad<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Sr. Software Development Engineer<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Mentor Graphics Pakistan<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Ph:   +92 – 423 – 609 – 92 - 09<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Cell: +92 – 303 – 444 – 77 – 05<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>