Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
This commit is contained in:
27
package/boot/kobs-ng/patches/004-fix-cal_nfc_geometry.patch
Normal file
27
package/boot/kobs-ng/patches/004-fix-cal_nfc_geometry.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
The Freescale downstream vendor kernel has a patch that exports the bch
|
||||
flash geometry via a debugfs file. This is not available in mainline linux
|
||||
kernels so the fallback method calculates the geometry based on known info
|
||||
from the mtd partition. A bug exists in this funcion where it fails to
|
||||
assume that block0 ECC is the same as the other blocks by default.
|
||||
--- a/src/mtd.c
|
||||
+++ b/src/mtd.c
|
||||
@@ -610,7 +610,7 @@ static int cal_nfc_geometry(struct mtd_d
|
||||
/* The two are fixed, please change them when the driver changes. */
|
||||
geo->metadata_size_in_bytes = 10;
|
||||
geo->gf_len = 13;
|
||||
- geo->ecc_chunkn_size_in_bytes = 512;
|
||||
+ geo->ecc_chunkn_size_in_bytes = geo->ecc_chunk0_size_in_bytes = 512;
|
||||
|
||||
if (mtd->oobsize > geo->ecc_chunkn_size_in_bytes) {
|
||||
geo->gf_len = 14;
|
||||
@@ -700,8 +700,9 @@ int parse_nfc_geometry(struct mtd_data *
|
||||
unsigned int value;
|
||||
|
||||
if (!plat_config_data->m_u32UseNfcGeo) {
|
||||
+ /* fsl kernel patch provides bch_geometry via debugfs */
|
||||
if (!(node = fopen(dbg_geometry_node_path, "r"))) {
|
||||
- fprintf(stderr, "Cannot open BCH geometry node: \"%s\"",
|
||||
+ fprintf(stderr, "Cannot open BCH geometry node: \"%s\"\n",
|
||||
dbg_geometry_node_path);
|
||||
return cal_nfc_geometry(md);
|
||||
}
|
||||
Reference in New Issue
Block a user