Peilin Ye

@ypl

Joined on Jul 6, 2020

  • *** BLURB HERE *** Hi all, Welcome to Peilin Ye's blog! This is my 2nd blog; my 1st blog is (hopefully) still there, but no longer maintained because: I've decided to keep everything in Markdown; I'd like to focus on writing, instead of moderating spam comments and/or tweaking WordPress themes...
     Like  Bookmark
  • Peilin Ye's blog System76 团队维护一个官方的 Linux 内核仓库(GitHub 链接),基于 Ubuntu 的,但是没有提供 debug(-dbg)包,所以有些内核 debug 工具用不成,比如 drgn:Getting Debugging Symbols — drgn 0.0.23+unknown documentation GitHub 上也有人提了 issue,快一年了也没人理,目前只能自己 build 了。好在流程很简单,我 checkout 了 commit d567a383cdc8 ("Tell thelio-io-2 about suspend status"),执行了 ./rebuild.sh(按它说的装 build 依赖,缺什么装什么就行;我新装的系统,只预先装了个 pahole)和 ./reinstall.sh,然后重启了一下,就换上新内核了: ypl@pop-os:~$ uname -r 6.4.6-76060406-generic ./rebuild.sh 花了半个多小时,唉……不过终于可以用 drgn 了!试试,在 ./debian/build/build-generic/ 里执行 sudo drgn --no-default-symbols -s ./vmlinux:
     Like  Bookmark
  • Peilin Ye's blog 平时 make 加个 -j$(nproc) 已经成习惯了,今天来看看 nproc 是怎么在(我这台)Linux x86_64 机器上工作的。nproc 是 Coreutils(GNU Core Utilities)的一部分,我用的 Debian 10 上的 8.30-3: $ dpkg -S $(which nproc) coreutils: /usr/bin/nproc $ apt-cache show coreutils | grep -i version Version: 8.30-3 $ nproc --version | head -1 nproc (GNU coreutils) 8.30
     Like  Bookmark
  • Peilin Ye's blog Linux: 5.18-rc5, commit 1728c0567f70 ("net: phy: smsc: add LAN8742 phy support.") ypl@home:~$ cat /proc/$$/stat | cut -d' ' -f2 (bash) ypl@home:~$ cat /proc/self/stat | cut -d' ' -f2 (cat) ypl@home:~$ cut -d' ' -f2 < /proc/self/stat (cut)
     Like 1 Bookmark
  • Peilin Ye's blog arch: x86_64 Bash: 5.1, commit 9439ce094c9a ("Bash-5.1 patch 16: fix interpretation of multiple instances of ! in [[ conditional commands") Linux: 5.18-rc5, commit 9c095bd0d4c4 ("Merge branch 'hns3-next'") QEMU: 7.0.50, commit 2d20a57453f6 ("Merge tag 'pull-fixes-for-7.1-200422-1' of https://github.com/stsquad/qemu into staging") ypl@home:~$ sudo make isntall make: *** No rule to make target 'isntall'. Stop. ypl@home:~$ sudo make isntal^C
     Like 1 Bookmark