ubi详解(3)

2019-01-07 14:28

usb usb1: Manufacturer: Linux 2.6.32.57_stm24_V5.0-EUD7141_7141-STSDK ehci_hcd usb usb1: SerialNumber: stm-ehci.0 usb usb1: configuration #1 chosen from 1 choice hub 1-0:1.0: USB hub found hub 1-0:1.0: 1 port detected stm-ehci stm-ehci.1: st-ehci stm-ehci stm-ehci.1: new USB bus registered, assigned bus number 2 stm-ehci stm-ehci.1: irq 160, io mem 0xfeaffe00 stm-ehci stm-ehci.1: USB 0.0 started, EHCI 1.00 usb usb2: New USB device found, idVendor=1d6b, idProduct=0002 usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 usb usb2: Product: st-ehci usb usb2: Manufacturer: Linux 2.6.32.57_stm24_V5.0-EUD7141_7141-STSDK ehci_hcd usb usb2: SerialNumber: stm-ehci.1 usb usb2: configuration #1 chosen from 1 choice hub 2-0:1.0: USB hub found hub 2-0:1.0: 1 port detected Initializing USB Mass Storage driver... usbcore: registered new interface driver usb-storage USB Mass Storage support registered. mice: PS/2 mouse device common for all mice i2c /dev entries driver sh_tmu: TMU0 kept as earlytimer sh_tmu: TMU1 kept as earlytimer usbcore: registered new interface driver usbhid usbhid: v2.6:USB HID core driver [STM][PM-Sys]: emi @ 40 [STM][PM-Sys]: gpio @ 20 stm-hwrandom stm-hwrandom: STM Random Number Generator ver. 0.1 stm-rng hardware driver 1.0 configured nf_conntrack version 0.5.0 (1317 buckets, 5268 max) ip_tables: (C) 2000-2006 Netfilter Core Team ClusterIP Version 0.8 loaded successfully TCP cubic registered NET: Registered protocol family 10 IPv6 over IPv4 tunneling driver NET: Registered protocol family 17 drivers/rtc/hctosys.c: unable to open rtc device (rtc0) eth0: device MAC address 00:fa:e0:fa:e0:00 hub 1-0:1.0: over-current change on port 1 STMMAC MII Bus: probed No MAC Management Counters available IP-Config: Complete: device=eth0, addr=192.168.1.5, mask=255.255.255.0, gw=192.168.1.1, host=I01X088, domain=, nis-domain=(none), bootserver=255.255.255.255, rootserver=10.141.198.252, rootpath= Looking up port of RPC 100003/2 on 10.141.198.252 PHY: 1:01 - Link is Up - 100/Full Looking up port of RPC 100005/1 on 10.141.198.252 VFS: Mounted root (nfs filesystem) on device 0:12. Freeing unused kernel memory: 148k freed INIT: version 2.86 booting Fast Starting Kernel event manager... Activating swap. Checking all file systems... fsck from util-linux-ng 2.16.1 Mounting local filesystems... Cleaning /tmp /var/run /var/lock. Setting up networking...done. Hostname: I01X088.00. Configuring network interfaces: done. #!/bin/sh case \ start) /sbin/ubiattach /dev/ubi_ctrl -m 8 -O 2048 #/bin/mount -t ubifs /dev/ubi0 /opt/mtc /bin/mount -t ubifs ubi0_0 ~/mountpoint

#/bin/mount -t squashfs /dev/mtdblock7 /opt/mtc export MODULES_INSTALL_DIR=/opt/mtc/modules cd $MODULES_INSTALL_DIR; . load_modules.sh # point to new partitions export STMTD_BKUP_DEVICE=mtd5 export STMTD_MAIN_DEVICE=mtd6 #. /etc/stb.env if [ -e $MODULES_INSTALL_DIR/ecm_firmware.bin ] ; then echo \config.runtime [ -n \ fi cd ..; ./main*32BITS.out ;; :q! 用nand write写入之后进行关联ubifs

root@I01X088.00:~/mountpoint# /sbin/ubiattach /dev/ubi_ctrl -m 7 -O 2048 UBI: attaching mtd7 to ubi0 UBI: physical eraseblock size: 131072 bytes (128 KiB) UBI: logical eraseblock size: 126976 bytes UBI: smallest flash I/O unit: 2048 UBI: sub-page size: 512 UBI: VID header offset: 2048 (aligned 2048) UBI: data offset: 4096 UBI: empty MTD device detected UBI: create volume table (copy #1) UBI: create volume table (copy #2) UBI: attached mtd7 to ubi0 UBI: MTD device name: \UBI: MTD device size: 16 MiB UBI: number of good PEBs: 128 UBI: number of bad PEBs: 0 UBI: max. allowed volumes: 128 UBI: wear-leveling threshold: 4096 UBI: number of internal volumes: 1 UBI: number of user volumes: 0 UBI: available PEBs: 122 UBI: total number of reserved PEBs: 6 UBI: number of PEBs reserved for bad PEB handling: 2 UBI: max/mean erase counter: 0/0 UBI: image sequence number: 0 UBI: background thread \UBI device number 0, total 128 LEBs (16252928 bytes, 15.5 MiB), available 122 LEBs (15491072 bytes, 14.8 MiB), LEB size 126976 bytes (124.0 KiB) root@I01X088.00:~/mountpoint# /bin/mount -t ubifs ubi0_0 ~/mountpoint/ UBIFS error (pid 1223): ubifs_get_sb: cannot open \mount: unknown filesystem type 'ubifs'

