From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 057EE27456 for ; Fri, 14 Nov 2025 02:49:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763088586; cv=none; b=I9SHGY7wsao9LH91As9GEBmuZ90NZbZ3aeUUGY82xw+FVTv2Ou/FVtCpeynJnQItVdMNrR8MrXNHjttFAAvZH4gw2u9omDlPnXG/TRCOvAEYJeLuy5GltmlEF8ie9wSM2gkN0QPxz0I+1VXVd53IngKSowlSMZ9Coi5GdcuDIjc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763088586; c=relaxed/simple; bh=JIZJBulx0/F4unU4QOS4xnbX1x8/5Cngsbciztma+bY=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=cueB6LfqzmTAxIoMBBgXhnNg6VkXvUJcMDwU6rZT3hYHARqkWXB4Nc3v/RRT6Ojns2jJ8AtlruruzB+YaNQ3qdaiXH7Cse0jD2bgQ6S90zjajxm1HSSlvFrYuK/FbswXeRW+8MyZ8sDyuZLayhS2S0DgWemAIlHC+pk2nnAA3oU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ejoepnaL; arc=none smtp.client-ip=209.85.210.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ejoepnaL" Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-7a9fb6fccabso1171473b3a.0 for ; Thu, 13 Nov 2025 18:49:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763088581; x=1763693381; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=TlwqdKBLYUyX3rGRe1Gt2hG17s1fefagT0e6x8zuq/0=; b=ejoepnaLSRxcCVl+6PedBBkZQDNLWlXYo1LZ3LPVj9XSB0DZttCcZtx/b4BTLbdT1/ gP9PeJdjss02V0vkJWtuHmKScut5gCcFz65544gbveD467/V7ZROrtALXxJRN/MxV7re ZgJVqd6fT85nq/eoBB8mESUeITNCIfOXsSDtzHkjwRYKPNRF3hYQdzWBNzJw1RPUD8+2 C2aB8QI0l3O0pDLKNecBgmZ+4UbaLyCQ0Ke2Srw8MYDCoCkegtYiiw5Oy4+5iad9hjNV kD2eQ4PyRYPxEM3dkyuDZf4JCfKP6OTJ2X7vCA966GXBE6qFFk0zuHp3ocxKm3JRMGr1 hwsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763088581; x=1763693381; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=TlwqdKBLYUyX3rGRe1Gt2hG17s1fefagT0e6x8zuq/0=; b=pm8JRvwe3ZrpHlgO9M74OA+uODTMII24/qV3RKfrehX6kb0Y8wSI+A0Vt3nbK24cxn nuLmvOiGyngsK2dzSWaxm/RNn4kNsRHQ2eO0Du8c+dIzNrJVDNky4uGr+EZhvmEdn5Dc 3pD2bcsV/ldOfzwdC3qCc93FB+C6NVq+JYo06T50HCDVJdyGb+02T0qW9pPCI3wGjHbp 9prV4YDjMutU7Ih5YGMcdl+bb//DkeDURvZXjYL5XpZ81Qaq2Yz/zwaygs2bAQyY6125 9y9R1kqYNmmcpPyMOfvkk79yhVV5mL0Y2Zt1ibGLzVhVvBSMR7n1htrkARScjCGWL4v3 bpag== X-Forwarded-Encrypted: i=1; AJvYcCXBdze4WkxcQTdU9n6/fxT4UFyMqdfAakvCU9G15or9gquV1ZAOHU8XhB+k24jgjpuPxv3rLhMhiPjuFa8=@vger.kernel.org X-Gm-Message-State: AOJu0YyO4EZLvruH1CqlpqyWQZsW9OuESnFnAraBQ0gm4WqiE4lyBYEG oLKYolnBOBh3z9TPbLzyVwGkacTe6lbTw1OnaOhgGy0qEFGHxVRwmBGC X-Gm-Gg: ASbGncs1PT4+3MvifsvZw1cwuVcrK+8HoCJg1O8qc4C5JG3LUkXWXMkqTSK3Vv7A6zA tJmNoqnfKfV37xs0vK+7Sz9gW01aEtVRP9a2gkvExI4y48PkE+mlhNMp/10aWH/oNJ/QTmey9I6 kzck83f8V6U1udB0Dfehug9CXpBg/0XaT+6whfqdV0J+VwK0yBfYKiySjf4Vc+Qa8auQG8vT+nv Mlr0CXDVXc0TOG+1QgGg4hDhxz6TdYaIUGga7uYoifF/VVH4+TjOiLUz9hiMndc75/mXPPfUZst hiPm740Ze7hEtzglfJuMkEf+O3BrJqvqhjKqiCe9eWVgFonGq4cCKXrRWlnXAHfq1p0a0M0QJQJ otPbnR0W57mBOy9gEq2yOBigOwr0TmuqDJ2HftaZCio6o/Nbxjkn5O7PQbt3XjYSIqULLORouZ1 hd8IzuJa07PpioFWih72H/g+LNmZIQaDWASg== X-Google-Smtp-Source: AGHT+IFfLSedJ0x/AG0ftW+y7LEf2SVifb3v+sa3+onatpY/qCWjO5gwqeN0tqIXl4ztK/K9Dp9TRw== X-Received: by 2002:a05:6a00:2405:b0:7b6:ebcb:51eb with SMTP id d2e1a72fcca58-7ba3ba97bdamr2109918b3a.17.1763088580652; Thu, 13 Nov 2025 18:49:40 -0800 (PST) Received: from twhmp6px (mxsmtp211.mxic.com.tw. [211.75.127.162]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7b927c23103sm3489258b3a.65.2025.11.13.18.49.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Nov 2025 18:49:40 -0800 (PST) Received: from hqs-appsw-a2o.mp600.macronix.com (linux-patcher [172.17.236.67]) by twhmp6px (Postfix) with ESMTPS id 38252801D4; Fri, 14 Nov 2025 10:52:23 +0800 (CST) From: Cheng Ming Lin To: richard@nod.at, chengzhihao1@huawei.com, miquel.raynal@bootlin.com, vigneshr@ti.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Cc: alvinzhou@mxic.com.tw, leoyu@mxic.com.tw, Cheng Ming Lin Subject: [PATCH v2 0/1] mtd: ubi: skip programming unused bits in ubi headers Date: Fri, 14 Nov 2025 10:44:51 +0800 Message-Id: <20251114024452.2927429-1-linchengming884@gmail.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Cheng Ming Lin v2: - Modify ubi_io_write_vid_hdr to allow vid_hdr to be written not only at the start or end of a subpage - New experiment: perform a vid_hdr shift under subpage support conditions This patch verification was performed on a Xilinx Zynq-PicoZed board with mtd-utils version 2.3.0. Tests were conducted using both the nandsim simulated NAND and a real NAND flash device. Before modifying ubi/io.c, running the tests in mtd-utils/tests/ubi-tests exhibited the following issue. While running the mtd-utils/tests/ubi-tests/runubitests.sh test suite, the execution reaches rsvol.c where, after ubi_mkvol is called, it subsequently calls ubi_get_vol_info. At this point, there is a certain probability of encountering an "error -2, no such file or directory". To address this, I modified the ubi_mkvol function within mtd-utils by adding a polling mechanism that waits for the /dev/ubi0_x device node to be created before proceeding. However, after adding this polling, the test encountered a similar "no such file" error in io_paral.c. Further investigation pointed to a potential issue with mdev. According to mdev documentation, kernel hotplug events are not serialized and increment the SEQNUM environmental variable on each invocation. This can cause hotplug and hot-unplug events to be reordered, which sometimes results in device nodes not being created as expected. To solve this, I introduced an mdev.seq to serialize these events, effectively resolving the problem. With both modifications—the polling in ubi_mkvol and the mdev.seq handling — runubitests.sh completes successfully. Beyond these fixes, to validate the patch’s behavior with and without subpage support, I also added a new module parameter subpage to nandsim. This allows dynamically toggling subpage support. Setting the parameter to 0 enforces the chip flag NAND_NO_SUBPAGE_WRITE, effectively disabling subpage writes. The experimental procedure and logs are detailed below, covering tests on both real Macronix NAND flash and the nandsim simulated flash, each tested with and without subpage support enabled. Additionally, when subpage support is enabled, testing of the vid_hdr_shift performed. - Without subpage support on Macronix NAND flash nand: device found, Manufacturer ID: 0xc2, Chip ID: 0xda nand: Macronix MX30LF2G18AC nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64 Scanning device for bad blocks zynq> ./mnt/mtd-utils/flash_lock -u /dev/mtd0 zynq> flash_eraseall /dev/mtd0 Erasing 128 Kibyte @ 10000000 - 100% complete. zynq> ./mnt/mtd-utils/ubiattach -m 0 ubi0: attaching mtd0 ubi0: scanning is finished ubi0: empty MTD device detected ubi0: attached mtd0 (name "43a00000.Unified_Extensible_Flash_Controller", size 256 MiB) ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048 ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096 ubi0: good PEBs: 2048, bad PEBs: 0, corrupted PEBs: 0 ubi0: user volume: 0, internal volumes: 1, max. volumes count: 128 ubi0: max/mean erase counter: 0/0, WL threshold: 4096, image sequence number: 1021331801 ubi0: available PEBs: 2004, total reserved PEBs: 44, PEBs reserved for bad PEB handling: 40 ubi0: background thread "ubi_bgt0d" started, PID 83 UBI device number 0, total 2048 LEBs (260046848 bytes, 248.0 MiB), available 2004 LEBs (254459904 bytes, 242.6 MiB), LEB size 126976 bytes (124.0 KiB) zynq> hexdump -C -n 4096 /dev/mtd0 00000000 55 42 49 23 01 00 00 00 00 00 00 00 00 00 00 01 |UBI#............| 00000010 00 00 08 00 00 00 10 00 3c e0 49 59 00 00 00 00 |........<.IY....| 00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 b9 1c 05 fc |................| 00000040 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00000800 55 42 49 21 01 01 00 05 7f ff ef ff 00 00 00 00 |UBI!............| 00000810 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000820 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 |................| 00000830 00 00 00 00 00 00 00 00 00 00 00 00 65 b3 bd 2d |............e..-| 00000840 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00001000 zynq> ./mnt/mtd-utils/tests/ubi-tests/runubitests.sh /dev/ubi0 Running mkvol_basic /dev/ubi0 Running mkvol_bad /dev/ubi0 ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id -2 alignment 1 bytes 254459904 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 128 alignment 1 bytes 254459904 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 0 bytes 254459904 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment -1 bytes 254459904 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 126977 bytes 254459904 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 2049 bytes 254459904 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes -1 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes 0 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_create_volume: not enough PEBs, only 2004 available ubi0 error: ubi_create_volume: cannot create volume 0, error -28 ubi0 error: ubi_create_volume: not enough PEBs, only 2004 available ubi0 error: ubi_create_volume: cannot create volume 0, error -28 ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes 126976 vol_type 7 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_create_volume: volume 0 already exists ubi0 error: ubi_create_volume: cannot create volume 0, error -17 ubi0 error: ubi_create_volume: volume "mkvol_bad:test_mkvol()" exists (ID 0) ubi0 error: ubi_create_volume: cannot create volume 1, error -17 ubi0 error: ubi_create_volume: volume "mkvol_bad:test_mkvol()" exists (ID 0) ubi0 error: ubi_create_volume: cannot create volume 1, error -17 ubi0 error: ubi_open_volume: cannot open device 0, volume 128, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume -1, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume 128, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume 0, error -19 ubi0 error: ubi_open_volume: cannot open device 0, volume 0, error -19 Running mkvol_paral /dev/ubi0 Running rsvol /dev/ubi0 Running io_basic /dev/ubi0 Running io_read /dev/ubi0 Running io_update /dev/ubi0 Running io_paral /dev/ubi0 Running volrefcnt /dev/ubi0 SUCCESS - With subpage support of Macronix NAND flash nand: device found, Manufacturer ID: 0xc2, Chip ID: 0xda nand: Macronix MX30LF2G18AC nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64 Scanning device for bad blocks Bad eraseblock 1104 at 0x000008a00000 zynq> ./mnt/mtd-utils/flash_lock -u /dev/mtd0 zynq> flash_eraseall /dev/mtd0 Erasing 128 Kibyte @ 89e0000 - 53% complete. Skipping bad block at 0x08a00000 Erasing 128 Kibyte @ 10000000 - 100% complete. zynq> ./mnt/mtd-utils/ubiattach -m 0 ubi0: attaching mtd0 ubi0: scanning is finished ubi0: empty MTD device detected ubi0: attached mtd0 (name "43a00000.Unified_Extensible_Flash_Controller", size 256 MiB) ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512 ubi0: VID header offset: 512 (aligned 512), data offset: 2048 ubi0: good PEBs: 2047, bad PEBs: 1, corrupted PEBs: 0 ubi0: user volume: 0, internal volumes: 1, max. volumes count: 128 ubi0: max/mean erase counter: 0/0, WL threshold: 4096, image sequence number: 1673979568 ubi0: available PEBs: 2004, total reserved PEBs: 43, PEBs reserved for bad PEB handling: 39 ubi0: background thread "ubi_bgt0d" started, PID 83 UBI device number 0, total 2047 LEBs (264112128 bytes, 251.8 MiB), available 2004 LEBs (258564096 bytes, 246.5 MiB), LEB size 129024 bytes (126.0 KiB) zynq> hexdump -C -n 2048 /dev/mtd0 00000000 55 42 49 23 01 00 00 00 00 00 00 00 00 00 00 01 |UBI#............| 00000010 00 00 02 00 00 00 08 00 63 c6 e6 b0 00 00 00 00 |........c.......| 00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 a0 51 60 dd |.............Q`.| 00000040 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00000200 55 42 49 21 01 01 00 05 7f ff ef ff 00 00 00 00 |UBI!............| 00000210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000220 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 |................| 00000230 00 00 00 00 00 00 00 00 00 00 00 00 65 b3 bd 2d |............e..-| 00000240 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00000800 zynq> ./mnt/mtd-utils/tests/ubi-tests/runubitests.sh /dev/ubi0 Running mkvol_basic /dev/ubi0 Running mkvol_bad /dev/ubi0 ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id -2 alignment 1 bytes 258564096 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 128 alignment 1 bytes 258564096 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 0 bytes 258564096 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment -1 bytes 258564096 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 129025 bytes 258564096 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 2049 bytes 258564096 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes -1 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes 0 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_create_volume: not enough PEBs, only 2004 available ubi0 error: ubi_create_volume: cannot create volume 0, error -28 ubi0 error: ubi_create_volume: not enough PEBs, only 2004 available ubi0 error: ubi_create_volume: cannot create volume 0, error -28 ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes 129024 vol_type 7 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_create_volume: volume 0 already exists ubi0 error: ubi_create_volume: cannot create volume 0, error -17 ubi0 error: ubi_create_volume: volume "mkvol_bad:test_mkvol()" exists (ID 0) ubi0 error: ubi_create_volume: cannot create volume 1, error -17 ubi0 error: ubi_create_volume: volume "mkvol_bad:test_mkvol()" exists (ID 0) ubi0 error: ubi_create_volume: cannot create volume 1, error -17 ubi0 error: ubi_open_volume: cannot open device 0, volume 128, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume -1, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume 128, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume 0, error -19 ubi0 error: ubi_open_volume: cannot open device 0, volume 0, error -19 Running mkvol_paral /dev/ubi0 Running rsvol /dev/ubi0 Running io_basic /dev/ubi0 Running io_read /dev/ubi0 Running io_update /dev/ubi0 Running io_paral /dev/ubi0 Running volrefcnt /dev/ubi0 SUCCESS - With subpage support and vid_hdr shift of Macronix NAND flash nand: device found, Manufacturer ID: 0xc2, Chip ID: 0xda nand: Macronix MX30LF2G18AC nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64 Scanning device for bad blocks Bad eraseblock 1104 at 0x000008a00000 zynq> ./mnt/mtd-utils/flash_unlock -u /dev/mtd0 zynq> flash_eraseall /dev/mtd0 Erasing 128 Kibyte @ 89e0000 - 53% complete. Skipping bad block at 0x08a00000 Erasing 128 Kibyte @ 10000000 - 100% complete. zynq> ./mnt/mtd-utils/ubiattach -O 1280 -m 0 ubi0: attaching mtd0 ubi0: scanning is finished ubi0: empty MTD device detected ubi0: attached mtd0 (name "43a00000.Unified_Extensible_Flash_Controller", size 256 MiB) ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512 ubi0: VID header offset: 1280 (aligned 1024), data offset: 2048 ubi0: good PEBs: 2047, bad PEBs: 1, corrupted PEBs: 0 ubi0: user volume: 0, internal volumes: 1, max. volumes count: 128 ubi0: max/mean erase counter: 0/0, WL threshold: 4096, image sequence number: 481366231 ubi0: available PEBs: 2004, total reserved PEBs: 43, PEBs reserved for bad PEB handling: 39 ubi0: background thread "ubi_bgt0d" started, PID 745 UBI device number 0, total 2047 LEBs (264112128 bytes, 251.8 MiB), available 2004 LEBs (258564096 bytes, 246.5 MiB), LEB size 129024 bytes (126.0 KiB) zynq> hexdump -C -n 2048 /dev/mtd0 00000000 55 42 49 23 01 00 00 00 00 00 00 00 00 00 00 01 |UBI#............| 00000010 00 00 05 00 00 00 08 00 1c b1 10 d7 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 4d bf 63 fc |............M.c.| 00000040 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00000500 55 42 49 21 01 01 00 05 7f ff ef ff 00 00 00 00 |UBI!............| 00000510 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000520 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 |................| 00000530 00 00 00 00 00 00 00 00 00 00 00 00 65 b3 bd 2d |............e..-| 00000540 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00000800 zynq> ./mnt/mtd-utils/tests/ubi-tests/runubitests.sh /dev/ubi0 Running mkvol_basic /dev/ubi0 ubi0 error: ubi_cdev_ioctl: bad volume creation request Running mkvol_bad /dev/ubi0 Volume creation request dump: vol_id -2 alignment 1 bytes 258564096 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 128 alignment 1 bytes 258564096 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 0 bytes 258564096 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment -1 bytes 258564096 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 129025 bytes 258564096 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 2049 bytes 258564096 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes -1 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes 0 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_create_volume: not enough PEBs, only 2004 available ubi0 error: ubi_create_volume: cannot create volume 0, error -28 ubi0 error: ubi_create_volume: not enough PEBs, only 2004 available ubi0 error: ubi_create_volume: cannot create volume 0, error -28 ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes 129024 vol_type 7 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_create_volume: volume 0 already exists ubi0 error: ubi_create_volume: cannot create volume 0, error -17 ubi0 error: ubi_create_volume: volume "mkvol_bad:test_mkvol()" exists (ID 0) ubi0 error: ubi_create_volume: cannot create volume 1, error -17 ubi0 error: ubi_create_volume: volume "mkvol_bad:test_mkvol()" exists (ID 0) ubi0 error: ubi_create_volume: cannot create volume 1, error -17 ubi0 error: ubi_open_volume: cannot open device 0, volume 128, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume -1, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume 128, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume 0, error -19 ubi0 error: ubi_open_volume: cannot open device 0, volume 0, error -19 Running mkvol_paral /dev/ubi0 Running rsvol /dev/ubi0 Running io_basic /dev/ubi0 Running io_read /dev/ubi0 Running io_update /dev/ubi0 Running io_paral /dev/ubi0 Running volrefcnt /dev/ubi0 SUCCESS - nandsim: Toshiba NAND 128MiB 1,8V 8-bit without subpage support zynq> modprobe nandsim do_delays=1 subpage=0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 nand: device found, Manufacturer ID: 0x98, Chip ID: 0x39 nand: Toshiba NAND 128MiB 1,8V 8-bit nand: 128 MiB, SLC, erase size: 16 KiB, page size: 512, OOB size: 16 flash size: 128 MiB page size: 512 bytes OOB area size: 16 bytes sector size: 16 KiB pages number: 262144 pages per sector: 32 bus width: 8 bits in sector size: 14 bits in page size: 9 bits in OOB size: 4 flash size with OOB: 135168 KiB page address bytes: 4 sector address bytes: 3 options: 0x42 Scanning device for bad blocks Creating 1 MTD partitions on "NAND 128MiB 1,8V 8-bit": 0x000000000000-0x000008000000 : "NAND simulator partition 0" zynq> ./mnt/mtd-utils/ubiattach -m 0 ubi0: attaching mtd0 ubi0: scanning is finished ubi0: empty MTD device detected ubi0: attached mtd0 (name "NAND 128MiB 1,8V 8-bit", size 128 MiB) ubi0: PEB size: 16384 bytes (16 KiB), LEB size: 15360 bytes ubi0: min./max. I/O unit sizes: 512/512, sub-page size 512 ubi0: VID header offset: 512 (aligned 512), data offset: 1024 ubi0: good PEBs: 8192, bad PEBs: 0, corrupted PEBs: 0 ubi0: user volume: 0, internal volumes: 1, max. volumes count: 89 ubi0: max/mean erase counter: 0/0, WL threshold: 4096, image sequence number: 1589130535 ubi0: available PEBs: 8028, total reserved PEBs: 164, PEBs reserved for bad PEB handling: 160 ubi0: background thread "ubi_bgt0d" started, PID 92 UBI device number 0, total 8192 LEBs (125829120 bytes, 120.0 MiB), available 8028 LEBs (123310080 bytes, 117.5 MiB), LEB size 15360 bytes (15.0 KiB) zynq> hexdump -C -n 1024 /dev/mtd0 00000000 55 42 49 23 01 00 00 00 00 00 00 00 00 00 00 01 |UBI#............| 00000010 00 00 02 00 00 00 04 00 5e b8 35 27 00 00 00 00 |........^.5'....| 00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 52 64 4e dd |............RdN.| 00000040 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00000200 55 42 49 21 01 01 00 05 7f ff ef ff 00 00 00 00 |UBI!............| 00000210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000220 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 |................| 00000230 00 00 00 00 00 00 00 00 00 00 00 00 65 b3 bd 2d |............e..-| 00000240 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00000400 zynq> ./mnt/mtd-utils/tests/ubi-tests/runubitests.sh /dev/ubi0 Running mkvol_basic /dev/ubi0 Running mkvol_bad /dev/ubi0 ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id -2 alignment 1 bytes 123310080 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 89 alignment 1 bytes 123310080 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 0 bytes 123310080 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment -1 bytes 123310080 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 15361 bytes 123310080 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 513 bytes 123310080 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes -1 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes 0 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_create_volume: not enough PEBs, only 8028 available ubi0 error: ubi_create_volume: cannot create volume 0, error -28 ubi0 error: ubi_create_volume: not enough PEBs, only 8028 available ubi0 error: ubi_create_volume: cannot create volume 0, error -28 ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes 15360 vol_type 7 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_create_volume: volume 0 already exists ubi0 error: ubi_create_volume: cannot create volume 0, error -17 ubi0 error: ubi_create_volume: volume "mkvol_bad:test_mkvol()" exists (ID 0) ubi0 error: ubi_create_volume: cannot create volume 1, error -17 ubi0 error: ubi_create_volume: volume "mkvol_bad:test_mkvol()" exists (ID 0) ubi0 error: ubi_create_volume: cannot create volume 1, error -17 ubi0 error: ubi_open_volume: cannot open device 0, volume 89, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume -1, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume 89, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume 0, error -19 ubi0 error: ubi_open_volume: cannot open device 0, volume 0, error -19 Running mkvol_paral /dev/ubi0 Running rsvol /dev/ubi0 Running io_basic /dev/ubi0 Running io_read /dev/ubi0 Running io_update /dev/ubi0 Running io_paral /dev/ubi0 Running volrefcnt /dev/ubi0 SUCCESS - nandsim: Toshiba NAND 128MiB 1,8V 8-bit with subpage support zynq> modprobe nandsim do_delays=1 subpage=1 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 nand: device found, Manufacturer ID: 0x98, Chip ID: 0x39 nand: Toshiba NAND 128MiB 1,8V 8-bit nand: 128 MiB, SLC, erase size: 16 KiB, page size: 512, OOB size: 16 flash size: 128 MiB page size: 512 bytes OOB area size: 16 bytes sector size: 16 KiB pages number: 262144 pages per sector: 32 bus width: 8 bits in sector size: 14 bits in page size: 9 bits in OOB size: 4 flash size with OOB: 135168 KiB page address bytes: 4 sector address bytes: 3 options: 0x42 Scanning device for bad blocks Creating 1 MTD partitions on "NAND 128MiB 1,8V 8-bit": 0x000000000000-0x000008000000 : "NAND simulator partition 0" zynq> ./mnt/mtd-utils/ubiattach -m 0 ubi0: attaching mtd0 ubi0: scanning is finished ubi0: empty MTD device detected ubi0: attached mtd0 (name "NAND 128MiB 1,8V 8-bit", size 128 MiB) ubi0: PEB size: 16384 bytes (16 KiB), LEB size: 15872 bytes ubi0: min./max. I/O unit sizes: 512/512, sub-page size 256 ubi0: VID header offset: 256 (aligned 256), data offset: 512 ubi0: good PEBs: 8192, bad PEBs: 0, corrupted PEBs: 0 ubi0: user volume: 0, internal volumes: 1, max. volumes count: 92 ubi0: max/mean erase counter: 0/0, WL threshold: 4096, image sequence number: 1426356124 ubi0: available PEBs: 8028, total reserved PEBs: 164, PEBs reserved for bad PEB handling: 160 ubi0: background thread "ubi_bgt0d" started, PID 93 UBI device number 0, total 8192 LEBs (130023424 bytes, 124.0 MiB), available 8028 LEBs (127420416 bytes, 121.5 MiB), LEB size 15872 bytes (15.5 KiB) zynq> hexdump -C -n 512 /dev/mtd0 00000000 55 42 49 23 01 00 00 00 00 00 00 00 00 00 00 01 |UBI#............| 00000010 00 00 01 00 00 00 02 00 23 79 a7 a5 00 00 00 00 |........#y......| 00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 51 66 a6 80 |............Qf..| 00000040 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00000100 55 42 49 21 01 01 00 05 7f ff ef ff 00 00 00 00 |UBI!............| 00000110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 |................| 00000130 00 00 00 00 00 00 00 00 00 00 00 00 65 b3 bd 2d |............e..-| 00000140 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00000200 zynq> ./mnt/mtd-utils/tests/ubi-tests/runubitests.sh /dev/ubi0 Running mkvol_basic /dev/ubi0 Running mkvol_bad /dev/ubi0 ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id -2 alignment 1 bytes 127420416 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 92 alignment 1 bytes 127420416 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 0 bytes 127420416 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment -1 bytes 127420416 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 15873 bytes 127420416 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 513 bytes 127420416 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes -1 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes 0 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_create_volume: not enough PEBs, only 8028 available ubi0 error: ubi_create_volume: cannot create volume 0, error -28 ubi0 error: ubi_create_volume: not enough PEBs, only 8028 available ubi0 error: ubi_create_volume: cannot create volume 0, error -28 ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes 15872 vol_type 7 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_create_volume: volume 0 already exists ubi0 error: ubi_create_volume: cannot create volume 0, error -17 ubi0 error: ubi_create_volume: volume "mkvol_bad:test_mkvol()" exists (ID 0) ubi0 error: ubi_create_volume: cannot create volume 1, error -17 ubi0 error: ubi_create_volume: volume "mkvol_bad:test_mkvol()" exists (ID 0) ubi0 error: ubi_create_volume: cannot create volume 1, error -17 ubi0 error: ubi_open_volume: cannot open device 0, volume 92, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume -1, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume 92, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume 0, error -19 ubi0 error: ubi_open_volume: cannot open device 0, volume 0, error -19 Running mkvol_paral /dev/ubi0 Running rsvol /dev/ubi0 Running io_basic /dev/ubi0 Running io_read /dev/ubi0 Running io_update /dev/ubi0 Running io_paral /dev/ubi0 Running volrefcnt /dev/ubi0 SUCCESS - nandsim: Toshiba NAND 128MiB 1,8V 8-bit with subpage support and vid_hdr shift zynq> modprobe nandsim do_delays=1 subpage=1 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 nand: device found, Manufacturer ID: 0x98, Chip ID: 0x39 nand: Toshiba NAND 128MiB 1,8V 8-bit nand: 128 MiB, SLC, erase size: 16 KiB, page size: 512, OOB size: 16 flash size: 128 MiB page size: 512 bytes OOB area size: 16 bytes sector size: 16 KiB pages number: 262144 pages per sector: 32 bus width: 8 bits in sector size: 14 bits in page size: 9 bits in OOB size: 4 flash size with OOB: 135168 KiB page address bytes: 4 sector address bytes: 3 options: 0x42 Scanning device for bad blocks Creating 1 MTD partitions on "NAND 128MiB 1,8V 8-bit": 0x000000000000-0x000008000000 : "NAND simulator partition 0" zynq> ./mnt/mtd-utils/ubiattach -O 384 -m 0 ubi0: attaching mtd0 ubi0: scanning is finished ubi0: empty MTD device detected ubi0: attached mtd0 (name "NAND 128MiB 1,8V 8-bit", size 128 MiB) ubi0: PEB size: 16384 bytes (16 KiB), LEB size: 15872 bytes ubi0: min./max. I/O unit sizes: 512/512, sub-page size 256 ubi0: VID header offset: 384 (aligned 256), data offset: 512 ubi0: good PEBs: 8192, bad PEBs: 0, corrupted PEBs: 0 ubi0: user volume: 0, internal volumes: 1, max. volumes count: 92 ubi0: max/mean erase counter: 0/0, WL threshold: 4096, image sequence number: 3550195649 ubi0: available PEBs: 8028, total reserved PEBs: 164, PEBs reserved for bad PEB handling: 160 ubi0: background thread "ubi_bgt0d" started, PID 94 UBI device number 0, total 8192 LEBs (130023424 bytes, 124.0 MiB), available 8028 LEBs (127420416 bytes, 121.5 MiB), LEB size 15872 bytes (15.5 KiB) zynq> hexdump -C -n 512 /dev/mtd0 00000000 55 42 49 23 01 00 00 00 00 00 00 00 00 00 00 01 |UBI#............| 00000010 00 00 01 80 00 00 02 00 d3 9b af c1 00 00 00 00 |................| 00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 f7 06 13 d3 |................| 00000040 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00000180 55 42 49 21 01 01 00 05 7f ff ef ff 00 00 00 00 |UBI!............| 00000190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 000001a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 |................| 000001b0 00 00 00 00 00 00 00 00 00 00 00 00 65 b3 bd 2d |............e..-| 000001c0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00000200 zynq> ./mnt/mtd-utils/tests/ubi-tests/runubitests.sh /dev/ubi0 Running mkvol_basic /dev/ubi0 Running mkvol_bad /dev/ubi0 ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id -2 alignment 1 bytes 127420416 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 92 alignment 1 bytes 127420416 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 0 bytes 127420416 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment -1 bytes 127420416 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 15873 bytes 127420416 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 513 bytes 127420416 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes -1 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes 0 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_create_volume: not enough PEBs, only 8028 available ubi0 error: ubi_create_volume: cannot create volume 0, error -28 ubi0 error: ubi_create_volume: not enough PEBs, only 8028 available ubi0 error: ubi_create_volume: cannot create volume 0, error -28 ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes 15872 vol_type 7 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_create_volume: volume 0 already exists ubi0 error: ubi_create_volume: cannot create volume 0, error -17 ubi0 error: ubi_create_volume: volume "mkvol_bad:test_mkvol()" exists (ID 0) ubi0 error: ubi_create_volume: cannot create volume 1, error -17 ubi0 error: ubi_create_volume: volume "mkvol_bad:test_mkvol()" exists (ID 0) ubi0 error: ubi_create_volume: cannot create volume 1, error -17 ubi0 error: ubi_open_volume: cannot open device 0, volume 92, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume -1, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume 92, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume 0, error -19 ubi0 error: ubi_open_volume: cannot open device 0, volume 0, error -19 Running mkvol_paral /dev/ubi0 Running rsvol /dev/ubi0 Running io_basic /dev/ubi0 Running io_read /dev/ubi0 Running io_update /dev/ubi0 Running io_paral /dev/ubi0 Running volrefcnt /dev/ubi0 SUCCESS - nandsim: Micron NAND 256MiB 3,3V 8-bit without subpage support zynq> modprobe nandsim do_delays=1 subpage=0 first_id_byte=0x2C second _id_byte=0xDA third_id_byte=0x90 fourth_id_byte=0x95 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xda nand: Micron NAND 256MiB 3,3V 8-bit nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64 flash size: 256 MiB page size: 2048 bytes OOB area size: 64 bytes sector size: 128 KiB pages number: 131072 pages per sector: 64 bus width: 8 bits in sector size: 17 bits in page size: 11 bits in OOB size: 6 flash size with OOB: 270336 KiB page address bytes: 5 sector address bytes: 3 options: 0x8 Scanning device for bad blocks Creating 1 MTD partitions on "NAND 256MiB 3,3V 8-bit": 0x000000000000-0x000010000000 : "NAND simulator partition 0" zynq> ./mnt/mtd-utils/ubiattach -m 0 ubi0: attaching mtd0 ubi0: scanning is finished ubi0: empty MTD device detected ubi0: attached mtd0 (name "NAND 256MiB 3,3V 8-bit", size 256 MiB) ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048 ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096 ubi0: good PEBs: 2048, bad PEBs: 0, corrupted PEBs: 0 ubi0: user volume: 0, internal volumes: 1, max. volumes count: 128 ubi0: max/mean erase counter: 0/0, WL threshold: 4096, image sequence number: 2741000969 ubi0: available PEBs: 2004, total reserved PEBs: 44, PEBs reserved for bad PEB handling: 40 ubi0: background thread "ubi_bgt0d" started, PID 93 UBI device number 0, total 2048 LEBs (260046848 bytes, 248.0 MiB), available 2004 LEBs (254459904 bytes, 242.6 MiB), LEB size 126976 bytes (124.0 KiB) zynq> hexdump -C -n 4096 /dev/mtd0 00000000 55 42 49 23 01 00 00 00 00 00 00 00 00 00 00 01 |UBI#............| 00000010 00 00 08 00 00 00 10 00 a3 60 5b 09 00 00 00 00 |.........`[.....| 00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 65 74 6c af |............etl.| 00000040 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00000800 55 42 49 21 01 01 00 05 7f ff ef ff 00 00 00 00 |UBI!............| 00000810 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000820 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 |................| 00000830 00 00 00 00 00 00 00 00 00 00 00 00 65 b3 bd 2d |............e..-| 00000840 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00001000 zynq> ./mnt/mtd-utils/tests/ubi-tests/runubitests.sh /dev/ubi0 Running mkvol_basic /dev/ubi0 Running mkvol_bad /dev/ubi0 ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id -2 alignment 1 bytes 254459904 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 128 alignment 1 bytes 254459904 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 0 bytes 254459904 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment -1 bytes 254459904 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 126977 bytes 254459904 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 2049 bytes 254459904 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes -1 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes 0 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_create_volume: not enough PEBs, only 2004 available ubi0 error: ubi_create_volume: cannot create volume 0, error -28 ubi0 error: ubi_create_volume: not enough PEBs, only 2004 available ubi0 error: ubi_create_volume: cannot create volume 0, error -28 ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes 126976 vol_type 7 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_create_volume: volume 0 already exists ubi0 error: ubi_create_volume: cannot create volume 0, error -17 ubi0 error: ubi_create_volume: volume "mkvol_bad:test_mkvol()" exists (ID 0) ubi0 error: ubi_create_volume: cannot create volume 1, error -17 ubi0 error: ubi_create_volume: volume "mkvol_bad:test_mkvol()" exists (ID 0) ubi0 error: ubi_create_volume: cannot create volume 1, error -17 ubi0 error: ubi_open_volume: cannot open device 0, volume 128, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume -1, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume 128, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume 0, error -19 ubi0 error: ubi_open_volume: cannot open device 0, volume 0, error -19 Running mkvol_paral /dev/ubi0 Running rsvol /dev/ubi0 Running io_basic /dev/ubi0 Running io_read /dev/ubi0 Running io_update /dev/ubi0 Running io_paral /dev/ubi0 Running volrefcnt /dev/ubi0 SUCCESS - nandsim: Micron NAND 256MiB 3,3V 8-bit with subpage support zynq> modprobe nandsim do_delays=1 subpage=1 first_id_byte=0x2C second _id_byte=0xDA third_id_byte=0x90 fourth_id_byte=0x95 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xda nand: Micron NAND 256MiB 3,3V 8-bit nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64 flash size: 256 MiB page size: 2048 bytes OOB area size: 64 bytes sector size: 128 KiB pages number: 131072 pages per sector: 64 bus width: 8 bits in sector size: 17 bits in page size: 11 bits in OOB size: 6 flash size with OOB: 270336 KiB page address bytes: 5 sector address bytes: 3 options: 0x8 Scanning device for bad blocks Creating 1 MTD partitions on "NAND 256MiB 3,3V 8-bit": 0x000000000000-0x000010000000 : "NAND simulator partition 0" zynq> ./mnt/mtd-utils/ubiattach -m 0 ubi0: attaching mtd0 ubi0: scanning is finished ubi0: empty MTD device detected ubi0: attached mtd0 (name "NAND 256MiB 3,3V 8-bit", size 256 MiB) ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512 ubi0: VID header offset: 512 (aligned 512), data offset: 2048 ubi0: good PEBs: 2048, bad PEBs: 0, corrupted PEBs: 0 ubi0: user volume: 0, internal volumes: 1, max. volumes count: 128 ubi0: max/mean erase counter: 0/0, WL threshold: 4096, image sequence number: 1436200945 ubi0: available PEBs: 2004, total reserved PEBs: 44, PEBs reserved for bad PEB handling: 40 ubi0: background thread "ubi_bgt0d" started, PID 93 UBI device number 0, total 2048 LEBs (264241152 bytes, 252.0 MiB), available 2004 LEBs (258564096 bytes, 246.5 MiB), LEB size 129024 bytes (126.0 KiB) zynq> hexdump -C -n 1024 /dev/mtd0 00000000 55 42 49 23 01 00 00 00 00 00 00 00 00 00 00 01 |UBI#............| 00000010 00 00 02 00 00 00 08 00 55 9a af f1 00 00 00 00 |........U.......| 00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 d2 9b bc f7 |................| 00000040 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00000200 55 42 49 21 01 01 00 05 7f ff ef ff 00 00 00 00 |UBI!............| 00000210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000220 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 |................| 00000230 00 00 00 00 00 00 00 00 00 00 00 00 65 b3 bd 2d |............e..-| 00000240 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00000400 zynq> ./mnt/mtd-utils/tests/ubi-tests/runubitests.sh /dev/ubi0 Running mkvol_basic /dev/ubi0 Running mkvol_bad /dev/ubi0 ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id -2 alignment 1 bytes 258564096 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 128 alignment 1 bytes 258564096 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 0 bytes 258564096 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment -1 bytes 258564096 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 129025 bytes 258564096 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 2049 bytes 258564096 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes -1 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes 0 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_create_volume: not enough PEBs, only 2004 available ubi0 error: ubi_create_volume: cannot create volume 0, error -28 ubi0 error: ubi_create_volume: not enough PEBs, only 2004 available ubi0 error: ubi_create_volume: cannot create volume 0, error -28 ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes 129024 vol_type 7 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_create_volume: volume 0 already exists ubi0 error: ubi_create_volume: cannot create volume 0, error -17 ubi0 error: ubi_create_volume: volume "mkvol_bad:test_mkvol()" exists (ID 0) ubi0 error: ubi_create_volume: cannot create volume 1, error -17 ubi0 error: ubi_create_volume: volume "mkvol_bad:test_mkvol()" exists (ID 0) ubi0 error: ubi_create_volume: cannot create volume 1, error -17 ubi0 error: ubi_open_volume: cannot open device 0, volume 128, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume -1, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume 128, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume 0, error -19 ubi0 error: ubi_open_volume: cannot open device 0, volume 0, error -19 Running mkvol_paral /dev/ubi0 Running rsvol /dev/ubi0 Running io_basic /dev/ubi0 Running io_read /dev/ubi0 Running io_update /dev/ubi0 Running io_paral /dev/ubi0 Running volrefcnt /dev/ubi0 SUCCESS - nandsim: Micron NAND 256MiB 3,3V 8-bit with subpage support and vid_hdr shift zynq> modprobe nandsim do_delays=1 subpage=1 first_id_byte=0x2C second _id_byte=0xDA third_id_byte=0x90 fourth_id_byte=0x95 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xda nand: Micron NAND 256MiB 3,3V 8-bit nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64 flash size: 256 MiB page size: 2048 bytes OOB area size: 64 bytes sector size: 128 KiB pages number: 131072 pages per sector: 64 bus width: 8 bits in sector size: 17 bits in page size: 11 bits in OOB size: 6 flash size with OOB: 270336 KiB page address bytes: 5 sector address bytes: 3 options: 0x8 Scanning device for bad blocks Creating 1 MTD partitions on "NAND 256MiB 3,3V 8-bit": 0x000000000000-0x000010000000 : "NAND simulator partition 0" zynq> ./mnt/mtd-utils/ubiattach -O 1600 -m 0 ubi0: attaching mtd0 ubi0: scanning is finished ubi0: empty MTD device detected ubi0: attached mtd0 (name "NAND 256MiB 3,3V 8-bit", size 256 MiB) ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512 ubi0: VID header offset: 1600 (aligned 1536), data offset: 2048 ubi0: good PEBs: 2048, bad PEBs: 0, corrupted PEBs: 0 ubi0: user volume: 0, internal volumes: 1, max. volumes count: 128 ubi0: max/mean erase counter: 0/0, WL threshold: 4096, image sequence number: 2060544972 ubi0: available PEBs: 2004, total reserved PEBs: 44, PEBs reserved for bad PEB handling: 40 ubi0: background thread "ubi_bgt0d" started, PID 94 UBI device number 0, total 2048 LEBs (264241152 bytes, 252.0 MiB), available 2004 LEBs (258564096 bytes, 246.5 MiB), LEB size 129024 bytes (126.0 KiB) zynq> hexdump -C -n 2048 /dev/mtd0 00000000 55 42 49 23 01 00 00 00 00 00 00 00 00 00 00 01 |UBI#............| 00000010 00 00 06 40 00 00 08 00 7a d1 6b cc 00 00 00 00 |...@....z.k.....| 00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 d9 57 22 1e |.............W".| 00000040 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00000640 55 42 49 21 01 01 00 05 7f ff ef ff 00 00 00 00 |UBI!............| 00000650 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000660 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 |................| 00000670 00 00 00 00 00 00 00 00 00 00 00 00 65 b3 bd 2d |............e..-| 00000680 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00000800 zynq> ./mnt/mtd-utils/tests/ubi-tests/runubitests.sh /dev/ubi0 Running mkvol_basic /dev/ubi0 Running mkvol_bad /dev/ubi0 ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id -2 alignment 1 bytes 258564096 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 128 alignment 1 bytes 258564096 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 0 bytes 258564096 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment -1 bytes 258564096 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 129025 bytes 258564096 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 2049 bytes 258564096 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes -1 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes 0 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_create_volume: not enough PEBs, only 2004 available ubi0 error: ubi_create_volume: cannot create volume 0, error -28 ubi0 error: ubi_create_volume: not enough PEBs, only 2004 available ubi0 error: ubi_create_volume: cannot create volume 0, error -28 ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes 129024 vol_type 7 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_create_volume: volume 0 already exists ubi0 error: ubi_create_volume: cannot create volume 0, error -17 ubi0 error: ubi_create_volume: volume "mkvol_bad:test_mkvol()" exists (ID 0) ubi0 error: ubi_create_volume: cannot create volume 1, error -17 ubi0 error: ubi_create_volume: volume "mkvol_bad:test_mkvol()" exists (ID 0) ubi0 error: ubi_create_volume: cannot create volume 1, error -17 ubi0 error: ubi_open_volume: cannot open device 0, volume 128, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume -1, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume 128, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume 0, error -19 ubi0 error: ubi_open_volume: cannot open device 0, volume 0, error -19 Running mkvol_paral /dev/ubi0 Running rsvol /dev/ubi0 Running io_basic /dev/ubi0 Running io_read /dev/ubi0 Running io_update /dev/ubi0 Running io_paral /dev/ubi0 Running volrefcnt /dev/ubi0 SUCCESS - nandsim: Toshiba NAND 512MiB 3,3V 8-bit without subpage support zynq> modprobe nandsim do_delays=1 subpage=0 first_id_byte=0x98 second _id_byte=0xdc third_id_byte=0x91 fourth_id_byte=0x15 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 nand: device found, Manufacturer ID: 0x98, Chip ID: 0xdc nand: Toshiba NAND 512MiB 3,3V 8-bit nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64 flash size: 512 MiB page size: 2048 bytes OOB area size: 64 bytes sector size: 128 KiB pages number: 262144 pages per sector: 64 bus width: 8 bits in sector size: 17 bits in page size: 11 bits in OOB size: 6 flash size with OOB: 540672 KiB page address bytes: 5 sector address bytes: 3 options: 0x8 Scanning device for bad blocks Creating 1 MTD partitions on "NAND 512MiB 3,3V 8-bit": 0x000000000000-0x000020000000 : "NAND simulator partition 0" zynq> ./mnt/mtd-utils/ubiattach -m 0 ubi0: attaching mtd0 ubi0: scanning is finished ubi0: empty MTD device detected ubi0: attached mtd0 (name "NAND 512MiB 3,3V 8-bit", size 512 MiB) ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048 ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096 ubi0: good PEBs: 4096, bad PEBs: 0, corrupted PEBs: 0 ubi0: user volume: 0, internal volumes: 1, max. volumes count: 128 ubi0: max/mean erase counter: 0/0, WL threshold: 4096, image sequence number: 3027964992 ubi0: available PEBs: 4012, total reserved PEBs: 84, PEBs reserved for bad PEB handling: 80 ubi0: background thread "ubi_bgt0d" started, PID 93 UBI device number 0, total 4096 LEBs (520093696 bytes, 496.0 MiB), available 4012 LEBs (509427712 bytes, 485.8 MiB), LEB size 126976 bytes (124.0 KiB) zynq> hexdump -C -n 4096 /dev/mtd0 00000000 55 42 49 23 01 00 00 00 00 00 00 00 00 00 00 01 |UBI#............| 00000010 00 00 08 00 00 00 10 00 b4 7b 14 40 00 00 00 00 |.........{.@....| 00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 cb 04 bb 52 |...............R| 00000040 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00000800 55 42 49 21 01 01 00 05 7f ff ef ff 00 00 00 00 |UBI!............| 00000810 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000820 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 |................| 00000830 00 00 00 00 00 00 00 00 00 00 00 00 65 b3 bd 2d |............e..-| 00000840 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00001000 zynq> ./mnt/mtd-utils/tests/ubi-tests/runubitests.sh /dev/ubi0 Running mkvol_basic /dev/ubi0 Running mkvol_bad /dev/ubi0 ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id -2 alignment 1 bytes 509427712 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 128 alignment 1 bytes 509427712 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 0 bytes 509427712 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment -1 bytes 509427712 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 126977 bytes 509427712 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 2049 bytes 509427712 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes -1 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes 0 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_create_volume: not enough PEBs, only 4012 available ubi0 error: ubi_create_volume: cannot create volume 0, error -28 ubi0 error: ubi_create_volume: not enough PEBs, only 4012 available ubi0 error: ubi_create_volume: cannot create volume 0, error -28 ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes 126976 vol_type 7 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_create_volume: volume 0 already exists ubi0 error: ubi_create_volume: cannot create volume 0, error -17 ubi0 error: ubi_create_volume: volume "mkvol_bad:test_mkvol()" exists (ID 0) ubi0 error: ubi_create_volume: cannot create volume 1, error -17 ubi0 error: ubi_create_volume: volume "mkvol_bad:test_mkvol()" exists (ID 0) ubi0 error: ubi_create_volume: cannot create volume 1, error -17 ubi0 error: ubi_open_volume: cannot open device 0, volume 128, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume -1, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume 128, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume 0, error -19 ubi0 error: ubi_open_volume: cannot open device 0, volume 0, error -19 Running mkvol_paral /dev/ubi0 Running rsvol /dev/ubi0 Running io_basic /dev/ubi0 Running io_read /dev/ubi0 Running io_update /dev/ubi0 Running io_paral /dev/ubi0 Running volrefcnt /dev/ubi0 SUCCESS - nandsim: Toshiba NAND 512MiB 3,3V 8-bit with subpage support zynq> modprobe nandsim do_delays=1 subpage=1 first_id_byte=0x98 second _id_byte=0xdc third_id_byte=0x91 fourth_id_byte=0x15 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 nand: device found, Manufacturer ID: 0x98, Chip ID: 0xdc nand: Toshiba NAND 512MiB 3,3V 8-bit nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64 flash size: 512 MiB page size: 2048 bytes OOB area size: 64 bytes sector size: 128 KiB pages number: 262144 pages per sector: 64 bus width: 8 bits in sector size: 17 bits in page size: 11 bits in OOB size: 6 flash size with OOB: 540672 KiB page address bytes: 5 sector address bytes: 3 options: 0x8 Scanning device for bad blocks Creating 1 MTD partitions on "NAND 512MiB 3,3V 8-bit": 0x000000000000-0x000020000000 : "NAND simulator partition 0" zynq> ./mnt/mtd-utils/ubiattach -m 0 ubi0: attaching mtd0 ubi0: scanning is finished ubi0: empty MTD device detected ubi0: attached mtd0 (name "NAND 512MiB 3,3V 8-bit", size 512 MiB) ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512 ubi0: VID header offset: 512 (aligned 512), data offset: 2048 ubi0: good PEBs: 4096, bad PEBs: 0, corrupted PEBs: 0 ubi0: user volume: 0, internal volumes: 1, max. volumes count: 128 ubi0: max/mean erase counter: 0/0, WL threshold: 4096, image sequence number: 330582522 ubi0: available PEBs: 4012, total reserved PEBs: 84, PEBs reserved for bad PEB handling: 80 ubi0: background thread "ubi_bgt0d" started, PID 92 UBI device number 0, total 4096 LEBs (528482304 bytes, 504.0 MiB), available 4012 LEBs (517644288 bytes, 493.6 MiB), LEB size 129024 bytes (126.0 KiB) zynq> hexdump -C -n 2048 /dev/mtd0 00000000 55 42 49 23 01 00 00 00 00 00 00 00 00 00 00 01 |UBI#............| 00000010 00 00 02 00 00 00 08 00 13 b4 49 fa 00 00 00 00 |..........I.....| 00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 76 50 d5 f2 |............vP..| 00000040 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00000200 55 42 49 21 01 01 00 05 7f ff ef ff 00 00 00 00 |UBI!............| 00000210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000220 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 |................| 00000230 00 00 00 00 00 00 00 00 00 00 00 00 65 b3 bd 2d |............e..-| 00000240 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00000800 zynq> ./mnt/mtd-utils/tests/ubi-tests/runubitests.sh /dev/ubi0 Running mkvol_basic /dev/ubi0 Running mkvol_bad /dev/ubi0 ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id -2 alignment 1 bytes 517644288 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 128 alignment 1 bytes 517644288 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 0 bytes 517644288 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment -1 bytes 517644288 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 129025 bytes 517644288 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 2049 bytes 517644288 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes -1 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes 0 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_create_volume: not enough PEBs, only 4012 available ubi0 error: ubi_create_volume: cannot create volume 0, error -28 ubi0 error: ubi_create_volume: not enough PEBs, only 4012 available ubi0 error: ubi_create_volume: cannot create volume 0, error -28 ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes 129024 vol_type 7 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_create_volume: volume 0 already exists ubi0 error: ubi_create_volume: cannot create volume 0, error -17 ubi0 error: ubi_create_volume: volume "mkvol_bad:test_mkvol()" exists (ID 0) ubi0 error: ubi_create_volume: cannot create volume 1, error -17 ubi0 error: ubi_create_volume: volume "mkvol_bad:test_mkvol()" exists (ID 0) ubi0 error: ubi_create_volume: cannot create volume 1, error -17 ubi0 error: ubi_open_volume: cannot open device 0, volume 128, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume -1, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume 128, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume 0, error -19 ubi0 error: ubi_open_volume: cannot open device 0, volume 0, error -19 Running mkvol_paral /dev/ubi0 Running rsvol /dev/ubi0 Running io_basic /dev/ubi0 Running io_read /dev/ubi0 Running io_update /dev/ubi0 Running io_paral /dev/ubi0 Running volrefcnt /dev/ubi0 SUCCESS - nandsim: Toshiba NAND 512MiB 3,3V 8-bit with subpage support and vid_hdr shift zynq> modprobe nandsim do_delays=1 subpage=1 first_id_byte=0x98 second _id_byte=0xdc third_id_byte=0x91 fourth_id_byte=0x15 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 nand: device found, Manufacturer ID: 0x98, Chip ID: 0xdc nand: Toshiba NAND 512MiB 3,3V 8-bit nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64 flash size: 512 MiB page size: 2048 bytes OOB area size: 64 bytes sector size: 128 KiB pages number: 262144 pages per sector: 64 bus width: 8 bits in sector size: 17 bits in page size: 11 bits in OOB size: 6 flash size with OOB: 540672 KiB page address bytes: 5 sector address bytes: 3 options: 0x8 Scanning device for bad blocks Creating 1 MTD partitions on "NAND 512MiB 3,3V 8-bit": 0x000000000000-0x000020000000 : "NAND simulator partition 0" zynq> ./mnt/mtd-utils/ubiattach -O 1152 -m 0 ubi0: attaching mtd0 ubi0: scanning is finished ubi0: empty MTD device detected ubi0: attached mtd0 (name "NAND 512MiB 3,3V 8-bit", size 512 MiB) ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512 ubi0: VID header offset: 1152 (aligned 1024), data offset: 2048 ubi0: good PEBs: 4096, bad PEBs: 0, corrupted PEBs: 0 ubi0: user volume: 0, internal volumes: 1, max. volumes count: 128 ubi0: max/mean erase counter: 0/0, WL threshold: 4096, image sequence number: 3375335517 ubi0: available PEBs: 4012, total reserved PEBs: 84, PEBs reserved for bad PEB handling: 80 ubi0: background thread "ubi_bgt0d" started, PID 93 UBI device number 0, total 4096 LEBs (528482304 bytes, 504.0 MiB), available 4012 LEBs (517644288 bytes, 493.6 MiB), LEB size 129024 bytes (126.0 KiB) zynq> hexdump -C -n 2048 /dev/mtd0 00000000 55 42 49 23 01 00 00 00 00 00 00 00 00 00 00 01 |UBI#............| 00000010 00 00 04 80 00 00 08 00 c9 2f 88 5d 00 00 00 00 |........./.]....| 00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 40 05 05 1e |............@...| 00000040 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00000480 55 42 49 21 01 01 00 05 7f ff ef ff 00 00 00 00 |UBI!............| 00000490 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 000004a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 |................| 000004b0 00 00 00 00 00 00 00 00 00 00 00 00 65 b3 bd 2d |............e..-| 000004c0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00000800 zynq> ./mnt/mtd-utils/tests/ubi-tests/runubitests.sh /dev/ubi0 Running mkvol_basic /dev/ubi0 Running mkvol_bad /dev/ubi0 ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id -2 alignment 1 bytes 517644288 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 128 alignment 1 bytes 517644288 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 0 bytes 517644288 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment -1 bytes 517644288 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 129025 bytes 517644288 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 2049 bytes 517644288 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes -1 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes 0 vol_type 3 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_create_volume: not enough PEBs, only 4012 available ubi0 error: ubi_create_volume: cannot create volume 0, error -28 ubi0 error: ubi_create_volume: not enough PEBs, only 4012 available ubi0 error: ubi_create_volume: cannot create volume 0, error -28 ubi0 error: ubi_cdev_ioctl: bad volume creation request Volume creation request dump: vol_id 0 alignment 1 bytes 129024 vol_type 7 name_len 22 1st 16 characters of name: mkvol_bad:test_m ubi0 error: ubi_create_volume: volume 0 already exists ubi0 error: ubi_create_volume: cannot create volume 0, error -17 ubi0 error: ubi_create_volume: volume "mkvol_bad:test_mkvol()" exists (ID 0) ubi0 error: ubi_create_volume: cannot create volume 1, error -17 ubi0 error: ubi_create_volume: volume "mkvol_bad:test_mkvol()" exists (ID 0) ubi0 error: ubi_create_volume: cannot create volume 1, error -17 ubi0 error: ubi_open_volume: cannot open device 0, volume 128, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume -1, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume 128, error -22 ubi0 error: ubi_open_volume: cannot open device 0, volume 0, error -19 ubi0 error: ubi_open_volume: cannot open device 0, volume 0, error -19 Running mkvol_paral /dev/ubi0 Running rsvol /dev/ubi0 Running io_basic /dev/ubi0 Running io_read /dev/ubi0 Running io_update /dev/ubi0 Running io_paral /dev/ubi0 Running volrefcnt /dev/ubi0 SUCCESS Cheng Ming Lin (1): mtd: ubi: skip programming unused bits in ubi headers drivers/mtd/ubi/io.c | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 2.25.1