{"id":19,"date":"2019-09-07T15:07:07","date_gmt":"2019-09-07T15:07:07","guid":{"rendered":"http:\/\/blog.theopenpc.com\/?p=19"},"modified":"2019-09-07T15:07:07","modified_gmt":"2019-09-07T15:07:07","slug":"emacs-d","status":"publish","type":"post","link":"https:\/\/blog.theopenpc.com\/index.php\/2019\/09\/07\/emacs-d\/","title":{"rendered":".emacs.d\/"},"content":{"rendered":"\n<h1><a href=\"https:\/\/www.emacswiki.org\/emacs?search=%22DotEmacsDotD%22\">DotEmacsDotD<\/a><\/h1>\n\n\n\n<p>The directory&nbsp;<code>~\/.emacs.d\/<\/code>&nbsp;is a standard location for&nbsp;<strong>additional per-user Emacs-specific files<\/strong>. Various packages store information in this directory. Since it is located in the home directory (<code>~\/<\/code>), it is unique for each user, just like the&nbsp;<code>~\/.emacs<\/code>&nbsp;<a href=\"https:\/\/www.emacswiki.org\/emacs\/init_file\">init file<\/a>. Note that as&nbsp;<code>.emacs.d<\/code>&nbsp;begins with a dot, it is normally&nbsp;<strong>hidden<\/strong>&nbsp;on Unix systems and only turns up in directory listings if all files and folders are shown (<code>ls -a<\/code>).<\/p>\n\n\n\n<p>Starting with Emacs 22, if&nbsp;<code>~\/.emacs<\/code>&nbsp;does not exist, Emacs will try&nbsp;<code>~\/.emacs.d\/init.el<\/code>&nbsp;and&nbsp;<code>~\/.emacs.d\/init.elc<\/code>. You can also put the shell init file&nbsp;<code>.emacs_SHELL<\/code>&nbsp;under&nbsp;<code>~\/.emacs.d<\/code>.<\/p>\n\n\n\n<p>Starting with Emacs 23, the variable&nbsp;<code>user-emacs-directory<\/code>&nbsp;holds the location of&nbsp;<code>.emacs.d<\/code>. On&nbsp;<strong>Windows<\/strong>, the location depends on the&nbsp;<code>HOME<\/code>&nbsp;environment variable: if set to&nbsp;<code>C:\\<\/code>, then&nbsp;<code>.emacs<\/code>&nbsp;is located at&nbsp;<code>C:\\.emacs<\/code>&nbsp;and&nbsp;<code>.emacs.d<\/code>&nbsp;at&nbsp;<code>C:\\.emacs.d<\/code>. On Windows 7 the default is C:\\Users\\epich\\<a href=\"https:\/\/www.emacswiki.org\/emacs\/AppData\">AppData<\/a>\\Roaming\\.emacs and .emacs.d where&nbsp;<strong>epich<\/strong>&nbsp;is your username.<\/p>\n\n\n\n<p>The user directory itself is not part of&nbsp;<code>load-path<\/code>, and since it contains other things than libraries, you should leave it at that. Instead, you should install packages in a dedicated sub-directory (e.g.,&nbsp;<code>~\/.emacs.d\/elisp<\/code>) and&nbsp;<a href=\"https:\/\/www.emacswiki.org\/emacs\/LoadPath#AddSubDirectories\">add that<\/a>&nbsp;to the&nbsp;<code>load-path<\/code>&nbsp;instead.<\/p>\n\n\n\n<p>Ref: <a href=\"https:\/\/www.emacswiki.org\/emacs\/DotEmacsDotD\">https:\/\/www.emacswiki.org\/emacs\/DotEmacsDotD<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>DotEmacsDotD The directory&nbsp;~\/.emacs.d\/&nbsp;is a standard location for&nbsp;additional per-user Emacs-specific files. Various packages store information in this directory. Since it is located in the home directory&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[1],"tags":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":73,"url":"https:\/\/blog.theopenpc.com\/index.php\/2022\/02\/22\/nfsroot_tftp_embedded\/","url_meta":{"origin":19,"position":0},"title":"\u7528NFSRoot\u548cTFTP\u542f\u52a8\u4f60\u7684\u5d4c\u5165\u5f0f\u8bbe\u5907","date":"February 22, 2022","format":false,"excerpt":"\u4ecb\u7ecd \u6700\u8fd1\u5728\u5b66\u4e60\u5d4c\u5165\u5f0fLinux\u8bbe\u5907\u9a71\u52a8\u5f00\u53d1\u3002\u5728\u521a\u5f00\u59cb\u5b66\u4e60\u7684\u65f6\u5019\uff0c\u4e00\u4e2a\u6bd4\u8f83\u5927\u7684\u75db\u70b9\u662f\u603b\u662f\u9700\u8981\u628a\u7f16\u8bd1\u597d\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6\u60f3\u65b9\u6cd5\u642c\u5230\u8bbe\u5907\u4e0a\u3002\u5bf9\u4e8e\u6bd4\u8f83\u5c0f\u7684\u6587\u4ef6\u6bd4\u5982\u5185\u6838\u9a71\u52a8\u6216\u8005Userland\u7a0b\u5e8f\uff0c\u603b\u662f\u53ef\u4ee5\u7528scp\u4e4b\u7c7b\u7684\u5de5\u5177\u89e3\u51b3\u3002\u4f46\u5230\u4e86\u5b66\u4e60\u540e\u671f\u6d89\u53ca\u5230\u66f4\u6539\u5185\u6838\u6e90\u4ee3\u7801\uff0c\u4ee5\u81f3\u4e8e\u8981\u66f4\u6539SDCard\u4e0a\u7684\u5185\u6838\u955c\u50cf\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528\u7684\u5de5\u5177\u5c31\u6bd4\u8f83\u6709\u9650\u4e86\u3002\u9664\u975e\u4f60\u53ef\u4ee5\u5fcd\u53d7\u6bcf\u6b21\u66f4\u6539\u6e90\u4ee3\u7801\u90fd\u628a\u5185\u6838\u642c\u5230SDCard\u6216\u8005\u5176\u4ed6\u50a8\u5b58\u4ecb\u8d28\u4e0a\u3002 \u5728\u7ecf\u8fc7\u4e00\u756a\u641c\u7d22\u540e\uff0c\u53d1\u73b0\u4e86\u4e00\u4e2a\u5d4c\u5165\u5f0f\u8bbe\u5907\u53ef\u4ee5\u4f7f\u7528\u7684\u542f\u52a8\u6a21\u5f0f\uff0c\u5c31\u662f\u7528NFSRoot\u548cTFTP\u52a0\u8f7d\u6839\u6587\u4ef6\u7cfb\u7edf\uff08ROOTFS\uff09\u548c\u5185\u6838\uff0c\u800c\u4e14\u8fd9\u79cd\u542f\u52a8\u65b9\u6cd5\u5bf9\u4e8e\u8282\u7ea6\u5c06\u4e8c\u8fdb\u5236\u6587\u4ef6\u62f7\u8d1d\u5230\u50a8\u5b58\u4ecb\u8d28\u7684\u6b21\u6570\u5f88\u6709\u5e2e\u52a9\u3002 \u6bd4\u5982\u6211\u5728\u5bb6\u4e2d\u7684\u7f51\u7edc\uff08\u914d\u7f6e\u5982\u4e0b\uff09\u4f7f\u7528\u7b14\u8bb0\u672c\u8fdb\u884c\u5f00\u53d1\uff0c\u540c\u65f6\u7f51\u7edc\u4e0a\u8fd8\u6709\u5d4c\u5165\u5f0f\u5f00\u53d1\u677f\u548c\u53e6\u5916\u4e00\u4e2a\u670d\u52a1\u5668\u3002\u670d\u52a1\u7f51\u7edc\u56e0\u4e3a\u4f7f\u7528\u6709\u7ebf\u8fde\u63a5\u6bd4\u8f83\u7a33\u5b9a\u3002\u4f7f\u7528NFSRoot\u548cTFTP\u8ba9\u6211\u53ef\u4ee5\u5c06\u5f00\u53d1\u677f\u7684RootFS\uff0c\u5185\u6838\u955c\u50cf\u548cdtb\u7b49\u6587\u4ef6\u653e\u5728\u670d\u52a1\u5668\u4e0a\u3002\u5f00\u53d1\u7248\u542f\u52a8\u65f6\uff0c\u4f1a\u5f53\u5373\u8bfb\u53d6\u670d\u52a1\u5668\u4e0a\u7684\u5185\u6838\u5230\u5185\u5b58\u4e2d\u7684\u6307\u5b9a\u5730\u5740\uff0c\u7136\u540e\u7528\u5176\u542f\u52a8\u8bbe\u5907\u3002\u5f00\u53d1\u677f\u542f\u52a8\u540e\uff0c\u5728\u5185\u6838\u52a0\u8f7d\u65f6\u4f1a\u8bfb\u53d6\u670d\u52a1\u5668\u4e0a\u7684RootFS\u4f5c\u4e3a\u6839\u76ee\u5f55\u5e76\u542f\u52a8\u7cfb\u7edf\u3002 \u8fd9\u6837\u5b50\u7684\u8bbe\u7f6e\u610f\u5473\u7740\u5f00\u53d1\u677f\u542f\u52a8\u540e\u7684\u201c\u786c\u76d8\u201d\u5df2\u7ecf\u5df2\u7ecf\u4e0d\u518d\u5f00\u53d1\u677f\u4e0a\uff0c\u800c\u662f\u5728\u670d\u52a1\u5668\u4e0a\u4e86\uff01\u5982\u679c\u7528\u7ec8\u7aef\u6216SSH\u8fde\u63a5\u5f00\u53d1\u677f\u5e76\u66f4\u6539\u50a8\u5b58\u4e00\u4e9b\u6587\u4ef6\uff0c\u8fd9\u4e9b\u6539\u52a8\u4f1a\u76f4\u63a5\u53cd\u6620\u5728\u670d\u52a1\u5668\u4e0a\u3002\u66f4\u91cd\u8981\u7684\u662f\uff0c\u4f60\u76f4\u63a5\u8fde\u63a5\u670d\u52a1\u5668\u5bf9RootFS\u7684\u6539\u52a8\u5f00\u53d1\u677f\u80fd\u5b9e\u65f6\u63a5\u6536\u5230\u3002 \u7f51\u7edc\u914d\u7f6e \u6b65\u9aa4\uff1a \u5b89\u88c5\u548c\u8bbe\u7f6eTFTP\u670d\u52a1\u5668 \u5f88\u591a\u5d4c\u5165\u5f0fbootloader\u652f\u6301\u901a\u8fc7TFTP\u52a0\u8f7d\u5185\u6838\u955c\u50cf\u548c\u8bbe\u5907\u6811\uff0c\u8fd9\u5bf9\u4e8e\u7cfb\u7edf\u5f00\u53d1\u3001\u9a71\u52a8\u5f00\u53d1\u4eba\u5458\u662f\u975e\u5e38\u65b9\u4fbf\u7684\u3002\u8fd9\u8ba9\u5f00\u53d1\u4eba\u5458\u53ef\u4ee5\u5728\u5f00\u53d1\u7535\u8111\u4e0a\u7f16\u8bd1\u5185\u6838\u548c\u8bbe\u5907\u6811\uff0c\u628a\u7f16\u8bd1\u597d\u7684\u5185\u6838\u4e0e\u8bbe\u5907\u6811\u653e\u5728TFTP\u4e0a\u3002\u7136\u540e\uff0c\u5728\u5d4c\u5165\u5f0f\u8bbe\u5907\u4e0a\uff0c\u53ea\u9700\u91cd\u65b0\u542f\u52a8\u7cfb\u7edf\u5e76\u5728BootLoader\u4e2d\u901a\u8fc7TFTP\u5c31\u53ef\u4ee5\u52a0\u8f7d\u65b0\u7684\u5185\u6838\uff0c\u800c\u65e0\u9700\u62d4\u4e0bscdard\u70e7\u5f55\u6587\u4ef6\u7cfb\u7edf\u548c\u65b0\u5185\u6838\u3002\u90a3\u4e48\u5177\u4f53\u600e\u4e48\u4f7f\u7528TFTP\u5462\uff1f \u63a5\u4e0b\u6765\u7684\u6b65\u9aa4\u5047\u8bbe\u4f60\u4f7f\u7528Linux\u4f5c\u4e3a\u4f60\u7684\u64cd\u4f5c\u7cfb\u7edf\u3002\u9996\u5148\u8981\u5b89\u88c5TFTP\u670d\u52a1\u5668\uff0c\u5bf9\u4e8e\u57fa\u4e8eDebian\u7684\u7cfb\u7edf\uff0c\u53ef\u4ee5\u4f7f\u7528\u5982\u4e0b\u547d\u4ee4\uff1a apt-get install tftpd-hpa # \u5b89\u88c5\u5b8c\u6210\u540e\u542f\u52a8tftp\u670d\u52a1\u5668 service tftpd-hpa start \u6839\u636e\u64cd\u4f5c\u7cfb\u7edf\u7684\u4e0d\u540c\uff0c\u9ed8\u8ba4TFTP\u7684\u6839\u76ee\u5f55\u4e5f\u4e0d\u4e00\u6837\u3002\u82e5\u8981\u67e5\u770bTFTP\u7684\u6839\u76ee\u5f55\u53ef\u4ee5\u5230\/etc\/default\/tftpd-hpa\u4ef6\u91cc\u627e\u5230\u5982\u4e0b\u884c\uff1a TFTP\uff3fDIRECTORY=\"\/srv\/tftp\" \u5728TFTP\u6839\u76ee\u5f55\u4e0b\u6211\u4eec\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a\u76ee\u5f55\u5982\u4e0b\u5e76\u653e\u5165\u6211\u4eec\u4e3a\u5d4c\u5165\u5f0f\u8bbe\u5907\u7f16\u8bd1\u597d\u7684\u5185\u6838\u4e0e\u8bbe\u5907\u6811\uff1a \/svr\/tftp test_new_kernel devicetree.dtb uImage \u60f3\u8981\u8bbe\u5907\u52a0\u8f7d\u8fd9\u4e2a\u5185\u6838\uff0c\u6211\u4eec\u9700\u8981\u63d0\u4f9b\u4e00\u4e2a\u542f\u52a8\u811a\u672c\uff0c\u5047\u8bbe\u5176\u540d\u4e3abootscript_new_kernel\uff0c\u6211\u4eec\u53ef\u4ee5\u5c06\u5b83\u653e\u5728\/svr\/tftp\u76ee\u5f55\u4e0b\uff1a \/svr\/tftp test_new_kernel\/ devicetree.dtb uImage bootscript_new_kernel bootscript_new_kernel\u7684\u5177\u4f53\u5185\u5bb9\u6211\u4eec\u4e00\u4f1a\u513f\u518d\u7ec6\u8bb2\u3002 \u8fd9\u4e0b\u6211\u4eec\u628aTFTP\u5c31\u5927\u81f4\u8bbe\u7f6e\u597d\u4e86\u3002\u8981\u77e5\u9053\uff0c\u4ec5\u4ec5\u662f\u6709\u5185\u6838\u7684\u5d4c\u5165\u5f0f\u8bbe\u5907\u662f\u6ca1\u6709\u529e\u6cd5\u542f\u52a8\u7684\uff0c\u6211\u4eec\u8fd8\u9700\u8981\u63d0\u4f9b\u6839\u6587\u4ef6\u7cfb\u7edf\u5e76\u63d0\u4f9b\u542f\u52a8\u7a0b\u5e8f\uff08init\uff09\u624d\u80fd\u8ba9\u5d4c\u5165\u5f0f\u8bbe\u5907\u6210\u529f\u542f\u52a8\u3002\u63a5\u4e0b\u6765\u6211\u4eec\u8bb2\u8bb2\u600e\u4e48\u7528NFSRoot\u6765\u4f5c\u4e3a\u8bbe\u5907\u7684\u8ddf\u6587\u4ef6\u7cfb\u7edf\u3002","rel":"","context":"Similar post","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.theopenpc.com\/wp-content\/uploads\/2022\/02\/NFSRoot-TFTP-Boot-1.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/blog.theopenpc.com\/index.php\/wp-json\/wp\/v2\/posts\/19"}],"collection":[{"href":"https:\/\/blog.theopenpc.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.theopenpc.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.theopenpc.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.theopenpc.com\/index.php\/wp-json\/wp\/v2\/comments?post=19"}],"version-history":[{"count":1,"href":"https:\/\/blog.theopenpc.com\/index.php\/wp-json\/wp\/v2\/posts\/19\/revisions"}],"predecessor-version":[{"id":20,"href":"https:\/\/blog.theopenpc.com\/index.php\/wp-json\/wp\/v2\/posts\/19\/revisions\/20"}],"wp:attachment":[{"href":"https:\/\/blog.theopenpc.com\/index.php\/wp-json\/wp\/v2\/media?parent=19"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.theopenpc.com\/index.php\/wp-json\/wp\/v2\/categories?post=19"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.theopenpc.com\/index.php\/wp-json\/wp\/v2\/tags?post=19"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}