{"id":735,"date":"2015-02-18T21:01:37","date_gmt":"2015-02-18T19:01:37","guid":{"rendered":"http:\/\/blog.prunk.si\/?p=735"},"modified":"2015-02-19T16:55:10","modified_gmt":"2015-02-19T14:55:10","slug":"utilite-computer-3-10-17-kernel-upgrade","status":"publish","type":"post","link":"https:\/\/blog.janprunk.com\/?p=735","title":{"rendered":"Utilite computer 3.10.17 Linux kernel upgrade"},"content":{"rendered":"<p><a href=\"http:\/\/blog.prunk.si\/wp-uploads\/\/2015\/02\/Utilitie-intro.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignleft size-large wp-image-744\" src=\"http:\/\/blog.prunk.si\/wp-uploads\/\/2015\/02\/Utilitie-intro-1024x363.png\" alt=\"Utilitie-intro\" width=\"630\" height=\"223\" srcset=\"https:\/\/blog.janprunk.com\/wp-content\/uploads\/2015\/02\/Utilitie-intro-1024x363.png 1024w, https:\/\/blog.janprunk.com\/wp-content\/uploads\/2015\/02\/Utilitie-intro-300x106.png 300w, https:\/\/blog.janprunk.com\/wp-content\/uploads\/2015\/02\/Utilitie-intro.png 1600w\" sizes=\"(max-width: 630px) 100vw, 630px\" \/><\/a>This is the manual about how to (properly) compile Utilite-developed Linux kernel for the <a title=\"Utilite 1\" href=\"http:\/\/www.compulab.co.il\/utilite-computer\/web\/home\" target=\"_blank\">Utilite computer<\/a> (Utilite Pro) running &#8220;Ubuntu 12.04 LTS (Precise Pangolin)&#8221;. It&#8217;s mostly written for my own reference in case of possible future upgrades, but some might find it useful, as otherwise the information seems to be scattered around the Internet. We will do the start in user-mode and finish it in superuser (root) mode. The commands in <strong>bold<\/strong> are those which you need to type on the command line. However, <strong>I am not responsible for any damage that you might experience trying out this manual on your Utilite Pro<\/strong>. <strong>These are unofficial instructions, if you want official instructions read information on the Utilite Forum and Wiki.<\/strong> So here we go &#8230;<\/p>\n<p>1. First we are going to pull the kernel sources with <strong>git<\/strong> ( there is an online manual on how to use <a title=\"git\" href=\"http:\/\/git-scm.com\/\" target=\"_blank\">git<\/a> ). This is a one-string command, so write all in one line.<\/p>\n<pre><strong>$ git clone -b 'utilite\/devel'\r\nhttps:\/\/github.com\/utilite-computer\/linux-kernel --depth 1<\/strong><\/pre>\n<p>2. Lets move inside the kernel tree.<\/p>\n<p><strong>$ cd linux-kernel<\/strong><\/p>\n<p>3. Let&#8217;s make default kernel .config<\/p>\n<p><strong>$ make cm_fx6_defconfig<\/strong><\/p>\n<p>4. Let&#8217;s define other settings with menuconfig. Beside of concatenating kernel image and DTB you need to make sure that the following kernel options are present in your .config :<\/p>\n<p>CONFIG_ARM_APPENDED_DTB=y<br \/>\nCONFIG_ARM_ATAG_DTB_COMPAT=y<br \/>\nCONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND=y<br \/>\nCONFIG_CMDLINE_FROM_BOOTLOADER=y<\/p>\n<p><strong>$ make menuconfig<\/strong><\/p>\n<p>5. Clean before compiling.<\/p>\n<p><strong>$ make clean<\/strong><\/p>\n<p>6. Let&#8217;s compile. Option &#8220;-j8&#8221; means that we&#8217;ll be using 8 jobs on all 4 cores ( x 2 for SMP) on Utilite Pro for compiling ( it&#8217;s faster ). Approx. build time is 24 minutes.<\/p>\n<p><strong>$ make -j8 zImage<\/strong><\/p>\n<p>7. If you enabled DTB settings in the kernel .config, DTB should be made successfully. Approx. build time is 1 minute.<\/p>\n<p><strong>$ make -j8 imx6q-sbc-fx6m.dtb<\/strong><\/p>\n<p>8. Let&#8217;s make the modules. Approx. build time is 4 minutes.<\/p>\n<p><strong>$ make -j8 modules<\/strong><\/p>\n<p>9. Until this step everything can be done in user-mode. From here on you will need to perform all the additional steps as root or with &#8220;sudo&#8221; command. Let&#8217;s install the modules.<\/p>\n<p><strong># make modules_install<\/strong><\/p>\n<p>10. Let&#8217;s install the firmware.<\/p>\n<p><strong># make firmware_install<\/strong><\/p>\n<p>11. Let&#8217;s install the kernel headers.<\/p>\n<p><strong># make headers_install<\/strong><\/p>\n<p>12. Now with all things in place and no errors, we are going to mount the <strong>boot<\/strong> partition on Utilite Pro ( this is a one-string command, so copy the whole string ).<\/p>\n<p><strong># boot_partition=`cat \/proc\/cmdline | awk &#8216;{ for (i=1;i&lt;=NF;i++) { if($i~\/root=\/) { print substr($i,6,length($i)-6)&#8221;1&#8243; } } }&#8217;`<\/strong><\/p>\n<p><strong># mount $boot_partition \/boot<\/strong><\/p>\n<p>13. <strong>DO NOT FORGET<\/strong> to backup your existing working kernel !<\/p>\n<p><strong># cp \/boot\/uImage-cm-fx6 \/boot\/uImage-cm-fx6.bak<\/strong><\/p>\n<p>14. Move the newly built Linux kernel image into \/boot .<\/p>\n<p><strong># cat arch\/arm\/boot\/zImage arch\/arm\/boot\/dts\/imx6q-sbc-fx6m.dtb &gt; \/boot\/zImage-cm-fx6<\/strong><\/p>\n<p>15. Perform the last step to fit everything in place ( this is one-string long command, write everything together ).<\/p>\n<p><strong># cd \/boot; mkimage -A arm -O linux -T kernel -C none -a 0x10008000 -e 0x10008000 -n 3.10.17-cm-fx6-1-beta2-aufs -d zImage-cm-fx6 uImage-cm-fx6; rm -f zImage-cm-fx6<\/strong><\/p>\n<p>16. The result should be similar to this if all went well &#8230;<\/p>\n<p>Image Name: 3.10.17-cm-fx6-1-beta2-aufs<br \/>\nCreated: Tue Feb 17 13:53:34 2015<br \/>\nImage Type: ARM Linux Kernel Image (uncompressed)<br \/>\nData Size: 5460160 Bytes = 5332.19 kB = 5.21 MB<br \/>\nLoad Address: 10008000<br \/>\nEntry Point: 10008000<\/p>\n<p>17. un-mount the \/boot partition.<\/p>\n<p><strong># umount \/boot<\/strong><\/p>\n<p>18. Reboot and pray !<\/p>\n<p><strong># reboot<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>If all went well, you should have a new workable 3.10.17 kernel on Utilite Pro.<\/p>\n<p>If you are unable to boot to the new kernel or if something was faulty, there are several things you can try for the rescue. Most information can be asked or found on the <a title=\"Utilite forum\" href=\"http:\/\/www.compulab.co.il\/utilite-computer\/forum\/\" target=\"_blank\">Utilite support forum<\/a>. This is the best place to ask questions. You should enable <a title=\"Utilite Serial Console\" href=\"http:\/\/www.compulab.co.il\/utilite-computer\/wiki\/index.php\/Utilite:_Android:_Serial_console_connection\" target=\"_blank\">serial console<\/a> ( I won&#8217;t describe how you do this, you can find the information on the forum or wiki ). So after being connected with the serial console, the first thing you see starting is U-boot. There will be a similar output, compared to this one :<\/p>\n<p>U-Boot 2009.08-cm-fx6-0.98+tools (Mar 10 2014 &#8211; 16:17:49)<\/p>\n<p>CPU: Freescale i.MX6 family TO6.4 at 792 MHz<br \/>\nTemperature: 34 C, calibration data 0x59d4f769<br \/>\nmx6q pll1: 792MHz<br \/>\nmx6q pll2: 528MHz<br \/>\nmx6q pll3: 480MHz<br \/>\nmx6q pll8: 50MHz<br \/>\nipg clock : 66000000Hz<br \/>\nipg per clock : 66000000Hz<br \/>\nuart clock : 80000000Hz<br \/>\ncspi clock : 60000000Hz<br \/>\nahb clock : 132000000Hz<br \/>\naxi clock : 264000000Hz<br \/>\nemi_slow clock: 29333333Hz<br \/>\nddr clock : 528000000Hz<br \/>\nusdhc1 clock : 198000000Hz<br \/>\nusdhc2 clock : 198000000Hz<br \/>\nusdhc3 clock : 198000000Hz<br \/>\nusdhc4 clock : 198000000Hz<br \/>\nnfc clock : 11000000Hz<br \/>\nBoard: CM-FX6:[ POR ]<br \/>\nBoot Device: SD<br \/>\nI2C: ready<br \/>\nRAM Configuration:<br \/>\nBank #0: 10000000 1 GB<br \/>\nBank #1: 80000000 1 GB<br \/>\nNAND: No NAND device found!!!<br \/>\n0 MiB<br \/>\nMMC: FSL_USDHC: 0,FSL_USDHC: 1,FSL_USDHC: 2<br \/>\nJEDEC ID: 0xbf:0x25:0x41<br \/>\nReading SPI NOR flash 0xc0000 [0x2000 bytes] -&gt; ram 0x17e030c0<br \/>\nSUCCESS<\/p>\n<p>In: serial<br \/>\nOut: serial<br \/>\nErr: serial<br \/>\nNet: got MAC address from IIM: 00:00:00:00:00:00<br \/>\nFEC0<br \/>\nHit any key to stop autoboot:<\/p>\n<p><strong>Here you have 3 seconds of time to hit any key and enter into the U-boot interface, where you can perform additional steps.<\/strong><\/p>\n<p>1. First step would be to boot the previous kernel. Define the previous kernel with &#8220;setenv&#8221;.<\/p>\n<p><strong>$ setenv kernel uImage-cm-fx6.bak<\/strong><\/p>\n<p><strong>$ run bootcmd<\/strong><\/p>\n<p>This should at least bring you back to the previous kernel.<\/p>\n<p>2. If you forgot what your previous kernel name was ( if you selected a different name ), you can try these commands :<\/p>\n<p><strong>$ sata init<\/strong><br \/>\n<strong>$ fatls sata 0:1<\/strong><\/p>\n<p>This should list all available kernels in the \/boot partition, so just select another name with &#8220;setenv&#8221;.<\/p>\n<p><strong>Good luck !<\/strong><\/p>\n<p><strong>P. S. If you have tried this procedure and found any errors or know about the improvements, you are welcome to comment on the post and I will be glad to fix the article !<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is the manual about how to (properly) compile Utilite-developed Linux kernel for the Utilite computer (Utilite Pro) running &#8220;Ubuntu 12.04 LTS (Precise Pangolin)&#8221;. It&#8217;s mostly written for my own reference in case of possible future upgrades, but some might find it useful, as otherwise the information seems to be scattered around the Internet. We [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,22,12,3],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.janprunk.com\/index.php?rest_route=\/wp\/v2\/posts\/735"}],"collection":[{"href":"https:\/\/blog.janprunk.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.janprunk.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.janprunk.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.janprunk.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=735"}],"version-history":[{"count":17,"href":"https:\/\/blog.janprunk.com\/index.php?rest_route=\/wp\/v2\/posts\/735\/revisions"}],"predecessor-version":[{"id":755,"href":"https:\/\/blog.janprunk.com\/index.php?rest_route=\/wp\/v2\/posts\/735\/revisions\/755"}],"wp:attachment":[{"href":"https:\/\/blog.janprunk.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=735"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.janprunk.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=735"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.janprunk.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=735"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}