source: MondoRescue/branches/stable/mindi-busybox/scripts/Makefile.lib@ 1770

Last change on this file since 1770 was 1770, checked in by Bruno Cornec, 16 years ago
  • Better output for mindi-busybox revision
  • Remove dummy file created on NFS - report from Arnaud Tiger <arnaud.tiger_at_hp.com>
  • strace useful for debug
  • fix new versions for pb (2.0.0 for mindi and 1.7.2 for mindi-busybox)
  • fix build process for mindi-busybox + options used in that version (dd for label-partitions-as-necessary)
  • fix typo in label-partitions-as-necessary which doesn't seem to work
  • Update to busybox 1.7.2
  • perl is now required at restore time to support uuid swap partitions (and will be used for many other thigs

in the future for sure)

  • next mindi version will be 2.0.0 due to all the changes made in it (udev may break working distros)
  • small optimization in mindi on keyboard handling (one single find instead of multiple)
  • better interaction for USB device when launching mindi manually
  • attempt to automatically guess block disk size for ramdisk
  • fix typos in bkphw
  • Fix the remaining problem with UUID support for swap partitions
  • Updates mondoarchive man page for USB support
  • Adds preliminary Hardware support to mindi (Proliant SSSTK)
  • Tries to add udev support also for rhel4
  • Fix UUID support which was still broken.
  • Be conservative in test for the start-nfs script
  • Update config file for mindi-busybox for 1.7.2 migration
  • Try to run around a busybox bug (1.2.2 pb on inexistant links)
  • Add build content for mindi-busybox in pb
  • Remove distributions content for mindi-busybox
  • Fix a warning on inexistant raidtab
  • Solve problem on tmpfs in restore init (Problem of inexistant symlink and busybox)
  • Create MONDO_CACHE and use it everywhere + creation at start
  • Really never try to eject a USB device
  • Fix a issue with &> usage (replaced with 1> and 2>)
  • Adds magic file to depllist in order to have file working + ldd which helps for debugging issues
  • tty modes correct to avoid sh error messages
  • Use ext3 normally and not ext2 instead
  • USB device should be corrected after reading (take 1st part)
  • Adds a mount_USB_here function derived from mount_CDROM_here
  • usb detection place before /dev detection in device name at restore time
  • Fix when restoring from USB: media is asked in interactive mode
  • Adds USB support for mondorestore
  • mount_cdrom => mount_media
  • elilo.efi is now searched throughout /boot/efi and not in a fixed place as there is no standard
  • untar-and-softlink => untar (+ interface change)
  • suppress useless softlinks creation/removal in boot process
  • avoids udevd messages on groups
  • Increase # of disks to 99 as in mindi at restore time (should be a conf file parameter)
  • skip existing big file creation
  • seems to work correctly for USB mindi boot
  • Adds group and tty link to udev conf
  • Always load usb-torage (even 2.6) to initiate USB bus discovery
  • Better printing of messages
  • Attempt to fix a bug in supporting OpenSusE 10.3 kernel for initramfs (mindi may now use multiple regex for kernel initrd detection)
  • Links were not correctly done as non relative for modules in mindi
  • exclusion of modules denied now works
  • Also create modules in their ordinary place, so that classical modprobe works + copy modules.dep
  • Fix bugs for DENY_MODS handling
  • Add device /dev/console for udev
  • ide-generic should now really be excluded
  • Fix a bug in major number for tty
  • If udev then adds modprobe/insmod to rootfs
  • tty0 is also cretaed with udev
  • ide-generic put rather in DENY_MODS
  • udevd remove from deplist s handled in mindi directly
  • better default for mindi when using --usb
  • Handles dynamically linked busybox (in case we want to use it soon ;-)
  • Adds fixed devices to create for udev
  • ide-generic should not be part of the initrd when using libata v2
  • support a dynamically linked udev (case on Ubuntu 7.10 and Mandriva 2008.0 so should be quite generic) This will give incitation to move to dyn. linked binaries in the initrd which will help for other tasks (ia6 4)
  • Improvement in udev support (do not use cl options not available in busybox)
  • Udev in mindi
    • auto creation of the right links at boot time with udev-links.conf(from Mandriva 2008.0)
    • rework startup of udev as current makes kernel crash (from Mandriva 2008.0)
    • add support for 64 bits udev
  • Try to render MyInsmod silent at boot time
  • Adds udev support (mandatory for newest distributions to avoid remapping of devices in a different way as on the original system)
  • We also need vaft format support for USB boot
  • Adds libusual support (Ubuntu 7.10 needs it for USB)
  • Improve Ubuntu/Debian keyboard detection and support
  • pbinit adapted to new pb (0.8.10). Filtering of docs done in it
  • Suppress some mondo warnings and errors on USB again
  • Tries to fix lack of files in deb mindi package
  • Verify should now work for USB devices
  • More log/mesages improvement for USB support
  • - Supress g_erase_tmpdir_and_scratchdir
  • Improve some log messages for USB support
  • Try to improve install in mindi to avoid issues with isolinux.cfg not installed vene if in the pkg :-(
  • Improve mindi-busybox build
  • In conformity with pb 0.8.9
  • Add support for Ubuntu 7.10 in build process
  • Add USB Key button to Menu UI (CD streamer removed)
  • Attempt to fix error messages on tmp/scratch files at the end by removing those dir at the latest possible.
  • Fix a bug linked to the size of the -E param which could be used (Arnaud Tiger/René Ribaud).
  • Integrate ~/.pbrc content into mondorescue.pb (required project-builder >= 0.8.7)
  • Put mondorescue in conformity with new pb filtering rules
  • Add USB support at restore time (no test done yet). New start-usb script PB varibale added where useful
  • Unmounting USB device before removal of temporary scratchdir
  • Stil refining USB copy back to mondo (one command was not executed)
  • No need to have the image subdor in the csratchdir when USB.
  • umount the USB partition before attempting to use it
  • Remove useless copy from mindi to mondo at end of USB handling

(risky merge, we are raising the limits of 2 diverging branches. The status of stable is not completely sure as such. Will need lots of tests, but it's not yet done :-()
(merge -r1692:1769 $SVN_M/branches/2.2.5)

File size: 6.4 KB
Line 
1# Backward compatibility - to be removed...
2extra-y += $(EXTRA_TARGETS)
3# Figure out what we need to build from the various variables
4# ===========================================================================
5
6# When an object is listed to be built compiled-in and modular,
7# only build the compiled-in version
8
9obj-m := $(filter-out $(obj-y),$(obj-m))
10
11# Libraries are always collected in one lib file.
12# Filter out objects already built-in
13
14lib-y := $(filter-out $(obj-y), $(sort $(lib-y) $(lib-m)))
15
16
17# Handle objects in subdirs
18# ---------------------------------------------------------------------------
19# o if we encounter foo/ in $(obj-y), replace it by foo/built-in.o
20# and add the directory to the list of dirs to descend into: $(subdir-y)
21# o if we encounter foo/ in $(obj-m), remove it from $(obj-m)
22# and add the directory to the list of dirs to descend into: $(subdir-m)
23
24__subdir-y := $(patsubst %/,%,$(filter %/, $(obj-y)))
25subdir-y += $(__subdir-y)
26__subdir-m := $(patsubst %/,%,$(filter %/, $(obj-m)))
27subdir-m += $(__subdir-m)
28obj-y := $(patsubst %/, %/built-in.o, $(obj-y))
29obj-m := $(filter-out %/, $(obj-m))
30
31# Subdirectories we need to descend into
32
33subdir-ym := $(sort $(subdir-y) $(subdir-m))
34
35# if $(foo-objs) exists, foo.o is a composite object
36multi-used-y := $(sort $(foreach m,$(obj-y), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))), $(m))))
37multi-used-m := $(sort $(foreach m,$(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))), $(m))))
38multi-used := $(multi-used-y) $(multi-used-m)
39single-used-m := $(sort $(filter-out $(multi-used-m),$(obj-m)))
40
41# Build list of the parts of our composite objects, our composite
42# objects depend on those (obviously)
43multi-objs-y := $(foreach m, $(multi-used-y), $($(m:.o=-objs)) $($(m:.o=-y)))
44multi-objs-m := $(foreach m, $(multi-used-m), $($(m:.o=-objs)) $($(m:.o=-y)))
45multi-objs := $(multi-objs-y) $(multi-objs-m)
46
47# $(subdir-obj-y) is the list of objects in $(obj-y) which do not live
48# in the local directory
49subdir-obj-y := $(foreach o,$(obj-y),$(if $(filter-out $(o),$(notdir $(o))),$(o)))
50
51# $(obj-dirs) is a list of directories that contain object files
52obj-dirs := $(dir $(multi-objs) $(subdir-obj-y))
53
54# Replace multi-part objects by their individual parts, look at local dir only
55real-objs-y := $(foreach m, $(filter-out $(subdir-obj-y), $(obj-y)), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))),$($(m:.o=-objs)) $($(m:.o=-y)),$(m))) $(extra-y)
56real-objs-m := $(foreach m, $(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))),$($(m:.o=-objs)) $($(m:.o=-y)),$(m)))
57
58# Add subdir path
59
60extra-y := $(addprefix $(obj)/,$(extra-y))
61always := $(addprefix $(obj)/,$(always))
62targets := $(addprefix $(obj)/,$(targets))
63obj-y := $(addprefix $(obj)/,$(obj-y))
64obj-m := $(addprefix $(obj)/,$(obj-m))
65lib-y := $(addprefix $(obj)/,$(lib-y))
66subdir-obj-y := $(addprefix $(obj)/,$(subdir-obj-y))
67real-objs-y := $(addprefix $(obj)/,$(real-objs-y))
68real-objs-m := $(addprefix $(obj)/,$(real-objs-m))
69single-used-m := $(addprefix $(obj)/,$(single-used-m))
70multi-used-y := $(addprefix $(obj)/,$(multi-used-y))
71multi-used-m := $(addprefix $(obj)/,$(multi-used-m))
72multi-objs-y := $(addprefix $(obj)/,$(multi-objs-y))
73multi-objs-m := $(addprefix $(obj)/,$(multi-objs-m))
74subdir-ym := $(addprefix $(obj)/,$(subdir-ym))
75obj-dirs := $(addprefix $(obj)/,$(obj-dirs))
76
77# These flags are needed for modversions and compiling, so we define them here
78# already
79# $(modname_flags) #defines KBUILD_MODNAME as the name of the module it will
80# end up in (or would, if it gets compiled in)
81# Note: It's possible that one object gets potentially linked into more
82# than one module. In that case KBUILD_MODNAME will be set to foo_bar,
83# where foo and bar are the name of the modules.
84name-fix = $(subst $(comma),_,$(subst -,_,$1))
85basename_flags = -D"KBUILD_BASENAME=KBUILD_STR($(call name-fix,$(*F)))"
86modname_flags = $(if $(filter 1,$(words $(modname))),\
87 -D"KBUILD_MODNAME=KBUILD_STR($(call name-fix,$(modname)))")
88
89_c_flags = $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(*F).o)
90_a_flags = $(AFLAGS) $(EXTRA_AFLAGS) $(AFLAGS_$(*F).o)
91_cpp_flags = $(CPPFLAGS) $(EXTRA_CPPFLAGS) $(CPPFLAGS_$(@F))
92
93# If building the kernel in a separate objtree expand all occurrences
94# of -Idir to -I$(srctree)/dir except for absolute paths (starting with '/').
95
96ifeq ($(KBUILD_SRC),)
97__c_flags = $(_c_flags)
98__a_flags = $(_a_flags)
99__cpp_flags = $(_cpp_flags)
100else
101
102# -I$(obj) locates generated .h files
103# $(call addtree,-I$(obj)) locates .h files in srctree, from generated .c files
104# and locates generated .h files
105# FIXME: Replace both with specific CFLAGS* statements in the makefiles
106__c_flags = $(call addtree,-I$(obj)) $(call flags,_c_flags)
107__a_flags = $(call flags,_a_flags)
108__cpp_flags = $(call flags,_cpp_flags)
109endif
110
111c_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(CPPFLAGS) \
112 $(__c_flags) $(modkern_cflags) \
113 -D"KBUILD_STR(s)=\#s" $(basename_flags) $(modname_flags)
114
115a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(CPPFLAGS) \
116 $(__a_flags) $(modkern_aflags)
117
118cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(__cpp_flags)
119
120ld_flags = $(LDFLAGS) $(EXTRA_LDFLAGS)
121
122# Finds the multi-part object the current object will be linked into
123modname-multi = $(sort $(foreach m,$(multi-used),\
124 $(if $(filter $(subst $(obj)/,,$*.o), $($(m:.o=-objs)) $($(m:.o=-y))),$(m:.o=))))
125
126# Shipped files
127# ===========================================================================
128
129quiet_cmd_shipped = SHIPPED $@
130cmd_shipped = cat $< > $@
131
132$(obj)/%:: $(src)/%_shipped
133 $(call cmd,shipped)
134
135# Commands useful for building a boot image
136# ===========================================================================
137#
138# Use as following:
139#
140# target: source(s) FORCE
141# $(if_changed,ld/objcopy/gzip)
142#
143# and add target to EXTRA_TARGETS so that we know we have to
144# read in the saved command line
145
146# Linking
147# ---------------------------------------------------------------------------
148
149quiet_cmd_ld = LD $@
150cmd_ld = $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS_$(@F)) \
151 $(filter-out FORCE,$^) -o $@
152
153# Objcopy
154# ---------------------------------------------------------------------------
155
156quiet_cmd_objcopy = OBJCOPY $@
157cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@
158
159# Gzip
160# ---------------------------------------------------------------------------
161
162quiet_cmd_gzip = GZIP $@
163cmd_gzip = gzip -f -9 < $< > $@
164
165
Note: See TracBrowser for help on using the repository browser.