GithubHelp home page GithubHelp logo

anjandev / pinebook-pro-keyboard-updater Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ayufan-rock64/pinebook-pro-keyboard-updater

0.0 1.0 0.0 158 KB

A keyboard/touchpad firmware updater tool

Makefile 2.07% C 97.93%

pinebook-pro-keyboard-updater's Introduction

Pinebook Pro keyboard/touchpad firmware updater

This application does upgrade firmware of the built-in keyboard and touchpad.

Compiling

git clone https://github.com/ayufan-rock64/pinebook-pro-keyboard-updater
cd pinebook-pro-keyboard-updater
sudo apt-get install build-essential libusb-1.0-0-dev xxd
make

Pick right keyboard model

Pinebook Pro offers two keyboard types: ISO and ANSI.

Append your model type after the step-1 or step-2 command specifying iso or ansi.

In order to update with ANSI keyboard the external keyboard will be required as for the duration of the process the keyboard will stop working.

Update all firmwares

You need to do all of that in correct order, if at any point process fails, start it from point 1.:

  1. Run step-1 iso or step-1 ansi of update process: sudo ./updater step-1 iso,
  2. After step-1 iso or step-1 ansi touchpad will not work, keyboard works as normal (this is true only for ISO, the ANSI keyboard will not work after step-1),
  3. Reboot with sudo reboot,
  4. After reboot, run step-2 iso or step-2 ansi of update process: sudo ./updater step-2,
  5. Reboot with sudo reboot,
  6. After reboot, your keyboard and touchpad firmware should be updated.
# compile
git clone https://github.com/ayufan-rock64/pinebook-pro-keyboard-updater
cd pinebook-pro-keyboard-updater
sudo apt-get install build-essential libusb-1.0-0-dev xxd
make

# For ISO keyboard
# step-1
sudo ./updater step-1 iso
sudo reboot

# after reboot, step-2
sudo ./updater step-2 iso
sudo reboot

# For ANSI keyboard
# step-1
sudo ./updater step-1 ansi
sudo reboot

# after reboot, step-2
sudo ./updater step-2 ansi
sudo reboot

Log from STEP-1

$ sudo ./updater step-1 iso
Running STEP-1...
[*] Flashing keyboard updater firmware...
>>> Fix hex file
[*] Opening in user mode...
>>> Trying to open VID:258a PID:001e...
>>> Device not found
>>> Trying to open VID:258a PID:001f...
[*] Sending command to switch to boot mode...
[*] Command send
>>> release interface
[*] Opening in boot mode
>>> Trying to open VID:0603 PID:1020...
>>> Device not found
>>> Trying to open VID:0603 PID:1020...
>>> Kernel Driver Active
[*] Erasing flash
[*] Writing firmware...
>>> USB: write_block_start (length=14336)
>>> USB: write_block (offset=0, length=2048)
>>> USB: write_block (offset=2048, length=2048)
>>> USB: write_block (offset=4096, length=2048)
>>> USB: write_block (offset=6144, length=2048)
>>> USB: write_block (offset=8192, length=2048)
>>> USB: write_block (offset=10240, length=2048)
>>> USB: write_block (offset=12288, length=2048)
>>> USB: write_block_start (length=14336)
>>> USB: write_block (offset=0, length=2048)
[*] Reading back firmware...
>>> USB: read_block_start (length=14336)
>>> USB: read_block (offset=0, length=2048)
>>> USB: read_block (offset=2048, length=2048)
>>> USB: read_block (offset=4096, length=2048)
>>> USB: read_block (offset=6144, length=2048)
>>> USB: read_block (offset=8192, length=2048)
>>> USB: read_block (offset=10240, length=2048)
>>> USB: read_block (offset=12288, length=2048)
[*] Comparing firmwares...
[*] Reseting device?
[*] Finished succesfully!
>>> release interface
[*] Please reboot now, and run `step-2`.

Log from STEP-2

