# note **Repository Path**: maygeek/note ## Basic Information - **Project Name**: note - **Description**: 个人笔记 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2021-02-09 - **Last Updated**: 2024-09-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 社区 [patchwork](https://patchwork.kernel.org/)|[lore](https://lore.kernel.org/)|[kernel doc](https://www.kernel.org/doc/html/latest/index.html)|[如何参与](https://blog.csdn.net/nirendao/article/details/53699832) | [OS](os.md) | [memory](memory.md) * [kernel 0.11](https://elixir.bootlin.com/linux/0.11/source/init) * [lxc](https://sourcegraph.com/github.com/lxc/lxc) |[runc nsexec](https://sourcegraph.com/github.com/opencontainers/runc/-/blob/libcontainer/nsenter/nsexec.c) |[isulad](https://sourcegraph.com/github.com/openeuler-mirror/iSulad) | [kata](https://sourcegraph.com/github.com/kata-containers/kata-containers) |[gvisor](https://sourcegraph.com/github.com/google/gvisor) * ROS * [阿波罗 自动驾驶](https://github.com/ApolloAuto) * [Arduino]() * CPU [树莓派](https://shumeipai.nxez.com/what-raspi-used-for) [树上学院](https://sourcegraph.com/github.com/openharmony/telephony_core_service) Raspberry 4B [摄像头启用](https://blog.csdn.net/lisp10101/article/details/120228925) Cortex-A72 1.5GHz 内存2G * MPU [STM32MP157 上电启动](https://i2som.atlassian.net/wiki/spaces/PanGuBoard/pages/395248049) [澎拜兔 PanGuBoard](https://i2som.atlassian.net/wiki/spaces/PanGuBoard/overview) CortexA7 DDR3512M eMMC 4G * MCU [Nucleo STM32F767zi](https://www.st.com/zh/evaluation-tools/nucleo-f767zi.html#overview)|[github](https://github.com/STMicroelectronics/STM32CubeF7) | [NUCLEO F767zi运行FreeRTOS 连网](https://www.21ic.com/evm/evaluate/MCU/201606/679904.htm) CortexM7 [正点原子](openedv.com) [bibili视频](https://www.bilibili.com/video/BV1pJ411b7PN) [MDK arm](https://www.keil.com/demo/eval/arm.htm) [keil STM32F7xx_DFP.pack](https://www.keil.com/dd2/stmicroelectronics/stm32f767zitx/) * GPU [MindSpore 昇腾AI](https://www.mindspore.cn/) * DSP [TMS32C66x](https://blog.csdn.net/YEYUANGEN/article/details/106414130) | [CEVA](https://www.ceva-dsp.com/product/ceva-xc4500/) * FPGA []() * [Android]() * [鸿蒙]() * [openEuler例会](https://space.bilibili.com/527064077) [鲲鹏论坛](https://bbs.huaweicloud.com/forum/forum-923-1.html) # code [bootlin在线代码](https://elixir.bootlin.com/linux/0.11/source/init)|[woboq](https://code.woboq.org/)|[架构](https://source.android.google.cn/devices/architecture)|[指南cn](https://developer.android.google.cn/docs) |[平台](https://developer.android.google.cn/guide/platform) |[指南](https://developer.android.com/guide) |[Java-examples](https://www.programcreek.com/java-api-examples/index.php) * [platform/frameworks/base](https://github.com/aosp-mirror/platform_frameworks_base)|[servicemanager binder_open ](http://androidxref.com/9.0.0_r3/xref/frameworks/native/cmds/servicemanager/binder.c#97) |[view inflat](http://androidxref.com/9.0.0_r3/xref/frameworks/base/core/java/android/view/LayoutInflater.java#451) |[分析](https://blog.csdn.net/guolin_blog/article/details/12921889) * [kernel](https://github.com/aosp-mirror/kernel_common) |[binder_open](http://androidxref.com/kernel_3.18/xref/drivers/staging/android/binder.c#2941) [binder in kernel_common](https://github.com/aosp-mirror/kernel_common/blob/99be12b566d557fa83764d28561ae87d3e1635e6/drivers/android/binder.c#L5385)|[GKI](https://source.android.com/devices/architecture/kernel/generic-kernel-image) [github asop](https://github.com/aosp-mirror)|[androidxref](http://androidxref.com/) | [cs.android](https://cs.android.com/) |[官方源码](https://android.googlesource.com/) |[Gerrit kernel](https://android-review.googlesource.com/q/project:kernel/common) [AOSP镜像](https://mirrors.tuna.tsinghua.edu.cn/help/AOSP/) [下载代码](https://source.android.com/setup/build/downloading) ``` repo init https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/platform/manifest ``` [构建android内核](https://source.android.com/setup/build/building-kernels) ``` repo init https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/kernel/manifest -b common-android-mainline repo init -b common-android-mainline && repo sync BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh ``` ## [车机](./idrive.md) ## HarmanyOS [hmxt](https://hmxt.org/) | [sample](https://gitee.com/openharmony/app_samples) |[设计](https://developer.harmonyos.com/cn/design)|[codelabs](https://developer.huawei.com/consumer/cn/codelabsPortal/index) [一个不错的技术分享网站](http://www.sharetechnote.com/) |[dog250](https://blog.51cto.com/dog250/original) | []() ## 1024 [ZJU](http://grs.zju.edu.cn/ssszs/studentZsml.htm) |[iMF 148000](http://zibs.intl.zju.edu.cn/imf) |[NTU](http://yjs.ntu.edu.cn/Detail/News/958) ## shell ``` netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}' readelf -s Exe|grep UND|grep -v GLIBC|awk '{print $8}'|sort -n|uniq find -name \*.so |xargs -i sh -c 'echo {};readelf -s {}|grep PyUnicodeUCS2' if [ $# -lt 1 ]; then echo -e "\033[31mError Parameter counts:$#, exit\033[0m" exit elif [ $# -eq 2 ]; then tmp=`echo "obase=8;ibase=16;$2" | bc` character=`echo "\\\\$tmp"` else character='\377' fi cd $(dirname "$0") 参数格式化 ``` ## wireshark 过滤 ``` frame[58:3]==c0:a8:82 !(eth.src == 01:02:03:04:00:0) eth.dst matches "\xff.*\xff" eth.src ~ "\x02\x40\x43\x80.*" eth.addr matches "\x01\x02.*\x04\x05" data.data ~ "Hello World" data.data ~ He..o.Wor.d ``` #### QEMU [Qemu](https://gitee.com/maygeek/qemu) #### iptable 端口映射 [iptables实现端口映射](https://blog.csdn.net/xin_yu_xin/article/details/46416101) #### Docker 常用操作 * [VNC访问ubuntu容器](https://blog.csdn.net/spylyt/article/details/79944772) * systemctl daemon-reload * 退出 ctrl+P+Q * 普通用户运行, 需要断开ssh重新连接 ``` sudo groupadd docker sudo usermod -aG docker ${USER} sudo systemctl restart docker ``` * 安装 ``` wget -qO- https://get.docker.com |sh curl -sSL https://get.daocloud.io/docker | sh curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://2a22c3ad.m.daocloud.io /etc/docker/daemon.json { "registry-mirrors": ["https://***.mirror.aliyuncs.com"] } ``` * 代理 /etc/systemd/system/docker.service.d/http-proxy.conf ``` [Service] Environment="HTTP_PROXY=http://defra1c-proxy.emea.xxx-net.net:8080/" Environment="HTTPS_PROXY=http://defra1c-proxy.emea.xxx-net.net:8080/" Environment="NO_PROXY=docker-registry.xxx.net,localhost,127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,*.local,xxx.net" ``` * 镜像 [国内镜像](https://www.cnblogs.com/wushuaishuai/p/9984228.html) * docker file ``` FROM centos:7 COPY yum.conf /etc/yum.conf RUN yum update ``` * 导出导入 ``` docker save eb40dcf64078 > img.tar docker load < img.tar docker load -i sct.img.xz docker tag d1ffb1ac7a9f linsee docker save your_iamges:1.0 | docker -H your_ip:port load //远程迁移 端口是多少? ``` * [不使用 ADD/COPY 添加临时文件](https://www.jb51.cc/docker/436458.html) 例如rpm安装完就不需要, add会让镜像变得庞大 ``` python -m http.server --bind 192.168.178.20 8000 curl file://localhost/home/user/program.zip -o /tmp/ ``` * 常见问题: 1. docker: Error response from daemon: toomanyrequests: 添加 /etc/docker/daemon.json ``` { "registry-mirrors": ["https://registry.docker-cn.com"] } ``` 2. 网络无法访问 ``` vi /etc/default/docker DOCKER_OPTS="--dns xxx.xxx.xxx.xxx" ``` 3. 挂载目录 ``` docker run -v /home/b2zhang/docker:/home/docker:rw -itd centos:7 docker build -t tag -f my.df . ``` 4. 用户 ``` uid=$(id -u) gid=$(id -g) docker run -it --rm ${ADDITIONAL_ARGS} \ -e SVN_USER="${SVN_USER}" -e SVN_PASSWORD="${SVN_PASSWORD}" \ --env http_proxy="${http_proxy}" \ --env https_proxy="${https_proxy}" \ --env no_proxy="${no_proxy}" \ ${MOUNTS} \ ${DOCKER_IMAGE} \ /bin/bash -c "groupadd -g ${gid} ${USER} && useradd -M -u ${uid} -g ${gid} -s /bin/bash --home-dir ${HOME} ${USER} && \ chown ${uid}:${gid} ${HOME} && \ ${ADDITIONAL_SETUP} && \ echo \"${DOCKER_YOCTO_BUILD_SETUP}\" >> \"${HOME}/setup.sh\" && \ chmod +x ${HOME}/setup.sh && \ su ${USER}" ``` #### 发行版本与构建 * OpenSuse的obs * Fedora的koji * Ubuntu的launchpad的ppa * Arch的aur * linux基金会的yocto * meego的mic 1. [centos 8.1.1911](http://vault.centos.org/8.1.1911/AppStream/Source/SPackages/) 2. [Fedora 28](https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/28/Everything/source/) 3. [ KOJI 搜包](https://koji.fedoraproject.org/koji/) 4. [ubuntu 1804](http://cdimage.ubuntu.com/releases/18.04/release/source/) 5. [Deepin]() [使用archon运行anroid应用](https://bbs.deepin.org/forum.php?mod=viewthread&tid=36081) 6. [OpenEuler 20.03 LTS](https://mirrors.huaweicloud.com/openeuler/openEuler-20.03-LTS/source/) #### YUM * 查询已经安装的包 yum list installed * 查询文件属于哪个包 yum search ssh #### REPO & Mirrors * [itellyou](https://msdn.itellyou.cn/) * [阿里云 centos](https://mirrors.aliyun.com/centos/) [EPEL](https://mirrors.aliyun.com/epel/) * Centos 7 git2.22 ``` [git] name=Wandisco GIT Repository baseurl=http://opensource.wandisco.com/centos/7/git/$basearch/ enabled=1 gpgcheck=0 #proxy=_none_ ``` #### TIPS 1. 注销用户 ``` pkill -kill -t tty1 ``` #### NGINX 将/etc/selinux/config文件修改为disabled ``` SELINUX-disabled /usr/sbin/sestatus -v getenforce setenforce 0 ``` vi /etc/nginx/nginx.conf ``` #root /var/www/html; #根目录修改这里 root /usr/share/nginx/html; # Load configuration files for the default server block. include /etc/nginx/default.d/*.conf; location / { autoindex on; # 不加这个 打开目录会显示403 } ``` #### Python 1. 代理 ``` pip install pandas --proxy=http://10.20.217.2:8080 ~/.config/pip/pip.conf [global] proxy=http://xxx.xxx.xxx.xxx:8080 ``` #### 虚拟机 [解决共享目录 can not create link](https://www.jianshu.com/p/9ef5ef856d54) ``` cd C:\Program Files\Oracle\VirtualBox ./VBoxManage setextradata deepin VBoxInternal2/SharedFoldersEnableSymlinksCreate/sabdbox 1 VBoxManage getextradata deepin enumerate secpol.msc 本地安全策略-->本地策略-->用户权限分配-->创建符号链接-->添加用户或者组权限 ``` ``` sudo mount -t vboxsf sandbox /sandbox sudo vi etc/fstab sandbox /sandbox vboxsf auto,rw,comment=systemd.automount 0 0 mount -a ``` 银行 | 账单日 | 还款日 | 其他 :-: | :-: | :-: | :- 交通| 8 | 20 |中铁 中国| 9 | 1 | 招商| 12 | 1 | 中信| 15 | 3 |Huawei Card 农信| 15 | 10 |微信联名卡 平安| 19 | 7 |