BusyBox

busybox只做文件系统的配置

我是研究僧i 提交于 2019-12-15 09:35:27
一、busybox配置编译过程参考网上其他教程,基本是一样的,通用的 二、/etc/init.d/rcS echo "---- welcome to linux ----" PATH=/sbin:/bin:/usr/sbin:/usr/bin runlevel=S prevlevel=N umask 022 export PATH runlevel prevlevel mount -a echo /sbin/mdev > /proc/sys/kernel/hotplug mdev -s #/bin/hostname -F /etc/sysconfig/HOSTNAME #ifconfig eth0 192.168.1.10 三、/etc/fstab # /etc/fstab: static file system information. # # Use 'vol_id --uuid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file

ARM嵌入式——制作根文件系统并使用NFS挂载运行。

﹥>﹥吖頭↗ 提交于 2019-12-15 09:02:56
制作根文件系统并使用NFS挂载运行。 上位机准备: 准备busybox,安装menuconfig所需依赖的库: sudo apt-get install build-essential sudo apt-get install libncurses5 sudo apt-get install libncurses5-dev 在busybox中执行make menuconfig Linux Module Utilities ---> //按N键去除选项(insmod/lsmod/rmmod精简版命令) [*] Simplified modutils (NEW) 去除以上选项,立马出现完整版的命令选项: [*] insmod (NEW) │ │ [*] rmmod (NEW) │ │ [*] lsmod (NEW) [*] Pretty output (NEW) [*] Blacklist support │ │ [*] modprobe (NEW) │ │ [*] depmod (NEW) 保存退出 注意:目前busybox提供的命令已经足够使用 修改Makefile进行交叉编译: vim Makefile +164 //修改为指定的交叉编译器。 vim Makefile +190 //修改为ARCH=arm。(指定架构) 保存退出 正式进行编译: make make install

Docker的网络介绍

元气小坏坏 提交于 2019-12-13 22:40:15
Docker 网络基础 Docker启动时, 会自动在主机上创建一个docker0虚拟网桥, 实际上是Linux的一个bridge,可以理解为一个软件交换机, 它会而挂载到它的网口之间进行转发 当创建一个Docker容器的时候, 同理会创建一对veth pair接口(当数据包发送到一个接口时, 另外一个接口也可以收到相同的数据包), 这对接口一端在容器内, 即eth0;另一端在本地并被挂载到docker0网桥, 名称以veth开头。 Docker容器的DNS和主机名 实际上容器中/etc目录下有3个文件是容器启动后被虚拟文件覆盖掉的, 分别是/etc/hostname、 /etc/hosts、 /etc/resolve.conf,通过在容器中运行mount命令可以查看。 Docker容器的5种网络模式 在使用docker run创建docker容器时, 可以用--net选项指定容器的网络模式, Docker有以下5种网络模式: 1. bridge模式 使用docker run --net=bridge指定, bridge模式是Docker默认的网络设置, 此模式会为每一个容器分配Network Namespace、 设置IP等, 并将一个主机上的Docker容器连接到一个虚拟网桥上。 此模式与外界通信使用NAT协议, 增加了通讯的复杂性, 在复杂场景下使用会有诸多 限制。

busybox in embedded linux shows “applet not found”

情到浓时终转凉″ 提交于 2019-12-13 11:50:21
问题 I compiled busybox myself,and I put it in our embedded linux. But I have some questions. Question 1:When I try to use some command such as gzip,it prints "gzip: applet not found".While I checked the menuconfig of busybox,I make sure that I've selected "gzip". Question 2:I used to work with VIM,but busybox just provide VI.So I make a link VIM to VI,but when I typed vim and run it,it also show "vim: applet not found". Anybody can help me with this problem that "applet not found"? Thank you very

K8s资源Pod(第一篇)

耗尽温柔 提交于 2019-12-13 11:36:33
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 资源配置格式: apiVersion:用来定义api群组的版本。 Kind:用来定义资源类型。 metadata:用来定义元数据,元数据中包含,资源的名字,标签,隶属的名称空间等。 sepc: 用来定义资源的期望状态。 status:资源的实际状态,用户不能够定义,由k8s自行维护。 获取集群所支持的所有资源类型: [root@k8smaster data]# kubectl api-resources NAME SHORTNAMES APIGROUP NAMESPACED KIND bindings true Binding componentstatuses cs false ComponentStatus configmaps cm true ConfigMap endpoints ep true Endpoints events ev true Event limitranges limits true LimitRange namespaces ns false Namespace nodes no false Node persistentvolumeclaims pvc true PersistentVolumeClaim persistentvolumes pv false

Linux shell script with file saving and sequential file naming

心不动则不痛 提交于 2019-12-13 03:44:33
问题 I am working with a Ethernet camera that comes with Busybox. A single board computer is connected to it through RS232. The SBC needs to send a single command to the camera in order to take a jpg snapshot, save it to a CF memory card and name it in a sequential order (0001, 0002 etc..). This is the code I use to take a single snapshot, without sequential naming: wget http://127.0.0.1/snap.php -O /mnt/0/snapfull`date +%d%m%y%H%M%S`.jpg I need the files to be named sequentially. This is the code

Linux C++ How to Programatically Get MAC address for all adapters on a LAN

爱⌒轻易说出口 提交于 2019-12-12 10:55:31
问题 How may I use C or C++ PROGRAM (no command line) to get the MAC addresses (I'll take the IP addresses too if they are "free") on my (small) local network. It's an embedded Busybox Linux so I need a minimalist answer that hopefully doesn't require porting some library. I don't have libnet or libpcap. The arp cache seems to never contain anything but the MAC if the DHCP host. 回答1: Full source here. Open /proc/net/arp , then read each line like this: char line[500]; // Read with fgets(). char ip

install apk in background using busybox

柔情痞子 提交于 2019-12-12 08:01:50
问题 can i install apk in background using busybox on rooted device ??? i see something like that but it doesn't work process install; CommandCapture command = new CommandCapture(0, "chmod 777 /data/app"); RootTools.getShell(true).add(command).waitForFinish(); CommandCapture command2 = new CommandCapture(0, "chmod 777 /system/xbin/busybox"); RootTools.getShell(true).add(command2).waitForFinish(); install = Runtime.getRuntime().exec("/system/xbin/busybox install " + Environment

How to R/W file in android system directory (Internal Storage)

▼魔方 西西 提交于 2019-12-12 04:49:43
问题 I want to create the file in android system folder. I have also tried this "mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system" using Runtime.getRuntime().exec() but it's not working. if you have example please let me know. Thanks 回答1: Android applications don't run as root on an unmodified device so they can't write to the /system folder or remount file systems. Why do you want to write to /system ? What's wrong the the storage directory for you app? This may be possible on a "rooted

Turning a bash script into a busybox script

点点圈 提交于 2019-12-12 03:30:05
问题 I am working on a device that only has busybox (ash?) and does not support bash. However, I need to run the bash script below on it. Is it possible or busybox simply does not support scripts? #!/bin/bash domain="mydomain.com" record="11019653" api_key="key1234" ip="$(curl http://ipecho.net/plain)" echo content="$(curl \ -k \ -H "Authorization: Bearer $api_key" \ -H "Content-Type: application/json" \ -d '{"data": "'"$ip"'"}' \ -X PUT "https://api.digitalocean.com/v2/domains/$domain/records/