summaryrefslogtreecommitdiffstats
path: root/package/boot/kobs-ng/patches/002-add-init-size-param.patch
diff options
context:
space:
mode:
authorTim Harvey <tharvey@gateworks.com>2016-09-01 07:45:37 -0700
committerFelix Fietkau <nbd@nbd.name>2016-09-04 13:36:09 +0200
commita4b86b292a0bce95b9874d6c757a709c5a5269b4 (patch)
tree7922e9c3677adc852b5812519866586fd9fb2c80 /package/boot/kobs-ng/patches/002-add-init-size-param.patch
parentf8c7e935ef8060b8ab2f5ca52832ef8dfea361bc (diff)
downloadmaster-31e0f0ae-a4b86b292a0bce95b9874d6c757a709c5a5269b4.tar.gz
master-31e0f0ae-a4b86b292a0bce95b9874d6c757a709c5a5269b4.tar.bz2
master-31e0f0ae-a4b86b292a0bce95b9874d6c757a709c5a5269b4.zip
boot: kobs-ng: update kobs-ng for newer kernels
This allows kobs-ng to flash the SPL successfully on the 4.4 kernel used by the Gateworks IMX boards supporting NAND. The previous version of kobs-ng worked with the 3.14 kernel but will brick a board making its SPL unbootable for the 4.4 kernel. See http://trac.gateworks.com/wiki/ventana/bootloader#nandspl for instructions on updating the SPL from Linux. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Diffstat (limited to 'package/boot/kobs-ng/patches/002-add-init-size-param.patch')
-rw-r--r--package/boot/kobs-ng/patches/002-add-init-size-param.patch13
1 files changed, 8 insertions, 5 deletions
diff --git a/package/boot/kobs-ng/patches/002-add-init-size-param.patch b/package/boot/kobs-ng/patches/002-add-init-size-param.patch
index e0e89b2aec..8ad34e9e71 100644
--- a/package/boot/kobs-ng/patches/002-add-init-size-param.patch
+++ b/package/boot/kobs-ng/patches/002-add-init-size-param.patch
@@ -1,3 +1,6 @@
+Add --chip_0_size param to override the size of the mtd partition which is
+required if the SPL does not occupy the entire partition. For Gateworks
+Ventana boards the 'uboot' partition contains both the SPL and uboot.
--- a/src/main.c
+++ b/src/main.c
@@ -94,6 +94,7 @@ void usage(void)
@@ -10,7 +13,7 @@
" --data_hold_time=<value> ............. NCB field (default 60)\n"
--- a/src/mtd.c
+++ b/src/mtd.c
-@@ -716,6 +716,11 @@ struct mtd_data *mtd_open(const struct m
+@@ -876,6 +876,11 @@ struct mtd_data *mtd_open(const struct m
goto out;
}
@@ -20,9 +23,9 @@
+ }
+
/* verify it's a nand */
- if (miu->type != MTD_NANDFLASH) {
- fprintf(stderr, "mtd: device %s not NAND\n", mp->name);
-@@ -2914,7 +2919,7 @@ static const struct {
+ if (miu->type != MTD_NANDFLASH
+ && miu->type != MTD_MLCNANDFLASH) {
+@@ -3385,7 +3390,7 @@ static const struct {
} mtd_int_args[] = {
ARG_IGNORE(chip_count),
ARG_IGNORE(chip_0_offset),
@@ -31,7 +34,7 @@
ARG_IGNORE(chip_1_offset),
ARG_IGNORE(chip_1_size),
ARG(search_exponent),
-@@ -3107,7 +3112,7 @@ void mtd_cfg_dump(struct mtd_config *cfg
+@@ -3578,7 +3583,7 @@ void mtd_cfg_dump(struct mtd_config *cfg
// Pd(chip_count);
Ps(chip_0_device_path);
// Pd(chip_0_offset);