mirror of
				git://git.openwrt.org/openwrt/openwrt.git
				synced 2025-11-03 22:44:27 -05:00 
			
		
		
		
	mvebu: Add bootscript for espressobin to support mainline firmware
The generic bootscript is tailored around a downstream firmware and doesn't work on a firmware built from mainline components. Add a bootscript which: * sets $console since mainline u-boot doesn't do that * uses distro boot variables, so OpenWRT can be booted off any supported device when using a mainline firmware * sets missing distro boot variables for the downstream firmware Booting with a downstream firmware is unchanged. Booting with a mainline firmware now works. Signed-off-by: Andre Heider <a.heider@gmail.com>
This commit is contained in:
		
							parent
							
								
									7c0496f29b
								
							
						
					
					
						commit
						c43b45863e
					
				@ -15,6 +15,7 @@ define Device/globalscale_espressobin
 | 
			
		||||
  DEVICE_ALT0_MODEL := Armada 3700 Community Board
 | 
			
		||||
  DEVICE_ALT0_VARIANT := Non-eMMC
 | 
			
		||||
  SOC := armada-3720
 | 
			
		||||
  BOOT_SCRIPT := espressobin
 | 
			
		||||
endef
 | 
			
		||||
TARGET_DEVICES += globalscale_espressobin
 | 
			
		||||
 | 
			
		||||
@ -27,6 +28,7 @@ define Device/globalscale_espressobin-emmc
 | 
			
		||||
  DEVICE_ALT0_MODEL := Armada 3700 Community Board
 | 
			
		||||
  DEVICE_ALT0_VARIANT := eMMC
 | 
			
		||||
  SOC := armada-3720
 | 
			
		||||
  BOOT_SCRIPT := espressobin
 | 
			
		||||
endef
 | 
			
		||||
TARGET_DEVICES += globalscale_espressobin-emmc
 | 
			
		||||
 | 
			
		||||
@ -39,6 +41,7 @@ define Device/globalscale_espressobin-v7
 | 
			
		||||
  DEVICE_ALT0_MODEL := Armada 3700 Community Board
 | 
			
		||||
  DEVICE_ALT0_VARIANT := V7 Non-eMMC
 | 
			
		||||
  SOC := armada-3720
 | 
			
		||||
  BOOT_SCRIPT := espressobin
 | 
			
		||||
endef
 | 
			
		||||
TARGET_DEVICES += globalscale_espressobin-v7
 | 
			
		||||
 | 
			
		||||
@ -51,6 +54,7 @@ define Device/globalscale_espressobin-v7-emmc
 | 
			
		||||
  DEVICE_ALT0_MODEL := Armada 3700 Community Board
 | 
			
		||||
  DEVICE_ALT0_VARIANT := V7 eMMC
 | 
			
		||||
  SOC := armada-3720
 | 
			
		||||
  BOOT_SCRIPT := espressobin
 | 
			
		||||
endef
 | 
			
		||||
TARGET_DEVICES += globalscale_espressobin-v7-emmc
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										34
									
								
								target/linux/mvebu/image/espressobin.bootscript
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								target/linux/mvebu/image/espressobin.bootscript
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,34 @@
 | 
			
		||||
# Bootscript for Globalscale ESPRESSOBin Board
 | 
			
		||||
 | 
			
		||||
# Set distro variables if necessary for compability with downstream firmware
 | 
			
		||||
if test -z "${kernel_addr_r}"; then
 | 
			
		||||
	setenv kernel_addr_r 0x7000000
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if test -z "${fdt_add_r}"; then
 | 
			
		||||
	setenv fdt_addr_r 0x6f00000
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if test -z "${devtype}"; then
 | 
			
		||||
	setenv devtype mmc
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if test -z "${devnum}"; then
 | 
			
		||||
	if mmc dev 0; then
 | 
			
		||||
		setenv devnum 0
 | 
			
		||||
	elif mmc dev 1; then
 | 
			
		||||
		setenv devnum 1
 | 
			
		||||
	fi
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# figure out partition uuid to pass to the kernel as root=
 | 
			
		||||
part uuid ${devtype} ${devnum}:2 uuid
 | 
			
		||||
 | 
			
		||||
setenv console "console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000"
 | 
			
		||||
setenv bootargs "root=PARTUUID=${uuid} rw rootwait ${console}"
 | 
			
		||||
 | 
			
		||||
echo "Booting Linux from ${devtype} ${devnum} with args: ${bootargs}"
 | 
			
		||||
load ${devtype} ${devnum}:1 ${fdt_addr_r} @DTB@.dtb
 | 
			
		||||
load ${devtype} ${devnum}:1 ${kernel_addr_r} Image
 | 
			
		||||
 | 
			
		||||
booti ${kernel_addr_r} - ${fdt_addr_r}
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user