리누스 베네딕트 토르발스 (Linus Benedict Torvalds)
(https://en.wikipedia.org/wiki/Linus_Torvalds)"가 개발하여 1991년에 처음으로 v0.01이 Copyleft로 처음 공개되어진 커널입니다. 현재는 전세계 수많은 개발자들이 협력하여 커널이 개발되고 있습니다.
#if defined(__KERNEL__) /* Kernel code 영역 */ #else /* User side application 영역 */ #endif
#include <linux/version.h>
#include <linux/kernel.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)
/* Kernel version 4.15 이상에서 작동하는 코드 */
#else
/* Kernel version 4.15 미만에서 작동하는 코드 */
#endif
#if IS_ENABLED(CONFIG_VLAN_8021Q)
/* CONFIG_VLAN_8021Q 가 Kernel config에서 y 또는 m으로 설정되었음 */
#endif
- asflags-y += $(EXTRA_AFLAGS) - ccflags-y += $(EXTRA_CFLAGS) - cppflags-y += $(EXTRA_CPPFLAGS) - ldflags-y += $(EXTRA_LDFLAGS)
printk(KERN_INFO "this dev's ifname is %s\n", netdev_name(dev));
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0) /* rcu ifalias */
const struct dev_ifalias *alias = rcu_dereference(dev->ifalias);
if(alias) {
printk(KERN_INFO "ifalias=%s\n", alias->ifalias);
}
#else
if(dev->ifalias) {
printk(KERN_INFO "ifalias=%s\n", dev->ifalias);
}
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,7) /* netif_has_l3_rx_handler */
if(netif_has_l3_rx_handler(dev)) { /* IFF_L3MDEV_RX_HANDLER */
printk(KERN_INFO "this dev is l3mdev_rx\n");
}
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0) /* netif_is_failover/netif_is_failover_slave IFF_FAILOVER/IFF_FAILOVER_SLAVE */
if(netif_is_failover(dev)) { /* IFF_FAILOVER */
printk(KERN_INFO "this dev is failover\n");
}
if(netif_is_failover_slave(dev)) { /* IFF_FAILOVER_SLAVE */
printk(KERN_INFO "this dev is failover_port\n");
}
#endif
#if IS_ENABLED(CONFIG_VLAN_8021Q)
if(is_vlan_dev(dev)) { /* IFF_802_1Q_VLAN */
printk(KERN_INFO "this dev is vlan\n");
}
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,12,0) /* LLTX flag */
if(!!dev->lltx) {
printk(KERN_INFO "this dev is lltx\n");
}
#else
if(!!(dev->features & NETIF_F_LLTX)) {
printk(KERN_INFO "this dev is lltx\n");
}
#endif
The Linux Kernel Archives
(https://www.kernel.org/)
Bootlin Elixir Cross Referencer
(https://elixir.bootlin.com/)
NVD Vulnerability Search
(https://nvd.nist.gov/vuln/search)
Arm GNU Toolchain Downloads
(https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads)
https://junsoolee.gitbook.io/linux-insides-ko/summary/interrupts/linux-interrupts-9
https://kjy8901.github.io/blog/2019/10/28/kernel_list.html