aboutsummaryrefslogtreecommitdiffstats
path: root/usr/Makefile
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /usr/Makefile
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'usr/Makefile')
-rw-r--r--usr/Makefile65
1 files changed, 65 insertions, 0 deletions
diff --git a/usr/Makefile b/usr/Makefile
new file mode 100644
index 000000000000..248d5551029d
--- /dev/null
+++ b/usr/Makefile
@@ -0,0 +1,65 @@
1
2obj-y := initramfs_data.o
3
4hostprogs-y := gen_init_cpio
5
6clean-files := initramfs_data.cpio.gz initramfs_list
7
8# initramfs_data.o contains the initramfs_data.cpio.gz image.
9# The image is included using .incbin, a dependency which is not
10# tracked automatically.
11$(obj)/initramfs_data.o: $(obj)/initramfs_data.cpio.gz FORCE
12
13ifdef CONFIG_INITRAMFS_ROOT_UID
14gen_initramfs_args += -u $(CONFIG_INITRAMFS_ROOT_UID)
15endif
16
17ifdef CONFIG_INITRAMFS_ROOT_GID
18gen_initramfs_args += -g $(CONFIG_INITRAMFS_ROOT_GID)
19endif
20
21# The $(shell echo $(CONFIG_INITRAMFS_SOURCE)) is to remove the
22# gratuitous begin and end quotes from the Kconfig string type.
23# Internal, escaped quotes in the Kconfig string will loose the
24# escape and become active quotes.
25quotefixed_initramfs_source := $(shell echo $(CONFIG_INITRAMFS_SOURCE))
26
27filechk_initramfs_list = $(CONFIG_SHELL) \
28 $(srctree)/scripts/gen_initramfs_list.sh $(gen_initramfs_args) $(quotefixed_initramfs_source)
29
30$(obj)/initramfs_list: FORCE
31 $(call filechk,initramfs_list)
32
33quiet_cmd_cpio = CPIO $@
34 cmd_cpio = ./$< $(obj)/initramfs_list > $@
35
36
37# Check if the INITRAMFS_SOURCE is a cpio archive
38ifneq (,$(findstring .cpio,$(quotefixed_initramfs_source)))
39
40# INITRAMFS_SOURCE has a cpio archive - verify that it's a single file
41ifneq (1,$(words $(quotefixed_initramfs_source)))
42$(error Only a single file may be specified in CONFIG_INITRAMFS_SOURCE (="$(quotefixed_initramfs_source)") when a cpio archive is directly specified.)
43endif
44# Now use the cpio archive directly
45initramfs_data_cpio = $(quotefixed_initramfs_source)
46targets += $(quotefixed_initramfs_source)
47
48else
49
50# INITRAMFS_SOURCE is not a cpio archive - create one
51$(obj)/initramfs_data.cpio: $(obj)/gen_init_cpio \
52 $(initramfs-y) $(obj)/initramfs_list FORCE
53 $(call if_changed,cpio)
54
55targets += initramfs_data.cpio
56initramfs_data_cpio = $(obj)/initramfs_data.cpio
57
58endif
59
60
61$(obj)/initramfs_data.cpio.gz: $(initramfs_data_cpio) FORCE
62 $(call if_changed,gzip)
63
64targets += initramfs_data.cpio.gz
65