mirror of
https://github.com/LiBwrt-op/openwrt-6.x.git
synced 2025-12-25 13:29:47 +00:00
Many NAND devices use a build recipe with "append-ubi | check-size" to ensure factory images don't exceed the target flash partition size. However, UBI reserves space for bad block handling and other operational overhead, and thus 'check-size' can overestimate the space available by several MB. In practice, this means a failed check is definitely a failure, while a passing check is only probably a pass. Improve the situation by teaching 'Build/append-ubi' to check image sizes while accounting for UBI reserved blocks. Add new device variable NAND_SIZE and use with existing IMAGE_SIZE to derate the available space. Each UBI device reserves 20 PEBs per 1024 PEBs of the entire NAND device for bad blocks, plus an additional 4 PEBs overhead. Many devices can transparently enable this check by setting NAND_SIZE based on their flash storage, and may then remove any unneeded 'check-size'. Link: http://www.linux-mtd.infradead.org/doc/ubi.html#L_overhead Suggested-by: Shiji Yang <yangshiji66@qq.com> Suggested-by: Robert Marko <robimarko@gmail.com> Signed-off-by: Tony Ambardar <itugrok@yahoo.com> |
||
|---|---|---|
| .. | ||
| site | ||
| autotools.mk | ||
| bpf.mk | ||
| cmake.mk | ||
| debug.mk | ||
| depends.mk | ||
| device_table.txt | ||
| download.mk | ||
| feeds.mk | ||
| hardened-ld-pie.specs | ||
| hardening.mk | ||
| host-build.mk | ||
| image-commands.mk | ||
| image.mk | ||
| kernel-5.15 | ||
| kernel-6.1 | ||
| kernel-build.mk | ||
| kernel-defaults.mk | ||
| kernel-version.mk | ||
| kernel.mk | ||
| logo.png | ||
| logo.svg | ||
| meson.mk | ||
| netfilter.mk | ||
| nls.mk | ||
| openssl-module.mk | ||
| package-bin.mk | ||
| package-defaults.mk | ||
| package-dumpinfo.mk | ||
| package-ipkg.mk | ||
| package-seccomp.mk | ||
| package.mk | ||
| prereq-build.mk | ||
| prereq.mk | ||
| quilt.mk | ||
| rootfs.mk | ||
| scan.awk | ||
| scan.mk | ||
| shell.sh | ||
| subdir.mk | ||
| target.mk | ||
| toolchain-build.mk | ||
| toplevel.mk | ||
| trusted-firmware-a.mk | ||
| u-boot.mk | ||
| uclibc++.mk | ||
| unpack.mk | ||
| verbose.mk | ||
| version.mk | ||