root@I01X088.00:~/mountpoint# ubimkvol /dev/ubi0 -N rootfs -s 30MiB UBI error: ubi_create_volume: cannot create volume 0, error -28 ubimkvol: error!: cannot UBI create volume error 28 (No space left on device) 此处因为关联错分区,导致挂在失败

root@I01X088.00:~/mountpoint# ubi ubiattach ubiformat ubinize ubirsvol ubicrc32 ubimkvol ubirename ubiupdatevol ubidetach ubinfo ubirmvol root@I01X088.00:~/mountpoint# /sbin/ubidetach --help ubidetach version 1.5.0 - tool to remove UBI devices (detach MTD devices from UBI) Usage: ubidetach [] [-d ] [-m ] [-p ] [--devn=] [--mtdn=] [--dev-path=] UBI control device defaults to /dev/ubi_ctrl if not supplied. Example 1: ubidetach -p /dev/mtd0 - detach MTD device /dev/mtd0 Example 2: ubidetach -d 2 - delete UBI device 2 (ubi2) Example 3: ubidetach -m 0 - detach MTD device 0 (mtd0) -d, --devn= UBI device number to delete -p, --dev-path= or alternatively, MTD device node path to detach -m, --mtdn= or alternatively, MTD device number to detach -h, --help print help message -V, --version print program version root@I01X088.00:~/mountpoint# /sbin/ubidetach -p /dev/mtd7 用ubidetach命令删除已建关联。 UBI: mtd7 is detached from ubi0

root@I01X088.00:~/mountpoint# /sbin/ubidetach /dev/ubi_ctrl -m 8 -O 2048 重新建立关联 /sbin/ubidetach: invalid option -- 'O' Use -h for help root@I01X088.00:~/mountpoint# /sbin/ubiattach /dev/ubi_ctrl -m 8 -O 2048 UBI: attaching mtd8 to ubi0 UBI: physical eraseblock size: 131072 bytes (128 KiB) UBI: logical eraseblock size: 126976 bytes UBI: smallest flash I/O unit: 2048 UBI: sub-page size: 512 UBI: VID header offset: 2048 (aligned 2048) UBI: data offset: 4096 UBI warning: ubi_scan: 203 PEBs are corrupted corrupted PEBs are: 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 UBI: volume 0 (\UBI: attached mtd8 to ubi0 UBI: MTD device name: \UBI: MTD device size: 32 MiB UBI: number of good PEBs: 256 UBI: number of bad PEBs: 0 UBI: max. allowed volumes: 128 UBI: wear-leveling threshold: 4096 UBI: number of internal volumes: 1 UBI: number of user volumes: 1 UBI: available PEBs: 0 UBI: total number of reserved PEBs: 256 UBI: number of PEBs reserved for bad PEB handling: 2 UBI: max/mean erase counter: 1/0 UBI: image sequence number: 669128329 UBI: background thread \UBI device number 0, total 256 LEBs (32505856 bytes, 31.0 MiB), available 0 LEBs (0 bytes), LEB size 126976 bytes (124.0 KiB) root@I01X088.00:~/mountpoint# /bin/mount -t ubifs ubi0_0 ~/mountpoint/ 挂载已经焼写了rootfs,并被关联到ubi的分区 UBIFS: mounted UBI device 0, volume 0, name \UBIFS: file system size: 14983168 bytes (14632 KiB, 14 MiB, 118 LEBs) UBIFS: journal size: 2412544 bytes (2356 KiB, 2 MiB, 19 LEBs) UBIFS: media format: w4/r0 (latest is w4/r0) UBIFS: default compressor: lzo UBIFS: reserved for root: 0 bytes (0 KiB) root@I01X088.00:~/mountpoint# ls root@I01X088.00:~/mountpoint# cd .. root@I01X088.00:~# ls mountpoint mtraces.txt nfs printenv saveenv setenv root@I01X088.00:~# cd mountpoint/ root@I01X088.00:~/mountpoint# ls macros.ttm multicom-libstsdk macros_tests.ttm multicom_v4.0.5P2 main_eud7141_7141_ST40ESTB_LINUX_32BITS.out sdk-fonts modules stsdk-fonts modules_eud7141_7141_ST40ESTB_LINUX_32BITS 使用flashcp烧录后进行ubi关联

root@I01X088.00:~# flashcp -v ../mtc_jelly.ubifs /dev/mtd8 Erasing blocks: 53/53 (100%) Writing data: 6784k/0k (100%)) Verifying data: 6784k/0k (100%)) root@I01X088.00:~# ubiattach /dev/ubi_ctrl -m 8 -O 2048 UBI: attaching mtd8 to ubi0 UBI: physical eraseblock size: 131072 bytes (128 KiB)


ubi详解(3).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:医院救护车管理规定

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: