download.sh

#!/bin/sh

# check the network first

serverip=$(cat /tmp/serverip)

while true; do
ping -c 5 $serverip;
if [ $? = 0 ];then
break;
fi
done

# then disable the firewall
/etc/init.d/firewall stop

cd /tmp

tftp -g -r rootfs.tar.gz $serverip

cd /

format.sh

#!/bin/sh

mmcdev=/dev/mmcblk0
# check device
while true;do
if [ -e $mmcdev ];then
break;
else
sleep 1;
fi
done

echo "d
n
p
1

w" |/usr/sbin/fdisk $mmcdev

mmcpart=${mmcdev}p1

while true;do
if [ -e $mmcpart ];then
break;
else
sleep 1;
fi
done

echo "y
" | /usr/sbin/mkfs.ext4 $mmcpart

install.sh

#!/bin/sh

mmcpart=/dev/mmcblk0p1

if [ ! -e $mmcpart ];then
echo "format the eMMC device failed";
exit
fi

tarfile=/tmp/rootfs.tar.gz

if [ ! -f $tarfile ]; then
echo "download the armbian failed";
exit
fi

mount $mmcpart /mnt

if [ $? = 1 ];then
echo "format the eMMC device failed";
exit
fi

cd /mnt

tar vxzf $tarfile

cd /

umount /mnt

echo "install finish"

download fomat install rootfs script的更多相关文章

  1. Download and Install Apache Zookeeper on Ubuntu

    http://www.techburps.com/misc/download-and-install-apache-zookeepr/36 In previous article of this Bi ...

  2. Erlang - Download and Install for Linux

    1. 下载 Erlang [huey@huey-K42JE erlang]$ wget http://www.erlang.org/download/otp_src_R16B03.tar.gz 2. ...

  3. [Training Video - 1] [Selenium Basics] [Download and Install Selenium]

    Download Selenium Jars Configure jars in eclipse Webdriver http://docs.seleniumhq.org/download/ Sele ...

  4. [BlueZ] 1、Download install and use the BlueZ and hcitool on PI 3B+

    星期日, 02. 九月 2018 11:58下午 - beautifulzzzz 1. Introduction Bluez is the default Bluetooth protocol sta ...

  5. MD5 Checksums for R12.1.1 Rapid Install Media (文档 ID 802195.1)

    Oracle EBusiness Suite R12.1.x Rapid Installmd5 Checksums November 2011 Section      1: Overview Sec ...

  6. Install Ansible on Mac OSX

    from: https://devopsu.com/guides/ansible-mac-osx.html and : https://devopsu.com/guides/ansible-post- ...

  7. How to install and configure Azure PowerShell

    https://azure.microsoft.com/en-us/documentation/articles/powershell-install-configure/ In this artic ...

  8. How to install 64-bit Google Chrome 28+ on 64-bit RHEL/CentOS 6 or 7

    How to install 64-bit Google Chrome 28+ on 64-bit RHEL/CentOS 6 or 7 The problem Google developers s ...

  9. Google Chrome 55 Released – Install on RHEL/CentOS 7/6 and Fedora 25-20

    Google Chrome is a freeware web browser developed by Google Inc. Google Chrome team proudly announce ...

随机推荐

  1. 20145335郝昊《网络攻防》Exp 4 利用nmap扫描

    20145335郝昊<网络攻防>Exp 4 利用nmap扫描 实验原理 使用msf辅助模块,nmap来扫描发现局域网中的主机ip 实验步骤 首先使用命令创建一个msf所需的数据库 serv ...

  2. 前端开发环境全面配置 --- mac OS

    Mac 开发配置 brew /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install ...

  3. map set iterator not incrementable 解决办法

    例子: #include <iostream> #include <map> using namespace std; int main() { map<int, int ...

  4. openwrt的编译方法

    1.获取最新包 ./scripts/feeds update -a 2.安装包 ./scripts/feeds install -a 3.配置 make menuconfig 4.编译 make -j ...

  5. Excel中Application和ApplicationClass的区别

    Application和ApplicationClass的联系和区别Application和ApplicationClass都继承自接口_Application.Application为接口.Appl ...

  6. trigger自动执行事件

    html <button>点击文字变红</button> <p>trigger出发点击事件</p> js $('button').click(funct ...

  7. [Java] - MySQL数据库的时间设置问题.

    之前有朋友做的项目时间格式设置为String,我感觉很不好,随后自己试了试. 首先在设置数据库类型时,选择的是timestamp, 而Java的实体中设置时间的属性类型为Date, (java.uti ...

  8. spring注解没起作用

    本文为博主原创,未经允许,不得转载: 今天在写一个功能的时候,用的是springMVC的注解,当整个的功能写完在调试的时候, 从浏览器请求一直请求不到,仔细检查代码的时候也没检查出逻辑的问题,关键的问 ...

  9. c++之数组形参

    1.问题,最近看项目log模块,_log模板函数中的一个参数竟然看蒙x了.函数原形是这样: template<size_t size>void _Log(char (&strDes ...

  10. JVM内存管理的机制

    Eclipse崩溃,错误提示:MyEclipse has detected that less than 5% of the 64MB of Perm Gen (Non-heap memory) sp ...