본문으로 건너뛰기
Modern Embedded Recipes · 86/153

sysfs·configfs 활용 — kobject 기반 User 인터페이스

· Hawk · 6분 읽기
recipes sysfs configfs kobject udev

#한 줄 요약

“sysfs = driver가 사용자 공간에 보여 주는 작은 텍스트 파일.” kobject 트리에 attribute를 달면 cat과 echo로 읽고 쓰는 제어 인터페이스가 됩니다. 이 글의 driver·udev·configfs 출력은 모두 Debian 13 arm64(커널 6.12.116+deb13-arm64, systemd/udev 257)에서 직접 돌린 결과입니다.

#어떤 상황에서 쓰나

LED 밝기나 fan PWM duty처럼 가끔 바꾸는 제어 값은 ioctl을 정의하는 것보다 sysfs 파일 하나가 단순합니다. 셸 스크립트에서 echo 42 > .../value로 바로 쓸 수 있고, 전용 도구 없이 cat으로 상태를 볼 수 있습니다. 집 안의 온도 조절기 다이얼처럼, 자주 돌리지는 않지만 누구나 바로 보고 돌릴 수 있는 손잡이입니다.

configfs는 방향이 반대입니다. sysfs는 커널이 만든 객체를 사용자에게 보여 주고, configfs는 사용자가 mkdir로 커널 객체를 만듭니다. USB gadget을 사용자 공간에서 조립하는 것이 대표 예이고, 아래에서 실제로 만들어 봅니다.

#핵심 개념

커널 쪽sysfs에서 보이는 것
struct kobject디렉터리
struct attribute (+ show/store)디렉터리 안의 파일 하나
struct attribute_group (.name)파일 묶음, 이름이 있으면 하위 디렉터리
struct bin_attribute텍스트가 아닌 바이너리 파일

커널 문서의 규칙은 “Attributes should be ASCII text files, preferably with only one value per file”입니다(v6.12 Documentation/filesystems/sysfs.rst:62-65). 같은 문서는 같은 타입 값의 배열 정도는 한 파일에 담아도 된다고 덧붙입니다. show는 PAGE_SIZE 크기 버퍼를 받으며 sysfs_emit()/sysfs_emit_at()로만 채워야 합니다(같은 문서 240-246행).

#코드 / 실제 사용 예

#Attribute group을 가진 platform driver

아래 모듈은 platform device sample과 driver를 함께 등록합니다. 읽기·쓰기 attribute value, 읽기 전용 status, 쓰기 전용 reset, 바이너리 firmware를 control/ 하위 디렉터리에 둡니다. Attribute는 probe에서 직접 만들지 않고 .driver.dev_groups에 넘겨 driver core가 bind 때 만들고 unbind 때 지우게 했습니다(v6.12 include/linux/device/driver.h:79, :116).

