{"id":966,"date":"2021-04-09T20:00:12","date_gmt":"2021-04-09T11:00:12","guid":{"rendered":"https:\/\/sirius10.net\/blog\/wordpress\/?p=966"},"modified":"2021-04-17T19:37:22","modified_gmt":"2021-04-17T10:37:22","slug":"post-966","status":"publish","type":"post","link":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/2021\/04\/09\/966\/","title":{"rendered":"\u30ab\u30fc\u30cd\u30eb\u30e2\u30b8\u30e5\u30fc\u30eb\u30d3\u30eb\u30c9\u306e\u6e96\u5099"},"content":{"rendered":"\n<p>\u3000CDEmu \u3092\u4f7f\u3063\u3066\u3044\u308b\u3068\u3001Raspberry Pi OS \u306e\u30ab\u30fc\u30cd\u30eb\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u4e0a\u304c\u308b\u6bce\u306b\u6539\u3081\u3066\u6574\u5099\u3057\u306a\u3051\u308c\u3070\u3044\u3051\u307e\u305b\u3093\u3002\u307b\u307c\u3001\u540c\u3058\u624b\u9806\u306a\u306e\u3067\u3001SHELL \u30b9\u30af\u30ea\u30d7\u30c8\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u3000\u624b\u9806\u81ea\u4f53\u306f\u3001<a href=\"https:\/\/qiita.com\/newtypehiro919\/items\/336e09340e728a94a9f7\">https:\/\/qiita.com\/newtypehiro919\/items\/336e09340e728a94a9f7<\/a> \u306b\u66f8\u304b\u308c\u3066\u3044\u308b\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u3000SHELL \u30b9\u30af\u30ea\u30d7\u30c8\u306f\u4ee5\u4e0b\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"file\"><code>#!\/bin\/bash\n\n# \u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\nsudo apt-get -y install bc bison flex libssl-dev\n\n# \u30cf\u30c3\u30b7\u30e5\u5024\u3092 github \u304b\u3089\u53d6\u5f97\ncheckurl=\"https:\/\/github.com\/Hexxeh\/rpi-firmware\/commits\/master\"\nREL=`uname -r|sed -e 's\/-.*\/\/'`\nlist=`wget -q -O - ${checkurl} | grep ${REL} | head -2 | tail -1`\nrev=`echo \"${list}\" | sed -e 's!.*href=\"\/Hexxeh\/rpi-firmware\/commit\/\\(.*\\)\"&gt;.*!\\1!'`\nif [ \"${rev}\" == \"\" ]; then\n    echo \"kernel ${REL} not found.\"\n    exit 1\nfi\nFIRMWARE_REV=${rev}\n\n# kernel revision\u3092\u53d6\u5f97\u3057\u3001\u30bd\u30fc\u30b9\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\nKERNEL_REV=`wget -q -O - \"https:\/\/github.com\/Hexxeh\/rpi-firmware\/raw\/${FIRMWARE_REV}\/git_hash\"`\nif [ ! -f \"${KERNEL_REV}.tar.gz\" ]; then\n    wget \"https:\/\/github.com\/raspberrypi\/linux\/archive\/${KERNEL_REV}.tar.gz\"\nfi\n\n# \/usr\/src \u306b\u5c55\u958b\u3059\u308b\nif [ ! -d \"\/usr\/src\/linux-${KERNEL_REV}\" ]; then\n    sudo tar -C \/usr\/src -xvf \"${KERNEL_REV}.tar.gz\"\nfi\n\ncd \/usr\/src\/linux-${KERNEL_REV}\n\n# \u30b7\u30f3\u30dc\u30eb\u30d5\u30a1\u30a4\u30eb\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\nif [ ! -f Module7l.symvers ]; then\n    sudo wget \"https:\/\/github.com\/Hexxeh\/rpi-firmware\/raw\/${FIRMWARE_REV}\/Module7l.symvers\"\n    sudo ln -s Module7l.symvers Module.symvers\nfi\n\n# .config\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b\nif [ ! -f .config ]; then\n    sudo modprobe configs\n    sudo bash -c \"zcat \/proc\/config.gz &gt; .config\"\nfi\n\n# \u30b3\u30f3\u30d1\u30a4\u30eb\nsudo make -j4 modules_prepare\n\n# \u30ab\u30fc\u30cd\u30eb\u30bd\u30fc\u30b9\u306e\u30eb\u30fc\u30c8\u3078\u306e\u30b7\u30f3\u30dc\u30ea\u30c3\u30af\u30ea\u30f3\u30af\u3092\/lib\/modules\/`uname -r`\/build \u3068\u3057\u3066\u4f5c\u6210\u3059\u308b\nif [ -d \/lib\/modules\/`uname -r`\/build ]; then\n    sudo rm -f \/lib\/modules\/`uname -r`\/build\nfi\nsudo ln -s \/usr\/src\/linux-${KERNEL_REV} \/lib\/modules\/`uname -r`\/build\n\n<\/code><\/p>\n\n\n\n<p> \u3000\u4eca\u306e\u6240\u3001\u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u4e00\u767a\u3067 vhba \u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u74b0\u5883\u304c\u4f5c\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3000CDEmu \u3092\u4f7f\u3063\u3066\u3044\u308b\u3068\u3001Raspberry Pi OS \u306e\u30ab\u30fc\u30cd\u30eb\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u4e0a\u304c\u308b\u6bce\u306b\u6539\u3081\u3066\u6574\u5099\u3057\u306a\u3051\u308c\u3070\u3044\u3051\u307e\u305b\u3093\u3002\u307b\u307c\u3001\u540c\u3058\u624b\u9806\u306a\u306e\u3067\u3001SHELL \u30b9\u30af\u30ea\u30d7\u30c8\u306b\u3057\u307e\u3057\u305f\u3002 \u3000\u624b\u9806\u81ea\u4f53\u306f\u3001https:\/\/qi [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-966","post","type-post","status-publish","format-standard","hentry","category-raspberry-pi"],"_links":{"self":[{"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/966","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=966"}],"version-history":[{"count":4,"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/966\/revisions"}],"predecessor-version":[{"id":1040,"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/966\/revisions\/1040"}],"wp:attachment":[{"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=966"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=966"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=966"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}