Skip to content

Commit

Permalink
u-boot: v2017.01-rc1
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Nelson <[email protected]>
  • Loading branch information
RobertCNelson committed Dec 6, 2016
1 parent c71782f commit 8e42256
Show file tree
Hide file tree
Showing 20 changed files with 4,412 additions and 0 deletions.
1,287 changes: 1,287 additions & 0 deletions v2017.01-rc1/0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch

Large diffs are not rendered by default.

105 changes: 105 additions & 0 deletions v2017.01-rc1/0001-at91sam9x5ek-uEnv.txt-bootz-n-fixes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
From 109d44956988f3121d264e451f677df8647411a5 Mon Sep 17 00:00:00 2001
From: Robert Nelson <[email protected]>
Date: Wed, 28 Sep 2016 09:58:30 -0500
Subject: [PATCH] at91sam9x5ek: uEnv.txt, bootz, n fixes

Signed-off-by: Robert Nelson <[email protected]>
---
configs/at91sam9x5ek_mmc_defconfig | 3 ++
include/configs/at91sam9x5ek.h | 58 ++++++++++++++++++++++++++++++--------
2 files changed, 49 insertions(+), 12 deletions(-)

diff --git a/configs/at91sam9x5ek_mmc_defconfig b/configs/at91sam9x5ek_mmc_defconfig
index eb88bbb..ad9e442 100644
--- a/configs/at91sam9x5ek_mmc_defconfig
+++ b/configs/at91sam9x5ek_mmc_defconfig
@@ -16,7 +16,10 @@ CONFIG_CMD_USB=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_DHCP=y
CONFIG_CMD_PING=y
+CONFIG_CMD_EXT2=y
+CONFIG_CMD_EXT4=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_FS_GENERIC=y
CONFIG_CMD_UBI=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_ATMEL=y
diff --git a/include/configs/at91sam9x5ek.h b/include/configs/at91sam9x5ek.h
index edad1dd..3c6aab2 100644
--- a/include/configs/at91sam9x5ek.h
+++ b/include/configs/at91sam9x5ek.h
@@ -117,6 +117,7 @@
#define CONFIG_MMC
#define CONFIG_GENERIC_MMC
#define CONFIG_GENERIC_ATMEL_MCI
+#define CONFIG_SUPPORT_RAW_INITRD
#endif

/* FAT */
@@ -191,18 +192,51 @@
#endif

#ifdef CONFIG_SYS_USE_MMC
-#define CONFIG_BOOTARGS "mem=128M console=ttyS0,115200 " \
- "mtdparts=atmel_nand:" \
- "8M(bootstrap/uboot/kernel)ro,-(rootfs) " \
- "root=/dev/mmcblk0p2 " \
- "rw rootfstype=ext4 rootwait"
-#else
-#define CONFIG_BOOTARGS \
- "console=ttyS0,115200 earlyprintk " \
- "mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro," \
- "256k(env),256k(env_redundant),256k(spare)," \
- "512k(dtb),6M(kernel)ro,-(rootfs) " \
- "rootfstype=ubifs ubi.mtd=7 root=ubi0:rootfs rw"
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ "initrd_high=0xffffffff\0" \
+ "fdt_high=0xffffffff\0" \
+ "loadaddr=0x22000000\0" \
+ "fdtaddr=0x27FF0000\0" \
+ "fdtfile=/dtbs/at91sam9g25ek.dtb\0" \
+ "console=ttyS0,115200n8\0" \
+ "optargs=\0" \
+ "video=\0" \
+ "mmcdev=0\0" \
+ "mmcpart=1\0" \
+ "mmcroot=/dev/mmcblk0p2 ro\0" \
+ "mmcrootfstype=ext4 rootwait\0" \
+ "mmcargs=setenv bootargs console=${console} " \
+ "${optargs} " \
+ "root=${mmcroot} " \
+ "rootfstype=${mmcrootfstype} " \
+ "video=${video}\0" \
+ "loadbootenv=load mmc ${mmcdev}:${mmcpart} ${loadaddr} uEnv.txt\0" \
+ "importbootenv=echo Importing environment from mmc (uEnv.txt)...; " \
+ "env import -t ${loadaddr} ${filesize}\0" \
+ "loadzimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} zImage\0" \
+ "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdtaddr} ${fdtfile}\0" \
+ "mmcboot=echo Booting from mmc ...; " \
+ "run mmcargs; " \
+ "bootz ${loadaddr} - ${fdtaddr}\0"
+
+#define CONFIG_BOOTCOMMAND \
+ "mmc dev ${mmcdev};" \
+ "if mmc rescan; then " \
+ "echo SD/MMC found on device ${mmcdev};" \
+ "if run loadbootenv; then " \
+ "run importbootenv;" \
+ "fi;" \
+ "echo Checking if uenvcmd is set ...;" \
+ "if test -n $uenvcmd; then " \
+ "echo Running uenvcmd ...;" \
+ "run uenvcmd;" \
+ "fi;" \
+ "echo Running default loadzimage ...;" \
+ "if run loadzimage; then " \
+ "run loadfdt;" \
+ "run mmcboot;" \
+ "fi;" \
+ "fi;"
#endif