GPL-2.0
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/platform_device.h>
#include <linux/sysfs.h>
static unsigned int g_value;
static DEFINE_MUTEX(g_lock);
static const char fw_data[] = "calibration-blob-v1";
static ssize_t value_show(struct device *dev, struct device_attribute *a, char *buf)
{
unsigned int v;
mutex_lock(&g_lock);
v = g_value;
mutex_unlock(&g_lock);
return sysfs_emit(buf, "%u\n", v);
}
static ssize_t value_store(struct device *dev, struct device_attribute *a,
const char *buf, size_t count)
{
unsigned int v;
int ret = kstrtouint(buf, 10, &v);
if (ret)
return ret;
if (v > 100)
return -ERANGE;
mutex_lock(&g_lock);
g_value = v;
mutex_unlock(&g_lock);
sysfs_notify(&dev->kobj, "control", "value"); /* wake poll() on the file */
return count;
}
static DEVICE_ATTR_RW(value);
static ssize_t status_show(struct device *dev, struct device_attribute *a, char *buf)
{
return sysfs_emit(buf, "ok\n");
}
static DEVICE_ATTR_RO(status);
static ssize_t reset_store(struct device *dev, struct device_attribute *a,
const char *buf, size_t count)
{
msleep(500); /* long work inside store */
return count;
}
static DEVICE_ATTR_WO(reset);
static ssize_t firmware_read(struct file *f, struct kobject *k, struct bin_attribute *a,
char *buf, loff_t off, size_t count)
{
return memory_read_from_buffer(buf, count, &off, fw_data, sizeof(fw_data) - 1);
}
static BIN_ATTR_RO(firmware, sizeof(fw_data) - 1);
static struct attribute *sample_attrs[] = {
&dev_attr_value.attr,
&dev_attr_status.attr,
&dev_attr_reset.attr,
NULL,
};
static struct bin_attribute *sample_bin_attrs[] = {
&bin_attr_firmware,
NULL,
};
static const struct attribute_group sample_group = {
.name = "control", /* subdirectory */
.attrs = sample_attrs,
.bin_attrs = sample_bin_attrs,
};
__ATTRIBUTE_GROUPS(sample); /* sample_groups[] */
static int sample_probe(struct platform_device *pdev)
{
dev_info(&pdev->dev, "probed; groups are added by the driver core\n");
return 0;
}
static struct platform_driver sample_driver = {
.probe = sample_probe,
.driver = {
.name = "sample",
.dev_groups = sample_groups,
},
};
static struct platform_device *sample_pdev;
static int __init sample_init(void)
{
int ret = platform_driver_register(&sample_driver);
if (ret)
return ret;
sample_pdev = platform_device_register_simple("sample", -1, NULL, 0);
if (IS_ERR(sample_pdev)) {
platform_driver_unregister(&sample_driver);
return PTR_ERR(sample_pdev);
}
return 0;
}
static void __exit sample_exit(void)
{
platform_device_unregister(sample_pdev);
platform_driver_unregister(&sample_driver);
}
module_init(sample_init);
module_exit(sample_exit);
MODULE_LICENSE("GPL");
Terminal window
make # obj-m += sample.o, KDIR=/lib/modules/$(uname -r)/build
insmod sample.ko
D=/sys/devices/platform/sample/control
ls -l $D
cat $D/value $D/status
echo 42 > $D/value && cat $D/value
echo 101 > $D/value; echo abc > $D/value; cat $D/value
hexdump -C $D/firmware
total 0
-r--r--r-- 1 root root 19 Nov 16 14:41 firmware
--w------- 1 root root 4096 Nov 16 14:41 reset
-r--r--r-- 1 root root 4096 Nov 16 14:41 status
-rw-r--r-- 1 root root 4096 Nov 16 14:41 value
0
ok
42
bash: line 6: echo: write error: Numerical result out of range
bash: line 6: echo: write error: Invalid argument
42
00000000 63 61 6c 69 62 72 61 74 69 6f 6e 2d 62 6c 6f 62 |calibration-blob|
00000010 2d 76 31 |-v1|
00000013
  • DEVICE_ATTR_RW는 0644, _RO는 0444, _WO는 0200 파일을 만들었습니다(ls -l의 -rw-r--r--, -r--r--r--, --w-------).
  • store가 돌려준 에러는 write의 errno가 됩니다. 범위를 넘은 101은 -ERANGE로, 숫자가 아닌 abc는 kstrtouint의 -EINVAL로 거부되어 셸이 Numerical result out of range·Invalid argument를 찍었고, 값은 42로 남았습니다.
  • 바이너리 attribute firmware의 크기 19(0x13)는 BIN_ATTR_RO에 준 길이이고, 내용이 그대로 읽혔습니다.
  • driver만 떼었다가 다시 붙여도 중복 이름 에러가 나지 않았습니다. unbind하면 control/이 사라지고, 다시 bind하면 그대로 다시 생겼습니다. dev_groups는 driver core가 bind 때 만들고 unbind 때 지웁니다. 모듈을 rmmod/insmod하는 것으로는 이 구분이 보이지 않습니다. 이 모듈은 device까지 지우므로, attribute를 지우지 않는 잘못된 driver도 다시 올리면 성공하기 때문입니다(독립 검증에서 확인).
Terminal window
echo sample > /sys/bus/platform/drivers/sample/unbind; ls /sys/devices/platform/sample
echo sample > /sys/bus/platform/drivers/sample/bind && ls $D
driver_override
modalias
power
subsystem
uevent
firmware
reset
status
value

