Burning Tools for Linux PC

Burning image on Ubuntu

This tutorial is about how to burn image on Ubuntu.

Preperations

$ sudo apt-get install libusb-dev git

Get burning tool

Image burning tool on Ubuntu is in repository utils.

$ git clone https://github.com/khadas/utils

Or just pull it if you have cloned this repository.

$ cd /path/to/utils
$ git pull

Install burning tool

You need to install USB rules.

$ cd /path/to/utils
$ ./INSTALL

You will see this if successed.

Installing Amlogic flash-tool...

===============================================

Host PC: Ubuntu 16.04

===============================================

Installing USB rules...
[sudo] password for nick: 
Installing flash-tool...
Done!

Installing Rockchip flash-tool...

===============================================

Host PC: Ubuntu 16.04

===============================================

Installing USB rules...
Installing flash-tool...
Done!
Installing Khadas burn-tool...
Done!

Check the USB driver

You should bring your VIMs board enter upgrade mode.
Check the USB driver.

$ lsusb | grep Amlogic
Bus 002 Device 036: ID 1b8e:c003 Amlogic, Inc.

The message means that your board is recognized.

Check flash-tool.

$ cd /path/to/utils
$ ./aml-flash-tool/tools/update identify

You will see the message.

AmlUsbIdentifyHost
This firmware version is 0-7-0-16

How to burn image on Ubuntu

$ burn-tool -i /path/to/image

You will see the logs if successed.

Rebooting the board ........[OK]
Unpacking image [OK]
Initializing ddr ........[OK]
Running u-boot ........[OK]
Create partitions [OK]
Writing device tree [OK]
Writing bootloader [OK]
Wiping  data partition [OK]
Wiping  cache partition [OK]
Writing boot partition [OK]
Writing data partition [OK]
Writing logo partition [OK]
Writing system partition [OK]
Do you want to reset the board? y/n [n]? y
Resetting board [OK]

And you can add parameter --debug to print debug infomation.For more usage please refer to docs.

Uninstall burning tool

$ cd /path/to/utils
$ ./UNINSTALL

NOTICE

This burning tool has been verified on Ubuntu 14.04/16.04.As we don’t have environment of Ububtu 17.04/10 and other distributions, so I’m not sure whether it works well.

13 Likes

I personal tend to give it a better and easy to type name for fast-burn-vims, like:

  • magic-tool
  • burn-tool
  • usb-tool
  • usbtool
  • utool
  • downtool
  • xtool
0 voters

Kindly feedback a better name @all forks :wink:

One more things is that, should be run the tool at any path instead of specify path.

1 Like

you could post a video because I did
sudo apt-get install libusb-dev git - ok
git clone https://github.com/khadas/utils ok
cd / path / to / utils error
git pull error
cd / path / to / utils error
cd flash-tool error
./INSTALL error
you could publish a video !!
thank you

Is it possible to run it under osx?

/path/to/utils means the directory where you clone utils to.

nick@Nick:~/test$ git clone https://github.com/khadas/utils
Cloning into 'utils'...
remote: Counting objects: 55, done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 55 (delta 10), reused 21 (delta 10), pack-reused 33
Unpacking objects: 100% (55/55), done.
Checking connectivity... done.
nick@Nick:~/test$ cd utils/
nick@Nick:~/test/utils$ cd flash-tool/
nick@Nick:~/test/utils/flash-tool$ ls
docs  fast-burn-vims  flash-tool  INSTALL  rules  tools  UNINSTALL
nick@Nick:~/test/utils/flash-tool$ 


Hi kkkkk,

Not support OSX yet.

Thanks.

It seems linux-x86-64 is mandated so unable to test on Raspbian/Raspberry Pi. And INSTALL requires Ubuntu - I guess could be edited but the x86-64 constraint will stop any trials on linux-ARM?

Hi dukla2000,

It’s only for linux x86-64. There are some binary files like flash-tool/tools/update are x86-64 architecture.

Thanks.

hello,
the directory and the file names have changed apparently, but the instructions here have not been updated, can @numbqq confirm that and eventually fix this problem ?
thank you

Ok, I think I managed to use this tools, at my first try, and after I forced it to accept to run under ubuntu 17.10.
Here are the traces
assuming I’ve installed the app in ~/myapps/khadas-utils,

cd ~/myapps/khadas-utils/aml-flash-tool
sudo aml-burn-tool -i /home/raxy/project/khadas/ubuntu/build/images/khadas_vim_emmc.img

Rebooting the board ........[OK]
Unpacking image [OK]
Initializing ddr ........[OK]
Running u-boot ........[OK]
Create partitions [OK]
Writing device tree [OK]
Writing bootloader [OK]
Wiping  data partition [OK]
Wiping  cache partition [OK]
Writing logo partition [OK]
Writing rootfs partition [OK]
Do you want to reset the board? y/n [n]? y
Resetting board [OK]

Done !

4 Likes

I seem to get:
indent preformatted text by 4 spaces
Installing Amlogic flash-tool…
cat: /etc/lsb-release: No such file or directory

Check out this video, maybe you’ve missed a step somewhere or mis-typed something.

Hello EmattpoYouRebooted,

What’s your host PC OS?

My host PC OS is Chrome OS, on Developer Mode with Linux apps on.

Not tested on Chrome OS, maybe not supported.

Well, I might be the first one to test it! All I am doing is burning Ubuntu 18.10 onto a usb drive to put it into my Chromebook so I can have a better Linux computer!

can this tool totally erase and reformat all the content of the EMMC before burning any official img provided by khadas on its firmare webpage ?
thanks!

Hello ravelo,

Seems not supported. You can use windows burning toool to erase the eMMC.

I can confirm utils works fine with Ubuntu-18.04.3-LTS as well :slight_smile: