sd card

New situation:
Units = mebibytes of 1048576 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start   End    MiB    #blocks   Id  System
/dev/sdb1         7+    21-    15-     14942   83  Linux
/dev/sdb2        21+    36-    15-     14942   83  Linux
/dev/sdb3        36+  2042-  2007-   2054525    5  Extended
/dev/sdb4      2042+  4049-  2007-   2054525   83  Linux
/dev/sdb5        36+   554-   519-    530440+  83  Linux
/dev/sdb6       554+  1072-   519-    530440+  83  Linux
/dev/sdb7      1072+  1087-    15-     14941+  83  Linux
/dev/sdb8      1087+  1101-    15-     14941+  83  Linux
Warning: no primary partition is marked bootable (active)



 

echo "--------------1--u-boot-no-padding.bin --------------"
sudo dd if=1.txt of=/dev/sdb bs=1K seek=1
echo "Download the boot.img :" 
sudo dd if=2.txt of=/dev/sdb1 
echo "Download the system.img :"
sudo dd if=3.txt of=/dev/sdb5
echo "Download the recovery.img:"
sudo dd if=4.txt of=/dev/sdb2
sync



0X200 : 22222222222222  

0X400 : 111111            这个对应db1  ,这个位置是对的.

0x247ae00 :33333333333          //这里对于db5 ,也是对的,地址是36mb多一点

0x15e3400 :444444444444444444444    //这里对应db2 ,也是对的.对应21mb多一点


所以我认为是这一条指令有错误:

sfdisk --force -uM ${node} -N1 << EOF
${BOOTLOAD_RESERVE},${BOOT_ROM_SIZE},83
EOF

---------------------------------------------------------------------------------------------------

这里是原卡的分区,测试:

0X76AC00 : 22222222222222  

0X400 : 111111            这个对应db1  ,这个位置是对的.

0x2515e00 :33333333333          //这里对于db5 ,也是对的,地址是36mb多一点

0x1640400 :444444444444444444444    //这里对应db2 ,也是对的.对应21mb多一点


   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdb1          1       2       2      15190   83  Linux
/dev/sdb2          3       4       2      15190   83  Linux
/dev/sdb3          5     254     250    1898750    5  Extended
/dev/sdb4        255    1025     771    5855745    b  W95 FAT32
/dev/sdb5          5+     74      70-    531649+  83  Linux
/dev/sdb6         75+    109      35-    265824+  83  Linux
/dev/sdb7        110+    248     139-   1055704+  83  Linux
/dev/sdb8        249+    250       2-     15189+  83  Linux
/dev/sdb9        251+    252       2-     15189+  83  Linux



--------------------------------------------------------------------------------------------------

这里是使用jb4.2里面的脚本分区的情况,测试:

0X74BC00 : 22222222222222  

0X400 : 111111            这个对应db1  ,这个位置是对的.

0x247ae00 :33333333333          //这里对于db5 ,也是对的,地址是36mb多一点

0x15e3400 :444444444444444444444    //这里对应db2 ,也是对的.对应21mb多一点


   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdb1          1       2       2      14942   83  Linux
/dev/sdb2          3       4       2      14942   83  Linux
/dev/sdb3          5     153     149    1113179    5  Extended
/dev/sdb4        154    1030     877    6552067   83  Linux
/dev/sdb5          5+     75      71-    530440+  83  Linux
/dev/sdb6         76+    146      71-    530440+  83  Linux
/dev/sdb7        147+    148       2-     14941+  83  Linux
/dev/sdb8        149+    150       2-     14941+  83  Linux


---------------------------------------------------------------------------------------------

上面2个烧录的脚本:

echo "--------proc u-boot-6q.bin----"
sudo dd if=1.txt of=/dev/sdb bs=1k seek=1 
sync
sync
sudo dd if=2.txt of=/dev/sdb1 
sync
sync
sudo dd if=3.txt of=/dev/sdb5 
sync
sync
sudo dd if=4.txt of=/dev/sdb2 
sync
sync


--------------------------------------------------------

   Device Boot Start   End    MiB    #blocks   Id  System
/dev/sdb1         7+    21-    15-     14942   83  Linux
/dev/sdb2        21+    36-    15-     14942   83  Linux
/dev/sdb3        36+  2042-  2007-   2054525    5  Extended
/dev/sdb4      2042+  4049-  2007-   2054525   83  Linux
/dev/sdb5        36+   554-   519-    530440+  83  Linux
/dev/sdb6       554+  1072-   519-    530440+  83  Linux
/dev/sdb7      1072+  1087-    15-     14941+  83  Linux
/dev/sdb8      1087+  1101-    15-     14941+  83  Linux
Warning: no primary partition is marked bootable (active)
This does not matter for LILO, but the DOS MBR will not boot this disk.
Successfully wrote the new partition table

Re-reading the partition table ...
BLKRRPART: Device or resource busy
The command to re-read the partition table failed.
Run partprobe(8), kpartx(8) or reboot your system now,
before using mkfs
If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes:  dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
formating android images
mke2fs 1.42 (29-Nov-2011)
Filesystem label=data
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
128512 inodes, 513631 blocks
25681 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=528482304
16 block groups
32768 blocks per group, 32768 fragments per group
8032 inodes per group
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done 

mke2fs 1.42 (29-Nov-2011)
Filesystem label=system
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
33200 inodes, 132610 blocks
6630 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=138412032
5 block groups
32768 blocks per group, 32768 fragments per group
6640 inodes per group
Superblock backups stored on blocks: 
	32768, 98304

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

mke2fs 1.42 (29-Nov-2011)
Filesystem label=cache
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
33200 inodes, 132610 blocks
6630 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=138412032
5 block groups
32768 blocks per group, 32768 fragments per group
6640 inodes per group
Superblock backups stored on blocks: 
	32768, 98304

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

mke2fs 1.42 (29-Nov-2011)
Filesystem label=vender
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
Stride=0 blocks, Stripe width=0 blocks
3744 inodes, 14940 blocks
747 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=15466496
2 block groups
8192 blocks per group, 8192 fragments per group
1872 inodes per group
Superblock backups stored on blocks: 
	8193

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (1024 blocks): done
Writing superblocks and filesystem accounting information: done

hkbdm@ubuntu:~/img_yang/tools$ cd ..



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值