Skip to content

Commit

Permalink
Update boot files for vplus
Browse files Browse the repository at this point in the history
  • Loading branch information
ophub committed Feb 25, 2023
1 parent 1289ef2 commit c2d5959
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#-----------------------------------------------------------------
# Armbian first run configuration
# Set optional end user configuration
# - Rename this file from /boot/armbian_first_run.txt.template to /boot/armbian_first_run.txt
# - Settings below will be applied only on 1st run of Armbian
#-----------------------------------------------------------------

#-----------------------------------------------------------------
# General:
# 1 = delete this file, after first run setup is completed.

FR_general_delete_this_file_after_completion=1

#-----------------------------------------------------------------
#Networking:
# Change default network settings
# Set to 1 to apply any network related settings below

FR_net_change_defaults=0

# Enable WiFi or Ethernet.
# NB: If both are enabled, WiFi will take priority and Ethernet will be disabled.

FR_net_ethernet_enabled=1
FR_net_wifi_enabled=0

#Enter your WiFi creds
# SECURITY WARN: Your wifi keys will be stored in plaintext, no encryption.

FR_net_wifi_ssid='MySSID'
FR_net_wifi_key='MyWiFiKEY'

# Country code to enable power ratings and channels for your country. eg: GB US DE | https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2

FR_net_wifi_countrycode='GB'

#If you want to use a static ip, set it here

FR_net_use_static=0
FR_net_static_ip='192.168.0.100'
FR_net_static_mask='255.255.255.0'
FR_net_static_gateway='192.168.0.1'
FR_net_static_dns='8.8.8.8 8.8.4.4' #2 entries max, seperated by a space.
#-----------------------------------------------------------------
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
echo "Start running sunxi mainline u-boot"
#setenv loadaddr "0x42000000"
#setenv kernel_addr_r "0x40080000"
#setenv ramdisk_addr_r "0x4FF00000"
#setenv fdt_addr_r "0x4FA00000"
setenv dev_nums "0 1 2 3"
for devtype in "usb mmc" ; do
for devnum in ${dev_nums} ; do
if test -e ${devtype} ${devnum} uEnv.txt; then
load ${devtype} ${devnum} ${loadaddr} uEnv.txt
env import -t ${loadaddr} ${filesize}
setenv bootargs ${APPEND}
if printenv ethaddr; then
setenv bootargs ${bootargs} mac=${ethaddr}
elif printenv eth_mac; then
setenv bootargs ${bootargs} mac=${eth_mac}
elif printenv mac; then
setenv bootargs ${bootargs} mac=${mac}
fi
if load ${devtype} ${devnum} ${kernel_addr_r} ${LINUX}; then
if load ${devtype} ${devnum} ${ramdisk_addr_r} ${INITRD}; then
if load ${devtype} ${devnum} ${fdt_addr_r} ${FDT}; then
fdt addr ${fdt_addr_r}
booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}
fi
fi
fi
fi
done
done
# Recompile with:
# mkimage -C none -A arm -T script -d boot.cmd boot.scr
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
echo "Start running sunxi mainline u-boot"
#setenv loadaddr "0x42000000"
#setenv kernel_addr_r "0x40080000"
#setenv ramdisk_addr_r "0x4FF00000"
#setenv fdt_addr_r "0x4FA00000"
setenv dev_nums "0 1 2 3"
echo "start mainline u-boot"
setenv loadaddr "0x44000000"
setenv l_mmc "0 1 2 3"
for devtype in "usb mmc" ; do
for devnum in ${dev_nums} ; do
if test "${devtype}" = "mmc"; then
setenv l_mmc "0"
fi
for devnum in ${l_mmc} ; do
if test -e ${devtype} ${devnum} uEnv.txt; then
load ${devtype} ${devnum} ${loadaddr} uEnv.txt
env import -t ${loadaddr} ${filesize}
setenv bootargs ${APPEND}
if printenv ethaddr; then
setenv bootargs ${bootargs} mac=${ethaddr}
if printenv mac; then
setenv bootargs ${bootargs} mac=${mac}
elif printenv eth_mac; then
setenv bootargs ${bootargs} mac=${eth_mac}
elif printenv mac; then
setenv bootargs ${bootargs} mac=${mac}
elif printenv ethaddr; then
setenv bootargs ${bootargs} mac=${ethaddr}
fi
if load ${devtype} ${devnum} ${kernel_addr_r} ${LINUX}; then
if load ${devtype} ${devnum} ${ramdisk_addr_r} ${INITRD}; then
Expand All @@ -28,5 +28,3 @@ for devtype in "usb mmc" ; do
fi
done
done
# Recompile with:
# mkimage -C none -A arm -T script -d boot.cmd boot.scr
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ APPEND=root=${uenv_mount_string} console=ttyS0,115200n8 no_console_suspend conso
EOF

#mv -f ${DIR_INSTALL}/boot-emmc.scr ${DIR_INSTALL}/boot.scr
#mv -f ${DIR_INSTALL}/boot-emmc.cmd ${DIR_INSTALL}/boot.cmd
mv -f ${DIR_INSTALL}/boot-emmc.scr ${DIR_INSTALL}/boot.scr
mv -f ${DIR_INSTALL}/boot-emmc.cmd ${DIR_INSTALL}/boot.cmd

sync && sleep 3
umount -f ${DIR_INSTALL}
Expand Down

0 comments on commit c2d5959

Please sign in to comment.