Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Does anyone know of an Embedded Controller editor for Linux?
I currently use Read & Write Utility When using Windows to set my fan between 25%-50% because without it my laptop idles at 50°c
When using Linux however the fan simply never turns on and the computer turns off because of overheating after two minutes.

I already know what byte to edit on the Controller I just don't know of an Embedded Controller editor for Linux.
Any help is appreciated thanks.

share|improve this question
    
The word "editor" can be ambiguous without a modifier. Most people think of text editor. You seem to asking about a memory hex editor. Such a capability is more common in boot or memory programs, e.g. U-Boot, than under a kernel that protects memory. You are really asking an XY question. Why not try to turn on the fan in the bootloader, before memory protection, i.e. the MMU, is enabled? – sawdust Aug 6 '12 at 20:04

You can use vim and xxd:

vim -b some_binary_file

The -b open it in binary mode - vim won't put a newline at the end of the file when you save it.

Once you have it open, do

:%!xxd

Say you have a text file with these contents:

  Hello there this is a test blah blah blah blah blah blah blah blah

Running :%!xxd in vim will produce hex output like this:

1 0000000: 4865 6c6c 6f20 7468 6572 6520 7468 6973  Hello there this
2 0000010: 2069 7320 6120 7465 7374 2062 6c61 6820   is a test blah 
3 0000020: 626c 6168 2062 6c61 6820 626c 6168 2062  blah blah blah b
4 0000030: 6c61 6820 626c 6168 2062 6c61 6820 626c  lah blah blah bl
5 0000040: 6168 0a                                  ah.

To edit a byte, edit the hex value you want, and then run

:%!xxd -r

To convert the hex bytes back to binary format.

For example, changing the first 0x48 byte to 0x4a in the hex output above:

1 0000000: 4a65 6c6c 6f20 7468 6572 6520 7468 6973  Hello there this
2 0000010: 2069 7320 6120 7465 7374 2062 6c61 6820   is a test blah 
3 0000020: 626c 6168 2062 6c61 6820 626c 6168 2062  blah blah blah b
4 0000030: 6c61 6820 626c 6168 2062 6c61 6820 626c  lah blah blah bl
5 0000040: 6168 0a                                  ah

and then running :%!xxd -r will convert the hex bytes back to binary format, which gives you this:

Jello there this is a test blah blah blah blah blah blah blah blah

Hope this helps

share|improve this answer
    
This doesn't make sense. – Zacharee1 May 2 '15 at 2:13

If your Embedded Controller is based on BusyBox, then there is a very small version of vi.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .