OpenWrt Forum Archive

Topic: package/u-boot

The content of this topic has been archived on 17 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

hi,

pls see below the Makefile for the package/u-boot. In addition I've added the u-boot board configuration string to target/linux/tqm86x-2.4/image/Config.in .
It would be fine if one of the developers can add it to the kamikaze trunk, please.

btw. I'didn't found how to provide patches / enhancements within the FAQ. Is there somewhere a small chapter in the wiki ?

thanks
br/R

package/u-boot/Makefile
>>>>
#
# Copyright (C) 2006 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# $Id:  $

include $(TOPDIR)/rules.mk

PKG_NAME:=u-boot
PKG_VERSION:=1.1.6
PKG_RELEASE:=0

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/u-boot
PKG_CAT:=bzcat

PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install

include $(INCLUDE_DIR)/package.mk

UBOOT_CONFIG=$(strip $(subst ",, $(CONFIG_UBOOT_TARGET)))

define Package/u-boot
  SECTION:=utils
  CATEGORY:=Utilities
  TITLE:=Universal Bootloader
  URL:=http://u-boot.sourceforge.net/
endef

define Build/Configure
    (cd $(PKG_BUILD_DIR); \
        rm .configured_for_*; \
        $(TARGET_CONFIGURE_OPTS) \
        CFLAGS="$(TARGET_CFLAGS) $(CFLAGS_LARGEFILE)" \
        $(MAKE) $(UBOOT_CONFIG)_config; \
    );
endef

define Build/Compile
    rm -rf $(PKG_INSTALL_DIR)
    mkdir -p $(PKG_INSTALL_DIR)
    export CROSS_COMPILE=$(TARGET_CROSS); \
    $(MAKE) -C $(PKG_BUILD_DIR)
endef

define Build/InstallDev
    echo Installing u-boot ....
    $(CP) $(PKG_BUILD_DIR)/u-boot.bin $(BIN_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(UBOOT_CONFIG).pkg
endef

$(eval $(call BuildPackage,u-boot))
<<<<

target/linux/tqm86x-2.4/image/Config.in
>>>>
config UBOOT_TARGET
    string "U-Boot Board Configuration"
    default "TQM8xxL_IFXCOM"
    help
      For all supported boards there are ready-to-use default
      configurations available; just type "<board_name>".

      Example: For a TQM823L module type:

          TQM823L

      For the Cogent platform, you need to specify the cpu type as well;  e.g. "cogent_mpc8xx".

<<<<

create a folder named "patches" where your Makefile is and throw your patches in there. they'll automatically get applied. create a new ticket <https://dev.openwrt.org/newticket> and attach your Makefile + patches. sooner or later it will be included in the trunk.

The discussion might have continued from here.