Initial Commit
This commit is contained in:
		
						commit
						fb6a8dfc7c
					
				
					 5 changed files with 95 additions and 0 deletions
				
			
		
							
								
								
									
										7
									
								
								README.md
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								README.md
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,7 @@
 | 
				
			||||||
 | 
					# U-boot for Utilte
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					This is some work I've on my (now perished) Utilite:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					https://en.wikipedia.org/wiki/Utilite
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Probably no longer useful but some some sentimental value so here it is.
 | 
				
			||||||
							
								
								
									
										5
									
								
								boot-geexbox.uboot
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								boot-geexbox.uboot
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,5 @@
 | 
				
			||||||
 | 
					# You will need to create an empty 'geexbox' directory under your boot file-system on the USB, for this setup to work
 | 
				
			||||||
 | 
					dtbaddr=15000000
 | 
				
			||||||
 | 
					usbdev=0
 | 
				
			||||||
 | 
					bootgeex=setenv dtb imx6q-sbc-fx6m.dtb;setenv zimage zImage;if fatload usb ${usbdev} ${loadaddr} ${zimage}; then setenv bootargs console=ttymxc3,115200 root=/dev/sdb2 rootwait rw  video=mxcfb0:dev=hdmi,1920x1080@60,if=RGB24,bpp=16 consoleblank=0 cm_fx6_v4l dmfc=3 mxc_vout.vdi_rate_double=1;fatload usb ${usbdev} ${dtbaddr} ${dtb};fi;bootz ${loadaddr} - ${dtbaddr}
 | 
				
			||||||
 | 
					bootcmd=run setupmmcboot;mmc dev ${storagedev};if mmc rescan; then run trybootsrz;fi;run setupusbboot;if usb start; then if fatls usb ${usbdev} geexbox; then run bootgeex;fi;if run loadscript; then run bootscript;else run usbbootargs;if run loadkernel; then run doboot;else setenv bootargs;fi;fi;fi; run setupsataboot;if sata init; then run trybootsmz;fi;run setupnandboot;run nandboot;
 | 
				
			||||||
							
								
								
									
										4
									
								
								setup-usb-boot-utilite.uboot
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								setup-usb-boot-utilite.uboot
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,4 @@
 | 
				
			||||||
 | 
					bootcmd=run setupmmcboot;mmc dev ${storagedev};if mmc rescan; then run trybootsrz;fi;run setupusbboot;if usb start; then if run loadscript; then run bootscript;else run usbbootargs;if run loadkernel; then run doboot;else setenv bootargs;fi;fi;fi; run setupsataboot;if sata init; then run trybootsmz;fi;run setupnandboot;run nandboot;
 | 
				
			||||||
 | 
					usbroot=/dev/sdb2
 | 
				
			||||||
 | 
					usbrootdelay=1
 | 
				
			||||||
 | 
					usbbootargs=setenv bootargs root=${usbroot} rootdelay=${usbrootdelay}
 | 
				
			||||||
							
								
								
									
										34
									
								
								u-boot-update-env.sh
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										34
									
								
								u-boot-update-env.sh
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
					@ -0,0 +1,34 @@
 | 
				
			||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# This script will accept a text file with standard u-boot commands and 
 | 
				
			||||||
 | 
					# load it to the U-Boot environment. The original environment is saved
 | 
				
			||||||
 | 
					# in a backup file in the current directory
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
 | 
				
			||||||
 | 
					BACKUP_FILE=u-boot_env-$$.bak
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ -z "$1" ]; then
 | 
				
			||||||
 | 
					    echo "Usage: $0 U-BOOT_ENV_FILE"
 | 
				
			||||||
 | 
					    exit 1
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Backup existing U-Boot environment
 | 
				
			||||||
 | 
					env fw_printenv > $BACKUP_FILE || exit 2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Check if the ethaddr variable is defined
 | 
				
			||||||
 | 
					ethaddr=$(fw_printenv ethaddr 2> /dev/null)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					while read line
 | 
				
			||||||
 | 
					do
 | 
				
			||||||
 | 
					    # Suppress the ethaddr overwrite warning
 | 
				
			||||||
 | 
					    [ -z "$ethaddr"] && [[ "$line" =~ "ethaddr" ]] && continue
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # ignore comments starting with '#'
 | 
				
			||||||
 | 
					    if [[ "$line" == *'#'* ]]; then
 | 
				
			||||||
 | 
					        line=$(echo $line | cut -d\# -f1)
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if [[ $line  = *[^[:space:]]* ]]; then
 | 
				
			||||||
 | 
					        env fw_setenv $(echo $line | sed 's/=/ /') || exit 3
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					done < "$1"
 | 
				
			||||||
							
								
								
									
										45
									
								
								u-boot_utilite.env.orig
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								u-boot_utilite.env.orig
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,45 @@
 | 
				
			||||||
 | 
					autoload=no
 | 
				
			||||||
 | 
					baudrate=115200
 | 
				
			||||||
 | 
					bootcmd=run setupmmcboot;mmc dev ${storagedev};if mmc rescan; then run trybootsmz;fi;run setupusbboot;if usb start; then if run loadscript; then run bootscript;fi;fi;run setupsataboot;if sata init; then run trybootsmz;fi;run setupnandboot;run nandboot;
 | 
				
			||||||
 | 
					bootdelay=2
 | 
				
			||||||
 | 
					bootm_low=18000000
 | 
				
			||||||
 | 
					bootscript=echo Running bootscript from ${storagetype} ...;source ${loadaddr};
 | 
				
			||||||
 | 
					console=ttymxc3,115200
 | 
				
			||||||
 | 
					doboot=bootm ${loadaddr}
 | 
				
			||||||
 | 
					doloadfdt=false
 | 
				
			||||||
 | 
					dtb=cm-fx6.dtb
 | 
				
			||||||
 | 
					ethprime=FEC0
 | 
				
			||||||
 | 
					fdtaddr=0x11000000
 | 
				
			||||||
 | 
					kernel=uImage-cm-fx6
 | 
				
			||||||
 | 
					loadaddr=0x10800000
 | 
				
			||||||
 | 
					loadfdt=load ${storagetype} ${storagedev} ${fdtaddr} ${dtb};
 | 
				
			||||||
 | 
					loadkernel=load ${storagetype} ${storagedev} ${loadaddr} ${kernel};
 | 
				
			||||||
 | 
					loadscript=load ${storagetype} ${storagedev} ${loadaddr} ${script};
 | 
				
			||||||
 | 
					mmcargs=setenv bootargs console=${console} root=${mmcroot} ${video}
 | 
				
			||||||
 | 
					mmcroot=/dev/mmcblk0p2 rw rootwait
 | 
				
			||||||
 | 
					nandargs=setenv bootargs console=${console} root=${nandroot} rootfstype=${nandrootfstype} ${video}
 | 
				
			||||||
 | 
					nandboot=if run nandloadkernel; then run nandloadfdt;run setboottypem;run storagebootcmd;run setboottypez;run storagebootcmd;fi;
 | 
				
			||||||
 | 
					nandloadfdt=nand read ${fdtaddr} 780000 80000;
 | 
				
			||||||
 | 
					nandloadkernel=nand read ${loadaddr} 0 780000;
 | 
				
			||||||
 | 
					nandroot=/dev/mtdblock4 rw
 | 
				
			||||||
 | 
					nandrootfstype=ubifs
 | 
				
			||||||
 | 
					panel=HDMI
 | 
				
			||||||
 | 
					preboot=usb start
 | 
				
			||||||
 | 
					run_eboot=echo Starting EBOOT ...; mmc dev 2 && mmc rescan && mmc read 10042000 a 400 && go 10042000
 | 
				
			||||||
 | 
					sataargs=setenv bootargs console=${console} root=${sataroot} ${video}
 | 
				
			||||||
 | 
					sataroot=/dev/sda2 rw rootwait
 | 
				
			||||||
 | 
					script=boot.scr
 | 
				
			||||||
 | 
					setboottypem=setenv kernel uImage-cm-fx6;setenv doboot bootm ${loadaddr};setenv doloadfdt false;
 | 
				
			||||||
 | 
					setboottypez=setenv kernel zImage-cm-fx6;setenv doboot bootz ${loadaddr} - ${fdtaddr};setenv doloadfdt true;
 | 
				
			||||||
 | 
					setupmmcboot=setenv storagetype mmc; setenv storagedev 2;
 | 
				
			||||||
 | 
					setupnandboot=setenv storagetype nand;
 | 
				
			||||||
 | 
					setupsataboot=setenv storagetype sata; setenv storagedev 0;
 | 
				
			||||||
 | 
					setupusbboot=setenv storagetype usb; setenv storagedev 0;
 | 
				
			||||||
 | 
					stderr=serial,vga
 | 
				
			||||||
 | 
					stdin=serial,usbkbd
 | 
				
			||||||
 | 
					stdout=serial,vga
 | 
				
			||||||
 | 
					storagebootcmd=echo Booting from ${storagetype} ...;run ${storagetype}args; run doboot;
 | 
				
			||||||
 | 
					trybootk=if run loadkernel; then if ${doloadfdt}; then run loadfdt;fi;run storagebootcmd;fi;
 | 
				
			||||||
 | 
					trybootsmz=if run loadscript; then run bootscript;fi;run setboottypem;run trybootk;run setboottypez;run trybootk;
 | 
				
			||||||
 | 
					video_dvi=mxcfb0:dev=dvi,1280x800M-32@50,if=RGB32
 | 
				
			||||||
 | 
					video_hdmi=mxcfb0:dev=hdmi,1920x1080M-32@50,if=RGB32
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue