1 ###############################################################################
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007-2018 IPFire Team <info@ipfire.org> #
6 # This program is free software: you can redistribute it and/or modify #
7 # it under the terms of the GNU General Public License as published by #
8 # the Free Software Foundation, either version 3 of the License, or #
9 # (at your option) any later version. #
11 # This program is distributed in the hope that it will be useful, #
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14 # GNU General Public License for more details. #
16 # You should have received a copy of the GNU General Public License #
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
19 ###############################################################################
21 ###############################################################################
23 ###############################################################################
29 THISAPP = u-boot-$(VER)
30 DL_FILE = $(THISAPP).tar.bz2
31 DL_FROM = $(URL_IPFIRE)
32 DIR_APP = $(DIR_SRC)/$(THISAPP)
33 TARGET = $(DIR_INFO)/$(THISAPP)-kirkwood
36 ###############################################################################
38 ###############################################################################
42 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
44 $(DL_FILE)_MD5 = 02922bdf0ee003fe25bfc32749ffdeab
48 check : $(patsubst %,$(DIR_CHK)/%,$(objects))
50 download :$(patsubst %,$(DIR_DL)/%,$(objects))
52 md5 : $(subst %,%_MD5,$(objects))
54 ###############################################################################
55 # Downloading, checking, md5sum
56 ###############################################################################
58 $(patsubst %,$(DIR_CHK)/%,$(objects)) :
61 $(patsubst %,$(DIR_DL)/%,$(objects)) :
64 $(subst %,%_MD5,$(objects)) :
70 ###############################################################################
71 # Installation Details
72 ###############################################################################
74 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
76 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
79 -mkdir -pv /usr/share/u-boot/dreamplug
80 cd $(DIR_APP) && make CROSS_COMPILE="" dreamplug_config
81 cd $(DIR_APP) && sed -i -e 's!^CONFIG_IDENT_STRING=.*!CONFIG_IDENT_STRING=" Globalscale Dreamplug - IPFire.org"!' .config
82 cd $(DIR_APP) && sed -i -e 's!^# CONFIG_CMD_BOOTZ is not set!CONFIG_CMD_BOOTZ=y!' .config
83 cd $(DIR_APP) && make CROSS_COMPILE="" HOSTCC="gcc $(CFLAGS)"
84 cd $(DIR_APP) && install -v -m 644 u-boot.kwb \
85 /usr/share/u-boot/dreamplug
86 cd $(DIR_APP) && make distclean
89 -mkdir -pv /usr/share/u-boot/icybox
90 cd $(DIR_APP) && make CROSS_COMPILE="" ib62x0_config
91 cd $(DIR_APP) && sed -i -e 's!^CONFIG_IDENT_STRING=.*!CONFIG_IDENT_STRING=" Raidsonic ICY-Box 62x0 - IPFire.org"!' .config
92 cd $(DIR_APP) && sed -i -e 's!^# CONFIG_CMD_BOOTZ is not set!CONFIG_CMD_BOOTZ=y!' .config
93 cd $(DIR_APP) && make CROSS_COMPILE="" HOSTCC="gcc $(CFLAGS)"
94 cd $(DIR_APP) && install -v -m 644 u-boot.kwb \
95 /usr/share/u-boot/icybox
96 cd $(DIR_APP) && make distclean
99 -mkdir -pv /usr/share/u-boot/iconnect
100 # Fix crash at env save because this uboot is larger than 512KB
101 cd $(DIR_APP) && echo "#undef CONFIG_ENV_OFFSET" >> include/configs/iconnect.h
102 cd $(DIR_APP) && echo "#define CONFIG_ENV_OFFSET 0xC0000" >> include/configs/iconnect.h
103 cd $(DIR_APP) && make CROSS_COMPILE="" iconnect_config
104 cd $(DIR_APP) && sed -i -e 's!^CONFIG_IDENT_STRING=.*!CONFIG_IDENT_STRING=" Iomega iConnect - IPFire.org"!' .config
105 cd $(DIR_APP) && sed -i -e 's!^# CONFIG_CMD_BOOTZ is not set!CONFIG_CMD_BOOTZ=y!' .config
106 cd $(DIR_APP) && sed -i -e 's!^# CONFIG_HUSH_PARSER is not set!CONFIG_HUSH_PARSER=y!' .config
107 cd $(DIR_APP) && sed -i -e 's!^CONFIG_MTDPARTS_DEFAULT=.*!CONFIG_MTDPARTS_DEFAULT="mtdparts=orion_nand:0xC0000@0x0(uboot),0x40000@0xC0000(uboot_env),-@0x100000(rootfs)"!' .config
108 cd $(DIR_APP) && make CROSS_COMPILE="" HOSTCC="gcc $(CFLAGS)"
109 cd $(DIR_APP) && make CROSS_COMPILE="" HOSTCC="gcc $(CFLAGS)" u-boot.kwb
110 cd $(DIR_APP) && install -v -m 644 u-boot.kwb \
111 /usr/share/u-boot/iconnect
112 cd $(DIR_APP) && make distclean