내용으로 건너뛰기
사용자 도구
사이트 도구
검색
도구
문서 보기
이전 판
역링크
최근 바뀜
미디어 관리자
사이트맵
로그인
>
English
현재 위치:
index
»
comfilepi
»
gpio_init
»
edit_binfile
comfilepi:gpio_init:edit_binfile
이 문서는 읽기 전용입니다. 원본을 볼 수는 있지만 바꿀 수는 없습니다. 문제가 있다고 생각하면 관리자에게 문의하세요.
====== dt-blob.bin 직접 고치기 ====== GPIO의 디폴트 상태를 결정하는 파일이 /boot/dt-blob.bin입니다. 이 파일 내용을 바꾸면 최초상태를 Off로 할 수 있습니다. * 혹시 모르니까 기존''/boot/dt-blob.bin'' 파일을 백업하세요.<code> cp /boot/dt-blob.bin dt-blob-backup.bin </code> {{ :comfilepi:gpio_init:dtd1.png?nolink |}} * 우선 텍스트형태로 만들어야 바꿀 수 있습니다. bin파일을 아래 명령어로 텍스트파일인 dts로 만드세요. <code> sudo dtc -I dtb -O dts -o dt-blob.dts /boot/dt-blob.bin </code> {{ :comfilepi:gpio_init:dtd12.png?nolink |}} - 텍스트 에디터 (보조 프로그램에 있음)를 사용해서 ''dt-blob.dts''을 오픈하세요. {{ :comfilepi:gpio_init:dtd123.png?nolink |}} \\ {{ :comfilepi:gpio_init:dtd1234.png?nolink |}} \\ * 중간즈음에 오면 pins_cm3라는 부분이 있습니다. {{ :comfilepi:gpio_init:dtd12343.png?nolink |}} * ''pins_cm3 { pin_config { ...'' 안쪽에 아래 소스를 카피해서 넣으세요. (VNC를 사용해서 PC에서 작업하시면 편합니다. Ctrl+c로 카피해서 ctrl+v로 넣으세요.) <code> pin@p17 { function = "output"; termination = "no_pulling"; polarity = "active_low"; startup_state = "active"; }; // GPIO17 pin@p18 { function = "output"; termination = "no_pulling"; polarity = "active_low"; startup_state = "active"; }; // GPIO18 pin@p19 { function = "output"; termination = "no_pulling"; polarity = "active_low"; startup_state = "active"; }; // GPIO19 pin@p20 { function = "output"; termination = "no_pulling"; polarity = "active_low"; startup_state = "active"; }; // GPIO20 pin@p21 { function = "output"; termination = "no_pulling"; polarity = "active_low"; startup_state = "active"; }; // GPIO21 pin@p22 { function = "output"; termination = "no_pulling"; polarity = "active_low"; startup_state = "active"; }; // GPIO22 pin@p23 { function = "output"; termination = "no_pulling"; polarity = "active_low"; startup_state = "active"; }; // GPIO23 pin@p24 { function = "output"; termination = "no_pulling"; polarity = "active_low"; startup_state = "active"; }; // GPIO24 pin@p25 { function = "output"; termination = "no_pulling"; polarity = "active_low"; startup_state = "active"; }; // GPIO25 pin@p26 { function = "output"; termination = "no_pulling"; polarity = "active_low"; startup_state = "active"; }; // GPIO26 pin@p27 { function = "output"; termination = "no_pulling"; polarity = "active_low"; startup_state = "active"; }; // GPIO27 </code> {{ :comfilepi:gpio_init:dtd1234311.png?nolink |}} * 다른이름으로 저장하기 누른뒤 dt-blob2.dts라는 이름으로 저장하세요. - dts를 다시 bin으로 바꾸어야 합니다.<code> sudo dtc -I dts -O dtb -o /boot/dt-blob.bin dt-blob2.dts </code> * 다시 껏다 켜보세요. CPIO의 출력포트의 최초상태가 Off인 것을 확인할 수 있습니다. [[comfilepi:index|ComfilePi (컴파일 파이)]]
comfilepi/gpio_init/edit_binfile.txt
· 마지막으로 수정됨: 2020/11/22 23:55 저자
Comfile Technology
문서 도구
문서 보기
이전 판
역링크
맨 위로