3. Downloading
and programming in the system
3.1 How to program via tftp under uboot?
We may use tftp to download when programming
from the internet. Example code:
Configure the IP under uboot:
setenv ipaddr 192.168.30.106 (example only)
setenv serverip 192.168.30.103 (example only)
setenv ethaddr 00:01:03:A0:03:11 (example only)
saveenv
kernel:
tftp ${loadaddr}
zImage-myd-y6ull
nand erase
0x600000 0xA00000 //to erase
nand write
${loadaddr} 0x600000 0xA00000 //to
write
dtb:
tftp
${fdt_addr} zImage-myd-y6ull-14x14-gpmi-weim.dtb
nand erase
0x1000000 0x100000
nand write
${fdt_addr} 0x1000000 0x100000
rootfs:
tftp
0x85000000 rootfs.ubi (ubi file system)
nand erase
0x1100000 0x9000000
nand write.e
0x85000000 0x1100000 0x9000000
Please note above address bits are examples only, you may modify
according to the partition of your PC.
3.2 When updating OS via SD card or programming with mfgtool, how to
replace the files?
When making the files in the SD card to
update OS, please choose relevant “mfgimages-myd*” folder. There is a file
named “Manifest” in each folder. In the file “Manifest” we can find the naming
rules of uboot, kernel, dtb and file system.
When moving new files to “mfgimages-myd*”
folder, naming rules from “Manifest” must be obeyed.
When programming with mfgtool in Windows, the
new uboot, kernel, dtb, file system files should be move to “MYD-Y6ULX-mfgtools-20180810\Profiles\Linux\OS
Firmware\files”.
3.3 How to transfer files between Windows PC /
Ubuntu and the development board?
-
How
to connect Ubuntu to the Internet?
Run Oracle VM VirtualBox (this is what I am
using, you may use other VirtualBox). Open the settings in the supervisor,
choose network, enable network connection, connection type: bridge network
card, the name of the interface: Select by actual occurrence.
If you want ubuntu to use fixed IP, you may set
it up in “Ubuntu/etc/network/interface”.
Reference:
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
auto enp0s3
iface enp0s3 inet static
address 192.168.30.109
netmask 255.255.255.0
getway 192.168.30.1
-
How
to transfer files between Windows PC and the development board?
The board and PC should be connected to the same
network.
Install tftpd64.exe software on the PC.
Current Directory, choose the path to upload
files.
Server interface, choose the IP of PC. Execute “tftp
192.168.1.153 -g -r test.sh” in Xshell when downloading files to the board.
Execute “tftp 192.168.1.153 -p -r test.sh” when upload files from the board to
PC.
3-3-1 tftpd64
Server configuration
-
How
to transfer files between Ubuntu and the development board?
The board and Ubuntu should be connected to the
same network.
Execute scp file to transfer files:
“scp -r /home/roy/rs485
root@192.168.1.223:/home/root”.
Tips: this command means copy folder
ubuntu/home/roy/rs485 to directory /home/root of board with IP 192.168.1.223.
|