[R&D Notes] Troubleshooting Busybox 1.7.2 taskset.c Compilation Errors

While compiling Busybox 1.7.2 using the default config (make defconfig) with a specific ARM toolchain, I encountered two specific compilation errors. One was related to the route applet, and the other was in taskset.c. I resolved the taskset.c issue by disabling it temporarily, but later found a proper fix. The root cause lies in a mismatch between uClibc (which Busybox is primarily designed for) and glibc. Specifically, the number of arguments for sched_getaffinity and sched_setaffinity differs between the two. ...

September 30, 2007 · 1 min · 206 words · Fran Kuo

[R&D Notes] Implementing Linux Daemons in Embedded Systems

Implementing Daemons in Embedded Linux systems is a fundamental task for long-running services. Based on the excellent Linux Daemon Writing HOWTO by Devin Watson, I have refactored several processes in my current project to run as background services (daemons). By backgrounding these processes, we ensure they remain resident in the system without blocking the console or being tied to a specific session. Core Implementation Pattern The following C snippet demonstrates the standard procedure for “daemonizing” a process: fork() from the parent, create a new session with setsid(), change the working directory, and close standard file descriptors. ...

September 19, 2007 · 2 min · 245 words · Fran Kuo