apply mtdpslit patch only for openwrt kernel
it doesn't apply to mainline because there's no mtdsplit in mainline
This commit is contained in:
parent
d0c2b3b274
commit
abd01a7809
3 changed files with 6 additions and 1 deletions
|
@ -54,7 +54,6 @@ stdenv.mkDerivation rec {
|
|||
|
||||
patches = [
|
||||
./cmdline-cookie.patch
|
||||
./make-mtdsplit-jffs2-endian-agnostic.patch
|
||||
];
|
||||
|
||||
# this is here to work around what I think is a bug in nixpkgs
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
On a little-endian CPU, the little-endian JFFS2 magic
|
||||
appears to be word-swapped.
|
||||
|
||||
There is probably a better way to implement this; if you are reading
|
||||
this patch you are probably well-qualified to do that and upstream it
|
||||
to OpenWrt
|
||||
|
||||
|
||||
diff --git a/drivers/mtd/mtdsplit/mtdsplit.c b/drivers/mtd/mtdsplit/mtdsplit.c
|
||||
index b2e51dcfc6..533af0298e 100644
|
||||
--- a/drivers/mtd/mtdsplit/mtdsplit.c
|
||||
+++ b/drivers/mtd/mtdsplit/mtdsplit.c
|
||||
@@ -92,6 +93,6 @@
|
||||
*type = MTDSPLIT_PART_TYPE_SQUASHFS;
|
||||
return 0;
|
||||
- } else if (magic == 0x19852003) {
|
||||
+ } else if ((magic == 0x19852003) || (magic == 0x20031985)) {
|
||||
if (type)
|
||||
*type = MTDSPLIT_PART_TYPE_JFFS2;
|
||||
return 0;
|
Loading…
Add table
Add a link
Reference in a new issue