aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot/uboot-oxnas/patches
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2014-11-26 09:00:17 +0000
committerJohn Crispin <blogic@openwrt.org>2014-11-26 09:00:17 +0000
commit10bfe12b380e4a498b9447ee2fa35ab53539789a (patch)
treebd18a477f47a11b35f143cd550833ddb4e15572b /package/boot/uboot-oxnas/patches
parent7d4dfd7dd7ce1ac02d84ad7482e3f7d168d61ec9 (diff)
downloadupstream-10bfe12b380e4a498b9447ee2fa35ab53539789a.tar.gz
upstream-10bfe12b380e4a498b9447ee2fa35ab53539789a.tar.bz2
upstream-10bfe12b380e4a498b9447ee2fa35ab53539789a.zip
add uboot-oxnas
This adds support for the oxnas target in U-Boot 2014.04 History can be found at https://github.com/kref/u-boot-oxnas up to 2013.10 changes from 2013.10 to 2014.04 can be followed at https://gitorious.org/openwrt-oxnas Signed-off-by: Daniel Golle <daniel@makrotopia.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43389 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/boot/uboot-oxnas/patches')
-rw-r--r--package/boot/uboot-oxnas/patches/150-spl-block.patch54
-rw-r--r--package/boot/uboot-oxnas/patches/300-oxnas-target.patch99
-rw-r--r--package/boot/uboot-oxnas/patches/800-fix-bootm-assertion.patch13
3 files changed, 166 insertions, 0 deletions
diff --git a/package/boot/uboot-oxnas/patches/150-spl-block.patch b/package/boot/uboot-oxnas/patches/150-spl-block.patch
new file mode 100644
index 0000000000..a258f3fe0c
--- /dev/null
+++ b/package/boot/uboot-oxnas/patches/150-spl-block.patch
@@ -0,0 +1,54 @@
+--- a/common/spl/Makefile
++++ b/common/spl/Makefile
+@@ -19,4 +19,5 @@ obj-$(CONFIG_SPL_MMC_SUPPORT) += spl_mmc
+ obj-$(CONFIG_SPL_USB_SUPPORT) += spl_usb.o
+ obj-$(CONFIG_SPL_FAT_SUPPORT) += spl_fat.o
+ obj-$(CONFIG_SPL_SATA_SUPPORT) += spl_sata.o
++obj-$(CONFIG_SPL_BLOCK_SUPPORT) += spl_block.o
+ endif
+--- a/common/spl/spl.c
++++ b/common/spl/spl.c
+@@ -191,6 +191,14 @@ void board_init_r(gd_t *dummy1, ulong du
+ spl_spi_load_image();
+ break;
+ #endif
++#ifdef CONFIG_SPL_BLOCK_SUPPORT
++ case BOOT_DEVICE_BLOCK:
++ {
++ extern void spl_block_load_image(void);
++ spl_block_load_image();
++ break;
++ }
++#endif
+ #ifdef CONFIG_SPL_ETH_SUPPORT
+ case BOOT_DEVICE_CPGMAC:
+ #ifdef CONFIG_SPL_ETH_DEVICE
+--- a/common/cmd_nvedit.c
++++ b/common/cmd_nvedit.c
+@@ -47,6 +47,7 @@ DECLARE_GLOBAL_DATA_PTR;
+ !defined(CONFIG_ENV_IS_IN_SPI_FLASH) && \
+ !defined(CONFIG_ENV_IS_IN_REMOTE) && \
+ !defined(CONFIG_ENV_IS_IN_UBI) && \
++ !defined(CONFIG_ENV_IS_IN_EXT4) && \
+ !defined(CONFIG_ENV_IS_NOWHERE)
+ # error Define one of CONFIG_ENV_IS_IN_{EEPROM|FLASH|DATAFLASH|ONENAND|\
+ SPI_FLASH|NVRAM|MMC|FAT|REMOTE|UBI} or CONFIG_ENV_IS_NOWHERE
+--- a/common/Makefile
++++ b/common/Makefile
+@@ -45,6 +45,7 @@ obj-$(CONFIG_ENV_IS_IN_ONENAND) += env_o
+ obj-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o
+ obj-$(CONFIG_ENV_IS_IN_REMOTE) += env_remote.o
+ obj-$(CONFIG_ENV_IS_IN_UBI) += env_ubi.o
++obj-$(CONFIG_ENV_IS_IN_EXT4) += env_ext4.o
+ obj-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o
+
+ # command
+@@ -191,6 +192,8 @@ obj-$(CONFIG_UPDATE_TFTP) += update.o
+ obj-$(CONFIG_USB_KEYBOARD) += usb_kbd.o
+ obj-$(CONFIG_CMD_DFU) += cmd_dfu.o
+ obj-$(CONFIG_CMD_GPT) += cmd_gpt.o
++else
++obj-$(CONFIG_SPL_BLOCK_SUPPORT) += cmd_ide.o
+ endif
+
+ ifdef CONFIG_SPL_BUILD
diff --git a/package/boot/uboot-oxnas/patches/300-oxnas-target.patch b/package/boot/uboot-oxnas/patches/300-oxnas-target.patch
new file mode 100644
index 0000000000..cfe918d5e6
--- /dev/null
+++ b/package/boot/uboot-oxnas/patches/300-oxnas-target.patch
@@ -0,0 +1,99 @@
+--- a/arch/arm/include/asm/mach-types.h
++++ b/arch/arm/include/asm/mach-types.h
+@@ -212,6 +212,7 @@ extern unsigned int __machine_arch_type;
+ #define MACH_TYPE_EDB9307A 1128
+ #define MACH_TYPE_OMAP_3430SDP 1138
+ #define MACH_TYPE_VSTMS 1140
++#define MACH_TYPE_OXNAS 1152
+ #define MACH_TYPE_MICRO9M 1169
+ #define MACH_TYPE_BUG 1179
+ #define MACH_TYPE_AT91SAM9263EK 1202
+--- a/boards.cfg
++++ b/boards.cfg
+@@ -57,6 +57,11 @@ Active arm arm1136 mx35
+ Active arm arm1136 mx35 - woodburn woodburn_sd woodburn_sd:IMX_CONFIG=board/woodburn/imximage.cfg -
+ Active arm arm1136 mx35 CarMediaLab - flea3 - Stefano Babic <sbabic@denx.de>
+ Active arm arm1136 mx35 freescale - mx35pdk - Stefano Babic <sbabic@denx.de>
++Active arm arm1136 nas782x - - ox820 - -
++Active arm arm1136 nas782x - nas782x ox820_sata ox820:BOOT_FROM_SATA -
++Active arm arm1136 nas782x - nas782x ox820_fat ox820:BOOT_FROM_SATA,BOOT_FROM_FAT
++Active arm arm1136 nas782x - nas782x ox820_ext4 ox820:BOOT_FROM_SATA,BOOT_FROM_EXT4 -
++Active arm arm1136 nas782x - nas782x ox820_nand ox820:BOOT_FROM_NAND -
+ Active arm arm1176 bcm2835 raspberrypi rpi_b rpi_b - Stephen Warren <swarren@wwwdotorg.org>
+ Active arm arm1176 tnetv107x ti tnetv107xevm tnetv107x_evm - Chan-Taek Park <c-park@ti.com>
+ Active arm arm720t - armltd integrator integratorap_cm720t integratorap:CM720T Linus Walleij <linus.walleij@linaro.org>
+--- a/drivers/block/Makefile
++++ b/drivers/block/Makefile
+@@ -21,3 +21,4 @@ obj-$(CONFIG_IDE_SIL680) += sil680.o
+ obj-$(CONFIG_SANDBOX) += sandbox.o
+ obj-$(CONFIG_SCSI_SYM53C8XX) += sym53c8xx.o
+ obj-$(CONFIG_SYSTEMACE) += systemace.o
++obj-$(CONFIG_IDE_PLX) += plxsata_ide.o
+--- a/drivers/serial/serial_ns16550.c
++++ b/drivers/serial/serial_ns16550.c
+@@ -135,6 +135,14 @@ static int calc_divisor (NS16550_t port)
+ }
+ #endif
+
++#ifdef CONFIG_OX820
++ {
++ /* with additional 3 bit fractional */
++ u32 div = (CONFIG_SYS_NS16550_CLK + gd->baudrate) / (gd->baudrate * 2);
++ port->reg9 = (div & 7) << 5;
++ return (div >> 3);
++ }
++#endif
+ #define MODE_X_DIV 16
+ /* Compute divisor value. Normally, we should simply return:
+ * CONFIG_SYS_NS16550_CLK) / MODE_X_DIV / gd->baudrate
+--- a/drivers/usb/host/Makefile
++++ b/drivers/usb/host/Makefile
+@@ -32,6 +32,7 @@ obj-$(CONFIG_USB_EHCI_MX6) += ehci-mx6.o
+ obj-$(CONFIG_USB_EHCI_OMAP) += ehci-omap.o
+ obj-$(CONFIG_USB_EHCI_PPC4XX) += ehci-ppc4xx.o
+ obj-$(CONFIG_USB_EHCI_MARVELL) += ehci-marvell.o
++obj-$(CONFIG_USB_EHCI_OXNAS) += ehci-oxnas.o
+ obj-$(CONFIG_USB_EHCI_PCI) += ehci-pci.o
+ obj-$(CONFIG_USB_EHCI_SPEAR) += ehci-spear.o
+ obj-$(CONFIG_USB_EHCI_TEGRA) += ehci-tegra.o
+--- a/spl/Makefile
++++ b/spl/Makefile
+@@ -207,8 +207,13 @@ cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS)
+
+ OBJCOPYFLAGS_$(SPL_BIN).bin = $(SPL_OBJCFLAGS) -O binary
+
++ifdef CONFIG_OX820
+ $(obj)/$(SPL_BIN).bin: $(obj)/$(SPL_BIN) FORCE
+ $(call if_changed,objcopy)
++ $(OBJTREE)/tools/mkox820crc $@
++else
++ $(call if_changed,objcopy)
++endef
+
+ LDFLAGS_$(SPL_BIN) += -T u-boot-spl.lds $(LDFLAGS_FINAL)
+ ifneq ($(CONFIG_SPL_TEXT_BASE),)
+--- a/tools/.gitignore
++++ b/tools/.gitignore
+@@ -7,6 +7,7 @@
+ /mkenvimage
+ /mkimage
+ /mkexynosspl
++/mkox820crc
+ /mpc86x_clk
+ /mxsboot
+ /ncb
+--- a/tools/Makefile
++++ b/tools/Makefile
+@@ -131,6 +131,12 @@ hostprogs-$(CONFIG_KIRKWOOD) += kwboot$(
+ hostprogs-y += proftool$(SFX)
+ hostprogs-$(CONFIG_STATIC_RELA) += relocate-rela$(SFX)
+
++
++hostprogs-$(CONFIG_OX820) += mkox820crc$(SFX)
++
++mkox820crc$(SFX)-objs := mkox820crc.o crc32.o
++
++
+ # We build some files with extra pedantic flags to try to minimize things
+ # that won't build on some weird host compiler -- though there are lots of
+ # exceptions for files that aren't complaint.
diff --git a/package/boot/uboot-oxnas/patches/800-fix-bootm-assertion.patch b/package/boot/uboot-oxnas/patches/800-fix-bootm-assertion.patch
new file mode 100644
index 0000000000..3abeb3215c
--- /dev/null
+++ b/package/boot/uboot-oxnas/patches/800-fix-bootm-assertion.patch
@@ -0,0 +1,13 @@
+diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
+index 166b901..9af3fd3 100644
+--- a/common/cmd_bootm.c
++++ b/common/cmd_bootm.c
+@@ -745,7 +745,7 @@ static int do_bootm_subcommand(cmd_tbl_t *cmdtp, int flag, int argc,
+ return CMD_RET_USAGE;
+ }
+
+- if (state != BOOTM_STATE_START && images.state >= state) {
++ if (!(state & BOOTM_STATE_START) && images.state >= state) {
+ printf("Trying to execute a command out of order\n");
+ return CMD_RET_USAGE;
+ }