#define CONFIG_BAUDRATE 115200
--
2.9.3

149 changes: 149 additions & 0 deletions v2017.01-rc1/0001-de0_nano-fixes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
From 9b87177da1720a40857e666619706430382e715f Mon Sep 17 00:00:00 2001
From: Robert Nelson <[email protected]>
Date: Fri, 18 Nov 2016 15:48:35 -0600
Subject: [PATCH] de0_nano fixes

Signed-off-by: Robert Nelson <[email protected]>
---
include/configs/socfpga_de0_nano_soc.h | 111 ++++++++++++++++++++++++++++-----
1 file changed, 96 insertions(+), 15 deletions(-)

diff --git a/include/configs/socfpga_de0_nano_soc.h b/include/configs/socfpga_de0_nano_soc.h
index 6b9546e..bc69bf8 100644
--- a/include/configs/socfpga_de0_nano_soc.h
+++ b/include/configs/socfpga_de0_nano_soc.h
@@ -13,6 +13,7 @@
#define CONFIG_DOS_PARTITION
#define CONFIG_FAT_WRITE
#define CONFIG_HW_WATCHDOG
+#define CONFIG_SUPPORT_RAW_INITRD

/* Memory configurations */
#define PHYS_SDRAM_1_SIZE 0x40000000 /* 1GiB */
@@ -20,7 +21,7 @@
/* Booting Linux */
#define CONFIG_BOOTFILE "fitImage"
#define CONFIG_BOOTARGS "console=ttyS0," __stringify(CONFIG_BAUDRATE)
-#define CONFIG_BOOTCOMMAND "run mmcload; run mmcboot"
+#define CONFIG_BOOTCOMMAND "run mmcboot"
#define CONFIG_LOADADDR 0x01000000
#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR

@@ -34,20 +35,100 @@

