鏍戣帗娲惧疄鏃惰ˉ涓佹暀绋嬩箣浜ゅ弶缂栬瘧绡-纭欢鍙婂巶鍟嗕笓鍖-閰峰痉缃 - CoDeSys杞欢鏁欑▼涓嬭浇,CoDeSys宸ユ帶璧勮闂ㄦ埛
HSC6490-cn涓浗鍒堕狅紝涓浗鑺瘇
鏌ョ湅: 4475|鍥炲: 1

鏍戣帗娲惧疄鏃惰ˉ涓佹暀绋嬩箣浜ゅ弶缂栬瘧绡

[澶嶅埗閾炬帴]
  • TA鐨勬瘡鏃ュ績鎯
    鎿︽睏
    2019-8-13 14:13
  • 绛惧埌澶╂暟: 32 澶

    [LV.5]甯镐綇灞呮皯I

    鍙戣〃浜 2020-6-11 08:54:49 | 鏄剧ず鍏ㄩ儴妤煎眰 |闃呰妯″紡
    姝ゆ暀绋嬬殑鐜鏄浗浜eepin绯荤粺锛岀‖浠舵槸铏氭嫙鏈猴紝濡傛湁闂璇峰悗鍙扮暀瑷銆傛偍鐨勬敮鎸佹槸灏忕紪鏇存柊涓嬪幓鐨勫姩鍔涖傚彟澶栵紝鐐硅禐鍒嗕韩锛屽叡鍚岃繘姝ワ紝娆㈣繋澶у杞彂銆1.瀹夎宸ュ叿銆
    鎸囦护锛
    apt-get install git bc bison flex libssl-dev make libc6-dev libncurses5-dev
    85abf4609284780e901d37a43a38706c.png
    宸ュ叿璇存槑锛
    Git : 涓涓紑婧愮殑鍒嗗竷寮忕増鏈帶鍒剁郴缁熴
    Bc锛氬畠绫讳技鍩烘湰鐨勮绠楀櫒, 浣跨敤杩欎釜璁$畻鍣ㄥ彲浠ュ仛鍩烘湰鐨勬暟瀛﹁繍绠椼
    bison 锛氭牴鎹枃娉曟妸涓绯诲垪鐨勮鍙疯浆鎹㈡垚涓涓娉曞垎鏋愭爲銆
    Flex锛氫竴涓瘝娉曞垎鏋愬櫒銆傜敤鏉ュ皢涓涓.l鏂囦欢鐢熸垚涓涓.c绋嬪簭鏂囦欢銆傚嵆鐢熸垚涓涓瘝娉曞垎鏋愬櫒銆
    libssl-dev锛氭槸OpenSSL閫氱敤搴擄紝SSL涔熷嵆Secure Socket Layer锛屾槸鐢辩綉鏅叕鍙镐负浜嗕紶杈撴晱鎰熸暟鎹屾彁鍑虹殑鍗忚
    make 锛氫竴涓敤鏉ユ帶鍒跺彲鎵ц鏂囦欢鍜屽叾浠栦竴浜涗粠婧愭枃浠舵潵鐨勯潪婧愪唬鐮佹枃浠剁増鏈殑杞欢
    libncurses5-dev锛氭槸涓涓狶inux绯荤粺涓嬬殑鍥惧舰鏀寔鐨勫嚱鏁板簱,瀛楃缁堢澶勭悊搴,鍖呮嫭闈㈡澘鍜岃彍鍗
    2.鏂板缓涓涓枃浠跺すKernel锛岃幏鍙栨爲鑾撴淳Linux鍐呮牳婧愮爜
    4c6fdab375cdd2853f19b48b076f1bb0.png
    鍛戒护锛
    git clone --depth=1 https://github.com/raspberrypi/linux
    鏌ョ湅Linux鐗堟湰:
    杩涘叆Linux鐩綍锛岃緭鍏ユ寚浠わ細
    head Makefile -n 4
    # SPDX-License-Identifier: GPL-2.0
    VERSION = 4
    PATCHLEVEL = 19
    SUBLEVEL = 122
    3.涓嬭浇瀹炴椂琛ヤ竵
    https://mirrors.edge.kernel.org/ ... ects/rt/4.19/older/
    鍛戒护锛
    wget mirrors.edge.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patch-4.19.120-rt52.patch.xz

    6949904e62595f789b0d881e840e09dd.png
    4.鎵撹ˉ涓
    鍛戒护
    sudo xz -cd ../patch-4.19.120-rt52.patch.xz | patch -p1 --verbos
    琛ヤ竵鎵撴垚鍔熸埅鍥
    704f6cffb141ca19627d8b4229c63180.png
    5.鏍戣帗娲惧伐鍏烽摼閰嶇疆锛
    鍖呮嫭Binutils(姹囩紪宸ュ叿)銆丟CC(缂栬瘧鍣)鍜孏libc(鏍囧噯C鍑芥暟搴)锛屼富瑕佺敤浜庢妸婧愪唬鐮佺紪璇戣繛鎺ョ敓鎴愬彲鎵ц绋嬪簭銆
    涓嬭浇宸ュ叿閾撅紙闇瑕佹椂闂村彲鑳借緝闀匡級銆
    鎸囦护锛
    git clone https://github.com/raspberrypi/tools ./
    d0a12d91352dff3153a264fa56bb26e6.png

    閰嶇疆鐜鍙橀噺锛
    echo PATH=\$PATH:~/Desktop/ToolChain/arm-bcm2708/arm-linux-gnueabihf/bin >> ~/.bashrc
    8e4dc72459ef395d8547e6e083b6feb4.png

    source ~/.bashrc
    0e02da88f63c6d7552a4ff5242d05adb.png

    6.閫氳繃Make menuconfig閰嶇疆PREEMPT_RT缂栬瘧寮鍏
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig

    d0628fcc71f22100187e0113f2f754f7.png

    7.搴旂敤榛樿閰嶇疆
    瀵逛簬鏍戣帗娲2锛3锛3+鏉ヨ
    KERNEL=kernel7make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcm2709_defconfig

    瀵逛簬鏍戣帗娲4鏉ヨ
    KERNEL=kernel7lmake ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcm2711_defconfig

    8.缂栬瘧鍐呮牳锛堟椂闂磋緝闀匡級
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j4 zImage modules dtbs
    9.鐩存帴鍦⊿D鍗′腑杩涜瀹夎
    涓婁竴姝ョ紪璇戞垚鍔熷悗浼氬湪涓嬮潰璺緞涓嬬敓鎴恴Image銆
    64b6732e3dbbeec56a238e09af1454a6.png
    灏哠D鍗℃彃鍏ヨ鍗″櫒锛屽苟鎸傝浇鍒拌櫄鎷熸満涓婏紝浣跨敤lsblk鍛戒护鏌ョ湅鎸傚湪鎯呭喌
    a1da1abd54e3c53117afb48d83b69a14.png

    8982009c38675407db6eb8ae31c8108d.png

    瀹夎modules
    sudo env PATH=$PATH make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=mnt/ext4 modules_install
    澶嶅埗鍐呮牳鍜岃澶囨爲鍒癝D鍗★紝骞跺浠借佺殑鍐呮牳
    sudo cp mnt/fat32/$KERNEL.img mnt/fat32/$KERNEL-backup.img
    sudo cp arch/arm/boot/zImage mnt/fat32/$KERNEL.img
    sudo cp arch/arm/boot/dts/*.dtb mnt/fat32/
    sudo cp arch/arm/boot/dts/overlays/*.dtb* mnt/fat32/overlays/
    sudo cp arch/arm/boot/dts/overlays/README mnt/fat32/overlays/
    sudo umount mnt/fat32sudo umount mnt/ext4


    8d68511133da45e1dd1926d35f45a0de.png

    10.鏍戣帗娲炬彃涓奡D鍗
    杈撳叆uname -a锛屽彂鐜板凡缁忔槸瀹炴椂鐗堟湰浜
    fd18145623f1a172e884164be90abd9b.png
    10.CODESYS浠诲姟娴嬭瘯
    1fc448c9e6302e11ff66e2e83c466ba1.png

                   
    +10
    涓嶈禐涓涓紵
    鎵撹祻榧撳姳涓涓嬶紒
    鍥炲

    浣跨敤閬撳叿 涓炬姤

  • TA鐨勬瘡鏃ュ績鎯

    2022-4-11 22:35
  • 绛惧埌澶╂暟: 35 澶

    [LV.5]甯镐綇灞呮皯I

    鍙戣〃浜 2020-8-14 15:40:48 | 鏄剧ず鍏ㄩ儴妤煎眰
    铏氭嫙鏈轰笂鍙互鐢ㄦ爲鑾撴淳鎺堟潈涓
    +10
    涓嶈禐涓涓紵
    鎵撹祻榧撳姳涓涓嬶紒
    鎮ㄩ渶瑕佺櫥褰曞悗鎵嶅彲浠ュ洖甯 鐧诲綍 | 绔嬪嵆娉ㄥ唽 鏂版氮寰崥鐧婚檰

    鏈増绉垎瑙勫垯

    椤堕儴qrcode搴曢儴
    鍏虫敞閰峰痉缃戣闃呭彿锛岃幏鍙栨洿澶氳祫璁紒

    QQ|灏忛粦灞|鎵嬫満鐗|Archiver|閰峰痉璁哄潧 ( 鑻廔CP澶16065247鍙-1 )|缃戠珯鍦板浘

    GMT+8, 2024-11-23 23:18 , Processed in 0.157757 second(s), 68 queries .

    閰峰痉缃

    © 2001-2013 Hicodesys. 鎶鏈敮鎸 by 閰峰痉缃

    蹇熷洖澶 杩斿洖椤堕儴 杩斿洖鍒楄〃