From LORIX One - Wiki
The SAM-BA tool is availlable at www.lorixone.io/devel/tools/sam-ba, choose the right archive according to your host OS and decompress it.
The sam-ba binary is ready to use and need a config file containing the serial port (over USB) to use and the various image file to program.
The image files you can program are either generated using Yocto or using the latest image files generated by Wifx under our image archives repository for NAND images www.lorixone.io/yocto/images/2.1.2/nand/.
There is now 2 versions of the NAND image: one for the 256MB NAND version and one for the 512MB NAND version.
Please take a look a the versions page to know more about these two versions.
Extract and configure the workspace
Create a root directory and extract the sam-ba source archive in it. Create at the same level a directory named sources_ which will contain the image binaries to be programmed. Add in the root directory the config file as well nandflash-usb-lorixone-.qml.
You should finally have something like that:
256MB NAND Version
| +---sources_256 | at91-sama5d4_lorix_one.dtb | at91bootstrap.bin
512MB NAND Version
| +---sources_512 | at91-sama5d4_lorix_one.dtb | at91bootstrap.bin
The sources directory contains for example the binaries generated with Yocto.
Be sure you don't have any bootable SD card inside the slot before switching to programming mode. The bootloader will automatically jump to the boot binary found on the SD card if discovered and programming will be simply impossible.
First of all, we need to put the gateway in programming mode. To do that, and as explained in the user manual (§5.1), you have to press shortly 3 times on the reset button and keep pressed the third time for at least 3 seconds (until the LED status flashes):
Connect the gateway to your PC with an USB A-miniB cable, power it and launch the programming using the following command from the root directory:
For 256MB NAND version: .\sam-ba_3.1.4\sam-ba.exe -x .\nandflash-usb-lorixone-256.qml For 512MB NAND version: .\sam-ba_3.1.4\sam-ba.exe -x .\nandflash-usb-lorixone-512.qml
For 256MB NAND version: sudo ./sam-ba_3.1.4/sam-ba -x ./nandflash-usb-lorixone-256.qml For 512MB NAND version: sudo ./sam-ba_3.1.4/sam-ba -x ./nandflash-usb-lorixone-512.qml
The progress percentage will be updated in real time and the status displayed clearly. When programming is complete, the gateway can simply be restarted using the reset button with one press.