/* Extra Environment */
#define CONFIG_EXTRA_ENV_SETTINGS \
- "loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
- "ramboot=setenv bootargs " CONFIG_BOOTARGS ";" \
- "bootm ${loadaddr} - ${fdt_addr}\0" \
- "bootimage=zImage\0" \
- "fdt_addr=100\0" \
- "fdtimage=socfpga.dtb\0" \
- "bootm ${loadaddr} - ${fdt_addr}\0" \
- "mmcroot=/dev/mmcblk0p2\0" \
- "mmcboot=setenv bootargs " CONFIG_BOOTARGS \
- " root=${mmcroot} rw rootwait;" \
- "bootz ${loadaddr} - ${fdt_addr}\0" \
- "mmcload=mmc rescan;" \
- "load mmc 0:1 ${loadaddr} ${bootimage};" \
- "load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \
+ "console=ttyS0,115200\0" \
+ "loadaddr=0x01000000\0" \
+ "fdt_addr=0x07000000\0" \
+ "fdt_file=socfpga_cyclone5_de0_sockit.dtb\0" \
+ "rdaddr=0x07080000\0" \
+ "fpgadata=0x2000000\0" \
+ "devtype=mmc\0" \
+ "optargs=\0" \
+ "cmdline=\0" \
+ "mmcdev=0\0" \
+ "mmcpart=\0" \
+ "mmcroot=/dev/mmcblk0p2 ro\0" \
+ "mmcrootfstype=ext4 rootwait\0" \
+ "mmcargs=setenv bootargs console=${console} " \
+ "${optargs} " \
+ "root=${mmcroot} " \
+ "rootfstype=${mmcrootfstype} " \
+ "${cmdline}\0" \
+ "loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
+ "loadfpga=load ${devtype} ${bootpart} ${fpgadata} ${bootdir}/${fpga_file}; setenv fpgadatasize ${filesize}\0" \
+ "uploadfpga=fpga load 0 ${fpgadata} ${fpgadatasize}\0" \
+ "loadrd=load ${devtype} ${bootpart} ${rdaddr} ${bootdir}/${rdfile}; setenv rdsize ${filesize}\0" \
+ "loadfdt=echo loading ${fdtdir}/${fdt_file} ...; load ${devtype} ${bootpart} ${fdt_addr} ${fdtdir}/${fdt_file}\0" \
+ "mmcboot=${devtype} dev ${mmcdev}; " \
+ "if ${devtype} rescan; then " \
+ "echo Checking for: /boot/uEnv.txt ...;" \
+ "for i in 2 3 4 5 6 7 ; do " \
+ "setenv mmcpart ${i};" \
+ "setenv bootpart ${mmcdev}:${mmcpart};" \
+ "if test -e ${devtype} ${bootpart} /boot/uEnv.txt; then " \
+ "load ${devtype} ${bootpart} ${loadaddr} /boot/uEnv.txt;" \
+ "env import -t ${loadaddr} ${filesize};" \
+ "echo Loaded environment from /boot/uEnv.txt;" \
+ "if test -n ${dtb}; then " \
+ "setenv fdt_file ${dtb};" \
+ "echo Using: dtb=${fdt_file} ...;" \
+ "fi;" \
+ "echo Checking if uname_r is set in /boot/uEnv.txt...;" \
+ "if test -n ${uname_r}; then " \
+ "echo Running uname_boot ...;" \
+ "setenv mmcroot /dev/mmcblk${mmcdev}p${mmcpart} ro;" \
+ "run uname_boot;" \
+ "fi;" \
+ "fi;" \
+ "done;" \
+ "fi;\0" \
+ "uname_boot="\
+ "setenv bootdir /boot; " \
+ "if test -n ${fpgafile}; then " \
+ "setenv fpga_file ${fpgafile};" \
+ "if test -e ${devtype} ${bootpart} ${bootdir}/${fpga_file}; then " \
+ "echo loading ${bootdir}/${fpga_file} ...; "\
+ "run loadfpga;" \
+ "echo uploading to fpga ...; "\
+ "run uploadfpga;" \
+ "echo fpga loading complete ...; "\
+ "fi;" \
+ "fi;" \
+ "setenv bootfile vmlinuz-${uname_r}; " \
+ "if test -e ${devtype} ${bootpart} ${bootdir}/${bootfile}; then " \
+ "echo loading ${bootdir}/${bootfile} ...; "\
+ "run loadimage;" \
+ "setenv fdtdir /boot/dtbs/${uname_r}; " \
+ "if test -e ${devtype} ${bootpart} ${fdtdir}/${fdt_file}; then " \
+ "run loadfdt;" \
+ "else " \
+ "setenv fdtdir /usr/lib/linux-image-${uname_r}; " \
+ "if test -e ${devtype} ${bootpart} ${fdtdir}/${fdt_file}; then " \
+ "run loadfdt;" \
+ "else " \
+ "setenv fdtdir /lib/firmware/${uname_r}/device-tree; " \
+ "if test -e ${devtype} ${bootpart} ${fdtdir}/${fdt_file}; then " \
+ "run loadfdt;" \
+ "fi;" \
+ "fi;" \
+ "fi; " \
+ "setenv rdfile initrd.img-${uname_r}; " \
+ "if test -e ${devtype} ${bootpart} ${bootdir}/${rdfile}; then " \
+ "echo loading ${bootdir}/${rdfile} ...; "\
+ "run loadrd;" \
+ "if test -n ${uuid}; then " \
+ "setenv mmcroot UUID=${uuid} ro;" \
+ "fi;" \
+ "run mmcargs;" \
+ "echo debug: [${bootargs}] ... ;" \
+ "echo debug: [bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdt_addr}] ... ;" \
+ "bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdt_addr}; " \
+ "else " \
+ "run mmcargs;" \
+ "echo debug: [${bootargs}] ... ;" \
+ "echo debug: [bootz ${loadaddr} - ${fdt_addr}] ... ;" \
+ "bootz ${loadaddr} - ${fdt_addr}; " \
+ "fi;" \
+ "fi;\0"

