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. 20165211 2017-2018-2 《Java程序设计》第3周学习总结

    20165211 2017-2018-2 <Java程序设计>第3周学习总结 教材学习内容总结 本周,我学习了书本上第四章的内容,以下是我整理的主要知识. 第四章 类与对象 编程语言的几个 ...

  2. 在浏览器输入url后并回车发生了哪些过程

    1.解析URL ________________________________________________________________________ 关于URL: URL(Universa ...

  3. 理解 python 中__name__ = '__main__' 的作用

    很多新手刚开始学习python的时候经常会看到python 中__name__ = \'__main__\' 这样的代码,可能很多新手一开始学习的时候都比较疑惑,python 中__name__ = ...

  4. Wireshark分析RabbitMQ

    消费者Code: using System; using System.Collections.Generic; using System.Linq; using System.Text; using ...

  5. Java Collections Framework概览

    本文github地址 概览 容器,就是可以容纳其他Java对象的对象.Java Collections Framework(JCF)为Java开发者提供了通用的容器,其始于JDK 1.2,优点是: 降 ...

  6. 04_Windows平台Spark开发环境构建

    Spark的开发环境,可以基于IDEA+Scala插件,最终将打包得到的jar文件放入Linux服务器上的Spark上运行 如果是Python的小伙伴,可以在Windows上部署spark+hadoo ...

  7. UVa 1347 旅行

    https://vjudge.net/problem/UVA-1347 思路:用d(i,j)表示第一个人走到i,第二个人走到j,还需要走多长的距离.在这里强制定义i>j,并且每次只能走到i+1. ...

  8. tornado 如何向html传list变量啊?

    py: html:

  9. codeforces804D Expected diameter of a tree

    本文版权归ljh2000和博客园共有,欢迎转载,但须保留此声明,并给出原文链接,谢谢合作. 本文作者:ljh2000 作者博客:http://www.cnblogs.com/ljh2000-jump/ ...

  10. python ros 订阅robot_pose获取机器人位置

    #!/usr/bin/env python import rospy import tf from tf.transformations import * from std_msgs.msg impo ...