{"id":543,"date":"2014-02-20T02:21:10","date_gmt":"2014-02-20T00:21:10","guid":{"rendered":"http:\/\/wp.oktay.com\/?p=543"},"modified":"2014-12-31T11:45:31","modified_gmt":"2014-12-31T09:45:31","slug":"fritzbox-7390-module-building-mips_24k-vs-mips32_r2","status":"publish","type":"post","link":"https:\/\/wp.oktay.com\/?p=543","title":{"rendered":"fritzbox 7390 &#8211; module building &#8211; MIPS_24K vs MIPS32_R2"},"content":{"rendered":"<p>just change arch\/mips\/include\/asm\/module.h<br \/>\nfrom<br \/>\n#define MODULE_PROC_FAMILY &#8220;MIPS32_R2 &#8221;<br \/>\nto<br \/>\n#define MODULE_PROC_FAMILY &#8220;MIPS_24K &#8221;<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>building modules for a different system is not always an easy task.<br \/>\nrequired information&#8217;s and where to get:<\/p>\n<p>1. cat \/proc\/cpuinfo to find out what kind of cpu (mips,arm,sh4 etc)<br \/>\n2. file busybox &#8211; any elf file and find out if LSB or MSB  , also CPU type should be there.<br \/>\n3. get crosstool-chain prebuild or build one yourself -> crosstool-ng<br \/>\n4. get the kernel sources -> cat \/proc\/version \/ uname -a<br \/>\n5. make mrproper, make menuconfig, make < - after this you should have all required files like  Module.symvers and .config \n6. go in your module directory and create your makefile:\n \n<code>obj-m += hello.o<\/p>\n<p>all:<br \/>\n    make -C \/lib\/modules\/$(shell uname -r)\/build M=$(PWD) modules<\/p>\n<p>clean:<br \/>\n    make -C \/lib\/modules\/$(shell uname -r)\/build M=$(PWD) clean<\/p>\n<p>type make, close your eyes and press enter&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>just change arch\/mips\/include\/asm\/module.h from #define MODULE_PROC_FAMILY &#8220;MIPS32_R2 &#8221; to #define MODULE_PROC_FAMILY &#8220;MIPS_24K &#8221; &#8212;&#8212;&#8212;&#8212; building modules for a different system is not always an easy task. required information&#8217;s and where to get: 1. cat \/proc\/cpuinfo to find out what kind of cpu (mips,arm,sh4 etc) 2. file busybox &#8211; any elf file and find out if&hellip; <a class=\"more-link\" href=\"https:\/\/wp.oktay.com\/?p=543\">Continue reading <span class=\"screen-reader-text\">fritzbox 7390 &#8211; module building &#8211; MIPS_24K vs MIPS32_R2<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-543","post","type-post","status-publish","format-standard","hentry","category-bash","entry"],"_links":{"self":[{"href":"https:\/\/wp.oktay.com\/index.php?rest_route=\/wp\/v2\/posts\/543","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.oktay.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.oktay.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.oktay.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.oktay.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=543"}],"version-history":[{"count":5,"href":"https:\/\/wp.oktay.com\/index.php?rest_route=\/wp\/v2\/posts\/543\/revisions"}],"predecessor-version":[{"id":546,"href":"https:\/\/wp.oktay.com\/index.php?rest_route=\/wp\/v2\/posts\/543\/revisions\/546"}],"wp:attachment":[{"href":"https:\/\/wp.oktay.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=543"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.oktay.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=543"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.oktay.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=543"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}