Add some stuff
This commit is contained in:
		| @@ -0,0 +1,10 @@ | ||||
| echo Starting Ubuntu... | ||||
| setenv bootargs console=ttySAC0,115200 nosplash mem=2048M@0x80000000 mem=6144M@0x100000000 | ||||
| sata init | ||||
| test -n "$kernel_addr_r" || setenv kernel_addr_r 0x80007000 | ||||
| test -n "$ramdisk_addr_r" || setenv ramdisk_addr_r 0x81000000 | ||||
| test -n "$fdt_addr_r" || setenv fdt_addr_r 0x82000000 | ||||
| ext2load sata 0 $kernel_addr_r uImage | ||||
| ext2load sata 0 $ramdisk_addr_r uInitrd | ||||
| imi $ramdisk_addr_r || setenv ramdisk_addr_r - | ||||
| bootm $kernel_addr_r $ramdisk_addr_r | ||||
| @@ -0,0 +1,65 @@ | ||||
| # Ubuntu Classic RPi U-Boot script (for armhf and arm64) | ||||
|  | ||||
| # Expects to be called with the following environment variables set: | ||||
| # | ||||
| #  devtype              e.g. mmc/scsi etc | ||||
| #  devnum               The device number of the given type | ||||
| #  distro_bootpart      The partition containing the boot files | ||||
| #                       (introduced in u-boot mainline 2016.01) | ||||
| #  prefix               Prefix within the boot partiion to the boot files | ||||
| #  kernel_addr_r        Address to load the kernel to | ||||
| #  fdt_addr_r           Address to load the FDT to | ||||
| #  ramdisk_addr_r       Address to load the initrd to. | ||||
|  | ||||
| # Take fdt addr from the prior stage boot loader, if available | ||||
| if test -n "$fdt_addr"; then | ||||
|   fdt addr ${fdt_addr} | ||||
|   fdt move ${fdt_addr} ${fdt_addr_r}  # implicitly sets fdt active | ||||
| else | ||||
|   fdt addr ${fdt_addr_r} | ||||
| fi | ||||
| fdt get value bootargs /chosen bootargs | ||||
|  | ||||
| setenv bootargs "@@LINUX_KERNEL_CMDLINE_DEFAULTS@@ ${bootargs} @@LINUX_KERNEL_CMDLINE@@" | ||||
| @@UBOOT_ENV_EXTRA@@ | ||||
|  | ||||
| @@UBOOT_PREBOOT_EXTRA@@ | ||||
|  | ||||
| if test -z "${fk_image_locations}"; then | ||||
|   setenv fk_image_locations ${prefix} | ||||
| fi | ||||
|  | ||||
| for pathprefix in ${fk_image_locations}; do | ||||
|   # Store the gzip header (1f 8b) in the kernel area for comparison to the | ||||
|   # header of the image we load. Load "vmlinuz" into the portion of memory for | ||||
|   # the RAM disk (because we want to uncompress to the kernel area if it's | ||||
|   # compressed) and compare the word at the start | ||||
|   mw.w ${kernel_addr_r} 0x8b1f  # little endian | ||||
|   if load ${devtype} ${devnum}:${distro_bootpart} ${ramdisk_addr_r} ${pathprefix}vmlinuz; then | ||||
|     kernel_size=${filesize} | ||||
|     if cmp.w ${kernel_addr_r} ${ramdisk_addr_r} 1; then | ||||
|       # gzip compressed image (NOTE: *not* a self-extracting gzip compressed | ||||
|       # kernel, just a kernel image that has been gzip'd) | ||||
|       echo "Decompressing kernel..." | ||||
|       unzip ${ramdisk_addr_r} ${kernel_addr_r} | ||||
|       setenv kernel_size ${filesize} | ||||
|       setenv try_boot "booti" | ||||
|     else | ||||
|       # Possibly self-extracting or uncompressed; copy data into the kernel area | ||||
|       # and attempt launch with bootz then booti | ||||
|       echo "Copying kernel..." | ||||
|       cp.b ${ramdisk_addr_r} ${kernel_addr_r} ${kernel_size} | ||||
|       setenv try_boot "bootz booti" | ||||
|     fi | ||||
|  | ||||
|     if load ${devtype} ${devnum}:${distro_bootpart} ${ramdisk_addr_r} ${pathprefix}initrd.img; then | ||||
|       setenv ramdisk_param "${ramdisk_addr_r}:${filesize}" | ||||
|     else | ||||
|       setenv ramdisk_param "-" | ||||
|     fi | ||||
|     for cmd in ${try_boot}; do | ||||
|         echo "Booting Ubuntu (with ${cmd}) from ${devtype} ${devnum}:${partition}..." | ||||
|         ${cmd} ${kernel_addr_r} ${ramdisk_param} ${fdt_addr_r} | ||||
|     done | ||||
|   fi | ||||
| done | ||||
| @@ -0,0 +1,56 @@ | ||||
| # Bootscript using the new unified bootcmd handling | ||||
| # | ||||
| # Expects to be called with the following environment variables set: | ||||
| # | ||||
| #  devtype              e.g. mmc/scsi etc | ||||
| #  devnum               The device number of the given type | ||||
| #  bootpart             The partition containing the boot files | ||||
| #  distro_bootpart      The partition containing the boot files | ||||
| #                       (introduced in u-boot mainline 2016.01) | ||||
| #  prefix               Prefix within the boot partiion to the boot files | ||||
| #  kernel_addr_r        Address to load the kernel to | ||||
| #  fdt_addr_r           Address to load the FDT to | ||||
| #  ramdisk_addr_r       Address to load the initrd to. | ||||
| # | ||||
| # The uboot must support the booti and generic filesystem load commands. | ||||
|  | ||||
| if test -n "${console}"; then | ||||
|   setenv bootargs "${bootargs} console=${console}" | ||||
| fi | ||||
|  | ||||
| setenv bootargs @@LINUX_KERNEL_CMDLINE_DEFAULTS@@ ${bootargs} @@LINUX_KERNEL_CMDLINE@@ | ||||
| @@UBOOT_ENV_EXTRA@@ | ||||
|  | ||||
| if test -z "${fk_kvers}"; then | ||||
|    setenv fk_kvers '@@KERNEL_VERSION@@' | ||||
| fi | ||||
|  | ||||
| # These two blocks should be the same apart from the use of | ||||
| # ${fk_kvers} in the first, the syntax supported by u-boot does not | ||||
| # lend itself to removing this duplication. | ||||
|  | ||||
| if test -n "${fdtfile}"; then | ||||
|    setenv fdtpath dtbs/${fk_kvers}/${fdtfile} | ||||
| else | ||||
|    setenv fdtpath dtb-${fk_kvers} | ||||
| fi | ||||
|  | ||||
| if test -z "${distro_bootpart}"; then | ||||
|   setenv partition ${bootpart} | ||||
| else | ||||
|   setenv partition ${distro_bootpart} | ||||
| fi | ||||
|  | ||||
| @@UBOOT_PREBOOT_EXTRA@@ | ||||
|  | ||||
| load ${devtype} ${devnum}:${partition} ${kernel_addr_r} ${prefix}vmlinuz-${fk_kvers} \ | ||||
| && load ${devtype} ${devnum}:${partition} ${fdt_addr_r} ${prefix}${fdtpath} \ | ||||
| && load ${devtype} ${devnum}:${partition} ${ramdisk_addr_r} ${prefix}initrd.img-${fk_kvers} \ | ||||
| && echo "Booting Debian ${fk_kvers} from ${devtype} ${devnum}:${partition}..." \ | ||||
| && booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r} | ||||
|  | ||||
| load ${devtype} ${devnum}:${partition} ${kernel_addr_r} ${prefix}vmlinuz \ | ||||
| && load ${devtype} ${devnum}:${partition} ${fdt_addr_r} ${prefix}dtb \ | ||||
| && load ${devtype} ${devnum}:${partition} ${ramdisk_addr_r} ${prefix}initrd.img \ | ||||
| && echo "Booting Debian from ${devtype} ${devnum}:${partition}..." \ | ||||
| && booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r} | ||||
| @@ -0,0 +1,5 @@ | ||||
| setenv bootargs "console=ttyS0,${baudrate}n8r ro" | ||||
| @@UBOOT_ENV_EXTRA@@ | ||||
| load scsi 0 ${kernel_addr_r} uImage | ||||
| load scsi 0 ${ramdisk_addr_r} uInitrd | ||||
| bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r} | ||||
| @@ -0,0 +1,6 @@ | ||||
| setenv bootargs @@LINUX_KERNEL_CMDLINE_DEFAULTS@@ ${bootargs} @@LINUX_KERNEL_CMDLINE@@ | ||||
| @@UBOOT_ENV_EXTRA@@ | ||||
| ext4load scsi 0 ${kernel_addr_r} uImage | ||||
| ext4load scsi 0 ${ramdisk_addr_r} uInitrd | ||||
| ext4load scsi 0 ${fdt_addr_r} dtb | ||||
| bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r} | ||||
							
								
								
									
										7
									
								
								systems/lctr-a72xx/fs/etc/flash-kernel/db
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								systems/lctr-a72xx/fs/etc/flash-kernel/db
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,7 @@ | ||||
| # To override fields include the Machine field and the fields you wish to | ||||
| # override. | ||||
| # | ||||
| # e.g. to override Boot-Device on the Dreamplug to sdb rather than sda | ||||
| # | ||||
| #Machine: Globalscale Technologies Dreamplug | ||||
| #Boot-Device: /dev/sdb1 | ||||
							
								
								
									
										2
									
								
								systems/lctr-a72xx/fs/etc/flash-kernel/dtbs/README.dtbs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								systems/lctr-a72xx/fs/etc/flash-kernel/dtbs/README.dtbs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| DTB files installed in this directory will be used in preference to | ||||
| the ones shipped with the kernel. | ||||
		Reference in New Issue
	
	Block a user