1
0

chore(lab01): bootloader scripts (cifs and net)

This commit is contained in:
2026-02-28 16:17:08 +01:00
committed by Klagarge
parent e24ef885d6
commit 7ec179071e
3 changed files with 35 additions and 0 deletions

5
boot-scripts/Makefile Normal file
View 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

View 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
View 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