去年1月30日,我们发布了GDK8的武城版本。之后我们做个几次更新,发布了武城的三个子版本。新年伊始,GDK8的新一代镜像终于完成。这个镜像取名聊城,代表着GDK8的预装软件步入了一个新的阶段。因为整个GDK8软件项目的代号叫言子,构建GDK8镜像的工作站的机器名也叫言子(孔子的著名弟子,又名子游),所以GDK8的镜像都是以言子曾经生活或者工作过的城市命名的。已经发布的版本有虞城(出生地)、曲阜(拜师学业)、武城(施展才华)。聊城版本的镜像发布于2023年1月18日,临近兔年春节。我们赶着在春节前发布,是希望喜爱GDK8的各位老铁可以在春节假期来升级。
聊城版本的新功能和改动如下。

主要改动

1. 增加图形化界面Xorg及相关动态连接库的调试支持

桌面统是现代操作的重要问题之一,特别是近些年来,许多开发者对于Linux桌面系统更为重视,所以GDK8为桌面系统的开发者提供了带有符号的二进制文件及全部源代码,帮助桌面系统的开发者更好的在GDK8上进行学习。

/home/geduer/software/xorg/
libdrm-2.4.100  xf86-input-evdev-2.10.6     xf86-input-mouse-1.9.3
libevdev-1.6.0  xf86-input-keyboard-1.9.0   xf86-input-synaptics-1.9.1
reference.txt   xf86-input-libinput-0.29.0  xorg-server-1.20.4

2. 增加Perf

Perf是Linux平台著名的性能分析利器,基于Linux 内核perf_event子系统实现,Perf不仅能够分析 PMU 事件(硬件事件),也能分析各种软件事件,如进程切换、pagefault、网络及文件IO等。
从聊城版本开始,GDK8会默认安装Perf,并附带Linux常用工具的源代码包。

/home/geduer/software/tools/
Makefile    build     hv          kvm     memory-model  pcmcia   spi      usb
accounting  cgroup    iio         laptop  nfsd          perf     testing  virtio
arch        firewire  include     leds    objtool       power    thermal  vm
bpf         gpio      installpkg  lib     pci           scripts  time     wmi
 usage: perf [--version] [--help] [OPTIONS] COMMAND [ARGS]

 The most commonly used perf commands are:
   annotate        Read perf.data (created by perf record) and display annotated code
   archive         Create archive with object files with build-ids found in perf.data file
   bench           General framework for benchmark suites
   buildid-cache   Manage build-id cache.
   buildid-list    List the buildids in a perf.data file
   c2c             Shared Data C2C/HITM Analyzer.
   config          Get and set variables in a configuration file.
   data            Data file related processing
   diff            Read perf.data files and display the differential profile
   evlist          List the event names in a perf.data file
   ftrace          simple wrapper for kernel's ftrace functionality
   inject          Filter to augment the events stream with additional information
   kallsyms        Searches running kernel for symbols
   kmem            Tool to trace/measure kernel memory properties
   kvm             Tool to trace/measure kvm guest os
   list            List all symbolic event types
   lock            Analyze lock events
   mem             Profile memory accesses
   record          Run a command and record its profile into perf.data
   report          Read perf.data (created by perf record) and display the profile
   sched           Tool to trace/measure scheduler properties (latencies)
   script          Read perf.data (created by perf record) and display trace output
   stat            Run a command and gather performance counter statistics
   test            Runs sanity tests.
   timechart       Tool to visualize total system behavior during a workload
   top             System profiling tool.
   trace           strace inspired tool

 See 'perf help COMMAND' for more information on a specific command.

3. 增加启动阶段的调试支持

不少开发者,尤其是安全研究者对于启动过程是非常感兴趣的,出于这一考虑,在GDK8的聊城版本中,为这一需求增加了支持。

使用方法
ndb驱动:
u-boot阶段:echo "iram 0x8881" | sudo tee -a /proc/ndb
kernel阶段:echo "iram 0x8882" | sudo tee -a /proc/ndb

Nano Code
.reboot [flag]

4. 增加KVM的支持

KVM是一款为类 Linux 系统提供的开源的全虚拟化解决方案,允许安装和运行多个虚拟机。并可以通过Virt Manager这样的图形化界面或virt-install这样的命令来创建和管理虚拟机。
同样的虚拟化也是非常的开发者关注的领域,因此聊城版本在内核增加了KVM的支持选项,并在用户空间内默认安装了虚拟机管理器及镜像文件(alpine-3.17)。

虚拟网络的支持:
sudo apt-get install ebtables iptables dnsmasq qemu
sudo systemctl restart libvirtd

5. 增加内核动态消息打印的支持

