From 3a0c5648e3c0a691e285a4ae1003cb6e06a19df1 Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Wed, 24 Jan 2001 23:33:40 +0000 Subject: stage1: add pcmcia --- mdk-stage1/stage1.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'mdk-stage1/stage1.c') diff --git a/mdk-stage1/stage1.c b/mdk-stage1/stage1.c index 68e143a22..725201400 100644 --- a/mdk-stage1/stage1.c +++ b/mdk-stage1/stage1.c @@ -46,6 +46,10 @@ #include "mount.h" #include "insmod-busybox/insmod.h" +#ifdef ENABLE_PCMCIA +#include "pcmcia/pcmcia.h" +#endif + #ifndef DISABLE_CDROM #include "cdrom.h" #endif @@ -167,6 +171,27 @@ static void expert_third_party_modules(void) return expert_third_party_modules(); } + +static void handle_pcmcia(void) +{ +#ifdef ENABLE_PCMCIA + char * pcmcia_adapter; + pcmcia_adapter = pcmcia_probe(); + if (!pcmcia_adapter) { + log_message("no pcmcia adapter found"); + return; + } + my_insmod("pcmcia_core", ANY_DRIVER_TYPE, NULL); + my_insmod(pcmcia_adapter, ANY_DRIVER_TYPE, NULL); + my_insmod("ds", ANY_DRIVER_TYPE, NULL); + + /* call to cardmgr takes time, let's use the wait message */ + wait_message("Enabling PCMCIA extension cards..."); + log_message("cardmgr rc: %d", cardmgr_call()); + remove_wait_message(); +#endif +} + static enum return_type method_select_and_prepare(void) { enum return_type results; @@ -255,6 +280,8 @@ int main(int argc, char **argv, char **env) if (IS_EXPERT) expert_third_party_modules(); + handle_pcmcia(); + ret = method_select_and_prepare(); finish_frontend(); -- cgit v1.2.1