Skip to content

redstar9451/learn-kernel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Comment linux kernel code

learn linux kernel with qemu simulator 编译kernel,制作rootfs,配置qemu参数,主要用来使用gdb学习、分析调试linux kernel、uboot

how to use

sudo apt-get install gdb-arm-none-eabi gcc-arm-linux-gnueabi
./scripts/download.sh
make all

qemu options you can speicify:

  • -S hold in the first instruction
  • -s gdb server with port 1234

how to debug with gdb

waiting for composing

about making rootfs

  • how many ways to identify a rootfs ?

how to use tap netdevice in qemu

first, sudo apt install uml-utilities bridge-utils

install tap netdevice

sudo ./setup-net.sh for example: sudo ./setup-net.sh eth0 $(whoami)

remove tap netdevice

sudo ./rm-net.sh

Tips

  • only support assign ip via DHCP
  • The IP assignment maybe fail, commonly because DHCP, then you will lose the connection to the host when you login via ssh/telnet

Questions

  • 什么情况下会使用到skb链表?处理分片时?
  • skb->truesize 有啥用
  • _____alloc_skb 中,skbuff_head_cache skbuff_fclone_cache 的区别,为fast clone专门设计了一个memory ?
  • skb 是什么的缩写 ? socket buffer
  • what does skb->data_len represent ?

About

learn linux kernel, read source code, debug with gdb & qemu

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published