/* The rest of the configuration is shared */
#include <configs/socfpga_common.h>
--
2.10.2

76 changes: 76 additions & 0 deletions v2017.01-rc1/0001-ls1021atwr-fixes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
From 9405e2e4ce516160cfb36ffd36d835c17406e817 Mon Sep 17 00:00:00 2001
From: Robert Nelson <[email protected]>
Date: Mon, 20 Jun 2016 17:05:54 -0500
Subject: [PATCH] ls1021atwr fixes

Signed-off-by: Robert Nelson <[email protected]>
---
include/configs/ls1021atwr.h | 42 +++++++++++++++++++++++++++++++++---------
1 file changed, 33 insertions(+), 9 deletions(-)

diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h
index 0fb28ef..a34f59f 100644
--- a/include/configs/ls1021atwr.h
+++ b/include/configs/ls1021atwr.h
@@ -418,17 +418,40 @@


#ifdef CONFIG_LPUART
-#define CONFIG_EXTRA_ENV_SETTINGS \
- "bootargs=root=/dev/ram0 rw console=ttyLP0,115200\0" \
- "initrd_high=0xffffffff\0" \
- "fdt_high=0xffffffff\0"
+#define CONFIG_CONSOLE_DEV "ttyLP0"
#else
-#define CONFIG_EXTRA_ENV_SETTINGS \
- "bootargs=root=/dev/ram0 rw console=ttyS0,115200\0" \
- "initrd_high=0xffffffff\0" \
- "fdt_high=0xffffffff\0"
+#define CONFIG_CONSOLE_DEV "ttyS0"
#endif

+#ifndef CONFIG_SPL_BUILD
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ "console=" CONFIG_CONSOLE_DEV ",115200\0" \
+ "fdtfile=ls1021a-twr.dtb\0" \
+ "fdt_high=0xffffffff\0" \
+ "initrd_high=0xffffffff\0" \
+ "fdt_addr_r=0x18000000\0" \
+ "fdt_addr=0x18000000\0" \
+ "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
+ "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
+ "pxe_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
+ "ramdisk_addr_r=0x13000000\0" \
+ "ramdiskaddr=0x13000000\0" \
+ "scriptaddr=" __stringify(CONFIG_LOADADDR) "\0" \
+ BOOTENV
+
+#define CONFIG_BOOTCOMMAND \
+ "run distro_bootcmd"
+
+#define BOOT_TARGET_DEVICES(func) \
+ func(MMC, mmc, 0)
+
+#include <config_distro_defaults.h>
+#include <config_distro_bootcmd.h>
+
+#else
+#define CONFIG_EXTRA_ENV_SETTINGS
+#endif /* CONFIG_SPL_BUILD */
+
/*
* Miscellaneous configurable options
*/
@@ -443,7 +466,8 @@
#define CONFIG_SYS_MEMTEST_START 0x80000000
#define CONFIG_SYS_MEMTEST_END 0x9fffffff

-#define CONFIG_SYS_LOAD_ADDR 0x82000000
+#define CONFIG_LOADADDR 0x82000000
+#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR

#define CONFIG_LS102XA_STREAM_ID

--
2.8.1

Loading

0 comments on commit 8e42256

Please sign in to comment.