Linux
-
[Linux] 툴체인Linux 2026. 5. 30. 15:21
- Reference : 임베디드 리눅스 프로그래밍 완전정복 3/e Q) 리눅스용으로 작성하는 모든 프로그램은 C로 작성됐든, C++ 로 작성됐든 상관없이 C 라이브러리인 libc와 링크될 것이다. 이것은 너무나 기본적이라서 gcc나 g++ 에게 지시할 필요도 없다. gcc/g++ 는 언제나 libc와 링크한다. => libc (C 표준 라이브러리)는 '커널과 소통하는 유일한 창구'입니다.=> 프로그램이 화면에 글자를 출력(printf)하거나, 파일을 열거나(fopen), 메모리를 할당(malloc)받으려면 반드시 리눅스 커널에게 시스템 콜(System Call)을 요청해야 합니다. 하지만 개발자가 어셈블리어를 써서 커널에 직접 시스템 콜을 요청하는 것은 너무 복잡하고 어렵습니다. 그래서 리눅스는 개발..
-
[리눅스 커널] V4L2_FIELD_* & V4L2_PIX_FMT_* & MEDIA_BUS_FMT_*Linux/kernel 2024. 9. 22. 18:42
글의 참고-- https://www.kernel.org/doc/html/v4.9/media/uapi/v4l/subdev-formats.html#bayer-patterns-글의 전제- 밑줄로 작성된 글은 강조 표시를 의미한다.- 그림 출처는 항시 그림 아래에 표시했다.글의 내용- V4L2_FIELD_*" V4L2_FIELD_* 는 프레임(Frame) 이 어떤 포맷(Format) 으로 전송되는지를 나타낸다. 예를 들어, 1 개의 이미지가 전송될 때 Top Field 와 Bottom Field 가 번갈아 가면서 전송되는지, 모든 Top Field 가 먼저 전송되고 Bottom Field 가 전송되는지 등을 나타낸다. 참고로, Frame 과 Field 는 다른 용어다. 예를 들어, interlaced video..
-
[리눅스 커널] Dmesg Buffer Size 변경Linux/kernel 2024. 8. 15. 17:26
글의 참고-- https://stackoverflow.com/questions/6451474/how-can-i-change-the-size-of-dmesg-linux-2-4- https://stackoverflow.com/questions/27640173/enlarge-linux-kernel-log-buffer-more-that-2m글의 전제- 밑줄로 작성된 글은 강조 표시를 의미한다.- 그림 출처는 항시 그림 아래에 표시했다.글의 내용- 개요" 실무에서 일하다보면 dmesg 사이즈가 너무 작아서 초기 부팅 때 로그를 확인하지 못할 때가 많다. 그럴 때 dmesg buffer size 를 늘릴 수 있는 2 가지 방법이 있다.1. 정적(in compile-time) - CONFIG_LOG_BUF_SHIF..
-
[리눅스 커널] /proc/config.gz 없을 경우Linux/kernel 2024. 8. 14. 18:14
글의 참고- https://stackoverflow.com/questions/11694657/proc-config-gz-does-not-exist- https://cateee.net/lkddb/web-lkddb/IKCONFIG_PROC.html글의 전제- 밑줄로 작성된 글은 강조 표시를 의미한다.- 그림 출처는 항시 그림 아래에 표시했다.- 테스한 커널 버전은 v5.4글의 내용- /proc/config.gz" 사실 굳히 /proc/config.gz 를 확인할 필요는 없다. 왜냐면 kernel 을 빌드하고 .config 를 확인하면 되기 때문이다. .config 는 가장 최근에 빌드된 defconfig 를 의미하기 때문에 confg.gz 가 없다면 .config 를 확인하면 되기 때문이다. 그러나 .con..
-
[리눅스 커널] IRQ - workqueueLinux/kernel 2023. 12. 30. 15:21
글의 참고 - https://docs.kernel.org/core-api/workqueue.html - https://lwn.net/Articles/355700/ - https://lwn.net/Articles/23634/ - https://lwn.net/Articles/329464/ - https://lwn.net/Articles/211279/ - https://lwn.net/Articles/393171/ - https://lwn.net/Articles/403891/ - http://www.wowotech.net/irq_subsystem/workqueue.html - http://www.wowotech.net/process_management/schedule-in-interrupt.html - http..
-
[리눅스 커널] Interrupt - Driver interrupt handlerLinux/kernel 2023. 12. 29. 14:56
글의 참고 - https://lwn.net/Articles/302043/ - http://www.wowotech.net/irq_subsystem/request_threaded_irq.html - https://stackoverflow.com/questions/7685294/request-threaded-irq-is-used-in-the-driver-why-not-request-irq-what-are-the - https://linux-kernel-labs.github.io/refs/heads/master/labs/interrupts.html - https://wiki.linuxfoundation.org/realtime/documentation/technical_details/threadirq 글의 전제 ..
-
[리눅스 커널] Interrupt - High-level flow irq handlerLinux/kernel 2023. 12. 27. 13:42
글의 참고 - https://linux-kernel-labs.github.io/refs/heads/master/lectures/interrupts.html - https://docs.kernel.org/core-api/genericirq.html - http://www.wowotech.net/irq_subsystem/High_level_irq_event_handler.html 글의 전제 - 밑줄로 작성된 글은 강조 표시를 의미한다. - 그림 출처는 항시 그림 아래에 표시했다. 글의 내용 - Overview " peripherals 이 interrupt 를 발생시키면, 대략적인 interrupt handling flow 는 다음과 같다. 참고로, 이 글에서는 주로 (3) 단계에 대해 다룰 것이다. 1. i..
-
[리눅스 커널] interrupt - IRQ numberLinux/kernel 2023. 12. 27. 01:45
글의 참고 - https://docs.kernel.org/core-api/genericirq.html - https://docs.kernel.org/core-api/irq/concepts.html - https://www.kernel.org/doc/html/next/core-api/irq/irq-domain.html - http://www.wowotech.net/irq_subsystem/interrupt_descriptor.html - https://lwn.net/Articles/380931/ - https://linux-kernel-labs.github.io/refs/heads/master/lectures/interrupts.html - https://stackoverflow.com/questions/..