]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - lfs/linux-initrd
xtables-addons: Fix typo in lfs
[people/pmueller/ipfire-2.x.git] / lfs / linux-initrd
CommitLineData
22820bf2
AF
1###############################################################################
2# #
3# IPFire.org - A linux based firewall #
eee037b8 4# Copyright (C) 2007-2018 IPFire Team <info@ipfire.org> #
22820bf2
AF
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
25include Config
26
27VER = $(KVER)
28
29THISAPP = linux-initrd-$(VER)
30
31VERSUFIX=ipfire$(KCFG)
32
33TARGET = $(DIR_INFO)/$(THISAPP)-$(VERSUFIX)
34
35###############################################################################
36# Top-level Rules
37###############################################################################
38
39install : $(TARGET)
40
41check : $(patsubst %,$(DIR_CHK)/%,$(objects))
42
43download :$(patsubst %,$(DIR_DL)/%,$(objects))
44
45md5 : $(subst %,%_MD5,$(objects))
46
47dist:
48 @$(PAK)
49
50###############################################################################
51# Installation Details
52###############################################################################
53
54$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
55 @$(PREBUILD)
56
57 # rebuild module deps
58 depmod -a $(KVER)-$(VERSUFIX)
59
c3efda65
AF
60 #skip initrd build on pae and rpi kernel.
61ifneq "$(KCFG)" "-rpi"
62ifneq "$(KCFG)" "-pae"
63
22820bf2 64 # Create initramfs images
b403b04a 65 dracut --force --early-microcode --verbose --strip --xz /boot/initramfs-$(KVER)-$(VERSUFIX).img $(KVER)-$(VERSUFIX)
22820bf2
AF
66
67ifeq "$(KCFG)" "-kirkwood"
0a21d63f
AF
68# cd /boot && mkimage -A arm -T ramdisk -C lzma -d initramfs-$(KVER)-$(VERSUFIX).img uInit-$(VERSUFIX)
69 cd /boot && mkimage -A arm -T ramdisk -C lzma -d initramfs-$(KVER)-$(VERSUFIX).img uInit-$(KVER)-$(VERSUFIX)
70 cd /boot && rm initramfs-$(KVER)-$(VERSUFIX).img
22820bf2
AF
71endif
72
73ifeq "$(KCFG)" "-multi"
5b17da41
AF
74ifeq "$(BUILD_ARCH)" "aarch64"
75 cd /boot && mkimage -A arm64 -T ramdisk -C lzma -d initramfs-$(KVER)-$(VERSUFIX).img uInit-$(KVER)-$(VERSUFIX)
76 # dont remove initramfs because grub need this to boot.
77else
0a21d63f
AF
78 cd /boot && mkimage -A arm -T ramdisk -C lzma -d initramfs-$(KVER)-$(VERSUFIX).img uInit-$(KVER)-$(VERSUFIX)
79 cd /boot && rm initramfs-$(KVER)-$(VERSUFIX).img
c3efda65 80endif
5b17da41 81endif
c3efda65
AF
82
83endif
22820bf2
AF
84endif
85 @$(POSTBUILD)