Readme massaging
This commit is contained in:
parent
90334856bc
commit
96a3c741b3
10
README.md
10
README.md
|
@ -11,12 +11,14 @@ rw access to the (often protected) /dev/mtd0 partition.
|
|||
|
||||
2. `git clone https://git.sr.ht/~monadnock/zig-mtd`
|
||||
|
||||
3. zig build
|
||||
3. `zig build`
|
||||
|
||||
## Modification
|
||||
|
||||
This code only currently supports mipsel out of the box. The only parts specific to mipsel are:
|
||||
|
||||
- mtd-rw.ko; The embedded kernel module is compiled for mipsel. You can replace this file with a version compiled for your arch, or comment out the function if you don't require it.
|
||||
- uboot-feb2019.bin: Same story. This is the version of u-boot I needed for mt7628 product. You'll almost certainly want to replace this file. Ask your doctor what version of u-boot is right for you
|
||||
- The ioctl numbers used to ERASE and UNLOCK the mtd are arch specific: https://git.sr.ht/~monadnock/zig-mtd/tree/master/src/mtd.zig#L8 . zig couldn't grok the nested ioctl #define horrors from the mtd headers. The easiest way I've found to determine these magic numbers is to compile the mtd-magic.c file in the repo with your target toolchain and run it on the target. It'll print out the macro expansions (e.g. `mipsel-openwrt-linux-gcc -o mtd-magic mtd-magic.c`)
|
||||
- *mtd-rw.ko*; The embedded kernel module is compiled for mipsel. You can replace this file with a version compiled for your arch, or comment out the function if you don't require it.
|
||||
- *uboot-feb2019.bin*: Same story. This is the version of u-boot I needed for mt7628 product. You'll almost certainly want to replace this file. Ask your doctor what version of u-boot is right for you
|
||||
- The [ioctl numbers used to ERASE and UNLOCK the mtd](https://git.sr.ht/~monadnock/zig-mtd/tree/master/src/mtd.zig#L8) are arch specific
|
||||
|
||||
> zig couldn't grok the nested ioctl #define horrors from the mtd headers. The easiest way I've found to determine these magic numbers is to compile the mtd-magic.c file in the repo with your target toolchain and run it on the target. It'll print out the macro expansions (e.g. `mipsel-openwrt-linux-gcc -o mtd-magic mtd-magic.c`)
|
||||
|
|
Loading…
Reference in New Issue