Skip to content

Commit

Permalink
uenv: r3/r4: update builtin environment
Browse files Browse the repository at this point in the history
  • Loading branch information
frank-w committed Jul 23, 2024
1 parent 37b8ae2 commit 539540c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
16 changes: 10 additions & 6 deletions uEnv_r3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,14 @@ ipaddr=192.168.0.19
netmask=255.255.255.0
serverip=192.168.0.10

lskernel=ls ${device} ${partition};
lstftp=if tftp ${loadaddr} ${serverip}:r3-itbfiles.lst;then setexpr listend ${loadaddr} + ${filesize};mw.b ${listend} 00 2;strings ${loadaddr};else echo "tftp download failed";fi
askkernel=askenv kernelinput "enter kernel-name:";
asksetkernel=run askkernel;if printenv kernelinput; then setenv fit $kernelinput;fi
askbootnetfit=run lstftp askkernel;if printenv kernelinput; then setenv bootfile "${kernelinput}"; run bootnetfit;fi

bootnvme=run usenvme; if test "$device" = "nvme"; then run newboot; fi;
askbootnvme=run usenvme; if test "$device" = "nvme"; then run asksetkernel;run newboot;fi
bootnvme=run usenvme; if test "$device" = "nvme"; then run loadenv; run newboot;fi
askbootnvme=run usenvme; if test "$device" = "nvme"; then run askkernel;if printenv kernelinput; then setenv fit $kernelinput;run newboot;fi;fi

bootnetfit=run buildargs;run setbootconf;if tftp $kaddr ${bootfile}; then bootm ${kaddr}${bootconf};;fi
bootfile=bpi-r3.itb

checkenv=test -e ${device} ${partition} ${bootenv}
Expand Down Expand Up @@ -80,11 +79,16 @@ wrfitnor=if printenv fitfile;then if fatload $device $partition ${loadaddr} ${fi

bootdelay=0
bootcmd=setenv bootdelay 3; run loadenv;bootmenu;
boot0=run lskernel;run asksetkernel; run newboot;

##untested
lskernel=ls ${device} ${partition};
askkernel=askenv kernelinput "enter kernel name:";

boot0=run lskernel;run askkernel;if printenv kernelinput ;then setenv fit ${kernelinput}; run newboot; fi;

bootmenu_0=1. Enter kernel-name to boot from SD/EMMC.=run boot0
bootmenu_1=2. Boot kernel from TFTP.=run askbootnetfit
bootmenu_2=3. Boot from SD/EMMC.=run newboot
bootmenu_3=4. Boot kernel from NVME.=run askbootnvme
bootmenu_3=4. Boot kernel from NVME.=run bootnvme

bootmenu_default=2
12 changes: 7 additions & 5 deletions uEnv_r4.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ fit=bpi-r4.itb
#initrd=rootfs.cpio.zst

loadaddr=0x46000000
uaddr=0x41e00000
kaddr=0x46000000
rdaddr=0x48000000

Expand All @@ -30,15 +31,13 @@ ipaddr=192.168.0.19
netmask=255.255.255.0
serverip=192.168.0.10

lskernel=ls ${device} ${partition};
lstftp=if tftp ${loadaddr} ${serverip}:r4-itbfiles.lst;then setexpr listend ${loadaddr} + ${filesize};mw.b ${listend} 00 2;strings ${loadaddr};else echo "tftp download failed";fi
askkernel=askenv kernelinput "enter kernel-name:";
asksetkernel=run askkernel;if printenv kernelinput; then setenv fit $kernelinput;fi
askbootnetfit=run lstftp askkernel;if printenv kernelinput; then setenv bootfile "${kernelinput}"; run bootnetfit;fi

bootnvme=run usenvme; if test "$device" = "nvme"; then run newboot; fi;
askbootnvme=run usenvme; if test "$device" = "nvme"; then run asksetkernel;run newboot;fi
askbootnvme=run usenvme; if test "$device" = "nvme"; then run askkernel;if printenv kernelinput; then setenv fit $kernelinput;run newboot;fi;fi

bootnetfit=run buildargs;if tftp $kaddr ${bootfile}; then bootm $kaddr;fi
bootfile=bpi-r4.itb

checkenv=test -e ${device} ${partition} ${bootenv}
Expand Down Expand Up @@ -69,7 +68,10 @@ wremmc=if printenv bl2file;then mmc partconf 0 1 1 1;if fatload $device $partiti
bootdelay=0
bootcmd=setenv bootdelay 3; run loadenv;bootmenu;

boot0=run lskernel;run asksetkernel; run newboot;
lskernel=ls ${device} ${partition};
askkernel=askenv kernelinput "enter kernel name:";

boot0=run lskernel;run askkernel;if printenv kernelinput ;then setenv fit ${kernelinput}; run newboot; fi;

bootmenu_0=1. Enter kernel-name to boot from SD/EMMC.=run boot0
bootmenu_1=2. Boot kernel from TFTP.=run askbootnetfit
Expand Down

0 comments on commit 539540c

Please sign in to comment.