About me

Sunday 16 April 2017

建立自己的作業系統 - step by step

之前研究過使用buildroot來建立一個客製化的Linux作業系統-『buildRoot study - 建立自己的作業系統』,那時候就想說想要把buildroot給抽掉,結果經過一年多,終於有空可以繼續之前的這個研究,這次完全的將buildroot給抽掉,『Bootloader-uboot』, 『Kernel』, 『Rootfs-busybox』,『glibc』完全都自己建立,藉由此了解一個小型OS的構成。




大綱

1.Preparation Ubuntu 數莓派2 TTL Cable Enviroment 2.目標 Firmware U-boot Kernel Root FileSystem 3.Partition SD Card 4.raspberry pi 官方軔體 5.Root File System 6.Glibc 7.Kernel 8.u-boot 9.Boot-up 10. Ref

Monday 10 April 2017

Linux poll 機制

語法
#須引入這個header
#include <poll.h>

#poll用法
int poll(struct pollfd *fds, nfds_t nfds, int timeout);

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include  <signal.h>
#include  <poll.h>

int ppoll(struct pollfd *fds, nfds_t nfds,
const struct timespec *tmo_p, const sigset_t *sigmask);