Files
bpfire/lfs/u-boot
2013-12-19 11:09:00 +01:00

120 lines
4.5 KiB
Plaintext

###############################################################################
# #
# IPFire.org - A linux based firewall #
# Copyright (C) 2007-2013 IPFire Team <info@ipfire.org> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
# #
###############################################################################
###############################################################################
# Definitions
###############################################################################
include Config
VER = 2013.10
THISAPP = u-boot-$(VER)
DL_FILE = $(THISAPP).tar.bz2
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
SUP_ARCH = armv5tel
###############################################################################
# Top-level Rules
###############################################################################
objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = a076a044b64371edc52f7e562b13f6b2
install : $(TARGET)
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
download :$(patsubst %,$(DIR_DL)/%,$(objects))
md5 : $(subst %,%_MD5,$(objects))
###############################################################################
# Downloading, checking, md5sum
###############################################################################
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
@$(CHECK)
$(patsubst %,$(DIR_DL)/%,$(objects)) :
@$(LOAD)
$(subst %,%_MD5,$(objects)) :
@$(MD5)
dist:
@$(PAK)
###############################################################################
# Installation Details
###############################################################################
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
# Pandaboard
-mkdir -pv /usr/share/u-boot/pandaboard
cd $(DIR_APP) && make CROSS_COMPILE="" omap4_panda_config
cd $(DIR_APP) && make CROSS_COMPILE="" HOSTCC="gcc $(CFLAGS)"
cd $(DIR_APP) && install -v -m 644 MLO u-boot.img \
/usr/share/u-boot/pandaboard
# Install pandaboard uboot as default
cd $(DIR_APP) && install MLO /boot/
cd $(DIR_APP) && install u-boot.img /boot/
cp -vf $(DIR_SRC)/config/u-boot/* /boot/
cd $(DIR_APP) && make distclean
# Wandboard Quad
-mkdir -pv /usr/share/u-boot/wandboard_quad
cd $(DIR_APP) && make CROSS_COMPILE="" wandboard_quad_config
cd $(DIR_APP) && make CROSS_COMPILE="" HOSTCC="gcc $(CFLAGS)"
cd $(DIR_APP) && install -v -m 644 u-boot.imx \
/usr/share/u-boot/wandboard_quad
cd $(DIR_APP) && make distclean
# Wandboard Dual
-mkdir -pv /usr/share/u-boot/wandboard_dl
cd $(DIR_APP) && make CROSS_COMPILE="" wandboard_dl_config
cd $(DIR_APP) && make CROSS_COMPILE="" HOSTCC="gcc $(CFLAGS)"
cd $(DIR_APP) && install -v -m 644 u-boot.imx \
/usr/share/u-boot/wandboard_dl
cd $(DIR_APP) && make distclean
# Wandboard Solo
-mkdir -pv /usr/share/u-boot/wandboard_solo
cd $(DIR_APP) && make CROSS_COMPILE="" wandboard_solo_config
cd $(DIR_APP) && make CROSS_COMPILE="" HOSTCC="gcc $(CFLAGS)"
cd $(DIR_APP) && install -v -m 644 u-boot.imx \
/usr/share/u-boot/wandboard_solo
cd $(DIR_APP) && make distclean
# mkimage
cd $(DIR_APP) && make CROSS_COMPILE="" HOSTCC="gcc $(CFLAGS)" tools
cd $(DIR_APP) && install -v -m 755 tools/mkimage /usr/bin
@rm -rf $(DIR_APP)
@$(POSTBUILD)