uboot-imx6: add new package
SVN-Revision: 36754
This commit is contained in:
parent
4b21af4268
commit
5fbc56cfdc
3 changed files with 190 additions and 0 deletions
93
package/boot/uboot-imx6/Makefile
Normal file
93
package/boot/uboot-imx6/Makefile
Normal file
|
@ -0,0 +1,93 @@
|
|||
#
|
||||
# Copyright (C) 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.04
|
||||
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:=ftp://ftp.denx.de/pub/u-boot
|
||||
PKG_MD5SUM:=21bf962d69938ed4ed783b792b2b074e
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define uboot/Default
|
||||
TITLE:=
|
||||
CONFIG:=
|
||||
IMAGE:=
|
||||
endef
|
||||
|
||||
define uboot/wandboard_solo
|
||||
TITLE:=U-Boot for the Wandboard Solo
|
||||
endef
|
||||
|
||||
define uboot/wandboard_dl
|
||||
TITLE:=U-Boot for the Wandboard Dual Lite
|
||||
endef
|
||||
|
||||
UBOOTS := \
|
||||
wandboard_solo \
|
||||
wandboard_dl
|
||||
|
||||
define Package/uboot/template
|
||||
define Package/uboot-imx6-$(1)
|
||||
SECTION:=boot
|
||||
CATEGORY:=Boot Loaders
|
||||
DEPENDS:=@TARGET_imx6
|
||||
TITLE:=$(2)
|
||||
URL:=http://www.denx.de/wiki/U-Boot
|
||||
VARIANT:=$(1)
|
||||
MAINTAINER:=Luka Perkov <luka@openwrt.org>
|
||||
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.bin)
|
||||
endif
|
||||
|
||||
define Build/Configure
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
$(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.imx \
|
||||
$(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.imx
|
||||
endef
|
||||
|
||||
define Package/uboot/install/template
|
||||
define Package/uboot-imx6-$(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-imx6-$(u))) \
|
||||
)
|
|
@ -0,0 +1,10 @@
|
|||
--- a/include/configs/wandboard.h
|
||||
+++ b/include/configs/wandboard.h
|
||||
@@ -206,4 +206,7 @@
|
||||
#define CONFIG_CMD_CACHE
|
||||
#endif
|
||||
|
||||
+#define CONFIG_FIT
|
||||
+#define CONFIG_FIT_VERBOSE
|
||||
+
|
||||
#endif /* __CONFIG_H * */
|
87
package/boot/uboot-imx6/patches/110-wandboard-owrt-env-patch
Normal file
87
package/boot/uboot-imx6/patches/110-wandboard-owrt-env-patch
Normal file
|
@ -0,0 +1,87 @@
|
|||
--- a/include/configs/wandboard.h
|
||||
+++ b/include/configs/wandboard.h
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
#undef CONFIG_CMD_IMLS
|
||||
|
||||
-#define CONFIG_BOOTDELAY 5
|
||||
+#define CONFIG_BOOTDELAY 3
|
||||
|
||||
#define CONFIG_SYS_MEMTEST_START 0x10000000
|
||||
#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 500 * SZ_1M)
|
||||
@@ -83,13 +83,15 @@
|
||||
|
||||
#if defined(CONFIG_MX6DL)
|
||||
#define CONFIG_DEFAULT_FDT_FILE "imx6dl-wandboard.dtb"
|
||||
+#define CONFIG_OWRT_NAME "openwrt-imx6dl-wandboard-uImage.itb"
|
||||
#elif defined(CONFIG_MX6S)
|
||||
#define CONFIG_DEFAULT_FDT_FILE "imx6s-wandboard.dtb"
|
||||
+#define CONFIG_OWRT_NAME "openwrt-imx6s-wandboard-uImage.itb"
|
||||
#endif
|
||||
|
||||
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||
"script=boot.scr\0" \
|
||||
- "uimage=uImage\0" \
|
||||
+ "uimage=" CONFIG_OWRT_NAME "\0" \
|
||||
"console=ttymxc0\0" \
|
||||
"fdt_high=0xffffffff\0" \
|
||||
"initrd_high=0xffffffff\0" \
|
||||
@@ -103,11 +105,11 @@
|
||||
"mmcargs=setenv bootargs console=${console},${baudrate} " \
|
||||
"root=${mmcroot}\0" \
|
||||
"loadbootscript=" \
|
||||
- "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
|
||||
+ "ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
|
||||
"bootscript=echo Running bootscript from mmc ...; " \
|
||||
"source\0" \
|
||||
- "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
|
||||
- "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
|
||||
+ "loaduimage=ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
|
||||
+ "loadfdt=ext2load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
|
||||
"mmcboot=echo Booting from mmc ...; " \
|
||||
"run mmcargs; " \
|
||||
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
|
||||
@@ -122,30 +124,6 @@
|
||||
"fi; " \
|
||||
"else " \
|
||||
"bootm; " \
|
||||
- "fi;\0" \
|
||||
- "netargs=setenv bootargs console=${console},${baudrate} " \
|
||||
- "root=/dev/nfs " \
|
||||
- "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
|
||||
- "netboot=echo Booting from net ...; " \
|
||||
- "run netargs; " \
|
||||
- "if test ${ip_dyn} = yes; then " \
|
||||
- "setenv get_cmd dhcp; " \
|
||||
- "else " \
|
||||
- "setenv get_cmd tftp; " \
|
||||
- "fi; " \
|
||||
- "${get_cmd} ${uimage}; " \
|
||||
- "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
|
||||
- "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
|
||||
- "bootm ${loadaddr} - ${fdt_addr}; " \
|
||||
- "else " \
|
||||
- "if test ${boot_fdt} = try; then " \
|
||||
- "bootm; " \
|
||||
- "else " \
|
||||
- "echo WARN: Cannot load the DT; " \
|
||||
- "fi; " \
|
||||
- "fi; " \
|
||||
- "else " \
|
||||
- "bootm; " \
|
||||
"fi;\0"
|
||||
|
||||
#define CONFIG_BOOTCOMMAND \
|
||||
@@ -155,10 +133,10 @@
|
||||
"else " \
|
||||
"if run loaduimage; then " \
|
||||
"run mmcboot; " \
|
||||
- "else run netboot; " \
|
||||
+ "else echo WARN: Can not boot the image; " \
|
||||
"fi; " \
|
||||
"fi; " \
|
||||
- "else run netboot; fi"
|
||||
+ "fi"
|
||||
|
||||
/* Miscellaneous configurable options */
|
||||
#define CONFIG_SYS_LONGHELP
|
Loading…
Reference in a new issue