{"id":279496,"date":"2023-08-05T04:05:02","date_gmt":"2023-08-04T20:05:02","guid":{"rendered":"https:\/\/lrxjmw.cn\/qrslxtjsjzyj.html"},"modified":"2023-08-05T04:05:02","modified_gmt":"2023-08-04T20:05:02","slug":"qrslxtjsjzyj","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/qrslxtjsjzyj.html","title":{"rendered":"\u5d4c\u5165\u5f0fLinux\u7cfb\u7edf\u8ba1\u7b97\u673a\u4e13\u4e1a\u57fa\u7840\u7b14\u8bb0\u76ee\u5f55\u77e5\u8bc6\u67b6\u6784\u53ca\u5c42\u6b21"},"content":{"rendered":"

\u5d4c\u5165\u5f0fLinux<\/a>\u7cfb\u7edf<\/a><\/p>\n

\u8ba1\u7b97\u673a\u4e13\u4e1a\u57fa\u7840\u7b14\u8bb0\u76ee\u5f55\u53ef\u4ee5\u70b9\u8fd9\u513f\uff1a\u8ba1\u7b97\u673a\u4e13\u4e1a\u57fa\u7840\u7b14\u8bb0\u76ee\u5f55<\/p>\n

\u77e5\u8bc6\u6784\u67b6\u53ca\u5c42\u6b21<\/p>\n

Linux\u5185\u6838\u7531\u4e09\u90e8\u4efd\u6784\u6210\uff1a<\/p>\n

\u5d4c\u5165\u5f0fLinux\u7cfb\u7edf\u6784\u6210\u53ca\u542f\u52a8\u7565\u6790<\/p>\n

\u5d4c\u5165\u5f0fLinux\u542f\u52a8\u7c7b\u540c4X100\u7c73\u63a5\u529b\u8dd1\uff0c\u662f\u7531\u591a\u4e2a\u90e8\u4efd\u5171\u540c\u5b8c\u6210\uff0c\u5305\u62ec\uff1a<\/p>\n

\u5d4c\u5165\u5f0fLinux\u4e09\u5251\u5ba2\u4e4buboot\u6280\u672fBootloader\u6982\u5ff5<\/p>\n

Bootloader\u662f\u64cd\u4f5c\u7cfb\u7edf\u5185\u6838\u8fd0\u884c\u524d\u8fd0\u884c\u7684\u4e00\u6bb5\u5c0f\u7a0b\u5e8f\u3002<\/p>\n

\u529f\u80fd\uff1a<\/p>\n

\u521d\u59cb\u5316\u786c\u4ef6\u8bbe\u5907\uff0c\u5982\u5bf9CPU\u3001SDRAM\u3001Flash\u3001\u4e32\u53e3\u7b49\u8fdb\u884c\u521d\u59cb\u5316\uff1b\u52a0\u8f7d\u5185\u6838\u5230\u663e\u5b58\u5e76\u6267\u884c\u5185\u6838\u4ee3\u7801\uff1b\u63d0\u4f9b\u4e00\u4e9b\u547d\u4ee4<\/a>\u5de5\u5177\uff0c\u5982\u64cd\u4f5cflash\u3001\u4ecePC\u673a\u642c\u8fd0\u5185\u6838\u5230\u5f00\u53d1\u677f\u7b49\u529f\u80fd\u3002<\/p>\n

Bootloader\u76f8\u5f53\u4e8ePC\u673a\u4e0aBIOS\u548cGRUB\u529f\u80fd\u96c6\u5408\u4f53\u3002<\/p>\n

UBOOT<\/p>\n

\u5e38\u89c1\u7684Bootloader\uff1a<\/p>\n

UBOOT\u7b80\u4ecb<\/p>\n

U-Boot\u662f\u4e00\u4e2a\u4e3b\u8981\u7528\u4e8e\u5d4c\u5165\u5f0f\u7cfb\u7edf\u7684\u5f15\u5bfc\u52a0\u8f7d\u7a0b\u5e8f\uff0c\u53ef\u4ee5\u652f\u6301\u591a\u79cd\u4e0d\u540c\u7684\u8ba1\u7b97\u673a\u7cfb\u7edf\u7ed3\u6784\uff0c\u5305\u62ecPPC\u3001ARM\u3001AVR32\u3001MIPS\u3001x86\u300168k\u3001Nios\u4e0eMicroBlaze\u3002\u8fd9\u4e5f\u662f\u4e00\u5957\u5728GNU\u901a\u7528\u516c\u5171\u8bb8\u53ef\u8bc1\u4e4b\u4e0b\u53d1\u5e03\u7684\u81ea\u7531\u8f6f\u4ef6\u3002<\/p>\n

\u8fd9\u4e2a\u9879\u76ee\u8d77\u6e90\u4e8eMagnusDamm.\u57288xxPowerPC\u6784\u67b6\u4e0b\u5199\u7684\u5f15\u5bfc\u52a0\u8f7d\u7a0b\u5e8f\uff1a8xxROM\u30021999\u5e74\u4e09\u6708\uff0cWolfgangDenk\u5c06\u9879\u76ee\u79fb\u8f6c\u56delinux\u5b89\u5168\u52a0\u56fa\uff0c\u4f46\u4e0d\u5bb9\u8bb8\u6570\u5b57\u5f00\u5934\u7684\u9879\u76ee\u540d\u79f0\uff0c\u6240\u4ee5\u66f4\u540d\u4e3aPPCBoot\u30022002\u5e7411\u6708PPCBoot\u66f4\u540d\u4e3aU-Boot\u3002<\/p>\n

UBOOT\u4f18\u52bfUBOOT\u529f\u80fdUBOOT\u5de5\u4f5c\u6a21\u5f0fUBOOT\u6e90\u7801\u76ee\u5f55<\/p>\n

UBOOT\u7f16\u8bd1\u8fc7\u7a0b\u89e3\u538b\u7f29uboot\u6e90\u7801\u5230\u76ee\u5f55\u4e0b\u6309\u7167\u5f00\u53d1\u677f\u8fdb\u884c\u914d\u7f6e<\/p>\n

makesmdk2440\u7f16\u8bd1uboot<\/p>\n

make\u70e7\u5f55uboot.bin\u5230\u5f00\u53d1\u677f\uff08\u4f7f\u7528\u4eff\u771f\u5668\u5b8c\u6210\uff09\u542f\u52a8\u5f00\u53d1\u677f\u540elinux \u539f\u7406 \u5185\u6838 \u9762\u8bd5<\/strong>\uff0cuboot\u5c31\u8fd0\u884c\u4e0a\u53bb<\/p>\n

\u5178\u578buboot\u547d\u4ee4<\/p>\n

\u590d\u5370\u73af\u5883\u53d8\u91cf\uff1aprintenv<\/p>\n

\u529f\u80fd\uff1a\u590d\u5370\u5f00\u53d1\u677f\u4e0a\u7684\u73af\u5883\u53d8\u91cf\u503c<\/p>\n

\u4f8b\uff1a<\/p>\n

\n

Uboot><\/span> printenv<\/span>\nbaudrate=<\/span>115200\nipaddr=<\/span>192.168.1.1\nethaddr=<\/span>12:34:56:78:9A:BC\nserverip=<\/span>192.168.1.5\nEnvironment size: 80\/8188 bytes\n<\/code><\/pre>\n<\/p>\n

\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\uff1asetenv\u53d8\u91cf\u503c<\/p>\n

\u529f\u80fd\uff1a\u8bbe\u7f6e\u5f00\u53d1\u677f\u4e0a\u7684\u73af\u5883\u53d8\u91cf\u503c<\/p>\n

\u4f8b\uff1a<\/p>\n

\n

Uboot><\/span> setenv ethaddr 12:34:56:78:9A:BC\nUboot><\/span> setenv ipaddr 192.168.1.1\nUboot><\/span> setenv serverip 192.168.1.254   \n\t\t\t\uff08tftp\u670d\u52a1\u5668\u7684\u5730\u5740\uff09\n<\/code><\/pre>\n<\/p>\n

\u4fdd\u5b58\u73af\u5883\u53d8\u91cf\uff1asaveenv<\/p>\n

\u529f\u80fd\uff1a\u4fdd\u5b58\u5f00\u53d1\u677f\u4e0a\u7684\u73af\u5883\u53d8\u91cf\u503c<\/p>\n

\u7f51\u8def\u52a0\u8f7d\u5185\u6838\uff1atftp\u5f85\u52a0\u8f7d\u5230\u7684\u663e\u5b58\u5730\u5740\u5f85\u52a0\u8f7d\u6587\u4ef6\u540d<\/p>\n

\u529f\u80fd\uff1a\u901a\u8fc7\u7f51\u8def\u5c06\u5750\u843dPC\u673a\u4e0atftp\u670d\u52a1\u5668\u76ee\u5f55\uff08\u5982\u4e3a\/tftpdroot)\u4e0b\u7684\u6587\u4ef6\u52a0\u8f7d\u5230\u5f00\u53d1\u677f\u663e\u5b58\u5730\u5740<\/p>\n

\u4f8b\uff1a\u628aserver\uff08IP=\u73af\u5883\u53d8\u91cf\u4e2d\u8bbe\u7f6e\u7684serverip\uff09\u4e2d\/tftpdroot\/\u4e0b\u7684vmlinux\u901a\u8fc7TFTP\u8bfb\u5165\u5230\u5316\u5b66\u663e\u5b5832000000\u5904\u3002<\/p>\n

\n

Uboot><\/span> tftp 32000000 vmlinux\n<\/code><\/pre>\n<\/p>\n

\u542f\u52a8\u5185\u6838\u547d\u4ee4\uff1abootm\u5185\u6838\u663e\u5b58\u5730\u5740<\/p>\n

\u529f\u80fd\uff1a\u5c06\u5750\u843d\u5185\u6838\u663e\u5b58\u5730\u5740\u5904\u7684\u5185\u6838\u542f\u52a8\u4e0a\u53bb<\/p>\n

\u4f8b\uff1a<\/p>\n

\n

Uboot><\/span> bootm 0x30008000\n## Booting image at 30008000 ...<\/span>\nStarting kernel ..<\/span>.\nUncompressing\nLinux..<\/span>..<\/span>..<\/span>..<\/span>..<\/span>..<\/span>..<\/span>..<\/span>..<\/span>..<\/span>..<\/span>..<\/span>..<\/span>..<\/span>..<\/span>..<\/span>..<\/span>..<\/span>..<\/span>..<\/span>..<\/span>..<\/span>..<\/span>..<\/span>..<\/span>..<\/span>..<\/span>..<\/span>..<\/span>..<\/span>..<\/span>..<\/span>..<\/span>..<\/span>..<\/span>\ndone.\n<\/code><\/pre>\n<\/p>\n

NandFlash\u64cd\u4f5c\u547d\u4ee4\uff1anand\u547d\u4ee4\u7801\u53c2\u6570<\/p>\n

\u529f\u80fd\uff1a<\/p>\n

\u5d4c\u5165\u5f0fLinux\u4e09\u5251\u5ba2\u4e4b\u5185\u6838\u6280\u672f\u5185\u6838\u4ecb\u7ecd\uff08\u529f\u80fd\uff09<\/p>\n

\u5185\u6838\u662f\u5d4c\u5165\u5f0fLinux\u7cfb\u7edf\u7684\u6838\u5fc3\uff0c\u8d1f\u8d23\u7ba1\u7406\u7cfb\u7edf\u7684\u8fdb\u7a0b\u3001\u5185\u5b58\u3001\u6587\u4ef6\u7cfb\u7edf\u3001\u7f51\u7edc\u548c\u8bbe\u5907\u9a71\u52a8\u7b49\u3002\u5047\u5982\u628a\u6708\u7403\u79f0\u4f5c\u8ba1\u7b97\u673a\u7cfb\u7edf\uff0c\u5185\u6838\u5c31\u662f\u7ba1\u7406\u8ba1\u7b97\u673a\u8d44\u6e90\u7684\u201c\u653f\u5e9c\u201d\uff0c\u5185\u6838\u4e2d\u7684\u6bcf\u4f4d\u529f\u80fd\u6a21\u5757\u76f8\u5f53\u4e8e\u653f\u5e9c\u4e2d\u7684\u6bcf\u4f4d\u90e8\u95e8\uff0c\u5982\u53f3\u56fe\u6240\u793a\u3002<\/p>\n

\u4ece\u529f\u80fd\u89d2\u5ea6\u6765\u770b\uff1a<\/p>\n

\u5185\u6838\u5c31\u662f\u4e00\u7cfb\u5217\u529f\u80fd\u6a21\u5757\u6784\u6210\uff0c\u5305\u62ec\uff1a<\/p>\n

Linux\u5185\u6838\u4e2d\u6bcf\u4f4d\u6a21\u5757\u72ec\u7acb\u5b8c\u6210\u76f8\u5e94\u529f\u80fd\uff0c\u5e76\u80fd\u4e0e\u5176\u5b83\u6a21\u5757\u4e92\u76f8\u914d\u5408\u3002<\/p>\n

Linux\u5185\u6838\u6e90\u7801\u53ca\u7ec4\u7ec7<\/p>\n

Linux\u5185\u6838\u6e90\u4ee3\u7801\u91c7\u7528\u6811\u72b6\u7ed3\u6784\u8fdb\u884c\u7ec4\u7ec7\uff0c\u5341\u5206\u5408\u7406\u5730\u628a\u529f\u80fd\u76f8\u5173\u7684\u6587\u4ef6\u90fd\u7f6e\u4e8e\u540c\u4e00\u4e2a\u5b50\u76ee\u5f55\u4e0b\uff0c\u81f4\u4f7f\u7a0b\u5e8f\u66f4\u5177\u53ef\u8bfb\u6027\u3002<\/p>\n

\u5185\u6838\u6e90\u4ee3\u7801\u4e0b\u8f7d\u5730\u5740\uff1a<\/p>\n

Linux\u5185\u6838\u6e90\u7801\u76ee\u5f55\uff1a<\/p>\n

Linux\u5185\u6838\u526a\u88c1\u53ca\u7f16\u8bd1<\/p>\n

\u5185\u6838\u9762\u8bd5\u9898_linux \u539f\u7406 \u5185\u6838 \u9762\u8bd5_linux\u5185\u6838\u9762\u8bd5\u5e38\u89c1\u95ee\u9898<\/p>\n

\u5177\u4f53\u7684\u5148\u7701\u7565\u3002\u3002\u3002\u6211\u4e5f\u6ca1\u600e\u6837\u8bfb\u61c2\u3002\u3002\u3002<\/p>\n

Kconfig\u7684\u4e94\u79cd\u57fa\u672c\u7ed3\u6784<\/p>\n

\u5d4c\u5165\u5f0fLinux\u4e09\u5251\u5ba2\u4e4b\u6587\u4ef6\u7cfb\u7edf\u6280\u672f<\/p>\n

\u6b64\u5904\u7684\u6587\u4ef6\u7cfb\u7edf\u662f\u5e94\u7528\u7a0b\u5e8f\u7b49\u6570\u636e\u6587\u4ef6\u7684\u96c6\u5408\u4f53\u3002<\/p>\n

BusyBox<\/p>\n

BusyBox\u6700\u521d\u662f\u7531BrucePerens\u57281996\u5e74\u4e3aDebianGNU\/Linux\u5b89\u88c5\u76d8\u7f16\u64b0\u7684\u3002<\/p>\n

\u5176\u76ee\u6807\u662f\u5728\u4e00\u5f20\u8f6f\u9a71\u4e0a\u521b\u5efa\u4e00\u4e2a\u53ef\u5f15\u5bfc\u7684GNU\/Linux\u7cfb\u7edf<\/p>\n

BusyBox\u4f7f\u7528\u4e86\u7b26\u53f7\u94fe\u63a5\u4fbf\u4e8e\u4f7f\u4e00\u4e2a\u53ef\u6267\u884c\u7a0b\u5e8f\u770b\u4e0a\u53bb\u50cf\u597d\u591a\u7a0b\u5e8f\u4e00\u6837\u3002\u5bf9\u4e8eBusyBox\u4e2d\u5305\u542b\u7684\u6bcf\u4f4d\u5de5\u5177\u6765\u8bf4\uff0c\u5c31\u4f1a\u8fd9\u6837\u521b\u5efa\u4e00\u4e2a\u7b26\u53f7\u94fe\u63a5\uff0c\u8fd9\u6837\u5c31\u53ef\u4ee5\u4f7f\u7528\u8fd9\u79cd\u7b26\u53f7\u94fe\u63a5\u6765\u8c03\u7528BusyBox\u4e86\u3002BusyBox\u4e4b\u540e\u53ef\u4ee5\u901a\u8fc7argv[0]\u6765\u8c03\u7528\u5185\u90e8\u5de5\u5177\u3002<\/p>\n

Glibc<\/p>\n

Glibc\u662f\u63d0\u4f9b\u7cfb\u7edf\u8c03\u7528\u548c\u57fa\u672c\u51fd\u6570\u7684C\u5e93\u3002<\/p>\n

glic\u5e93\u4e00\u822c\u4f7f\u7528\u4e8eX86\u6784\u67b6\u7684Linux\u7cfb\u7edf\uff0c\u5b83\u4f3c\u4e4e\u5341\u5206\u5b8c\u5907\uff0c\u7136\u800c\u5374\u5341\u5206\u5e9e\u5927\uff0c\u5bf9\u4e8e\u5d4c\u5165\u5f0f\u7cfb\u7edf\u6765\u8bf4\uff0c\u4f7f\u7528\u5b83\u610f\u5473\u7740\u663e\u5b58\u7684\u6d88\u8017\u4e5f\u4f1a\u7279\u522b\u5de8\u5927\u3002<\/p>\n

uClibc\u662f\u4e00\u4e2a\u5927\u578b\u7684C\u5e93\uff0c\u5e94\u7528\u4e8e\u5d4c\u5165\u5f0fLinux\u7cfb\u7edf\u5f00\u53d1\u3002\u5b83\u57fa\u672c\u5b9e\u73b0\u4e86glibc\u7684\u529f\u80fd\uff0c\u51e0\u4e4e\u6240\u6709glibc\u652f\u6301\u7684\u5e94\u7528\u7a0b\u5e8f\u90fd\u80fd\u5728uClibc\u4e0a\u8fd0\u884c\u3002<\/p>\n

linux\u5185\u6838\u9762\u8bd5\u5e38\u89c1\u95ee\u9898_linux \u539f\u7406 \u5185\u6838 \u9762\u8bd5_\u5185\u6838\u9762\u8bd5\u9898<\/p>\n

\u8bfe\u540e\u4f5c\u4e1a<\/p>\n

1.\u5d4c\u5165\u5f0fLinux\u64cd\u4f5c\u7cfb\u7edf\u5305\u62ec\uff08bootloader\uff09\u3001\uff08Linux\u5185\u6838\uff09\u3001\uff08\u6839\u6587\u4ef6\u7cfb\u7edf\uff09\u4e09\u90e8\u4efd\u7ec4\u6210\u3002<\/p>\n

2.\u5728PC\u673a\u4e0aLinux\u7cfb\u7edf\u7f16\u8bd1\u4f7f\u7528\u7684\u7f16\u8bd1\u5668\u540d\u4e3a(gcc)\uff0cARM\u5904\u7406\u5668\u5d4c\u5165\u5f0f\u7f16\u8bd1\u5668\u540d\u4e3a(arm-linux-gcc)\u3002<\/p>\n

3.\u4eceC\u8bed\u8a00\u89d2\u5ea6\u6765\u7406\u89e3\uff0c\u5d4c\u5165\u5f0fLinux\u5185\u6838\u4ec5\u662f\u8bf8\u591a\uff08\u51fd\u6570\uff09\u7684\u96c6\u5408\u4f53\uff0c\u5176\u6709\u4e00\u4e2a\u7c7b\u4f3c\u4e8emain\u7684\u51fd\u6570linux \u539f\u7406 \u5185\u6838 \u9762\u8bd5<\/strong>\uff0c\u540d\u79f0\u4e3a\uff08start_kernel\uff09\u3002<\/p>\n

4.\u9610\u8ff0bootloader\u7684\u529f\u80fd\uff1a<\/p>\n

\u521d\u59cb\u5316\u786c\u4ef6\u8bbe\u5907linux\u89c6\u9891\uff0c\u5982\u5bf9CPU\u3001SDRAM\u3001Flash\u3001\u4e32\u53e3\u7b49\u8fdb\u884c\u521d\u59cb\u5316\uff1b\u52a0\u8f7d\u5185\u6838\u5230\u663e\u5b58\u5e76\u6267\u884c\u5185\u6838\u4ee3\u7801\uff1b\u63d0\u4f9b\u4e00\u4e9b\u547d\u4ee4\u5de5\u5177\uff0c\u5982\u64cd\u4f5cflash\u3001\u4ecePC\u673a\u642c\u8fd0\u5185\u6838\u5230\u5f00\u53d1\u677f\u7b49\u529f\u80fd\u3002<\/p>\n

5.\u5728uboot\u4e2d\uff0c\u590d\u5370\u5f00\u53d1\u677f\u5e26\u73af\u5883\u53d8\u91cf\u503c\u7684\u547d\u4ee4\u4e3a\uff08printenv\uff09\uff0c\u8bbe\u7f6eIP\u5730\u5740\u4e3a192.168.1.1\u7684\u547d\u4ee4\u4e3a\uff08setenvipaddr192.168.1.1\uff09\uff0c\u5982\u679c\u5d4c\u5165\u5f0f\u5185\u6838\u540d\u4e3avmlinux\uff0c\u901a\u8fc7tftp\u52a0\u8f7d\u5185\u6838\u7684\u547d\u4ee4\u4e3a\uff08tftp32000000vmlinux\uff09\uff0c\u542f\u52a8\u5d4c\u5165\u5f0fLinux\u5185\u6838\u7684\u547d\u4ee4\u4e3a\uff08bootm0x32000000\uff09\u3002<\/p>\n

6.\u5d4c\u5165\u5f0fLinux\u5185\u6838\u526a\u88c1\u547d\u4ee4\u4e3a\uff08makemenuconfig\uff09\uff1b\u526a\u88c1\u5b8c\u6210\u540e\u751f\u6210\u914d\u7f6e\u9009\u62e9\u6587\u4ef6(.config)\uff1b\u7f16\u8bd1\u5185\u6838\u547d\u4ee4\u4e3a(makezImage)\u3002<\/p>\n

7.\u542f\u52a8linux\u540e\u5e38\u7528\u7684\u547d\u4ee4\u5982ifconfig\u3001cp\u3001ls\u7b49\u4e00\u822c\u5750\u843d\uff08\u6587\u4ef6\u7cfb\u7edf\uff09\u4e2d\uff1b\u5d4c\u5165\u5f0fLinux\u73af\u5883\u4e0b\u751f\u6210\u6587\u4ef6\u7cfb\u7edf\u7684\u5e38\u7528\u5de5\u5177\u4e3a\uff08mkyaffs2img\uff09\uff1b\u4ee5yaffs\u65b9\u5f0f\u4e3a\u4f8b\uff0c\u5c06\u5d4c\u5165\u5f0f\u6587\u4ef6\u5939\u538b\u7f29\u6210\u4e00\u4e2ayaffs2\u683c\u5f0f\u7684\u6587\u4ef6\u7cfb\u7edf\u547d\u4ee4\u4e3a\uff08mkyaffs2img\u6587\u4ef6\u5939\u955c\u50cf\u6587\u4ef6\u540d\uff09\u3002<\/p>\n

8.\u5efa\u7acb\u5d4c\u5165\u5f0fLinux\u7cfb\u7edf\u65f6\uff0c\u70e7\u5f55bootloader\u7684\u5de5\u5177\u4e3a\uff08hjtag\uff09\uff1b\u70e7\u5f55Linux\u5185\u6838\u901a\u5e38\u4f7f\u7528\uff08bootloader\uff09\u6765\u70e7\u5f55\uff0c\u70e7\u5f55\u6587\u4ef6\u7cfb\u7edf\u901a\u5e38\u4f7f\u7528\uff08bootloader\uff09\u6765\u70e7\u5f55\u3002<\/p>\n

\u6d4b\u9a8c\uff1a<\/p>\n

\u5199\u51fa\u5d4c\u5165\u5f0fLinux\u5185\u6838\u526a\u88c1\u57fa\u672c\u6b65\u9aa4\uff08\u8981\u6c42\u5199\u51fa\u5177\u4f53\u547d\u4ee4\uff09<\/p>\n

\n

make<\/span> menuconfig\nmake<\/span> zImage\n# Ubuntu\u53ef\u4ee5\u4f7f\u7528: make uImage<\/span>\n<\/code><\/pre>\n<\/p>\n

\u5047\u5982\u5411\u5185\u6838\u6dfb\u52a0RC5\u52a0\u5bc6\u4ee3\u7801rc5.c\uff0c\u62df\u50a8\u5b58\u5230linux\u5185\u6838\u6587\u4ef6\u5939crypt\u76ee\u5f55\u4e0b\uff0c\u5e76\u8981\u6c42\u80fd\u4ee5\u56fe\u5f62\u5f62\u5f0f\u4f9b\u7528\u6237\u526a\u88c1\uff0c\u5173\u8054\u5b8f\u4e3aCONFIG_RC5_ENCRYPT\u3002\u5199\u51fa\u8be5\u6587\u4ef6\u5939\u4e0bMakefile\u6587\u4ef6\u548cKconfig\u6587\u4ef6\u66f4\u6539\u5185\u5bb9\u3002<\/p>\n

Kconfig\u6587\u4ef6\u6dfb\u52a0\u7684\u5185\u5bb9\uff1a<\/p>\n

\n

config RC5ENCRYPT\n\tbool \"RC5 ENCRYPT SUPORT\"<\/span>\n\thelp<\/span> \n\t\tthis is a simple test<\/span> ,no use\n<\/code><\/pre>\n<\/p>\n

Makefile\u6587\u4ef6\u6dfb\u52a0\u7684\u5185\u5bb9\uff1a<\/p>\n

\n

obj-$(<\/span>CONFIG_RC5_ENCRYPT)<\/span><\/span> +=<\/span> rc5.o\n<\/code><\/pre>\n<\/p>\n

linux\u5185\u6838\u9762\u8bd5\u5e38\u89c1\u95ee\u9898_linux \u539f\u7406 \u5185\u6838 \u9762\u8bd5_\u5185\u6838\u9762\u8bd5\u9898<\/p>\n

\u5c0f\u6d4b\u9a8c<\/p>\n

1\u3001\u6784\u5efa\u5d4c\u5165\u5f0fLinux\u7cfb\u7edf\u662f\u5d4c\u5165\u5f0f\u5f00\u53d1\u7684\u91cd\u8981\u5185\u5bb9\uff0c\u5305\u62ecbootloader\u526a\u88c1\u548c\u7f16\u8bd1\u3001Linux\u5185\u6838\u526a\u88c1\u548c\u7f16\u8bd1\u4ee5\u53ca\u6587\u4ef6\u7cfb\u7edf\u526a\u88c1\u548c\u5236\u505a\u7b49\u6d41\u7a0b\u3002\u8bf7\u7b80\u7b54\uff1a<\/p>\n

(1)\u9610\u8ff0\u901a\u7528bootloader\u6838\u5fc3\u529f\u80fd\uff082\u5206\uff09\u3002<\/p>\n

(2)\u5199\u51fa\u5d4c\u5165\u5f0fLinux\u5185\u6838\u526a\u88c1\u57fa\u672c\u6b65\u9aa4\uff08\u8981\u6c42\u5199\u51fa\u5177\u4f53\u547d\u4ee4\uff09\uff083\u5206\uff09<\/p>\n

(3)\u5047\u5982\u5411\u5185\u6838\u6dfb\u52a0RC5\u52a0\u5bc6\u4ee3\u7801rc5.c\uff0c\u62df\u50a8\u5b58\u5230linux\u5185\u6838\u6587\u4ef6\u5939crypt\u76ee\u5f55\u4e0b\uff0c\u5e76\u8981\u6c42\u80fd\u4ee5\u56fe\u5f62\u5f62\u5f0f\u4f9b\u7528\u6237\u526a\u88c1\uff0c\u5173\u8054\u5b8f\u4e3aCONFIG_RC5_ENCRYPT\u3002\u5199\u51fa\u8be5\u6587\u4ef6\u5939\u4e0bMakefile\u6587\u4ef6\u548cKconfig\u6587\u4ef6\u66f4\u6539\u5185\u5bb9\u3002\uff083\u5206\uff09<\/p>\n

(1)<\/p>\n

\u521d\u59cb\u5316\u786c\u4ef6\u8bbe\u5907\uff0c\u5982\u5bf9CPU\u3001SDRAM\u3001Flash\u3001\u4e32\u53e3\u7b49\u8fdb\u884c\u521d\u59cb\u5316\uff1b\u52a0\u8f7d\u5185\u6838\u5230\u663e\u5b58\u5e76\u6267\u884c\u5185\u6838\u4ee3\u7801\uff1b\u63d0\u4f9b\u4e00\u4e9b\u547d\u4ee4\u5de5\u5177\uff0c\u5982\u64cd\u4f5cflash\u3001\u4ecePC\u673a\u642c\u8fd0\u5185\u6838\u5230\u5f00\u53d1\u677f\u7b49\u529f\u80fd\u3002<\/p>\n

(2)<\/p>\n

\n

make<\/span> menuconfig\nmake<\/span> zImage\n<\/code><\/pre>\n<\/p>\n

(3)<\/p>\n

Kconfig\u6587\u4ef6\u6dfb\u52a0\u7684\u5185\u5bb9\uff1a<\/p>\n

\n

config RC5ENCRYPT\n\tbool \"RC5 ENCRYPT SUPORT\"<\/span>\n\thelp<\/span> \n\t\tthis is a simple test<\/span> ,no use\n<\/code><\/pre>\n<\/p>\n

Makefile\u6587\u4ef6\u6dfb\u52a0\u7684\u5185\u5bb9\uff1a<\/p>\n

\n

obj-$(<\/span>CONFIG_RC5_ENCRYPT)<\/span><\/span> +=<\/span> rc5.o\n<\/code><\/pre>\n<\/p>\n

2\u3001\u7b80\u8ff0sqilte\u7684\u79fb\u690d\u6b65\u9aa4\uff08\u5199\u51fa\u5177\u4f53\u547d\u4ee4\uff09\u3002\uff082\u5206\uff09<\/p>\n

(1)\u4e0b\u8f7d\u6e90\u7801\u5305\u5e76\u89e3\u538b\u7f29<\/p>\n

(2)\u751f\u6210Makefile<\/p>\n

\n

.\/configure CC=<\/span>arm-linux-gcc \u2013prefix=<\/span>\/opt\/sqlite \u2013host=<\/span>arm-linux\n<\/code><\/pre>\n<\/p>\n

(3)\u7f16\u8bd1\u53ca\u5b89\u88c5<\/p>\n

\n

make<\/span>\nmake<\/span> install<\/span>\n<\/code><\/pre>\n<\/p>\n

\u5b89\u88c5\u540e\u53ef\u4ee5\u5728\/opt\/sqilte\u4e0b\u770b\u5230\u79fb\u690d\u597d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f\u53ca<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5d4c\u5165\u5f0fLinux\u4e09\u5251\u5ba2\u4e4b\u6587\u4ef6\u7cfb\u7edf\u6280\u672f\u6784\u5efa\u5d4c\u5165\u5f0fLinux\u7cfb\u7edf\u65f6\uff0c\u70e7\u5199bootloader\u7684\u5de5\u5177\u4e3a\uff08hjtag\uff09\uff1b\u70e7\u5199Linux\u5185\u6838\u4e00\u822c\u4f7f\u7528\uff08bootloader\uff09\u6765\u70e7\u5199\uff0c\u70e7\u5199\u6587\u4ef6\u7cfb\u7edf\u4e00\u822c\u4f7f\u7528\uff08bootloader\uff09\u6765\u70e7\u5199\u30021\u3001\u6784\u5efa\u5d4c\u5165\u5f0fLinux\u7cfb\u7edf\u662f\u5d4c\u5165\u5f0f\u5f00\u53d1\u7684\u91cd\u8981\u5185\u5bb9\uff0c\u5305\u62ecbootloader\u88c1\u526a\u548c\u7f16\u8bd1\u3001Linux\u5185\u6838\u88c1\u526a\u548c\u7f16\u8bd1\u4ee5\u53ca\u6587\u4ef6\u7cfb\u7edf\u88c1\u526a\u548c\u5236\u4f5c\u7b49\u6d41\u7a0b\u3002<\/p>\n","protected":false},"author":1,"featured_media":279497,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-279496","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/279496","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=279496"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/279496\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/279497"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=279496"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=279496"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=279496"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}