树莓派在启动时, 会从SD卡里读取一些系统配置参数. 包括硬件功能等,这些参数配置储存在/boot/config.txt文件中。在linux内核启动时,可以指定一些相关的启动参数,在树莓派中,内核命令行启动参数存放在/boot/cmdline.txt。在树莓派4中启动USB虚拟网卡或串口终端需要修改这两个文件
在文件的[pi4]或[all]小节中添加如下配置。关于config.tx文件的详细说明参见 树莓派文档
| #!/bin/sh | |
| INTERFACE=$1 # 状态发生变化的网络接口 | |
| STATUS=$2 # 网络接口的新状态:up, down, vpn-up, vpn-down | |
| IF_WIFI=wlp2s0 | |
| IF_ETH=enp0s25 | |
| IPV4_DEV=ppp0 | |
| ISATAP_ROUTER=210.34.219.49 | |
| XMU_IPV6_PREFIX=2001:da8:e800:45c0:200:5efe | |
| LANG=en |
| #download freedos iso img FD12CD.iso from http://www.freedos.org/ | |
| #download bios file and uzip to bios dir | |
| #create an empty disk image | |
| dd if=/dev/zero of=dos48m.img bs=1k count=48k | |
| #install free dos to disk img | |
| qemu-system-x86_64 -cdrom FD12CD.iso dos48m.img -boot d | |
| #after installed the free dos, mount the disk image and copy bios flash files into the img. | |
| sudo losetup -P -f dos48m.img | |
| losetup -j dos48m.img | |
| #mount the foud out loop dev loop19p1 |
树莓派在启动时, 会从SD卡里读取一些系统配置参数. 包括硬件功能等,这些参数配置储存在/boot/config.txt文件中。在linux内核启动时,可以指定一些相关的启动参数,在树莓派中,内核命令行启动参数存放在/boot/cmdline.txt。在树莓派4中启动USB虚拟网卡或串口终端需要修改这两个文件
在文件的[pi4]或[all]小节中添加如下配置。关于config.tx文件的详细说明参见 树莓派文档
| for i in {2..7} | |
| do | |
| sudo route del -net 192.168.1.$[2**i] netmask 255.255.255.$[256-2**i] | |
| done | |
| for i in 0 3 | |
| do | |
| sudo route del -net 192.168.1.$i netmask 255.255.255.255 | |
| done |
| #!/bin/bash | |
| if [[ "$1" == "" ]]; then | |
| echo usage: $0 file.mp4 | |
| exit | |
| fi | |
| export LANG=C | |
| echo "select the window with mouse for recording:" | |
| geo=`xwininfo |grep geometry` | |
| loc=${geo#*geometry } | |
| size=${loc%%+*} |
| /* Copyright 2018 The TensorFlow Authors. All Rights Reserved. | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. | |
| You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 | |
| Unless required by applicable law or agreed to in writing, software | |
| distributed under the License is distributed on an "AS IS" BASIS, |