diff options
Diffstat (limited to 'mdk-stage1')
-rw-r--r-- | mdk-stage1/Makefile | 7 | ||||
-rw-r--r-- | mdk-stage1/config-stage1.h | 1 | ||||
-rw-r--r-- | mdk-stage1/network.c | 25 | ||||
-rw-r--r-- | mdk-stage1/network.h | 3 | ||||
-rw-r--r-- | mdk-stage1/stage1-data/stage1-with-ka.tar.bz2 | bin | 0 -> 961924 bytes | |||
-rw-r--r-- | mdk-stage1/stage1.c | 11 | ||||
-rw-r--r-- | mdk-stage1/stage1.h | 1 |
7 files changed, 45 insertions, 3 deletions
diff --git a/mdk-stage1/Makefile b/mdk-stage1/Makefile index 39dd3a499..04fe357ff 100644 --- a/mdk-stage1/Makefile +++ b/mdk-stage1/Makefile @@ -114,9 +114,10 @@ STAGE1SRC = stage1.c log.c tools.c modules.c probing.c mount.c automatic.c front CDROMSRC = cdrom.c DISKSRC = disk.c directory.c partition.c NETWORKSRC = network.c nfsmount.c dhcp.c url.c dns.c adsl.c directory.c wireless.c +KASRC = ka.c # use sort to remove duplicates -STAGE1_ALLSRC = $(sort $(STAGE1SRC) $(CDROMSRC) $(DISKSRC) $(NETWORKSRC)) +STAGE1_ALLSRC = $(sort $(STAGE1SRC) $(CDROMSRC) $(DISKSRC) $(NETWORKSRC) $(KASRC)) ALLSRC = $(INITSRC) $(STAGE1_ALLSRC) @@ -128,12 +129,12 @@ CDROM_DEFS = -DSPAWN_SHELL -DDISABLE_DISK -DDISABLE_NETWORK STAGE1OBJS-NETWORK = $(subst .c,-NETWORK.o,$(STAGE1SRC) $(NETWORKSRC)) -NETWORK_DEFS = -DSPAWN_SHELL -DDISABLE_CDROM -DDISABLE_DISK +NETWORK_DEFS = -DSPAWN_SHELL -DDISABLE_CDROM -DDISABLE_DISK -DDISABLE_KA STAGE1OBJS-NETWORK-STANDALONE = $(subst .c,-NETWORK-STANDALONE.o,$(STAGE1SRC) $(NETWORKSRC)) -NETWORK_STANDALONE_DEFS = -DDISABLE_CDROM -DDISABLE_DISK -DENABLE_NETWORK_STANDALONE +NETWORK_STANDALONE_DEFS = -DDISABLE_CDROM -DDISABLE_DISK -DENABLE_NETWORK_STANDALONE -DDISABLE_KA STAGE1OBJS-FULL = $(subst .c,-FULL.o,$(STAGE1_ALLSRC)) diff --git a/mdk-stage1/config-stage1.h b/mdk-stage1/config-stage1.h index 3fd918ec7..54e3656f3 100644 --- a/mdk-stage1/config-stage1.h +++ b/mdk-stage1/config-stage1.h @@ -31,6 +31,7 @@ /* If we have more than that amount of memory (in Mbytes), we preload the rescue as a ramdisk */ #define MEM_LIMIT_RESCUE_PRELOAD 100 +#define KA_MAX_RETRY 5 #define SLASH_LOCATION "/sysroot" diff --git a/mdk-stage1/network.c b/mdk-stage1/network.c index 355227863..cbc90126b 100644 --- a/mdk-stage1/network.c +++ b/mdk-stage1/network.c @@ -51,6 +51,10 @@ #include "directory.h" #include "wireless.h" +#ifndef DISABLE_KA +#include "ka.h" +#endif + static void error_message_net(void) /* reduce code size */ { stg1_error_message("Could not configure network."); @@ -1204,4 +1208,25 @@ enum return_type http_prepare(void) return RETURN_OK; } + +#ifndef DISABLE_KA +enum return_type ka_prepare(void) +{ + enum return_type results; + + if (!ramdisk_possible()) { + stg1_error_message("KA install needs more than %d Mbytes of memory (detected %d Mbytes).", + MEM_LIMIT_DRAKX, total_memory()); + return RETURN_ERROR; + } + + results = intf_select_and_up(); + + if (results != RETURN_OK) + return results; + + return perform_ka(); +} +#endif + #endif diff --git a/mdk-stage1/network.h b/mdk-stage1/network.h index a94f8150b..e4612e259 100644 --- a/mdk-stage1/network.h +++ b/mdk-stage1/network.h @@ -32,6 +32,9 @@ enum return_type nfs_prepare(void); #ifndef MANDRAKE_MOVE enum return_type ftp_prepare(void); enum return_type http_prepare(void); +#ifndef DISABLE_KA +enum return_type ka_prepare(void); +#endif #endif diff --git a/mdk-stage1/stage1-data/stage1-with-ka.tar.bz2 b/mdk-stage1/stage1-data/stage1-with-ka.tar.bz2 Binary files differnew file mode 100644 index 000000000..b11adf85d --- /dev/null +++ b/mdk-stage1/stage1-data/stage1-with-ka.tar.bz2 diff --git a/mdk-stage1/stage1.c b/mdk-stage1/stage1.c index e3a5b364c..6024f20ca 100644 --- a/mdk-stage1/stage1.c +++ b/mdk-stage1/stage1.c @@ -266,6 +266,9 @@ static void method_select_and_prepare(void) char * network_nfs_install = "NFS server"; char * network_nfs_install_auto = "nfs"; char * network_ftp_install = "FTP server"; char * network_ftp_install_auto = "ftp"; char * network_http_install = "HTTP server"; char * network_http_install_auto = "http"; +#ifndef DISABLE_KA + char * network_ka_install = "KA server"; char * network_ka_install_auto = "ka"; +#endif #endif char * thirdparty_install = "Load third party modules"; char * thirdparty_install_auto = "thirdparty"; @@ -274,6 +277,9 @@ static void method_select_and_prepare(void) means[i] = network_nfs_install; means_auto[i++] = network_nfs_install_auto; means[i] = network_ftp_install; means_auto[i++] = network_ftp_install_auto; means[i] = network_http_install; means_auto[i++] = network_http_install_auto; +#ifndef DISABLE_KA + means[i] = network_ka_install; means_auto[i++] = network_ka_install_auto; +#endif #endif #ifndef DISABLE_CDROM means[i] = cdrom_install; means_auto[i++] = cdrom_install_auto; @@ -314,6 +320,11 @@ static void method_select_and_prepare(void) if (!strcmp(choice, network_http_install)) results = http_prepare(); + +#ifndef DISABLE_KA + if (!strcmp(choice, network_ka_install)) + results = ka_prepare(); +#endif #endif #endif diff --git a/mdk-stage1/stage1.h b/mdk-stage1/stage1.h index a14311918..b6ec98ef7 100644 --- a/mdk-stage1/stage1.h +++ b/mdk-stage1/stage1.h @@ -35,6 +35,7 @@ extern char * interactive_fifo; #define MODE_AUTOMATIC (1 << 4) #define MODE_KEEP_MOUNTED (1 << 5) /* for rescue */ #define MODE_DEBUGSTAGE1 (1 << 6) +#define MODE_RAMDISK (1 << 9) #define MODE_CHANGEDISK (1 << 10) #define MODE_THIRDPARTY (1 << 11) #define MODE_NOAUTO (1 << 12) |