$ sudo ./updater step-2 iso
Running STEP-2...
[*] Flashing touchpad firmware...
[*] Opening in touchpad mode
>>> Trying to open VID:258a PID:001f...
>>> Kernel Driver Active
>>> Writing offset:0 length:1024...
>>> Verifying '1k-data'...
>>> Writing offset:1024 length:1024...
>>> Verifying '1k-data'...
>>> Writing offset:2048 length:1024...
>>> Verifying '1k-data'...
>>> Writing offset:3072 length:1024...
>>> Verifying '1k-data'...
>>> Writing offset:4096 length:1024...
>>> Verifying '1k-data'...
>>> Writing offset:5120 length:1024...
>>> Verifying '1k-data'...
>>> Writing offset:6144 length:1024...
>>> Verifying '1k-data'...
>>> Writing offset:7168 length:1024...
>>> Verifying '1k-data'...
>>> Writing offset:8192 length:1024...
>>> Verifying '1k-data'...
>>> Writing offset:9216 length:1024...
>>> Verifying '1k-data'...
>>> Writing offset:10240 length:1024...
>>> Verifying '1k-data'...
>>> Writing offset:11264 length:1024...
>>> Verifying '1k-data'...
>>> Writing offset:12288 length:1024...
>>> Verifying '1k-data'...
>>> Writing offset:13312 length:1024...
>>> Verifying '1k-data'...
>>> Writing offset:14336 length:1024...
>>> Verifying '1k-data'...
>>> Writing offset:15360 length:1024...
>>> Verifying '1k-data'...
>>> Writing offset:16384 length:1024...
>>> Verifying '1k-data'...
>>> Writing offset:17408 length:1024...
>>> Verifying '1k-data'...
>>> Writing offset:18432 length:1024...
>>> Verifying '1k-data'...
>>> Writing offset:19456 length:1024...
>>> Verifying '1k-data'...
>>> Writing offset:20480 length:1024...
>>> Verifying '1k-data'...
>>> Writing offset:21504 length:1024...
>>> Verifying '1k-data'...
>>> Writing offset:22528 length:1024...
>>> Verifying '1k-data'...
>>> Writing offset:23552 length:1024...
>>> Verifying '1k-data'...
[*] Verifying 'end-program'...
[*] Verifying 'checksum'...
[*] Verifying 'program'...
[*] Finished succesfully!
>>> release interface
[*] Flashing ISO keyboard firmware...
>>> Fix hex file
[*] Opening in user mode...
>>> Trying to open VID:258a PID:001e...
>>> Device not found
>>> Trying to open VID:258a PID:001f...
[*] Sending command to switch to boot mode...
[*] Command send
>>> release interface
[*] Opening in boot mode
>>> Trying to open VID:0603 PID:1020...
>>> Device not found
>>> Trying to open VID:0603 PID:1020...
>>> Kernel Driver Active
[*] Erasing flash
[*] Writing firmware...
>>> USB: write_block_start (length=14336)
>>> USB: write_block (offset=0, length=2048)
>>> USB: write_block (offset=2048, length=2048)
>>> USB: write_block (offset=4096, length=2048)
>>> USB: write_block (offset=6144, length=2048)
>>> USB: write_block (offset=8192, length=2048)
>>> USB: write_block (offset=10240, length=2048)
>>> USB: write_block (offset=12288, length=2048)
>>> USB: write_block_start (length=14336)
>>> USB: write_block (offset=0, length=2048)
[*] Reading back firmware...
>>> USB: read_block_start (length=14336)
>>> USB: read_block (offset=0, length=2048)
>>> USB: read_block (offset=2048, length=2048)
>>> USB: read_block (offset=4096, length=2048)
>>> USB: read_block (offset=6144, length=2048)
>>> USB: read_block (offset=8192, length=2048)
>>> USB: read_block (offset=10240, length=2048)
>>> USB: read_block (offset=12288, length=2048)
[*] Comparing firmwares...
[*] Reseting device?
[*] Finished succesfully!
>>> release interface
[*] All done! Your keyboard and touchpad should be updated.

License

MIT, 2019, SHEN ZHEN HAI LUCK ELECTRONIC TECHNOLOGY CO., LTD

pinebook-pro-keyboard-updater's People

Contributors

ayufan avatar tobleminer avatar

Watchers

 avatar

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.