]>
Commit | Line | Data |
---|---|---|
bf1e7598 AF |
1 | ############################################################################### |
2 | # # | |
3 | # IPFire.org - A linux based firewall # | |
4 | # Copyright (C) 2007-2018 IPFire Team <info@ipfire.org> # | |
5 | # # | |
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. # | |
10 | # # | |
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. # | |
15 | # # | |
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/>. # | |
18 | # # | |
19 | ############################################################################### | |
20 | ||
21 | ############################################################################### | |
22 | # Definitions | |
23 | ############################################################################### | |
24 | ||
25 | include Config | |
26 | ||
27 | VER = 2018.03 | |
28 | ||
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 | |
34 | SUP_ARCH = armv5tel | |
35 | ||
36 | ############################################################################### | |
37 | # Top-level Rules | |
38 | ############################################################################### | |
39 | ||
40 | objects = $(DL_FILE) | |
41 | ||
42 | $(DL_FILE) = $(DL_FROM)/$(DL_FILE) | |
43 | ||
44 | $(DL_FILE)_MD5 = 02922bdf0ee003fe25bfc32749ffdeab | |
45 | ||
46 | install : $(TARGET) | |
47 | ||
48 | check : $(patsubst %,$(DIR_CHK)/%,$(objects)) | |
49 | ||
50 | download :$(patsubst %,$(DIR_DL)/%,$(objects)) | |
51 | ||
52 | md5 : $(subst %,%_MD5,$(objects)) | |
53 | ||
54 | ############################################################################### | |
55 | # Downloading, checking, md5sum | |
56 | ############################################################################### | |
57 | ||
58 | $(patsubst %,$(DIR_CHK)/%,$(objects)) : | |
59 | @$(CHECK) | |
60 | ||
61 | $(patsubst %,$(DIR_DL)/%,$(objects)) : | |
62 | @$(LOAD) | |
63 | ||
64 | $(subst %,%_MD5,$(objects)) : | |
65 | @$(MD5) | |
66 | ||
67 | dist: | |
68 | @$(PAK) | |
69 | ||
70 | ############################################################################### | |
71 | # Installation Details | |
72 | ############################################################################### | |
73 | ||
74 | $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) | |
75 | @$(PREBUILD) | |
76 | @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE) | |
77 | ||
78 | # Dreamplug | |
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 | |
87 | ||
88 | # ICY-Box 6x20 | |
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 | |
97 | ||
98 | # Iomega Iconnect | |
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 | |
ea76b08b AF |
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 | |
bf1e7598 AF |
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 | |
113 | ||
114 | @rm -rf $(DIR_APP) | |
115 | @$(POSTBUILD) |