aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot/uboot-omap
diff options
context:
space:
mode:
Diffstat (limited to 'package/boot/uboot-omap')
-rw-r--r--package/boot/uboot-omap/Makefile103
-rw-r--r--package/boot/uboot-omap/patches/001-switch_omap4_ext4.patch11
-rw-r--r--package/boot/uboot-omap/patches/002-fix_jffs2.patch34
-rw-r--r--package/boot/uboot-omap/patches/003-fix_findfdt_C4.patch11
4 files changed, 159 insertions, 0 deletions
diff --git a/package/boot/uboot-omap/Makefile b/package/boot/uboot-omap/Makefile
new file mode 100644
index 0000000..e21e2e1
--- /dev/null
+++ b/package/boot/uboot-omap/Makefile
@@ -0,0 +1,103 @@
+#
+# Copyright (C) 2012-2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=u-boot
+PKG_VERSION:=2013.10
+PKG_RELEASE:=1
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:= \
+ http://mirror2.openwrt.org/sources \
+ ftp://ftp.denx.de/pub/u-boot
+PKG_MD5SUM:=a076a044b64371edc52f7e562b13f6b2
+
+PKG_LICENSE:=GPL-2.0 GPL-2.0+
+PKG_LICENSE_FILES:=Licenses/README
+
+include $(INCLUDE_DIR)/package.mk
+
+define uboot/Default
+ TITLE:=
+ CONFIG:=
+ IMAGE:=
+endef
+
+define uboot/omap4_panda
+ TITLE:=U-Boot for the Pandaboard
+endef
+
+define uboot/am335x_evm
+ TITLE:=U-Boot for the AM335x EVM
+endef
+
+define uboot/omap3_overo
+ TITLE:=U-Boot for the Gumstix Overo
+endef
+
+define uboot/omap3_beagle
+ TITLE:=U-Boot for the BeagleBoard
+endef
+
+UBOOTS:=omap4_panda am335x_evm omap3_overo omap3_beagle
+
+define Package/uboot/template
+define Package/uboot-omap-$(1)
+ SECTION:=boot
+ CATEGORY:=Boot Loaders
+ DEPENDS:=@TARGET_omap
+ TITLE:=$(2)
+ URL:=http://www.denx.de/wiki/U-Boot
+ VARIANT:=$(1)
+ HIDDEN:=1
+endef
+endef
+
+define BuildUBootPackage
+ $(eval $(uboot/Default))
+ $(eval $(uboot/$(1)))
+ $(call Package/uboot/template,$(1),$(TITLE))
+endef
+
+ifdef BUILD_VARIANT
+$(eval $(call uboot/$(BUILD_VARIANT)))
+UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
+UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.img)
+endif
+
+define Build/Configure
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ USE_PRIVATE_LIBGCC=yes $(UBOOT_CONFIG)_config
+endef
+
+define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ CROSS_COMPILE=$(TARGET_CROSS)
+endef
+
+define Package/uboot/install/default
+ $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1)
+ $(CP) $(PKG_BUILD_DIR)/u-boot.img $(BIN_DIR)/uboot-$(BOARD)-$(1)/u-boot.img
+ $(CP) $(PKG_BUILD_DIR)/MLO $(BIN_DIR)/uboot-$(BOARD)-$(1)/MLO
+endef
+
+define Package/uboot/install/template
+define Package/uboot-omap-$(1)/install
+ $(call Package/uboot/install/default,$(2))
+endef
+endef
+
+$(foreach u,$(UBOOTS), \
+ $(eval $(call Package/uboot/install/template,$(u),$(u))) \
+)
+
+$(foreach u,$(UBOOTS), \
+ $(eval $(call BuildUBootPackage,$(u))) \
+ $(eval $(call BuildPackage,uboot-omap-$(u))) \
+)
diff --git a/package/boot/uboot-omap/patches/001-switch_omap4_ext4.patch b/package/boot/uboot-omap/patches/001-switch_omap4_ext4.patch
new file mode 100644
index 0000000..d741c08
--- /dev/null
+++ b/package/boot/uboot-omap/patches/001-switch_omap4_ext4.patch
@@ -0,0 +1,11 @@
+--- a/include/configs/omap4_common
++++ b/include/configs/omap4_common.h
+@@ -143,7 +143,7 @@
+ "vram=16M\0" \
+ "mmcdev=0\0" \
+ "mmcroot=/dev/mmcblk0p2 rw\0" \
+- "mmcrootfstype=ext3 rootwait\0" \
++ "mmcrootfstype=ext4 rootwait\0" \
+ "mmcargs=setenv bootargs console=${console} " \
+ "vram=${vram} " \
+ "root=${mmcroot} " \
diff --git a/package/boot/uboot-omap/patches/002-fix_jffs2.patch b/package/boot/uboot-omap/patches/002-fix_jffs2.patch
new file mode 100644
index 0000000..cba0e25
--- /dev/null
+++ b/package/boot/uboot-omap/patches/002-fix_jffs2.patch
@@ -0,0 +1,34 @@
+Building boards that have JFFS2 support enabled will fail when using
+U-Boot's builtin GCC library, for example like this:
+
+USE_PRIVATE_LIBGCC=yes ./MAKEALL omap3_evm
+...
+fs/jffs2/libjffs2.o: In function `jffs2_1pass_build_lists':
+fs/jffs2/jffs2_1pass.c:1441: undefined reference to `__aeabi_uldivmod'
+
+This is caused by a u64 / u32 division in jffs2_1pass.c; the problem
+can be avoided by using do_div() instead of plain division.
+
+Signed-off-by: Wolfgang Denk <wd@denx.de>
+Reported-by: Chris Ruehl <chris.ruehl@gtsys.com.hk>
+Cc: Chris Ruehl <chris.ruehl@gtsys.com.hk>
+
+---
+ fs/jffs2/jffs2_1pass.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/fs/jffs2/jffs2_1pass.c b/fs/jffs2/jffs2_1pass.c
+index c856983..a7dbe79 100644
+--- a/fs/jffs2/jffs2_1pass.c
++++ b/fs/jffs2/jffs2_1pass.c
+@@ -1438,7 +1438,7 @@ jffs2_1pass_build_lists(struct part_info * part)
+ {
+ struct b_lists *pL;
+ struct jffs2_unknown_node *node;
+- u32 nr_sectors = part->size/part->sector_size;
++ u32 nr_sectors = do_div(part->size, part->sector_size);
+ u32 i;
+ u32 counter4 = 0;
+ u32 counterF = 0;
+--
+1.8.3.1
diff --git a/package/boot/uboot-omap/patches/003-fix_findfdt_C4.patch b/package/boot/uboot-omap/patches/003-fix_findfdt_C4.patch
new file mode 100644
index 0000000..b0b85e5
--- /dev/null
+++ b/package/boot/uboot-omap/patches/003-fix_findfdt_C4.patch
@@ -0,0 +1,11 @@
+--- a/include/configs/omap3_beagle.h
++++ b/include/configs/omap3_beagle.h
+@@ -242,6 +242,8 @@
+ "setenv fdtfile omap3-beagle.dtb; fi; " \
+ "if test $beaglerev = Cx; then " \
+ "setenv fdtfile omap3-beagle.dtb; fi; " \
++ "if test $beaglerev = C4; then " \
++ "setenv fdtfile omap3-beagle.dtb; fi; " \
+ "if test $beaglerev = xMAB; then " \
+ "setenv fdtfile omap3-beagle-xm.dtb; fi; " \
+ "if test $beaglerev = xMC; then " \