[FS#3883] [NAND with badblocks] InitramFS image uses real partitions offset, w/o corrections to bad blocks
OpenWrt Bugs
openwrt-bugs at lists.openwrt.org
Fri Jun 18 04:19:51 PDT 2021
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - csharper2005 (csharper2005)
Attached to Project - OpenWrt/LEDE Project
Summary - [NAND with badblocks] InitramFS image uses real partitions offset, w/o corrections to bad blocks
Task Type - Bug Report
Category - Base system
Status - Unconfirmed
Assigned To -
Operating System - All
Severity - Medium
Priority - Very Low
Reported Version - Trunk
Due in Version - Undecided
Due Date - Undecided
Details - - Device problem occurs on - at least ramips NAND devices with bad erase blocks (Beeline Smartbox GIGA, Xiaomi Redmi router AC2100)
- Software versions - Trunk
- Steps to reproduce (on a device with bad erase blocks, at 0x2c0000 in the following example):
1. Boot OpenWRT InitramFS (e.g. from TFTP);
2. Write something on a mtd* partition (after a badblock):
> mtd write kernel.bin /dev/mtd4
mtd4 offset - 0x400000
3. Check the written data using U-Boot or OpenWRT installed on NAND. Written data is shifted by (number of bad blocks)*(block size, 0x20000). Our data is actually written at 0x380000 (for U-Boot or OpenWRT installed on NAND). System doesn't boot if it was a kernel.
Device layout (dts file):
0x000000000000-0x000000100000: "Boot Loader"
0x000000100000-0x000000200000: "dynamic partition map"
0x000000200000-0x000000300000: "Factory"
0x000000300000-0x000000400000: "Boot Flag"
0x000000400000-0x000000a00000: "Kernel" mtd4
0x000000a00000-0x000001000000: "Kernel 2"
0x000001000000-0x000002800000: "File System 1"
0x000002800000-0x000004000000: "File System 2"
Real partition addresses (for U-Boot, stock firmware & OpenWRT installed on NAND):
0x000000000000-0x000000100000 : "Boot Loader"
0x000000100000-0x000000200000 : "dynamic partition map"
0x000000200000-0x000000320000(shift by 1 block - 0x20000) : "Factory"
0x000000320000-0x000000420000(shift by 1 block - 0x20000): "Boot Flag"
0x000000420000-0x000000a20000(shift by 1 block - 0x20000): "Kernel" mtd4
0x000000a20000-0x000001020000(shift by 1 block - 0x20000): "Kernel 2"
0x000001020000-0x000002820000(shift by 1 block - 0x20000): "File System 1"
0x000002820000-0x000004020000(shift by 1 block - 0x20000): "File System 2"
Real partition addresses (for OpenWRT initramfs):
0x000000000000-0x000000100000 : "Boot Loader"
0x000000100000-0x000000200000 : "dynamic partition map"
0x000000200000-0x000000320000(shift by 1 block - 0x20000) : "Factory"
0x000000320000-0x000000420000(shift by 1 block - 0x20000): "Boot Flag"
0x000000420000-0x000000a20000(shift by 1 block - 0x20000): "Kernel 1"
0x000000a20000-0x000001020000(shift by 1 block - 0x20000): "Kernel 2"
0x000001020000-0x000002820000(shift by 1 block - 0x20000): "File System 1"
0x000002820000-0x000004020000(shift by 1 block - 0x20000): "File System 2"
More information can be found at the following URL:
https://bugs.openwrt.org/index.php?do=details&task_id=3883
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
More information about the openwrt-bugs
mailing list