#sysfs_notify — 값이 바뀌면 깨우기

store에서 sysfs_notify(&dev->kobj, "control", "value")를 불러 두면, 사용자 공간은 그 파일을 poll로 기다릴 수 있습니다. 파일을 한 번 읽은 뒤 POLLPRI·POLLERR로 기다리고, 깨어나면 처음부터 다시 읽습니다. kernfs의 poll은 알림이 오면 EPOLLERR|EPOLLPRI를 돌려줍니다(v6.12 fs/kernfs/file.c:842-843, 읽기 → poll → 다시 읽기 순서는 같은 파일 822-829행 주석).

#include <fcntl.h>
#include <poll.h>
#include <stdio.h>
#include <unistd.h>
int main(void)
{
const char *path = "/sys/devices/platform/sample/control/value";
char buf[16];
int fd = open(path, O_RDONLY);
read(fd, buf, sizeof buf); /* must read once before poll */
struct pollfd p = { .fd = fd, .events = POLLPRI | POLLERR };
int n = poll(&p, 1, 3000);
lseek(fd, 0, SEEK_SET);
ssize_t r = read(fd, buf, sizeof buf - 1);
buf[r > 0 ? r : 0] = 0;
printf("poll=%d revents=0x%x, new value=%s", n, p.revents, buf);
return 0;
}

notify를 배경으로 띄워 두고 echo 7 > $D/value를 하자 다음 줄이 찍혔습니다. revents 0xa는 POLLERR(0x8)와 POLLPRI(0x2)입니다.

poll=1 revents=0xa, new value=7

#결과를 udev rule로 초기화하기

장치가 나타날 때의 초기값은 driver에 하드코딩하지 않고 udev rule로 줄 수 있습니다. 이 attribute들은 dev_groups라 driver가 bind될 때 생기므로(v6.12 drivers/base/dd.c:677) rule은 add가 아니라 bind 이벤트에 겁니다. 독립 검증에서 ACTION=="add"로 걸었더니 20번 중 8번은 control/이 아직 없어 udev가 No such file or directory로 쓰기를 건너뛰었습니다. 아래 bind rule로는 모듈을 10번 올려 10번 모두 값이 0이 아니라 64로 시작했습니다. ATTR{}에는 장치 디렉터리 기준 상대 경로를 쓸 수 있어 control/value에 바로 썼습니다.

SUBSYSTEM=="platform", KERNEL=="sample", ACTION=="bind", ATTR{control/value}="64"
bind rule: value 64 in 10/10 runs

이 VM의 udev는 udevadm --version 기준 257입니다.

#configfs — 사용자가 USB gadget을 만든다

configfs에서는 mkdir가 커널 객체를 만듭니다. 커널 문서의 USB gadget 절차(v6.12 Documentation/usb/gadget_configfs.rst)대로, 가상 USB 장치 컨트롤러(dummy_hcd)에 CDC ACM serial gadget을 붙였습니다. Debian 커널은 CONFIG_USB_DUMMY_HCD=m, CONFIG_USB_CONFIGFS_ACM=y입니다.

Terminal window
modprobe dummy_hcd && modprobe libcomposite
G=/sys/kernel/config/usb_gadget/g1
mkdir $G
echo 0x1d6b > $G/idVendor
echo 0x0104 > $G/idProduct
mkdir -p $G/strings/0x409 && echo demo > $G/strings/0x409/product
mkdir $G/configs/c.1
mkdir $G/functions/acm.0
ln -s $G/functions/acm.0 $G/configs/c.1/
ls /sys/class/udc/ && cat /sys/class/udc/*/state
echo dummy_udc.0 > $G/UDC
sleep 1
cat /sys/class/udc/*/state
ls /dev/ttyACM* /dev/ttyGS*
dummy_udc.0
not attached
configured
/dev/ttyACM0
/dev/ttyGS0

UDC에 컨트롤러 이름을 쓰고 가상 host의 열거가 끝나자(독립 검증의 dmesg 기준 수백 ms, 그래서 sleep 1을 둠) 상태가 configured가 됐고, gadget 쪽 serial /dev/ttyGS0과, 같은 VM의 가상 host가 본 /dev/ttyACM0이 함께 생겼습니다. 실제 보드라면 dummy_udc.0 자리에 SoC의 USB device 컨트롤러 이름이 들어갑니다. 지울 때는 UDC를 비우고, 링크와 디렉터리를 만든 역순으로 지웁니다.