Dynamic debug是Linux重要的调试机制之一,允许内核开发者可以动态地开启或者关闭打印输出的消息,具体的介绍及使用方法可以参考https://www.kernel.org/doc/html/v4.11/admin-guide/dynamic-debug-howto.html

路径:
/sys/kernel/debug/dynamic_debug/control

6. 修正HDMI连接显示器可能没有显示的问题

在武城版本中,部分显示器可能会出现没有画面的问题,在聊城版本中修正这一问题,使得所以显示器都可以正常显示画面。

7. ndb驱动更新

ndb驱动的主要改动为修正高版本内核无法编译的问题、增加机器类型的识别及读写iram的支持。
源代码默认放置在GDK8上,可以作为学习参考。

/home/geduer/software/ndb_v19
Kconfig     dbgrdata.h  mailbox.c        ndb.elf.sections.txt  readme.txt
Makefile    install.sh  mailbox.h        ndb.mod               rel.sh
build.txt   kgb.c       main.c           ndsrv                 uname.txt
built-in.a  kgb.h       modules.builtin  ndsrv.service

8. 增加学习代码示例

增加用户空间及内核驱动的学习代码示例,用户空间的学习代码包括异常、缓存、堆及信号处理等机制。

/home/geduer/gelabs/
├── linux_labs
│   ├── filetrap
│   │   ├── a.out
│   │   ├── bak.c
│   │   ├── fileout.txt
│   │   ├── filesys.txt
│   │   ├── filetrap
│   │   ├── filetrap.c
│   │   ├── filetrap.c~
│   │   ├── filetrap.log
│   │   ├── filetrap_bak.c
│   │   ├── ft
│   │   └── vfile.c
│   ├── gecache
│   │   ├── CMakeLists.txt
│   │   ├── CMakeSettings.json
│   │   ├── clabs.c
│   │   ├── clabs.h
│   │   ├── gecache
│   │   ├── gecache.cpp
│   │   ├── gecache.h
│   │   ├── gecache_dbg
│   │   └── geocache_dbg
│   ├── geheap
│   │   ├── demorel
│   │   ├── exheap.c
│   │   ├── geheap
│   │   ├── geheap.c
│   │   ├── geheap.c~
│   │   ├── geheap32
│   │   ├── geheap64
│   │   ├── geheapo
│   │   ├── geheapsan
│   │   ├── geheapsang
│   │   ├── geheapsh
│   │   ├── gehp64ns
│   │   └── perf.data
│   ├── gemalloc
│   │   ├── a.txt
│   │   ├── build.sh
│   │   ├── buildwg.sh
│   │   ├── core
│   │   ├── dumpself
│   │   ├── dumpself.c
│   │   ├── dumpself.core.4474
│   │   ├── dumpself.core.4496
│   │   ├── dw.txt
│   │   ├── dwarf.txt
│   │   ├── exheap.c~
│   │   ├── gdbinit
│   │   ├── geheap.c~
│   │   ├── gem
│   │   ├── gemalloc
│   │   ├── gemalloc.c
│   │   ├── gemalloc.c~
│   │   ├── gemalloc_rel
│   │   ├── gemallocd
│   │   ├── gemallochf
│   │   ├── gemallochf2
│   │   ├── gemallocwg
│   │   ├── heap.txt
│   │   ├── main.c
│   │   ├── mallinfo
│   │   ├── mallinfo.c
│   │   ├── massif.out.2602
│   │   ├── massif.out.2674
│   │   ├── massif.out.2700
│   │   ├── peda-session-gemalloc.txt
│   │   ├── perf.data
│   │   ├── ptmalloc2
│   │   │   ├── COPYRIGHT
│   │   │   ├── ChangeLog
│   │   │   ├── Makefile
│   │   │   ├── Makefile~
│   │   │   ├── README
│   │   │   ├── arena.c
│   │   │   ├── hooks.c
│   │   │   ├── libmalloc.a
│   │   │   ├── lran2.h
│   │   │   ├── malloc-stats.c
│   │   │   ├── malloc-stats.o
│   │   │   ├── malloc.c
│   │   │   ├── malloc.c~
│   │   │   ├── malloc.h
│   │   │   ├── malloc.o
│   │   │   ├── sysdeps
│   │   │   │   ├── generic
│   │   │   │   │   ├── atomic.h
│   │   │   │   │   ├── malloc-machine.h
│   │   │   │   │   └── thread-st.h
│   │   │   │   ├── pthread
│   │   │   │   │   ├── malloc-machine.h
│   │   │   │   │   └── thread-st.h
│   │   │   │   ├── solaris
│   │   │   │   │   ├── malloc-machine.h
│   │   │   │   │   └── thread-st.h
│   │   │   │   └── sproc
│   │   │   │       ├── malloc-machine.h
│   │   │   │       └── thread-st.h
│   │   │   ├── t-test.h
│   │   │   ├── t-test1
│   │   │   ├── t-test1.c
│   │   │   ├── t-test2
│   │   │   ├── t-test2.c
│   │   │   ├── tst-mallocstate
│   │   │   ├── tst-mallocstate.c
│   │   │   ├── tst-mstats
│   │   │   └── tst-mstats.c
│   │   ├── strace.txt
│   │   ├── t.txt
│   │   ├── vg.log
│   │   ├── vg.log~
│   │   └── vg.txt
│   ├── gematrix
│   │   ├── build.sh
│   │   ├── gematrix
│   │   ├── gematrix.c
│   │   ├── gematrix.sln
│   │   ├── gematrix.vcxproj
│   │   ├── gematrix.vcxproj.filters
│   │   ├── gematrix.vcxproj.user
│   │   ├── gematrix.zip
│   │   ├── gemtrix
│   │   ├── matrix.c
│   │   ├── multiply.c
│   │   ├── multiply.h
│   │   ├── thrmodel.c
│   │   └── util.c
│   ├── gesilk
│   │   ├── a.out
│   │   ├── gesilk
│   │   └── gesilk.cpp
│   ├── gestl
│   │   ├── a.out
│   │   ├── gestl
│   │   └── gestl.cpp
│   ├── hdtrap
│   │   ├── HeadTrap.c
│   │   ├── Makefile
│   │   ├── Makefile~
│   │   ├── a.out
│   │   ├── demo2
│   │   ├── demowh
│   │   ├── dwarf.txt
│   │   ├── gdb.txt
│   │   ├── hd
│   │   ├── hd.sh
│   │   ├── hdmap.map
│   │   ├── hdtrap
│   │   ├── hdtrap.c
│   │   ├── hdtrap.cpp
│   │   ├── hdtrap.c~
│   │   ├── hdtrap.map
│   │   ├── hdtrap.o
│   │   ├── hdtrap64
│   │   ├── hdtrapbak
│   │   ├── hdtrapr
│   │   ├── hdtrapwrong
│   │   ├── hello
│   │   ├── hello.c
│   │   ├── md5.c
│   │   ├── md5.o
│   │   ├── nanjing
│   │   ├── nanjing64
│   │   ├── s.txt
│   │   ├── t.txt
│   │   ├── test
│   │   └── test2
│   ├── higtk
│   │   ├── gthlist.c
│   │   ├── gtkedit
│   │   ├── gtkedit.c
│   │   ├── gtklist
│   │   ├── gtklist.c
│   │   ├── gtkslist
│   │   ├── gtkslist.c
│   │   ├── gtkslist.core.11849
│   │   ├── higtk
│   │   ├── higtk.c
│   │   ├── higtk2
│   │   └── higtk2.c
│   ├── hisimd
│   │   ├── a.out
│   │   ├── hisimd
│   │   ├── hisimd.c
│   │   ├── hisimd.c~
│   │   └── hisimd.s
│   ├── llaolao
│   │   ├── Makefile
│   │   ├── a.out
│   │   ├── a.txt
│   │   ├── baner
│   │   ├── baner.c
│   │   ├── dg3.txt
│   │   ├── hang1
│   │   ├── hang2
│   │   ├── hangg2
│   │   ├── hangg3
│   │   ├── main.c
│   │   ├── modules.order
│   │   ├── probe.txt
│   │   └── probenkaslr.txt
│   ├── ptrtrap
│   │   ├── a.out
│   │   ├── parser.c
│   │   ├── ptrtrap
│   │   └── ptrtrap.c
│   ├── segfault
│   │   ├── Makefile
│   │   ├── segfault
│   │   ├── segfault.c
│   │   ├── segfault.c~
│   │   └── segfault.o
│   └── signal
│       ├── Makefile
│       ├── Makefile~
│       ├── ctrlc
│       ├── ctrlc.c
│       ├── ctrlc.c~
│       ├── signal
│       ├── signal.c
│       ├── signal.c.fork
│       ├── signal.c~
│       └── signal.o
└── llaolao
    ├── Makefile
    ├── README.txt
    ├── baner.c
    ├── gearm.c
    ├── gearm.h
    ├── llaolao.cpp
    ├── llaolao.h
    ├── llaolao2.sln
    ├── llaolao2.vcxproj
    ├── llaolao2.vcxproj.user
    └── main.c

9. 新版本葫芦娃

  1. 更新OTG、Host、Sysrq状态显示的问题
  2. 修正GTK图形化界面崩溃的问题
  3. 更新gird

10. 修正启动阶段的调试支持

作者:admin  创建时间:2023-01-18 13:54
最后编辑:李梓涌  更新时间:2024-03-12 10:45