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. ajax请求的同步异步问题

    前言 在做项目的过程中遇到一个bug就是:使用了alert语句后,代码才能正确执行,没使用就执行不成功. 后来我就用把console.log,代码就不能正确执行. 于是我就去比较了下consol.lo ...

  2. 垒骰子|2015年蓝桥杯B组题解析第九题-fishers

    垒骰子 赌圣atm晚年迷恋上了垒骰子,就是把骰子一个垒在另一个上边,不能歪歪扭扭,要垒成方柱体. 经过长期观察,atm 发现了稳定骰子的奥秘:有些数字的面贴着会互相排斥! 我们先来规范一下骰子:1 的 ...

  3. SPOJ ADAFIELD Ada and Field(STL的使用:set,multiset,map的迭代器)题解

    题意:n*m的方格,“0 x”表示x轴在x位置切一刀,“0 y”表示y轴在y位置切一刀,每次操作后输出当前面积最大矩形. 思路:用set分别储存x轴y轴分割的点,用multiset(可重复)储存x轴y ...

  4. Jedis和JAVA对象的序列化和反序列化的使用

    1. Jedis版本: jedis-2.6.2.jar 背景:现在系统提供portal接口服务,使用JDBC直接查询数据库,使用jedis提供的缓存功能,在JDBC前面加上Redis,先从Redis中 ...

  5. linux系统上安装java

    linux系统上安装java   如何在ubuntu server上安装java(jre或jdk),主要注意以下几点: 1.下载你想要的java版本压缩包. JRE下载:http://java.com ...

  6. 【TCP/IP详解 卷一:协议】第十一章 UDP 用户数据报协议

    11.1 引言 UDP 是一个简单的 面向数据报 的运输层协议:进程的每个 输出操作 都正好产生一个 UDP数据报,并且组装成一份待发送的IP数据报. 这与 TCP 不一样,它是 面向流字符 的协议, ...

  7. POJ 1222 EXTENDED LIGHTS OUT(高斯消元解XOR方程组)

    http://poj.org/problem?id=1222 题意:现在有5*6的开关,1表示亮,0表示灭,按下一个开关后,它上下左右的灯泡会改变亮灭状态,要怎么按使得灯泡全部处于灭状态,输出方案,1 ...

  8. jdk、tomcat、solr环境搭建

    环境概述 1)操作系统:windows7旗舰版(64位) 2)jdk:jdk-8u131-windows-x64: 3)tomcat:apache-tomcat-9.0.0.M21 4)solr:so ...

  9. hdu 5587 Array 二分

    Array Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) Problem ...

  10. html 表格中添加圆

    效果: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" con ...