ESP8266 Support WIKI

User Tools

Site Tools


toolchain

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
toolchain [2016/05/19 00:14]
gandibowo [Notes]
toolchain [2018/01/06 18:53] (current)
fabix [How to setup a VM to host your toolchain]
Line 60: Line 60:
   * I suggest that you run the server from now on in what is called headless mode -- that is you start and stop the VM from a command line using ''​vboxmanage''​ commands and just like a real server, you will only need to have the server console available for exceptional system maintenance. (I never bother with it and do everything over SSH.)  I use a set of aliases in my ''​.bashrc''​ on my laptop. (Windows users can use ''​doskey''​ macros to achieve the same effect.) (Replace ''​nodemcu''​ by whatever you've called your VM.   * I suggest that you run the server from now on in what is called headless mode -- that is you start and stop the VM from a command line using ''​vboxmanage''​ commands and just like a real server, you will only need to have the server console available for exceptional system maintenance. (I never bother with it and do everything over SSH.)  I use a set of aliases in my ''​.bashrc''​ on my laptop. (Windows users can use ''​doskey''​ macros to achieve the same effect.) (Replace ''​nodemcu''​ by whatever you've called your VM.
  
-  ​alias nodemcustart='​vboxmanage startvm nodemcu --type headless'​ +``` 
-  alias nodemcusave='​vboxmanage controlvm nodemcu savestate'​ +    ​alias nodemcustart='​vboxmanage startvm nodemcu --type headless'​ 
-  alias nodemcu='​ssh -p 2222 localhost'​+    alias nodemcusave='​vboxmanage controlvm nodemcu savestate'​ 
 +    alias nodemcu='​ssh -p 2222 localhost'​ 
 +```
  
   * A major advantage of the network install is that the latest versions of all packages at the point of the build are loaded into the system, so there'​s no need to do the 100s of patch updates that you typically need to do with Windows. ​ We are going to lock the system down so that the only access to the system will be from your account on the host PC or laptop; ​ in effect, no ports are exposed to the wider network. ​ The only way that the VM can be security compromised is if the host PC and host account have been compromised so there is no point in adding extra tiers of security within the VM.   * A major advantage of the network install is that the latest versions of all packages at the point of the build are loaded into the system, so there'​s no need to do the 100s of patch updates that you typically need to do with Windows. ​ We are going to lock the system down so that the only access to the system will be from your account on the host PC or laptop; ​ in effect, no ports are exposed to the wider network. ​ The only way that the VM can be security compromised is if the host PC and host account have been compromised so there is no point in adding extra tiers of security within the VM.
  
-  * Start the server and log on using your username / password combination. (If using SSH or puTTY for the first time google "​**putty ​ using ssh keys authorize_keys**" and read up on how public key based SSH access works and is configured). ​ Now copy your public key to ''​~/​.ssh/​authorized_keys'' ​and ''​chmod 600 ~/​.ssh/​authorized_keys''​. You should now be able to log off and log on from your host without needing to enter a password.+  * Start the server and log on using your username / password combination. (If using SSH or puTTY for the first time google "​**putty ​ using ssh keys `authorized_keys`**" and read up on how public key based SSH access works and is configured). ​ Now copy your public key to `~/​.ssh/​authorized_keysand `chmod 600 ~/​.ssh/​authorized_keys`. You should now be able to log off and log on from your host without needing to enter a password.
  
-  * Edit ''​/​etc/​ssh/​sshd_config'' ​and append the line ''​AllowUsers *@10.0.2.*'' ​to limit logon to access from the host PC. (You will neeed to use ''​sudo ​ nano''​ or ''​sudo vi''​ to do this). ​ And similarly do a ''​sudo visudo''​ to add ''​NOPASSWD''​ to the **''​%admin''​** and **''​%sudo''​** groups as follows; this enables you to access root privileges without having to enter a password (and log off and on again to check that these are working OK.)+  * Edit `/​etc/​ssh/​sshd_configand append the line `AllowUsers *@10.0.2.*to limit logon to access from the host PC. (You will neeed to use ''​sudo ​ nano''​ or ''​sudo vi''​ to do this). ​ And similarly do a ''​sudo visudo''​ to add ''​NOPASSWD''​ to the **''​%admin''​** and **''​%sudo''​** groups as follows; this enables you to access root privileges without having to enter a password (and log off and on again to check that these are working OK.) 
 + 
 +``` 
 +    %admin ALL=(ALL) NOPASSWD: ALL 
 +    %sudo  ALL=(ALL:​ALL) NOPASSWD: ALL 
 +```
  
-  %admin ALL=(ALL) NOPASSWD: ALL 
-  %sudo  ALL=(ALL:​ALL) NOPASSWD: ALL 
-  
   *  And lastly mangle your password so that only key-based access can work:   *  And lastly mangle your password so that only key-based access can work:
  
-  ​pwd=$(date|md5sum);​ echo -e "​$pwd\n$pwd"​|sudo passwd $USER +``` 
 +    ​pwd=$(date|md5sum);​ echo -e "​$pwd\n$pwd"​|sudo passwd $USER 
 +```
   * Now install all of the other core packages that allow you to build the toolchain, nodeMCU and ''​luac.cross''​. ​ Note that Ubuntu 12.04 doesn'​t include pre-packaged versions of some of the Lua libraries, so you need to do a ''​luarocks install''​ to build these:   * Now install all of the other core packages that allow you to build the toolchain, nodeMCU and ''​luac.cross''​. ​ Note that Ubuntu 12.04 doesn'​t include pre-packaged versions of some of the Lua libraries, so you need to do a ''​luarocks install''​ to build these:
  
 +```
   sudo apt-get install \   sudo apt-get install \
-     ​build-essential zip gdb git vim make unrar autoconf automake \ +     ​build-essential zip gdb git vim make unrar autoconf automake ​gawk 
-     bison texinfo libtool gcc g++ gperf libc-dbg ncurses-dev expat \+     bison texinfo libtool gcc g++ gperf libc-dbg ncurses-dev expat flex help2man ​\
      ​lua5.1 lua5.1-doc luarocks      ​lua5.1 lua5.1-doc luarocks
-  for m in lua-bitlib luafilesystem md5 luaposix luasocket; do sudo luarocks install $m; done  +  for m in bitlib luafilesystem md5 luaposix luasocket; do sudo luarocks install $m; done  
-  +```
 and now you are good to go.  If you want to work on the nodeMCU firmware documentation then you will also need the MkDocs toolkit: and now you are good to go.  If you want to work on the nodeMCU firmware documentation then you will also need the MkDocs toolkit:
  
 +```
   sudo apt-get install python-pip   sudo apt-get install python-pip
   sudo pip install mkdocs   sudo pip install mkdocs
 +```
 See the [[http://​www.mkdocs.org/​|MkDocs Website]] for more info. See the [[http://​www.mkdocs.org/​|MkDocs Website]] for more info.
    
Line 105: Line 112:
  
 Its limitation is its IO pins . Most have but one Analog pin but many Digital pins  Its limitation is its IO pins . Most have but one Analog pin but many Digital pins 
-http://​sakacamprung.blogspot.co.id/​2016/​05/​jelly-gamat-qnc.html 
toolchain.1463616887.txt.gz · Last modified: 2016/05/19 00:14 by gandibowo