#측정 / 성능 비교

sysfs 읽기 한 번의 비용을 같은 VM에서 다른 작업이 없을 때(load average 0.05) 쟀습니다(20만 회 평균, 두 번). 7-07의 char driver ioctl은 같은 VM에서 호출당 156 ns였습니다.

#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
static double now(void)
{
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
return ts.tv_sec + ts.tv_nsec / 1e9;
}
int main(void)
{
const char *path = "/sys/devices/platform/sample/control/value";
enum { N = 200000 };
char buf[16];
int fd = open(path, O_RDONLY);
double t0 = now();
for (int i = 0; i < N; i++)
pread(fd, buf, sizeof buf, 0); /* fd kept open */
double t1 = now();
for (int i = 0; i < N; i++) { /* open + read + close each time */
int f = open(path, O_RDONLY);
read(f, buf, sizeof buf);
close(f);
}
double t2 = now();
printf("pread on open fd: %.0f ns/read\nopen+read+close: %.0f ns/read\n",
(t1 - t0) / N * 1e9, (t2 - t1) / N * 1e9);
return 0;
}
pread on open fd: 287 ns/read
open+read+close: 1474 ns/read
pread on open fd: 287 ns/read
open+read+close: 1430 ns/read

fd를 열어 둔 채 pread로 다시 읽으면 300 ns대였지만, 매번 open·read·close를 하면 다섯 배쯤(1.4 µs 안팎) 걸렸습니다. 셸 스크립트의 cat은 매번 여는 쪽이고, 프로세스 생성 비용까지 더해집니다. 그래서 sysfs는 가끔 읽고 쓰는 제어 값에 맞고, 자주 오가는 데이터는 char device의 read·mmap(7-09)으로 보냅니다.

#자주 보는 함정

⚠️ Attribute group을 두 번 등록

static int sample_probe(struct platform_device *pdev) {
int rc = sysfs_create_group(&pdev->dev.kobj, &sample_group);
if (rc) return rc;
return devm_device_add_group(&pdev->dev, &sample_group); /* same group again */
}

같은 group을 sysfs_create_group과 devm_device_add_group으로 두 번 만들면 두 번째가 같은 이름의 디렉터리를 다시 만들려다 실패합니다. 한 가지만 씁니다. driver가 정적인 group을 가진다면 위 예처럼 .dev_groups가 가장 단순합니다. probe 안에서 조건에 따라 붙여야 할 때만 devm_device_add_group(v6.12 drivers/base/core.c:2845-2874)을 씁니다.

⚠️ store 안에서 오래 걸리는 작업

위 reset_store는 msleep(500)을 합니다. time (echo 1 > $D/reset)은 real 0.513 s였습니다. echo를 부른 쪽이 그만큼 멈추므로, 오래 걸리는 작업은 workqueue로 넘기고 store는 바로 반환한 뒤 끝나면 sysfs_notify로 알립니다.

⚠️ 여러 값을 한 파일에

return sysfs_emit(buf, "%u %u %u\n", a, b, c);

커널 문서는 한 파일에 한 값을 권하고, 같은 타입의 배열까지만 허용합니다. 서로 다른 의미의 값을 한 줄에 섞으면 사용자 공간이 위치로 파싱해야 하고, store 쪽은 일부만 바꾸는 쓰기를 표현할 방법이 없습니다.

⚠️ 마지막 newline 누락

return sysfs_emit(buf, "%08x", v); /* no trailing newline */

cat의 출력이 다음 셸 prompt와 붙습니다. 커널 문서의 show 예도 "\n"으로 끝납니다(sysfs.rst:266).

⚠️ 등록한 attribute를 지우지 않음

sysfs_create_group으로 직접 만들었다면 remove에서 sysfs_remove_group을 불러야 합니다. 빠뜨리면 unbind 후 다시 bind할 때(또는 device가 남은 채 driver 모듈만 다시 올릴 때) sysfs: cannot create duplicate filename이 납니다(7-06에서 kobject로 같은 에러를 실제로 냈습니다). .dev_groups나 devm_device_add_group은 이 짝을 driver core가 맞춥니다.

