{"id":1181,"date":"2017-08-08T18:12:42","date_gmt":"2017-08-08T16:12:42","guid":{"rendered":"https:\/\/www.dpin.de\/nf\/?p=1181"},"modified":"2017-08-08T18:22:42","modified_gmt":"2017-08-08T16:22:42","slug":"kirkwood-orion-mainline-linux-4-12-for-tk71","status":"publish","type":"post","link":"https:\/\/www.dpin.de\/nf\/kirkwood-orion-mainline-linux-4-12-for-tk71\/","title":{"rendered":"Kirkwood, Orion: Mainline Linux 4.12 for TK71"},"content":{"rendered":"<p>A client asked for more recent Linux kernel support for a Marvell Kirkwood\/Orion <a href=\"http:\/\/pdf1.alldatasheet.com\/datasheet-pdf\/view\/316968\/MARVELL\/88F6281.html\" target=\"_blank\" rel=\"noopener\">88F6281<\/a> based board made by <a href=\"https:\/\/www.karo-electronics.de\/tk71.html\" target=\"_blank\" rel=\"noopener\">KaRo, the TK71<\/a>. This is a Q7 form factor CPU module running @ 1.2GHz with two GBit Ethernet ports, two SATA ports, USB2.0 and PCIe support. The TK71 usually comes with 256MB of RAM, a 512MB version is available upon request. The Marvell Kirkwood CPU was intended for network appliances like routers or small NAS systems.<\/p>\n<p>Originally I did the U-Boot and Linux kernel adaptations for the <a href=\"http:\/\/www.warpcomm.org\/\" target=\"_blank\" rel=\"noopener\">Warpcomm<\/a> project in 2010, a joint venture of <a href=\"https:\/\/www.avnet.com\/wps\/portal\/emea\/\" target=\"_blank\" rel=\"noopener\">Avnet<\/a>, <a href=\"http:\/\/www.marvell.com\/\" target=\"_blank\" rel=\"noopener\">Marvell<\/a> and <a href=\"http:\/\/www.karo-electronics.de\/\" target=\"_blank\" rel=\"noopener\">KaRo<\/a>. At that time I ported a Linux mainline 2.6.36 kernel, later upgraded this to 2.6.38 but did no further updates.<\/p>\n<p>Today I resurrected the old boards and gave them a small test drive \ud83d\ude42<\/p>\n<p>I started from a vanilla defconfig for Orion5 and used the ARM cross toolchain from Debian:<\/p>\n<pre>export ARCH=arm\r\nexport CROSS_COMPILE=arm-linux-gnueabi-\r\nmake orion5x_defconfig\r\nmake zImage<\/pre>\n<p>Since the U-Boot version does not yet have device tree support I attached a device tree binary to the zImage and built the uImage from it:<\/p>\n<pre>make dtbs\r\ncat arch\/arm\/boot\/zImage arch\/arm\/boot\/dts\/kirkwood-openrd-base.dtb &gt; zImage-openrd-base\r\n\/bin\/sh .\/scripts\/mkuboot.sh -A arm -O linux -C none -T kernel -a 0x00008000 -e 0x00008000 -n 'Linux-4.12.5' -d .\/zImage-openrd-base uImage-openrd-base<\/pre>\n<p>Looks a little scary but works nicely. On the TK71 I can load this kernel image via dhcp\/tftp and boot into it:<\/p>\n<p>&nbsp;<\/p>\n<pre>TK71&gt;&gt; dhcp uImage-openrd-base\r\nBOOTP broadcast 1\r\nDHCP client bound to address 10.37.3.136\r\nUsing egiga0 device\r\nTFTP from server 10.37.3.254; our IP address is 10.37.3.136\r\nFilename 'uImage-openrd-base'.\r\nLoad address: 0x800000\r\nLoading: #################################################################\r\n #################################################################\r\n ##################################\r\ndone\r\nBytes transferred = 2394329 (2488d9 hex)\r\nTK71&gt;&gt; bootm\r\n## Booting kernel from Legacy Image at 00800000 ...\r\n Image Name: Linux-4.12.5\r\n Image Type: ARM Linux Kernel Image (uncompressed)\r\n Data Size: 2394265 Bytes = 2.3 MB\r\n Load Address: 00008000\r\n Entry Point: 00008000\r\n Verifying Checksum ... OK\r\n Loading Kernel Image ... OK\r\nOK\r\n\r\nStarting kernel ...\r\n\r\nUncompressing Linux... done, booting the kernel.\r\nBooting Linux on physical CPU 0x0\r\nLinux version 4.12.5 (nica@sourceress) (gcc version 4.9.2 ( 4.9.2-10) ) #6 PREEM\r\nPT Tue Aug 8 17:39:55 CEST 2017\r\nCPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f\r\n...<\/pre>\n<p>Excellent!<\/p>\n<p>The most important peripherals are working, like first Ethernet interface, serial console and NAND flash so I can continue from there. I guess that most of the work will be in properly configuring a devicetree for the TK71.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A client asked for more recent Linux kernel support for a Marvell Kirkwood\/Orion 88F6281 based board made by KaRo, the TK71. This is a Q7 form factor CPU module running @ 1.2GHz with two GBit Ethernet ports, two SATA ports, USB2.0 and PCIe support. The TK71 usually comes with 256MB of RAM, a 512MB version is available upon request. The&#8230; <a href=\"https:\/\/www.dpin.de\/nf\/kirkwood-orion-mainline-linux-4-12-for-tk71\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,2],"tags":[],"class_list":["post-1181","post","type-post","status-publish","format-standard","hentry","category-devices","category-geek-stuff"],"_links":{"self":[{"href":"https:\/\/www.dpin.de\/nf\/wp-json\/wp\/v2\/posts\/1181","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dpin.de\/nf\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dpin.de\/nf\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dpin.de\/nf\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dpin.de\/nf\/wp-json\/wp\/v2\/comments?post=1181"}],"version-history":[{"count":6,"href":"https:\/\/www.dpin.de\/nf\/wp-json\/wp\/v2\/posts\/1181\/revisions"}],"predecessor-version":[{"id":1187,"href":"https:\/\/www.dpin.de\/nf\/wp-json\/wp\/v2\/posts\/1181\/revisions\/1187"}],"wp:attachment":[{"href":"https:\/\/www.dpin.de\/nf\/wp-json\/wp\/v2\/media?parent=1181"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dpin.de\/nf\/wp-json\/wp\/v2\/categories?post=1181"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dpin.de\/nf\/wp-json\/wp\/v2\/tags?post=1181"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}