omap4 配置SD两个分区脚本

#!/bin/bash
 
 set -e
  
  if [ ! "$1" = "/dev/sda" ] ; then
          echo "Entry a variable $1 "
          echo 'Entry a variable $1'
          echo `Entry a variable $1`
          unset LANG
          DRIVE=$1
      if [ -b "$DRIVE" ] ; then
           dd if=/dev/zero of=$DRIVE bs=1024 count=1024
           SIZE=`fdisk -l $DRIVE | grep Disk | awk '{print $5}'`
           echo DISK SIZE - $SIZE bytes
           CYLINDERS=`echo $SIZE/255/63/512 | bc`
           echo CYLINDERS - $CYLINDERS
                {
                 	echo ,9,0x0C,*
                        echo ,,,-
                                 } | sfdisk -D -H 255 -S 63 -C $CYLINDERS $DRIVE
                mkfs.vfat -F 32 -n "boot" ${DRIVE}1
                mke2fs -j -L "rootfs" ${DRIVE}2
        fi 
                                                                                                                          
       if [ -b "${DRIVE}p1" ] ; then
           mount ${DRIVE}p1 /mnt
       wget -O /mnt/MLO http://ports.ubuntu.com/ubuntu-ports/dists/oneiric/main/installer-armel/current/images/omap4/netboot/MLO
                                                                                                                                                          wget -O /mnt/u-boot.bin http://ports.ubuntu.com/ubuntu-ports/dists/oneiric/main/installer-armel/current/images/omap4/netboot/u-boot.bin
                                                                                                                                                                  echo "setenv pxecfg_ram 0x88000000;setenv kernel_ram 0x80000000;setenv initrd_ram 0x81600000;pxecfg get;pxecfg boot" > /mnt/ENV.txt
                                                                                                                                                                          umount /mnt
                                                                                                                                                                              fi
                                                                                                                                                                              fi

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值