#정리

  • sysfs attribute는 파일 하나에 텍스트 값 하나를 담고, show는 sysfs_emit으로 채웁니다.
  • 정적인 attribute는 .driver.dev_groups로 넘기면 bind·unbind 때 driver core가 만들고 지웁니다.
  • store가 돌려준 에러는 write의 errno로 사용자에게 그대로 보입니다.
  • sysfs_notify를 부르면 사용자 공간은 POLLPRI·POLLERR로 그 파일을 기다릴 수 있습니다.
  • 초기값은 udev rule의 ATTR{}로 줄 수 있습니다.
  • configfs는 사용자가 mkdir로 커널 객체를 만드는 인터페이스이고, USB gadget을 그렇게 조립합니다.
  • sysfs 읽기는 fd를 열어 둬도 300 ns 안팎, 매번 열면 1.4 µs 안팎이라 제어용에 맞습니다.

다음 편은 IRQ Affinity입니다.

#관련 항목

Modern Embedded Recipes · 87 of 153 전체 목차
  1. 1 Modern Embedded Recipes — 모던 임베디드 실전 레시피 시리즈 소개
  2. 2 디지털 신호 기초 — Voltage Level·Edge·Noise Margin·반사 분석
  3. 3 임베디드 클럭과 타이밍 — Skew·Jitter·PLL 분석
  4. 4 GPIO 내부 구조 분해 — Push-Pull·Open-Drain·Schmitt Trigger
  5. 5 UART 하드웨어 동작 분석 — Baud Rate·Framing·FIFO
  6. 6 SPI 하드웨어 분석 — Clock Mode·MOSI/MISO·Chip Select
  7. 7 I2C 하드웨어 분석 — Open-Drain·Clock Stretching·Arbitration
  8. 8 ADC 동작 원리 — SAR·Sigma-Delta 비교
  9. 9 DAC 동작 원리 — R-2R Ladder·Sigma-Delta·Settling Time
  10. 10 PWM 신호 생성 분석 — Duty·Frequency·Dead Time·Center-Aligned
  11. 11 CAN 버스 전기적 특성 — 종단·전압 레벨·GND 전위차와 1 Mbit/s 버스 길이 예산
  12. 12 RS-485·RS-422 차동 신호 분석 — Termination·Biasing·Topology
  13. 13 LVDS 차동 신호 분석 — Common-Mode·Impedance·Eye Pattern
  14. 14 ARM Cortex-M 시리즈 비교 — M0·M3·M4·M7·M33·M55 분석
  15. 15 ARM Cortex-A 시리즈 비교 — A53·A55·A72·A78·X1 분석
  16. 16 Cortex-M 레지스터 구조 분석 — R0~R15·xPSR·CONTROL·Mask Registers
  17. 17 Cortex-M4 예외 처리 — Vector Table·NVIC 우선순위·Tail-Chaining
  18. 18 ARM 메모리 맵 분석 — Normal·Device·Strongly-Ordered Region
  19. 19 Cortex-M7 캐시와 DMA — Cache Line·Write-Back·Clean/Invalidate 순서
  20. 20 Cortex-M4 MPU 활용 — Region 배치·Stack Guard·Task 격리
  21. 21 AArch64 Linux MMU 기초 — Translation Table·TLB·ASID
  22. 22 ARM TrustZone-M 기초 — Secure/Non-Secure·NSC·MPC
  23. 23 ARM Memory Barrier 실전 — DMB·DSB·ISB·DMA·MMIO
  24. 24 임베디드 크로스 컴파일러 분석 — GCC·Clang·Sysroot 구성
  25. 25 C 컴파일 4단계 — Preprocess·Compile·Assemble·Link 추적
  26. 26 ELF 파일 구조 분석 — Section·Segment·Symbol Table·DWARF
  27. 27 링커 스크립트 기초 — SECTIONS·MEMORY·entry point
  28. 28 링커 스크립트 고급 — Overlay·BSS·init_array·LMA/VMA
  29. 29 임베디드 스타트업 코드 분석 — Reset_Handler·Vector Table·SystemInit
  30. 30 C 런타임 crt0 분석 — Stack·BSS Zero·Data Copy·atexit
  31. 31 임베디드 메모리 레이아웃 — .text·.rodata·.data·.bss·.heap·.stack
  32. 32 임베디드 컴파일러 최적화 분석 — -O0~-O3·-Os·-LTO 비교
  33. 33 Map 파일 분석 — 링커가 넣은 것, 끌어온 이유, 버린 것 읽기
  34. 34 Make·CMake 크로스 컴파일 — Toolchain File·Sysroot·Preset
  35. 35 임베디드 Bootloader 체인 — BootROM·SPL·U-Boot·Kernel·Secure Boot
  36. 36 첫 bare-metal 프로그램 작성 — Linker·Startup·main의 최소 구성
  37. 37 MMIO 레지스터 직접 접근 — volatile·Memory Map·Aliasing 분석
  38. 38 GPIO 드라이버 직접 구현 — STM32F407을 HAL 없이 레지스터로
  39. 39 임베디드 클럭 설정 분석 — HSE·PLL·SYSCLK·AHB/APB 분주
  40. 40 Cortex-M 인터럽트 핸들링 — NVIC·Priority·Vector·EXTI
  41. 41 SysTick 타이머 활용 — 24-bit Counter·1ms Tick·delay 구현
  42. 42 UART 드라이버 구현 — polling·interrupt·DMA 3가지 방식 비교
  43. 43 SPI 드라이버 구현 — Master·Slave·CRC·DMA
  44. 44 I2C 드라이버 구현 — STM32F405/407 Master·Repeated START·Clock Stretching·Bus Recovery
  45. 45 임베디드 DMA 기초 — Memory-to-Memory·Peripheral·Circular Mode
  46. 46 저전력 모드 분석 — Sleep·Stop·Standby·Wake-up Source
  47. 47 STM32F405/407 IWDG·WWDG 워치독 구현 — Independent vs Window 비교
  48. 48 임베디드 Flash 프로그래밍 — Erase·Program·Read While Write
  49. 49 DDR 초기화 실패 진단 — Timing·Calibration·Walking Bit Test
  50. 50 PWM 출력 실전 — LED 밝기·모터 속도 제어
  51. 51 DC 모터 제어 — H-Bridge·PWM Duty·Encoder Feedback
  52. 52 스테퍼 모터 제어 — Full Step·Half Step·Microstepping
  53. 53 서보 모터 제어 — 50 Hz PWM·다채널·Calibration
  54. 54 Character LCD 제어 — HD44780·4-bit Mode·Custom Char
  55. 55 SPI OLED 제어 — SSD1306·Frame Buffer·Page 단위 갱신
  56. 56 TFT 디스플레이 구동 — ILI9341 SPI와 STM32F746 LTDC
  57. 57 환경 센서 활용 — BME280 온습압·SHT3x 비교
  58. 58 IMU 센서 활용 — MPU-6050·Data Ready·Complementary Filter
  59. 59 CAN 통신 구현 — bxCAN Bit Timing·Filter·Mailbox·Error 상태
  60. 60 USB Device 기초 — TinyUSB CDC·Descriptor·STM32F407 OTG_FS
  61. 61 Ethernet MAC+PHY 통합 — RMII·MDIO·lwIP Raw API
  62. 62 SD 카드 SPI 모드 + FatFs — 초기화·diskio 포팅·다중 블록 쓰기와 f_sync
  63. 63 STM32F4 RTC 활용 — Calendar·Alarm·Sub-second·Tamper·Backup Register
  64. 64 RTOS 도입 결정 분석 — Super Loop vs RTOS 트레이드오프
  65. 65 RTOS Task 설계 패턴 — 우선순위·스택·State Machine
  66. 66 RTOS Scheduler 동작 분석 — Tick·Context Switch·Yield
  67. 67 RTOS Semaphore 활용 — Binary·Counting·ISR Give
  68. 68 RTOS Mutex 활용 — Recursive·Priority Inheritance 적용
  69. 69 RTOS Queue 활용 — By-Value·By-Reference·Timeout 패턴
  70. 70 RTOS Event Group 활용 — Bit Wait·Sync·Notify
  71. 71 RTOS Software Timer 활용 — One-shot·Auto-reload·Daemon Task
  72. 72 ISR-Safe API 설계 — Reentrant·Atomic·Defer 패턴
  73. 73 Priority Inversion 진단·예방 — Mars Pathfinder Lesson 추적
  74. 74 Timer Wheel 분석 — Hashed·Hierarchical·O(1) Tick
  75. 75 RTOS 디버깅 기법 — Stack·Heap·Run-time Stats·SystemView
  76. 76 i.MX8M Mini EVK Linux 부팅 흐름 — BootROM에서 PID 1까지 단계별 인계
  77. 77 U-Boot 활용 — bootcmd·env·tftp·boot.scr 분석
  78. 78 Device Tree 실전 — DTS·DTB·Overlay·Phandle 추적
  79. 79 Device Tree Overlay 적용 — Runtime fragment·dtoverlay
  80. 80 임베디드 커널 빌드 — defconfig·menuconfig·Image·deb 패키지
  81. 81 커널 모듈 기초 — init/exit·Parameter·KBuild·modprobe
  82. 82 캐릭터 드라이버 작성 — file_operations·cdev·register_chrdev
  83. 83 Platform 드라이버 작성 — of_match·devm 해제 순서·probe 실패 판정 (Linux v6.12)
  84. 84 mmap 4가지 모드 — Anonymous·File·Shared·Huge Page
  85. 85 epoll 실전 — LT·ET·ONESHOT·EXCLUSIVE 비교
  86. 86 UIO·VFIO 분석 — User-Space Driver와 IOMMU 격리
  87. 87 sysfs·configfs 활용 — kobject 기반 User 인터페이스
  88. 88 IRQ Affinity 설정이 거부되거나 되돌아가는 이유 — smp_affinity·effective_affinity·isolcpus·irqbalance
  89. 89 루트 파일시스템 구축 — Buildroot 기초·Package·Toolchain
  90. 90 임베디드 동적 메모리 — malloc 위험·결정성·대안 분석
  91. 91 메모리 정렬과 패딩 분석 — Natural·Strict Alignment·Trap
  92. 92 Cache Line Alignment — alignas·Padding·SoA 적용
  93. 93 DMA-Friendly Allocator — dma_alloc_coherent·IOMMU·Pool
  94. 94 Zero-Copy Pipeline — DMA-BUF·sendfile·io_uring·splice
  95. 95 NUMA Memory Topology — numactl·numa_alloc·HBM 적용
  96. 96 SIMD 활용 분석 — Intrinsics·Auto-Vectorization·OpenMP SIMD
  97. 97 ARM NEON 심화 — Matrix Multiply·FFT·Image Filter 적용
  98. 98 임베디드 스택 분석 — high-water·overflow 탐지
  99. 99 임베디드 코드 크기 최적화 — -Os·LTO·Section Garbage Collection
  100. 100 임베디드 전력 최적화 — Sleep Mode·Clock Gating·DVFS
  101. 101 WCET 분석 기법 — Static·Measurement·Hybrid 방법론
  102. 102 Lock-Free Ring Buffer 구현 — SPSC·Power-of-2·Memory Order
  103. 103 Wait-Free Signaling — Atomic Flag·Sequence·Latest-Value
  104. 104 RCU (Read-Copy-Update) 기초 — Quiescent State·Grace Period
  105. 105 Hazard Pointer 분석 — Lock-Free Memory Reclamation
  106. 106 Compare-And-Swap 패턴 — Stack·Counter·Linked List 적용
  107. 107 Atomic Operation 비용 분석 — Fence·Cache Line·Contention
  108. 108 Spinlock vs Mutex 결정 가이드 — Context Switch·Hold Time
  109. 109 ABA 문제 회피 — Tagged Pointer·Hazard·Generation Counter
  110. 110 False Sharing 해결 — Cache Line Padding·Per-CPU·thread_local
  111. 111 MPMC Queue 구현 — Multi-producer Multi-consumer Lock-Free
  112. 112 임베디드 디버깅 마인드셋 — 가설·격리·재현·이분탐색
  113. 113 JTAG·SWD 안 붙을 때 — 핀·전압·속도·세션 진단
  114. 114 GDB 원격 디버깅 — OpenOCD·J-Link·target remote 구성
  115. 115 Cortex-M 하드폴트 분석 — Stacked Frame·CFSR 읽기
  116. 116 UART 안 찍힐 때 — Bare-metal 체크리스트
  117. 117 임베디드 부팅 실패 진단 — 단계별 Isolation
  118. 118 인터럽트 누락·중복 진단 — Priority·Pending·Re-entry 추적
  119. 119 메모리 오버플로우·오염 진단 — Canary·MPU·Pattern 분석
  120. 120 타이밍·Race 진단 — Heisenbug 잡는 법
  121. 121 통신 프로토콜 분석 — Logic Analyzer와 Protocol Decoder
  122. 122 임베디드 로깅 시스템 설계 — 레벨·버퍼·SWO·Deferred
  123. 123 임베디드 포스트모템 분석 — Core Dump와 Field Crash
  124. 124 FPGA 기초 분석 — LUT·FF·BRAM·DSP 자원 구조
  125. 125 Vivado 사용법 — Project·Constraint·Synth·Impl·Bitstream
  126. 126 PCIe BAR 매핑 분석 — Config Space·Enumeration·MMIO 접근
  127. 127 AXI 인터페이스 — AXI4·AXI4-Lite·AXI-Stream 비교
  128. 128 Zynq PS-PL 통신 — GP·HP·ACP 인터페이스 선택
  129. 129 Mailbox Protocol 분석 — Host와 Accelerator를 잇는 Doorbell
  130. 130 Command Queue·Submission Queue — NVMe·XDMA 공통 패턴
  131. 131 DMA Completion 메커니즘 — Interrupt·Polling·Completion Ring
  132. 132 PCIe Streaming 분석 — BAR Type·MSI-X·Kernel Bypass
  133. 133 Vitis HLS 분석 — Pragma·Pipeline II·Dataflow 실전 감각
  134. 134 HLS 최적화 기법 — Pipeline·Unroll·Partition·Dataflow
  135. 135 Vitis AI 분석 — DPU·xmodel·VART
  136. 136 OpenCL on FPGA — Kernel·Channel·Burst Memory 분석
  137. 137 Intel Quartus로 넘어가기 전 — 어느 toolchain에서나 쓰는 HDL과 testbench
  138. 138 Edge Inference 분석 — Cloud vs Edge·Latency·Privacy
  139. 139 Edge 추론 Pipeline 측정 — Stage Latency·Mailbox 정책·Buffer 수
  140. 140 NPU 아키텍처 분석 — Ethos·Hexagon·Systolic Array 비교
  141. 141 딥러닝 Quantization 분석 — PTQ·QAT·INT8·INT4·Calibration
  142. 142 TensorRT 분석 — ONNX→Engine·FP16·INT8·DLA·Multi-Stream
  143. 143 TFLite Micro 분석 — Op Resolver·Tensor Arena·Cortex-M
  144. 144 ONNX Runtime 분석 — Execution Provider와 Cross-Platform 배포
  145. 145 Edge Thermal Management — Throttling·DVFS·Fan Curve·Sustained
  146. 146 NVIDIA Jetson 분석 — Nano·Xavier·Orin·Thor·JetPack·DLA·VPI
  147. 147 Zero-Copy Camera Pipeline — V4L2·DMA-BUF·GPU Import·NPU 직결
  148. 148 온디바이스 LLM 추론 — llama.cpp·GGUF·MLX·KV Cache·NPU Backend
  149. 149 Cortex-M33 TF-M·TrustZone — Secure Firmware·PSA·MCUboot
  150. 150 Matter·Thread 분석 — IoT 통합 표준·Commissioning·Multi-Fabric
  151. 151 PCIe → CXL 진화 — 같은 PHY 위 cache-coherent 프로토콜 추가
  152. 152 QEMU CXL Type 3 디바이스 에뮬레이션 — 노트북에서 CXL 개발 환경 구축
  153. 153 Linux CXL 드라이버 분석 — cxl_pci·cxl_core·region·DAX