Git Product home page Git Product logo

mtd-rw's Introduction

mtd-rw - Write-enabler for MTD partitions

Sets the MTD_WRITEABLE flag on all MTD partitions that are marked readonly. When unloading, read-only partitions will be restored. This module is intended for embedded devices where the mtd partition layout may be hard-coded in the firmware. If, for some reason, you DO have to write to a read-only partition (which is often a bad idea), this module is the way to go.

The module is currently limited to the first 64 partitions, but this should suffice for most purposes.

Inspired by [email protected]: https://electronics.stackexchange.com/a/116133/97342

Usage:

# insmod mtd-rw.ko i_want_a_brick=1
# dmesg | grep mtd-rw
[52997.620000] mtd-rw: mtd0: setting writeable flag
[52997.630000] mtd-rw: mtd1: setting writeable flag
[52997.640000] mtd-rw: mtd3: setting writeable flag
[52997.650000] mtd-rw: mtd4: setting writeable flag
[52997.660000] mtd-rw: mtd6: setting writeable flag

mtd-rw's People

Contributors

jclehner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

mtd-rw's Issues

Compile error (for 15.05)

make[3]: Entering directory `build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.18.23'
  CC [M]  build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_generic/mtd-rw-git-20160210/mtd-rw.o
build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_generic/mtd-rw-git-20160210/mtd-rw.c: In function 'mtd_rw_init':
build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_generic/mtd-rw-git-20160210/mtd-rw.c:91:2: error: 'count' undeclared (first use in this function)
  count = 0;
  ^

Quick fix:

--- a/mtd-rw.c
+++ b/mtd-rw.c
@@ -81,7 +81,7 @@

 static int __init mtd_rw_init(void)
 {
-   int i, err;
+   int i, err, count;

    if (!i_want_a_brick) {
        printk(MOD_ERR "must specify i_want_a_brick=1 to continue\n");

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.