- usbhid probe fixed
- only one stage1 binary built
This commit is contained in:
parent
b8e0eb7bac
commit
b666a6da01
75
Makefile
75
Makefile
@ -39,24 +39,28 @@ PACKAGE = propagator
|
||||
|
||||
DESTDIR =
|
||||
|
||||
METHODS ?= full medias network
|
||||
BINDIR ?= /usr/bin
|
||||
LIBDIR ?= /usr/lib
|
||||
BINSDIR ?= $(LIBDIR)/propagator/bin
|
||||
BINSDIR ?= $(LIBDIR)/$(PACKAGE)/bin
|
||||
|
||||
STAGE1BINS = $(METHODS:%=stage1-%)
|
||||
BINS = init $(STAGE1BINS) gencpio
|
||||
TARGETS = init stage1 gencpio
|
||||
|
||||
all: version.h $(BINS)
|
||||
all: version.h $(TARGETS)
|
||||
|
||||
include Makefile.common
|
||||
|
||||
DEFS =
|
||||
INIT_DEFS =
|
||||
STAGE1_DEFS =
|
||||
|
||||
ifneq ($(WITH_SHELL),)
|
||||
DEFS += -DSPAWN_SHELL
|
||||
STAGE1_DEFS += -DSPAWN_SHELL
|
||||
endif
|
||||
ifeq ($(WITH_ADSL),)
|
||||
DEFS += -DDISABLE_ADSL
|
||||
STAGE1_DEFS += -DDISABLE_ADSL
|
||||
endif
|
||||
ifneq ($(WITHOUT_USBNET),)
|
||||
STAGE1_DEFS += -DDISABLE_USBNET
|
||||
endif
|
||||
|
||||
COMPILE = $(CC) $(DEFS) $(CFLAGS)
|
||||
@ -105,21 +109,14 @@ endif
|
||||
|
||||
###############################################################################
|
||||
# stage1 itself
|
||||
STAGE1SRC = stage1.c log.c tools.c modules.c probing.c mount.c lomount.c automatic.c frontend-common.c
|
||||
MEDIASRC = cdrom.c disk.c
|
||||
NETWORKSRC = network.c nfsmount.c dhcp.c url.c dns.c adsl.c
|
||||
ALLSRC = $(INITSRC) $(STAGE1SRC) $(MEDIASRC) $(NETWORKSRC)
|
||||
STAGE1SRC = stage1.c log.c tools.c modules.c probing.c \
|
||||
mount.c lomount.c automatic.c frontend-common.c \
|
||||
cdrom.c disk.c \
|
||||
network.c nfsmount.c dhcp.c url.c dns.c adsl.c
|
||||
ALLSRC = $(INITSRC) $(STAGE1SRC)
|
||||
###############################################################################
|
||||
|
||||
STAGE1OBJS-MEDIA = $(subst .c,-MEDIA.o,$(STAGE1SRC) $(MEDIASRC))
|
||||
MEDIA_DEFS = -DDISABLE_NETWORK
|
||||
|
||||
STAGE1OBJS-NETWORK = $(subst .c,-NETWORK.o,$(STAGE1SRC) $(NETWORKSRC))
|
||||
NETWORK_DEFS = -DDISABLE_CDROM -DDISABLE_DISK
|
||||
|
||||
STAGE1OBJS-FULL = $(subst .c,-FULL.o,$(STAGE1SRC) $(MEDIASRC) $(NETWORKSRC))
|
||||
USBNET_DEFS = -DENABLE_USBNET
|
||||
USBSTORAGE_DEFS = -DENABLE_USBSTORAGE
|
||||
STAGE1OBJS = $(subst .c,.o,$(STAGE1SRC))
|
||||
|
||||
ifeq (xi386, $(ARCH))
|
||||
LDFLAGS_INIT = -static -nostdlib /usr/lib/crt1.o
|
||||
@ -138,29 +135,15 @@ init: $(INITOBJS) $(INIT_LIBC)
|
||||
$(CC) -o $@ $^ $(LDFLAGS_INIT)
|
||||
$(STRIPCMD) $@
|
||||
|
||||
stage1-medias: $(STAGE1OBJS-MEDIA) $(STAGE1_OWN_LIBS) $(FRONTEND_LINK) $(STAGE1_LIBC)
|
||||
$(CC) -o $@ $^ $(LDFLAGS_STAGE1)
|
||||
$(STRIPCMD) $@
|
||||
|
||||
stage1-network: $(STAGE1OBJS-NETWORK) $(STAGE1_OWN_LIBS) $(STAGE1_NETWORK_LIBS) $(FRONTEND_LINK) $(STAGE1_LIBC)
|
||||
$(CC) -o $@ $^ $(LDFLAGS_STAGE1)
|
||||
$(STRIPCMD) $@
|
||||
|
||||
stage1-full: $(STAGE1OBJS-FULL) $(STAGE1_OWN_LIBS) $(STAGE1_NETWORK_LIBS) $(FRONTEND_LINK) $(STAGE1_LIBC)
|
||||
stage1: $(STAGE1OBJS) $(STAGE1_OWN_LIBS) $(STAGE1_NETWORK_LIBS) $(FRONTEND_LINK) $(STAGE1_LIBC)
|
||||
$(CC) -o $@ $^ $(LDFLAGS_STAGE1)
|
||||
$(STRIPCMD) $@
|
||||
|
||||
$(INITOBJS): %.o: %.c
|
||||
$(COMPILE) $(INIT_DEFS) -c $<
|
||||
|
||||
$(STAGE1OBJS-MEDIA): %-MEDIA.o: %.c
|
||||
$(COMPILE) $(INCLUDES) $(MEDIA_DEFS) $(USBSTORAGE_DEFS) -c $< -o $@
|
||||
|
||||
$(STAGE1OBJS-NETWORK): %-NETWORK.o: %.c
|
||||
$(COMPILE) $(INCLUDES) $(NETWORK_DEFS) $(USBNET_DEFS) -c $< -o $@
|
||||
|
||||
$(STAGE1OBJS-FULL): %-FULL.o: %.c
|
||||
$(COMPILE) $(INCLUDES) $(USBNET_DEFS) $(USBSTORAGE_DEFS) -c $< -o $@
|
||||
$(STAGE1OBJS): %.o: %.c
|
||||
$(COMPILE) $(INCLUDES) $(STAGE1_DEFS) -c $< -o $@
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) $(INCLUDES) -c $<
|
||||
@ -170,7 +153,7 @@ version.h: /etc/altlinux-release
|
||||
echo \\#define VERSION \\"\2\\";echo \\#define DISTRIB_NAME \\"ALT Linux\2\1 \\(\3\\)\\"|' < $^ |sh > $@
|
||||
|
||||
clean:
|
||||
rm -f *.o .depend $(BINS) version.h
|
||||
rm -f *.o .depend $(TARGETS) version.h
|
||||
|
||||
.depend:
|
||||
$(CPP) $(CFLAGS) -M $(ALLSRC) > .depend
|
||||
@ -179,22 +162,10 @@ ifeq (.depend,$(wildcard .depend))
|
||||
include .depend
|
||||
endif
|
||||
|
||||
*-MEDIA.o: %-MEDIA.o: %.o
|
||||
|
||||
*-NETWORK.o: %-NETWORK.o: %.o
|
||||
|
||||
*-FULL.o: %-FULL.o: %.o
|
||||
|
||||
gencpio: gen_init_cpio.c
|
||||
gcc -Wall -O2 $^ -o $@
|
||||
|
||||
install: all
|
||||
install: $(TARGETS)
|
||||
mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(BINSDIR)
|
||||
install -m0755 gencpio $(DESTDIR)$(BINDIR)
|
||||
install -m0755 init $(DESTDIR)$(BINSDIR)
|
||||
@methods='$(METHODS)'; for m in $$methods; do \
|
||||
mkdir -p $(DESTDIR)$(BINSDIR)/$$m; \
|
||||
install -m0755 stage1-$$m $(DESTDIR)$(BINSDIR)/$$m/stage1; \
|
||||
done
|
||||
|
||||
export: install
|
||||
install -m0755 init stage1 $(DESTDIR)$(BINSDIR)
|
||||
|
@ -416,7 +416,7 @@ static void usb_probe(enum driver_type type)
|
||||
|
||||
if (type == HID_DEVICES && !already_probed_hid) {
|
||||
while (NULL != fgets(buf, sizeof(buf), f)) {
|
||||
if (strstr(buf, "Keyboard") || strstr(buf, "Mouse")) {
|
||||
if (strstr(buf, "Cls=03")) {
|
||||
my_insmod("usbhid", ANY_DRIVER_TYPE, NULL);
|
||||
already_probed_hid = 1;
|
||||
break;
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- rpm-spec -*-
|
||||
# $Id$
|
||||
|
||||
%def_without shell
|
||||
%def_with shell
|
||||
|
||||
Name: propagator
|
||||
Version: 20061123
|
||||
@ -38,6 +38,7 @@ make %{?_with_shell:WITH_SHELL=t}
|
||||
- added conditional shell spawning
|
||||
- fixed probing of some RAID adaptors
|
||||
- probe usbhid early
|
||||
- one full-featured stage1 binary
|
||||
|
||||
* Tue Jan 24 2006 Sergey Bolshakov <sbolshakov@altlinux.ru> 20060124-alt1
|
||||
- added tweaks for nForce nics
|
||||
|
2
stage1.c
2
stage1.c
@ -397,6 +397,7 @@ int main(int argc, char **argv, char **env)
|
||||
init_modules_insmoding();
|
||||
snprintf(buf, sizeof(buf), "Welcome to %s " __DATE__ " " __TIME__, version);
|
||||
init_frontend(buf);
|
||||
probe_hiddev();
|
||||
|
||||
if (IS_EXPERT)
|
||||
expert_third_party_modules();
|
||||
@ -415,7 +416,6 @@ int main(int argc, char **argv, char **env)
|
||||
"your own risk. Alternatively, you may reboot your system now.");
|
||||
}
|
||||
|
||||
probe_hiddev();
|
||||
ret = method_select_and_prepare();
|
||||
|
||||
finish_frontend();
|
||||
|
Loading…
Reference in New Issue
Block a user