Coder Social home page Coder Social logo

yunsketches's People

Contributors

fede85 avatar ffissore avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

yunsketches's Issues

Add a SWAP partition

Hi,

In order to use npm to install nodejs paquages, I need more RAM on the Arduino Yun.
So I think it could be interesting to add a SWAP partition in your program.

I begin to work on it, but i'm not an expert in linux.

I add this before the creation of the second partition:

int dataSWAPSize = readSWAPSize();
String SWAPPartition = "(echo n; echo p; echo 3; echo; echo +";
SWAPPartition += dataSWAPSize;
SWAPPartition += "M; echo t; echo 3; echo 82; echo w) | fdisk /dev/sda";
format.runShellCommand(SWAPPartition);
debugProcess(format);
unmount();

And this:

int readSWAPSize() {
  int SWAPSize = 0;
  while (!SWAPSize)
  {
    Serial.print(F("Enter the size of the SWAP in MB: "));
    while (Serial.available() == 0);
    String answer = Serial.readStringUntil('\n');
    SWAPSize = answer.toInt();
    Serial.println(SWAPSize);
    if (!SWAPSize)
      Serial.println(F("Invalid input, retry"));
  }
  return SWAPSize;
}

So I just have to add the command to make this partition a SWAP, but still working on it:

mkswap /dev/sda3
swapon /dev/sda3
vi /etc/fstab3
// vi command to insert a new line
/dev/sda3 swap swap defaults 0 0

Do you have some ideas to add the last part?

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.