Lines Matching full:dev
25 "$@" 2>/dev/null
37 DEV=fake_dev.bin
38 rm -f ${DEV}
39 dd if=/dev/zero of=${DEV} conv=notrunc bs=512 count=${NUM_SECTORS} 2>/dev/null
79 $CGPT create $MTD ${DEV}
82 -l "${DATA_LABEL}" ${DEV}
84 -l "${KERN_LABEL}" ${DEV}
86 -l "${ROOTFS_LABEL}" ${DEV}
88 -l "${ESP_LABEL}" ${DEV}
90 -l "${FUTURE_LABEL}" ${DEV}
92 -l "${RANDOM_LABEL}" ${DEV}
97 X=$($CGPT show $MTD -b -i $DATA_NUM ${DEV})
98 Y=$($CGPT show $MTD -s -i $DATA_NUM ${DEV})
101 X=$($CGPT show $MTD -b -i $KERN_NUM ${DEV})
102 Y=$($CGPT show $MTD -s -i $KERN_NUM ${DEV})
105 X=$($CGPT show $MTD -b -i $ROOTFS_NUM ${DEV})
106 Y=$($CGPT show $MTD -s -i $ROOTFS_NUM ${DEV})
109 X=$($CGPT show $MTD -b -i $ESP_NUM ${DEV})
110 Y=$($CGPT show $MTD -s -i $ESP_NUM ${DEV})
113 X=$($CGPT show $MTD -b -i $FUTURE_NUM ${DEV})
114 Y=$($CGPT show $MTD -s -i $FUTURE_NUM ${DEV})
117 X=$($CGPT show $MTD -b -i $RANDOM_NUM ${DEV})
118 Y=$($CGPT show $MTD -s -i $RANDOM_NUM ${DEV})
124 $CGPT add $MTD -i 1 -b ${DATA_START} ${DEV} || error
125 X=$($CGPT show $MTD -b -i 1 ${DEV})
130 $CGPT add $MTD -i 1 -s ${DATA_SIZE} ${DEV} || error
131 X=$($CGPT show $MTD -s -i 1 ${DEV})
135 $CGPT add $MTD -i 1 -t reserved ${DEV} || error
136 X=$($CGPT show $MTD -t -i 1 ${DEV} | tr 'A-Z' 'a-z')
139 $CGPT add $MTD -i 1 -t 610a563a-a55c-4ae0-ab07-86e5bb9db67f ${DEV} || error
140 X=$($CGPT show $MTD -t -i 1 ${DEV})
143 $CGPT add $MTD -i 1 -t data ${DEV} || error
144 X=$($CGPT show $MTD -t -i 1 ${DEV} | tr 'A-Z' 'a-z')
149 $CGPT boot $MTD -i ${KERN_NUM} ${DEV} >/dev/null
152 X=$($CGPT boot $MTD ${DEV})
153 Y=$($CGPT show $MTD -u -i $KERN_NUM $DEV)
159 # Output: ${DEV} has kernel partitions with the given priorities
162 $CGPT create $MTD ${DEV}
165 $CGPT add $MTD -t kernel -l "kern$idx" -b $((100 + 2 * $idx)) -s 1 -P $pri ${DEV}
172 for idx in $($CGPT find $MTD -t kernel ${DEV} | sed -e s@${DEV}@@); do
173 $CGPT show $MTD -i $idx -P ${DEV}
179 # Operation: expects ${DEV} to contain those kernel priorities
188 $CGPT create $MTD ${DEV}
189 $CGPT add $MTD -t rootfs -b 100 -s 1 ${DEV}
190 $CGPT prioritize $MTD ${DEV}
195 $CGPT prioritize $MTD -i 1 ${DEV}
197 $CGPT prioritize $MTD -i 2 ${DEV}
199 $CGPT prioritize $MTD -i 1 ${DEV}
201 $CGPT prioritize $MTD -i 2 ${DEV}
205 $CGPT prioritize $MTD ${DEV}
209 $CGPT prioritize $MTD -P 4 ${DEV}
213 $CGPT prioritize $MTD -P 5 -i 3 ${DEV}
217 $CGPT prioritize $MTD -P 3 -i 4 ${DEV}
221 $CGPT prioritize $MTD -P 6 -i 1 -f ${DEV}
226 $CGPT prioritize $MTD -i 2 ${DEV}
231 $CGPT prioritize $MTD -P 5 -i 2 -f ${DEV}
235 $CGPT prioritize $MTD ${DEV}
240 $CGPT prioritize $MTD -P 6 ${DEV}
245 $CGPT prioritize $MTD -P 7 -i 3 ${DEV}
250 $CGPT prioritize $MTD -P 6 -i 3 -f ${DEV}
255 $CGPT prioritize $MTD -P 2 ${DEV}
260 $CGPT prioritize $MTD -P 1 -i 3 ${DEV}
264 $CGPT prioritize $MTD -i 3 ${DEV}
266 $CGPT prioritize $MTD -i 5 ${DEV}
269 $CGPT prioritize $MTD -i 1 -f ${DEV}
274 chmod 0444 ${DEV}
277 $CGPT create $MTD -z ${DEV} 2>/dev/null && error
278 $CGPT add $MTD -i 2 -P 3 ${DEV} 2>/dev/null && error
279 $CGPT repair $MTD ${DEV} 2>/dev/null && error
280 $CGPT prioritize $MTD -i 3 ${DEV} 2>/dev/null && error
283 $CGPT boot $MTD -p ${DEV} 2>/dev/null && error
284 dd if=/dev/zero of=fake_mbr.bin bs=100 count=1 2>/dev/null
285 $CGPT boot $MTD -b fake_mbr.bin ${DEV} 2>/dev/null && error
286 $CGPT boot $MTD -i 2 ${DEV} 2>/dev/null && error
288 $CGPT boot $MTD ${DEV} >/dev/null
289 $CGPT show $MTD ${DEV} >/dev/null
290 $CGPT find $MTD -t kernel ${DEV} >/dev/null
293 chmod 600 ${DEV}
295 dd if=/dev/zero of=${DEV} bs=5632 count=1
296 assert_fail $CGPT create -D 1024 ${DEV}
298 dd if=/dev/zero of=${DEV} bs=6144 count=1
299 $CGPT create -D 1024 ${DEV}
301 dd if=/dev/zero of=${DEV} bs=8K count=1
303 assert_fail $CGPT create -D 511 ${DEV}
304 assert_fail $CGPT create -D 513 ${DEV}
307 $CGPT create $MTD ${DEV}
309 X=$($CGPT show -D 1024 -d ${DEV} | grep -c "Number of entries: 24")
312 assert_fail $CGPT show ${DEV}
314 $CGPT show $MTD ${DEV}
316 assert_fail $CGPT add $MTD -b 2 -s 1 -t data ${DEV}
318 assert_fail $CGPT add $MTD -b 0 -s 3 -t data ${DEV}