chore(lab01): bootloader scripts (cifs and net)
This commit is contained in:
5
boot-scripts/Makefile
Normal file
5
boot-scripts/Makefile
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
boot.cifs: boot_cifs.cmd
|
||||||
|
mkimage -T script -A arm -C none -d boot_cifs.cmd boot.cifs
|
||||||
|
|
||||||
|
boot.net: boot_net.cmd
|
||||||
|
mkimage -T script -A arm -C none -d boot_net.cmd boot.net
|
||||||
12
boot-scripts/boot_cifs.cmd
Normal file
12
boot-scripts/boot_cifs.cmd
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
setenv ipaddr 192.168.53.14
|
||||||
|
setenv serverip 192.168.53.4
|
||||||
|
setenv netmask 255.255.255.0
|
||||||
|
setenv gatewayip 192.168.53.4
|
||||||
|
setenv hostname myhost
|
||||||
|
setenv mountpath rootfs
|
||||||
|
setenv bootargs console=ttyS0,115200 earlyprintk rootdelay=1 root=/dev/cifs rw cifsroot=//$serverip/$mountpath,username=root,password=toor,port=1445 ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname::off
|
||||||
|
|
||||||
|
fatload mmc 0 $kernel_addr_r Image
|
||||||
|
fatload mmc 0 $fdt_addr_r nanopi-neo-plus2.dtb
|
||||||
|
|
||||||
|
booti $kernel_addr_r - $fdt_addr_r
|
||||||
18
boot-scripts/boot_net.cmd
Normal file
18
boot-scripts/boot_net.cmd
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
setenv ipaddr 192.168.53.14
|
||||||
|
setenv serverip 192.168.53.4
|
||||||
|
setenv netmask 255.255.255.0
|
||||||
|
setenv gatewayip 192.168.53.4
|
||||||
|
setenv hostname myhost
|
||||||
|
setenv mountpath rootfs
|
||||||
|
setenv tftppath output/images
|
||||||
|
setenv bootargs console=ttyS0,115200 earlyprintk rootdelay=1 root=/dev/cifs rw cifsroot=//$serverip/$mountpath,username=root,password=toor,port=1445 ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname::off
|
||||||
|
|
||||||
|
usb start
|
||||||
|
ping $serverip
|
||||||
|
|
||||||
|
setenv kernel_comp_addr_r 0x50000000
|
||||||
|
tftp $kernel_comp_addr_r $serverip:$tftppath/Image.gz
|
||||||
|
unzip $kernel_comp_addr_r $kernel_addr_r
|
||||||
|
tftp $fdt_addr_r $serverip:$tftppath/nanopi-neo-plus2.dtb
|
||||||
|
|
||||||
|
booti $kernel_addr_r - $fdt_addr_r
|
||||||
Reference in New Issue
Block a user