文章分类 - linux
1
摘要:# vmlinux 的链接 ## 0. 脚本 ```shell scripts/link_vmlinux.sh # final build of init/ ${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init need-builtin=1
阅读全文
摘要:# objcopy ```shell -S --strip-all Do not copy relocation and symbol information from the source file. Also deletes debug sections. # 去除某个段: -R .commen
阅读全文
摘要:# 生成 compile_commands.json ```shell # 否则会报 wrapper: failed with: gRPC call failed: Socket closed export no_proxy=localhost bear -- make ARCH=arm CROSS
阅读全文
摘要:# bear 报错 ```shell # 初次安装bear时由于提前使用了 $ export https_proxy=http://127.0.0.1:8889 命令,导致了该问题。使用如下命令可以解决: export no_proxy=localhost ```
阅读全文
摘要:# 前 ```shell # 文件数 find . -type f | wc -l 77922 # 目录数 find . -type d | wc -l 5001 # 行数 find . -type f -name "*.[ch]" | xargs wc -l | grep total 728628
阅读全文
摘要:# 命令 ```shell ctrl + a + x => 退出 qemu ctrl + a + c => 进入 monitor ``` # monitor 命令 ```shell info roms => 可查看加载位置 => -bios 选项,会放在 NorFlash 中,-kernel 会放在
阅读全文
摘要:# 网络 ```shell Net: smc911x: Invalid chip endian 0x00000000 No ethernet found. # 解决办法 -net nic -net tap,ifname=tap0,script=0 ``` ```shell qemu-system-a
阅读全文
摘要:# 下载 https://sourceforge.net/projects/stripcc/files/ # 编译 make && make install # 使用 ```shell # 进入源码目录 time make # 去掉预编译宏 time stripcc -c "make" ``` #
阅读全文
摘要:```shell # 打印 pretty 结构体 # 通过 help print 查看到 set print pretty on # 多线程/多进程 # 单线程调试 set scheduler-locking on ```
阅读全文
摘要:```shell # -I {} 表示将 每行输入视为一个参数 qemu-system-aarch64 -M help | awk '{ print $1 }' | xargs -I {} sh -c "qemu-system-aarch64 -M {} -cpu help" | grep a55
阅读全文
摘要:# apt 相关命令 ```shell # 查找包 apt-cache search gcc ```
阅读全文
摘要:# cmake 生成模块依赖图片 ```shell # CMKAE_SOURCE_DIR 目录 / 其他有 CMakeLists.txt 的目录 cmake --graphviz=dp.dot . sudo apt install graphviz dot -Tpng -odp.png -Gdpi=
阅读全文
摘要:# 内建变量 ```cmake # cmake -S source_dir -B build_dir CMAKE_MINIMUM_REQUIRED(VERSION 3.14) CMAKE_SOURCE_DIR # 顶层 CMakeLists.txt 所在目录 CMAKE_BINARY_DIR # b
阅读全文
摘要:# 步骤 1. 将 Makefile 重命名 2. 删除 .idea 3. File -> Invalidate Caches 即可
阅读全文
摘要:# 挂死调用栈实现 ## dump.c - backtrace 在 libgcc 中实现 ```c #include #include #include #include #include #define STACK_BUFFER 16 int get_data_from_awk(char *cmd
阅读全文
摘要:# 修改内核 - 添加 CONFIG_IO_STRICT_DEVMEM=y - /drivers/char/mem.c #ifdef CONFIG_STRICT_DEVMEM # 临时修改 - bootargs 添加 iomem=relaxed strict-devmem=0/relaxed - #
阅读全文
摘要:# 各个界面 1. Structure View -> Tool Windows -> Structure / Hierarchy / Debug / Messages / TODO 2. 回退工具按钮 View -> Apperance -> ToolBar / StatusBar / other
阅读全文
摘要:# clion setting ``` 1.setting -> build -> cmake -> cmake options -DCMAKE_TOOLCHAIN_FILE=./build/arch/arm-linux-cross-compile.cmake -DCMAKE_INSTALL_PRE
阅读全文
摘要:# 步骤 ## server 端 - gdbserver :1234 vcmu - gdbserver :1234 --attach pid - scp 192.168.0.0:/home/test . ## client 端 1. run -> edit configurations -> + -
阅读全文
摘要:# 物理机无 U盘 安装 ubuntu 1.下载 .iso 2. 新建一个10G分区,必须是 FAT32 格式;不能和要安装的位置在一个设备 3. 将 .iso 解压到该分区 4. 进入 BIOS,新建一个 EFI 启动项,找到 10G 的分区,EFI/boot/grub64.efi 5. 安装完之
阅读全文
posted @ 2023-08-16 00:30
chumoath
1

浙公网安备 33010602011771号