You can subscribe to this list here.
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
(330) |
May
(46) |
Jun
(52) |
Jul
(39) |
Aug
(26) |
Sep
(12) |
Oct
(110) |
Nov
(178) |
Dec
(161) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
(99) |
Feb
(106) |
Mar
(97) |
Apr
(93) |
May
(81) |
Jun
(112) |
Jul
(84) |
Aug
(142) |
Sep
(165) |
Oct
(89) |
Nov
(120) |
Dec
(117) |
| 2009 |
Jan
(141) |
Feb
(137) |
Mar
(121) |
Apr
(96) |
May
(207) |
Jun
(194) |
Jul
(210) |
Aug
(155) |
Sep
(91) |
Oct
(159) |
Nov
(123) |
Dec
(166) |
| 2010 |
Jan
(142) |
Feb
(79) |
Mar
(137) |
Apr
(126) |
May
(78) |
Jun
(69) |
Jul
(54) |
Aug
(161) |
Sep
(76) |
Oct
(98) |
Nov
(113) |
Dec
(95) |
| 2011 |
Jan
(101) |
Feb
(118) |
Mar
(74) |
Apr
(75) |
May
(32) |
Jun
(32) |
Jul
(39) |
Aug
(74) |
Sep
(48) |
Oct
(134) |
Nov
(133) |
Dec
(55) |
| 2012 |
Jan
(94) |
Feb
(143) |
Mar
(80) |
Apr
(75) |
May
(36) |
Jun
(46) |
Jul
(47) |
Aug
(51) |
Sep
(10) |
Oct
(36) |
Nov
(38) |
Dec
(19) |
| 2013 |
Jan
(26) |
Feb
(40) |
Mar
(48) |
Apr
(26) |
May
(34) |
Jun
(20) |
Jul
(18) |
Aug
(10) |
Sep
(8) |
Oct
(6) |
Nov
(64) |
Dec
(18) |
| 2014 |
Jan
(26) |
Feb
(42) |
Mar
(126) |
Apr
(122) |
May
(73) |
Jun
(33) |
Jul
(14) |
Aug
(20) |
Sep
(12) |
Oct
(33) |
Nov
(20) |
Dec
(49) |
| 2015 |
Jan
(79) |
Feb
(64) |
Mar
(49) |
Apr
(6) |
May
(9) |
Jun
(2) |
Jul
(27) |
Aug
|
Sep
|
Oct
(4) |
Nov
(1) |
Dec
(12) |
| 2016 |
Jan
(72) |
Feb
(9) |
Mar
(13) |
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
1
(14) |
2
(6) |
3
|
4
(2) |
5
(2) |
|
6
|
7
|
8
(6) |
9
(1) |
10
(1) |
11
|
12
(1) |
|
13
|
14
|
15
|
16
|
17
|
18
|
19
|
|
20
|
21
(1) |
22
|
23
(4) |
24
(1) |
25
|
26
|
|
27
(3) |
28
(3) |
29
|
30
(1) |
31
|
|
|
|
From: <ow...@us...> - 2007-05-30 13:08:27
|
Revision: 373
http://ipcop.svn.sourceforge.net/ipcop/?rev=373&view=rev
Author: owes
Date: 2007-05-30 06:08:14 -0700 (Wed, 30 May 2007)
Log Message:
-----------
Better return something that can be used.
Modified Paths:
--------------
ipcop/trunk/src/installer/helper.c
Modified: ipcop/trunk/src/installer/helper.c
===================================================================
--- ipcop/trunk/src/installer/helper.c 2007-05-28 15:12:32 UTC (rev 372)
+++ ipcop/trunk/src/installer/helper.c 2007-05-30 13:08:14 UTC (rev 373)
@@ -105,11 +105,11 @@
{
while (p != NULL)
{
- if (strcmp(p->item.key, key) == 0)
- return p->item.value;
- p = p->next;
+ if (strcmp(p->item.key, key) == 0)
+ return p->item.value;
+ p = p->next;
}
- return "MERDEMERDEMERDE";
+ return NULL;
}
/* Update a key or insert it */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ow...@us...> - 2007-05-28 15:12:32
|
Revision: 372
http://ipcop.svn.sourceforge.net/ipcop/?rev=372&view=rev
Author: owes
Date: 2007-05-28 08:12:32 -0700 (Mon, 28 May 2007)
Log Message:
-----------
move hardware detection into hardware.c
Modified Paths:
--------------
ipcop/trunk/src/installer/Makefile
ipcop/trunk/src/installer/common.h
ipcop/trunk/src/installer/main.c
Added Paths:
-----------
ipcop/trunk/src/installer/hardware.c
Modified: ipcop/trunk/src/installer/Makefile
===================================================================
--- ipcop/trunk/src/installer/Makefile 2007-05-28 14:01:07 UTC (rev 371)
+++ ipcop/trunk/src/installer/Makefile 2007-05-28 15:12:32 UTC (rev 372)
@@ -4,7 +4,7 @@
LIBS = -lhd_tiny -lsysfs -lnewt -lslang
HEADERS = common.h
-OBJS = main.o helper.o language.o partition.o
+OBJS = main.o helper.o hardware.o language.o partition.o
all: installer
strip installer
Modified: ipcop/trunk/src/installer/common.h
===================================================================
--- ipcop/trunk/src/installer/common.h 2007-05-28 14:01:07 UTC (rev 371)
+++ ipcop/trunk/src/installer/common.h 2007-05-28 15:12:32 UTC (rev 372)
@@ -78,11 +78,15 @@
*/
extern char **harddisklist;
+extern char **cdromlist;
+extern char **floppylist;
extern unsigned int nummodules;
extern char **modules;
extern hd_hw_item_t *module_type;
+void scanhardware(int nopcmcia, int nousb);
+
/*
*/
Added: ipcop/trunk/src/installer/hardware.c
===================================================================
--- ipcop/trunk/src/installer/hardware.c (rev 0)
+++ ipcop/trunk/src/installer/hardware.c 2007-05-28 15:12:32 UTC (rev 372)
@@ -0,0 +1,211 @@
+/*
+ * hardware.c: Probing, Scanning, everything to find out what's there
+ *
+ * This program is distributed under the terms of the GNU General Public
+ * Licence. See the file COPYING for details.
+ *
+ * (c) 2007, the IPCop team
+ *
+ * $Id$
+ *
+ */
+
+
+#include <hd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include "common.h"
+
+
+// Build a list of specified items and load corresponding driver
+unsigned int nummodules = 0;
+char **modules = NULL;
+hd_hw_item_t *module_type = NULL;
+
+
+// Device name are stored in Array of strings, last element allways NULL
+// Scanharware() contructs specifics lists of material
+// note: lists also serve for newtWinMenu
+char **cdromlist = NULL;// global list of CDROM
+char **harddisklist = NULL;// of harddrive
+char **floppylist = NULL;// of floppys
+
+
+unsigned int
+probehw(hd_hw_item_t item)
+{
+ char string[STRING_SIZE];
+ int addedmodule = 0;
+ hd_data_t *hd_data;
+ hd_data = calloc(1, sizeof *hd_data);
+
+ driver_info_t *di = NULL;
+ str_list_t *sl1, *sl2;
+ //get list of devices type item
+ hd_t *hd = hd_list(hd_data, item, 1, NULL);
+ // Then issue modprobe commands....
+ for (; hd; hd = hd->next)
+ {
+ for (di = hd->driver_info; di; di = di->next)
+ {
+ for (sl1 = di->module.names, sl2 = di->module.mod_args;
+ sl1 && sl2; sl1 = sl1->next, sl2 = sl2->next)
+ {
+ modules = realloc(modules, sizeof(char *) * (nummodules + 1));
+ module_type = realloc(module_type, sizeof(hd_hw_item_t) * (nummodules + 1));
+
+ modules[nummodules] = strdup(sl1->str);
+ module_type[nummodules] = item;
+
+ snprintf(string, STRING_SIZE, "%s %s",
+ di->module.modprobe ? "modprobe" : "insmod", sl1->str);
+ mysystem(string);
+ nummodules++;
+ addedmodule++;
+ }
+ }
+ }
+
+ hd_free_hd_list(hd); /* free it */
+ free(hd_data);
+ return addedmodule; // number of new item loaded
+}
+
+
+// fill in tables with data
+void
+scanhardware(int nopcmcia, int nousb)
+{
+#if 0
+ if (strstr(line, "nopcmcia") == NULL)
+ {
+ fprintf(flog, "Initializing PCMCIA controllers.\n");
+ pcmcia = initialize_pcmcia();
+ if (pcmcia)
+ {
+ fprintf(flog, "Detected PCMCIA Controller: %s.\n", pcmcia);
+ sprintf(string, "/sbin/modprobe %s", pcmcia);
+ mysystem("/sbin/modprobe pcmcia_core");
+ mysystem(string);
+ mysystem("/sbin/modprobe pcmcia");
+ } else
+ {
+ fprintf(flog,
+ "Detected No PCMCIA Controller (will re-try later for floppy boot).\n");
+ }
+ } else
+ {
+ fprintf(flog, "Skipping PCMCIA detection.\n");
+ }
+ if (strstr(line, "nousb") == NULL)
+ {
+ fprintf(flog, "Initializing USB controllers.\n");
+ initialize_usb();
+ } else
+ {
+ fprintf(flog, "Skipping USB detection.\n");
+ }
+ }
+#endif
+
+ int scsi = 0,i = 0;
+ hd_t *hd = NULL;
+ hd_data_t *hd_data;
+ hd_data = calloc(1, sizeof *hd_data);
+
+ /* Always probe bridges etc first as more storage
+ * and network cards might fall out from these bridges.
+ */
+ hd = hd_list(hd_data, hw_usb_ctrl, 1, NULL);
+
+ if ( !nousb ) {
+ fprintf(flog, "Probing USB controllers\n");
+ probehw(hw_usb_ctrl);
+ }
+
+ if ( !nopcmcia ) {
+ fprintf(flog, "Probing PCMCIA controllers\n");
+ probehw(hw_pcmcia_ctrl);
+ fprintf(flog, "Probing Cardbus controllers\n");
+ probehw(hw_bridge);
+ }
+
+ fprintf(flog, "Probing storage controllers\n");
+ probehw(hw_storage_ctrl);
+
+ fprintf(flog, "Probing network cards\n");
+ probehw(hw_network_ctrl);
+
+ mysystem("modprobe sd_mod");
+ mysystem("modprobe ide-disk");
+
+ /* must delay a little until hardware is recognized.
+ If not, device name is not found and installer
+ restarts (seg fault).
+ */
+ sleep (7);
+ fprintf(flog, "Probing Hard Disk drives\n");
+ hd = hd_list(hd_data, hw_disk, 1, NULL);
+ for (i = 0; hd; hd = hd->next, i++)
+ {
+ fprintf(flog, "DevName %s\n", hd->unix_dev_name);
+ fprintf(flog, "Model %s\n", hd->model);
+ if (hd->detail && hd->detail->type == hd_detail_scsi)
+ scsi = 1;
+ harddisklist = realloc(harddisklist, sizeof(char *) * (i + 1));
+ harddisklist[i] = strdup (hd->unix_dev_name);
+ }
+ /* end with a null pointer */
+ harddisklist = realloc(harddisklist, sizeof(char *) * (i + 1));
+ harddisklist[i] = NULL;
+ hd_free_hd_list(hd); /* free it */
+
+ mysystem("modprobe usb-storage");
+ mysystem("modprobe sr_mod");
+ mysystem("modprobe ide-cd");
+
+ fprintf(flog, "Probing CD/DVD drives\n");
+ //CHECK: hd_list returns really the head AND add tohd_data???
+ hd = hd_list(hd_data, hw_cdrom, 1, NULL);
+ for (i = 0; hd; hd = hd->next, i++)
+ {
+ fprintf(flog, "DevName %s\n", hd->unix_dev_name);
+ fprintf(flog, "Model %s\n", hd->model);
+ if (hd->detail && hd->detail->type == hd_detail_scsi)
+ scsi = 1;
+ cdromlist = realloc(cdromlist, sizeof(char *) * (i + 1));
+ cdromlist[i] = strdup (hd->unix_dev_name);
+ }
+ /* end with a null pointer */
+ cdromlist = realloc(cdromlist, sizeof(char *) * (i + 1));
+ cdromlist[i] = NULL;
+ hd_free_hd_list(hd); /* free it */
+
+
+ mysystem("modprobe ide-floppy");
+
+ fprintf(flog, "Probing Floppy Disk drives\n");
+ hd = hd_list(hd_data, hw_floppy, 1, NULL);
+ for (i = 0; hd; hd = hd->next, i++)
+ {
+ fprintf(flog, "DevName %s\n", hd->unix_dev_name);
+ fprintf(flog, "DevName2 %s\n", hd->unix_dev_name2);
+ if (hd->detail && hd->detail->type == hd_detail_scsi)
+ scsi = 1;
+ floppylist = realloc(floppylist, sizeof(char *) * (i + 1));
+ floppylist[i] = strdup (hd->unix_dev_name);
+ }
+ /* end with a null pointer */
+ floppylist = realloc(floppylist, sizeof(char *) * (i + 1));
+ floppylist[i] = NULL;
+ hd_free_hd_list(hd); /* free it */
+ hd_free_hd_data(hd_data);
+ free(hd_data);
+
+ fprintf(flog, "Configuration.....\n");
+ for (i = 0; i < nummodules; i++)
+ fprintf(flog, "Modules\t\t%12s\tType\t%d\n", modules[i], module_type[i]);
+ if (scsi)
+ fprintf(flog, "SCSI YES\n");
+}
Property changes on: ipcop/trunk/src/installer/hardware.c
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ipcop/trunk/src/installer/main.c
===================================================================
--- ipcop/trunk/src/installer/main.c 2007-05-28 14:01:07 UTC (rev 371)
+++ ipcop/trunk/src/installer/main.c 2007-05-28 15:12:32 UTC (rev 372)
@@ -18,13 +18,11 @@
#include <errno.h>
-#include <hd.h>
#include <libintl.h>
#include <newt.h>
#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
#include <stdlib.h>
+#include <string.h>
#include "common.h"
@@ -33,196 +31,6 @@
FILE *fstderr = NULL;
-// Build a list of specified items and load corresponding driver
-unsigned int nummodules = 0;
-char **modules = NULL;
-hd_hw_item_t *module_type = NULL;
-
-unsigned int
-probehw(hd_hw_item_t item)
-{
- char string[STRING_SIZE];
- int addedmodule = 0;
- hd_data_t *hd_data;
- hd_data = calloc(1, sizeof *hd_data);
-
- driver_info_t *di = NULL;
- str_list_t *sl1, *sl2;
- //get list of devices type item
- hd_t *hd = hd_list(hd_data, item, 1, NULL);
- // Then issue modprobe commands....
- for (; hd; hd = hd->next)
- {
- for (di = hd->driver_info; di; di = di->next)
- {
- for (sl1 = di->module.names, sl2 = di->module.mod_args;
- sl1 && sl2; sl1 = sl1->next, sl2 = sl2->next)
- {
- modules = realloc(modules, sizeof(char *) * (nummodules + 1));
- module_type = realloc(module_type, sizeof(hd_hw_item_t) * (nummodules + 1));
-
- modules[nummodules] = strdup(sl1->str);
- module_type[nummodules] = item;
-
- snprintf(string, STRING_SIZE, "%s %s",
- di->module.modprobe ? "modprobe" : "insmod", sl1->str);
- mysystem(string);
- nummodules++;
- addedmodule++;
- }
- }
- }
-
- hd_free_hd_list(hd); /* free it */
- free(hd_data);
- return addedmodule; // number of new item loaded
-}
-
-// Device name are stored in Array of strings, last element allways NULL
-// Scanharware() contructs specifics lists of material
-// note: lists also serve for newtWinMenu
-char **cdromlist = NULL;// global list of CDROM
-char **harddisklist = NULL;// of harddrive
-char **floppylist = NULL;// of floppys
-
-// fill in tables with data
-void
-scanhardware()
-{
-#if 0
- if (strstr(line, "nopcmcia") == NULL)
- {
- fprintf(flog, "Initializing PCMCIA controllers.\n");
- pcmcia = initialize_pcmcia();
- if (pcmcia)
- {
- fprintf(flog, "Detected PCMCIA Controller: %s.\n", pcmcia);
- sprintf(string, "/sbin/modprobe %s", pcmcia);
- mysystem("/sbin/modprobe pcmcia_core");
- mysystem(string);
- mysystem("/sbin/modprobe pcmcia");
- } else
- {
- fprintf(flog,
- "Detected No PCMCIA Controller (will re-try later for floppy boot).\n");
- }
- } else
- {
- fprintf(flog, "Skipping PCMCIA detection.\n");
- }
- if (strstr(line, "nousb") == NULL)
- {
- fprintf(flog, "Initializing USB controllers.\n");
- initialize_usb();
- } else
- {
- fprintf(flog, "Skipping USB detection.\n");
- }
- }
-#endif
-
- int scsi = 0,i = 0;
- hd_t *hd = NULL;
- hd_data_t *hd_data;
- hd_data = calloc(1, sizeof *hd_data);
-
- /* Always probe bridges etc first as more storage
- * and network cards might fall out from these bridges.
- */
- hd = hd_list(hd_data, hw_usb_ctrl, 1, NULL);
-
- if ( strcmp ("1", find_kv(kv,"nousb")) != 0) {
- fprintf(flog, "Probing USB controllers\n");
- probehw(hw_usb_ctrl);
- }
-
- if ( strcmp ("1", find_kv(kv,"nopcmcia")) != 0) {
- fprintf(flog, "Probing PCMCIA controllers\n");
- probehw(hw_pcmcia_ctrl);
- fprintf(flog, "Probing Cardbus controllers\n");
- probehw(hw_bridge);
- }
-
- fprintf(flog, "Probing storage controllers\n");
- probehw(hw_storage_ctrl);
-
- fprintf(flog, "Probing network cards\n");
- probehw(hw_network_ctrl);
-
- mysystem("modprobe sd_mod");
- mysystem("modprobe ide-disk");
-
- /* must delay a little until hardware is recognized.
- If not, device name is not found and installer
- restarts (seg fault).
- */
- sleep (7);
- fprintf(flog, "Probing Hard Disk drives\n");
- hd = hd_list(hd_data, hw_disk, 1, NULL);
- for (i = 0; hd; hd = hd->next, i++)
- {
- fprintf(flog, "DevName %s\n", hd->unix_dev_name);
- fprintf(flog, "Model %s\n", hd->model);
- if (hd->detail && hd->detail->type == hd_detail_scsi)
- scsi = 1;
- harddisklist = realloc(harddisklist, sizeof(char *) * (i + 1));
- harddisklist[i] = strdup (hd->unix_dev_name);
- }
- /* end with a null pointer */
- harddisklist = realloc(harddisklist, sizeof(char *) * (i + 1));
- harddisklist[i] = NULL;
- hd_free_hd_list(hd); /* free it */
-
- mysystem("modprobe usb-storage");
- mysystem("modprobe sr_mod");
- mysystem("modprobe ide-cd");
-
- fprintf(flog, "Probing CD/DVD drives\n");
- //CHECK: hd_list returns really the head AND add tohd_data???
- hd = hd_list(hd_data, hw_cdrom, 1, NULL);
- for (i = 0; hd; hd = hd->next, i++)
- {
- fprintf(flog, "DevName %s\n", hd->unix_dev_name);
- fprintf(flog, "Model %s\n", hd->model);
- if (hd->detail && hd->detail->type == hd_detail_scsi)
- scsi = 1;
- cdromlist = realloc(cdromlist, sizeof(char *) * (i + 1));
- cdromlist[i] = strdup (hd->unix_dev_name);
- }
- /* end with a null pointer */
- cdromlist = realloc(cdromlist, sizeof(char *) * (i + 1));
- cdromlist[i] = NULL;
- hd_free_hd_list(hd); /* free it */
-
-
- mysystem("modprobe ide-floppy");
-
- fprintf(flog, "Probing Floppy Disk drives\n");
- hd = hd_list(hd_data, hw_floppy, 1, NULL);
- for (i = 0; hd; hd = hd->next, i++)
- {
- fprintf(flog, "DevName %s\n", hd->unix_dev_name);
- fprintf(flog, "DevName2 %s\n", hd->unix_dev_name2);
- if (hd->detail && hd->detail->type == hd_detail_scsi)
- scsi = 1;
- floppylist = realloc(floppylist, sizeof(char *) * (i + 1));
- floppylist[i] = strdup (hd->unix_dev_name);
- }
- /* end with a null pointer */
- floppylist = realloc(floppylist, sizeof(char *) * (i + 1));
- floppylist[i] = NULL;
- hd_free_hd_list(hd); /* free it */
- hd_free_hd_data(hd_data);
- free(hd_data);
-
- fprintf(flog, "Configuration.....\n");
- for (i = 0; i < nummodules; i++)
- fprintf(flog, "Modules\t\t%12s\tType\t%d\n", modules[i], module_type[i]);
- if (scsi)
- fprintf(flog, "SCSI YES\n");
-}
-
-
// Try to load from network the IPCop tarballs
// If success, they are copied in ramdisk "/tmp"
// Interface receive an IP with dhcp
@@ -481,7 +289,10 @@
newtWinMessage(TITLE, gettext("TR_OK"), line);
/*TR*/
statuswindow(60, 4, TITLE, gettext("Probing Hardware.... Please Wait!"));
- scanhardware(); // find nics cdrom harddisk & floppies
+ // find nics cdrom harddisk & floppies
+ scanhardware(0, // noscan for pcmcia
+ 0 // noscan for usb
+ );
mysystem("/sbin/udevstart"); // Create device files now
newtPopWindow();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ges...@us...> - 2007-05-28 14:01:06
|
Revision: 371
http://ipcop.svn.sourceforge.net/ipcop/?rev=371&view=rev
Author: gespinasse
Date: 2007-05-28 07:01:07 -0700 (Mon, 28 May 2007)
Log Message:
-----------
Cosmetic changes in check_toolchain_prerequisites
- replace in display the first program letter that was forced uppercase
- remove the unneeded comment for 'Check for ...' when the line after mean
exactly the same
As it turn that mawk is not supported by glibc, force to test for gawk
gawk is needed.
On debian sarge, compilation look right after apt-get install gawk autoconf automake
-This line, and those below, will be ignored--
M trunk/make.sh
Modified Paths:
--------------
ipcop/trunk/make.sh
Modified: ipcop/trunk/make.sh
===================================================================
--- ipcop/trunk/make.sh 2007-05-28 09:39:42 UTC (rev 370)
+++ ipcop/trunk/make.sh 2007-05-28 14:01:07 UTC (rev 371)
@@ -627,71 +627,63 @@
echo -ne "${BOLD}Checking for toolchain prerequisites${NORMAL}\n" | tee -a $LOGFILE
- # Check for bash
- echo -ne "Checking for GNU Bash" | tee -a $LOGFILE
+ echo -ne "Checking for GNU bash" | tee -a $LOGFILE
if bash --version | grep -qEi 'GNU bash' ; then
beautify message DONE
else
- exiterror "GNU Bash not found!"
+ exiterror "GNU bash not found!"
fi
- # Check for binutils
- echo -ne "Checking for GNU Binutils" | tee -a $LOGFILE
+ echo -ne "Checking for GNU binutils" | tee -a $LOGFILE
if ld --version | grep -qEi 'GNU ld' ; then
beautify message DONE
else
- exiterror "GNU Binutils not found!"
+ exiterror "GNU binutils not found!"
fi
- # Check for bison
- echo -ne "Checking for GNU Bison" | tee -a $LOGFILE
+ echo -ne "Checking for GNU bison" | tee -a $LOGFILE
if bison --version | grep -qEi '(GNU Bison)' ; then
beautify message DONE
else
- exiterror "GNU Bison not found!"
+ exiterror "GNU bison not found!"
fi
- # Check for bzip2
- echo -ne "Checking for GNU Bzip2" | tee -a $LOGFILE
+ echo -ne "Checking for GNU bzip2" | tee -a $LOGFILE
if bzip2 --version 2>&1 < /dev/null | head -n1 | cut -d" " -f1,6- | grep -qEi '^bzip2' ; then
beautify message DONE
else
- exiterror "GNU Bzip2 not found!"
+ exiterror "GNU bzip2 not found!"
fi
- # Check for coreutils
- echo -ne "Checking for GNU Coreutils" | tee -a $LOGFILE
+ echo -ne "Checking for GNU coreutils" | tee -a $LOGFILE
if ls --version | head -n1 | grep -qEi 'coreutils' ; then
beautify message DONE
else
- exiterror "GNU Coreutils not found!"
+ exiterror "GNU coreutils not found!"
fi
- # Check for diffutils
- echo -ne "Checking for GNU Diffutils" | tee -a $LOGFILE
+ echo -ne "Checking for GNU diffutils" | tee -a $LOGFILE
if diff --version | grep -qEi '(GNU diffutils)' ; then
beautify message DONE
else
- exiterror "GNU Diffutils not found!"
+ exiterror "GNU diffutils not found!"
fi
- # Check for findutils
echo -ne "Checking for GNU Findutils" | tee -a $LOGFILE
if find --version | grep -qEi 'GNU find' ; then
beautify message DONE
else
- exiterror "GNU Findutils not found!"
+ exiterror "GNU findutils not found!"
fi
- # Check for awk (sarge use mawk and not GNU Awk)
- echo -ne "Checking for Gnu awk or mawk" | tee -a $LOGFILE
- if awk -W version 2>&1 | grep -qEi 'awk' ; then
+ echo -ne "Checking for Gnu awk" | tee -a $LOGFILE
+ if gawk --version | grep -qEi 'GNU awk' ; then
beautify message DONE
else
- exiterror "awk not found"
+ beautify message FAIL
+ exiterror "GNU gawk not found, mawk is not supported by glibc"
fi
- # Check for gcc
echo -ne "Checking for GNU CC" | tee -a $LOGFILE
if gcc --version | grep -qEi '(GCC)' ; then
beautify message DONE
@@ -700,38 +692,34 @@
fi
# Check for glibc
- echo -ne "Checking for GNU Libc" | tee -a $LOGFILE
+ echo -ne "Checking for GNU libc" | tee -a $LOGFILE
if iconv --version | grep -qEi '(GNU libc)' ; then
beautify message DONE
else
- exiterror "GNU Libc not found!"
+ exiterror "GNU libc not found!"
fi
- # Check for grep
- echo -ne "Checking for GNU Grep" | tee -a $LOGFILE
+ echo -ne "Checking for GNU grep" | tee -a $LOGFILE
if grep --version | grep -qEi '(GNU grep)' ; then
beautify message DONE
else
- exiterror "GNU Grep not found!"
+ exiterror "GNU grep not found!"
fi
- # Check for gzip
- echo -ne "Checking for GNU Zip" | tee -a $LOGFILE
+ echo -ne "Checking for GNU zip" | tee -a $LOGFILE
if gzip --version | grep -qEi '^gzip ' ; then
beautify message DONE
else
- exiterror "GNU Zip not found!"
+ exiterror "GNU gzip not found!"
fi
- # Check for linux-2.6
echo -ne "Checking for Linux Kernel v2.6" | tee -a $LOGFILE
if [ `uname -r | awk -F"." '{print $1$2}'` -eq 26 ]; then
beautify message DONE
else
- exiterror "A Linux Kernel v2.6 is necessary to build!"
+ exiterror "A Linux Kernel v2.6 is necessary to build glibc"
fi
- # Check for make
echo -ne "Checking for GNU Make" | tee -a $LOGFILE
if make --version | grep -qEi 'GNU Make' ; then
beautify message DONE
@@ -739,7 +727,6 @@
exiterror "GNU Make not found!"
fi
- # Check for patch
echo -ne "Checking for GNU Patch" | tee -a $LOGFILE
if patch --version | grep -qEi '^patch ' ; then
beautify message DONE
@@ -747,7 +734,6 @@
exiterror "GNU Patch not found!"
fi
- # Check for sed
echo -ne "Checking for GNU Sed" | tee -a $LOGFILE
if sed --version | grep -qEi 'GNU sed' ; then
beautify message DONE
@@ -755,7 +741,6 @@
exiterror "GNU Sed not found!"
fi
- # Check for tar
echo -ne "Checking for GNU Tar" | tee -a $LOGFILE
if tar --version | grep -qEi '(GNU tar)' ; then
beautify message DONE
@@ -772,7 +757,6 @@
exiterror "Flex/Lex not found"
fi
- # Check for autoconf
echo -ne "Checking for GNU Autoconf" | tee -a $LOGFILE
if autoconf --version | grep -qEi '(GNU Autoconf)' ; then
beautify message DONE
@@ -780,7 +764,6 @@
exiterror "GNU Autoconf not found"
fi
- # Check for automake
echo -ne "Checking for GNU Automake" | tee -a $LOGFILE
if automake --version | grep -qEi '(GNU Automake)' ; then
beautify message DONE
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ges...@us...> - 2007-05-28 09:39:42
|
Revision: 370
http://ipcop.svn.sourceforge.net/ipcop/?rev=370&view=rev
Author: gespinasse
Date: 2007-05-28 02:39:42 -0700 (Mon, 28 May 2007)
Log Message:
-----------
During awk detection, use a syntax compatible with mawk and GNU awk
Add check_toolchain_prerequisites before attempting to build the toolchain
Modified Paths:
--------------
ipcop/trunk/make.sh
Modified: ipcop/trunk/make.sh
===================================================================
--- ipcop/trunk/make.sh 2007-05-27 21:42:19 UTC (rev 369)
+++ ipcop/trunk/make.sh 2007-05-28 09:39:42 UTC (rev 370)
@@ -683,12 +683,12 @@
exiterror "GNU Findutils not found!"
fi
- # Check for gawk
- echo -ne "Checking for GNU Awk" | tee -a $LOGFILE
- if awk --version | grep -qEi 'GNU Awk' ; then
+ # Check for awk (sarge use mawk and not GNU Awk)
+ echo -ne "Checking for Gnu awk or mawk" | tee -a $LOGFILE
+ if awk -W version 2>&1 | grep -qEi 'awk' ; then
beautify message DONE
else
- exiterror "GNU Awk not found"
+ exiterror "awk not found"
fi
# Check for gcc
@@ -1883,6 +1883,8 @@
;;
toolchain)
prepareenv
+ # Check if host can build the toolchain
+ check_toolchain_prerequisites
toolchain_build
echo "Create toolchain tar.gz for $MACHINE" | tee -a $LOGFILE
# Safer inside the chroot
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ow...@us...> - 2007-05-27 21:42:21
|
Revision: 369
http://ipcop.svn.sourceforge.net/ipcop/?rev=369&view=rev
Author: owes
Date: 2007-05-27 14:42:19 -0700 (Sun, 27 May 2007)
Log Message:
-----------
Installer modifications. Far from complete, continues in the coming days.
Modified Paths:
--------------
ipcop/trunk/src/installer/Makefile
ipcop/trunk/src/installer/common.h
ipcop/trunk/src/installer/helper.c
ipcop/trunk/src/installer/main.c
Added Paths:
-----------
ipcop/trunk/src/installer/language.c
ipcop/trunk/src/installer/partition.c
Modified: ipcop/trunk/src/installer/Makefile
===================================================================
--- ipcop/trunk/src/installer/Makefile 2007-05-27 15:58:57 UTC (rev 368)
+++ ipcop/trunk/src/installer/Makefile 2007-05-27 21:42:19 UTC (rev 369)
@@ -4,7 +4,7 @@
LIBS = -lhd_tiny -lsysfs -lnewt -lslang
HEADERS = common.h
-OBJS = helper.o main.o
+OBJS = main.o helper.o language.o partition.o
all: installer
strip installer
Modified: ipcop/trunk/src/installer/common.h
===================================================================
--- ipcop/trunk/src/installer/common.h 2007-05-27 15:58:57 UTC (rev 368)
+++ ipcop/trunk/src/installer/common.h 2007-05-27 21:42:19 UTC (rev 369)
@@ -1,20 +1,21 @@
-/* IPCop.
+/*
+ * common.h: Global defines, function definitions etc.
*
* This program is distributed under the terms of the GNU General Public
* Licence. See the file COPYING for details.
*
- * (c) Franck Bourdonnec, 2006
- * Serie of functions helping the setup program.
- * -manage collection of key=values
- * -unanttended setup
- * -...
+ * (c) 2007, the IPCop team
*
* $Id$
*
*/
-#ifndef COMMON
-#define COMMON
+#ifndef __COMMON_H
+#define __COMMON_H
+
+#include <hd.h>
+#include <stdio.h>
+
#define TRUE 1
#define FALSE 0
#define STRING_SIZE 256
@@ -23,25 +24,37 @@
#define NETWORK_INSTALL 1
#define TITLE NAME " v"VERSION " - " SLOGAN
+
+/*
+ Partioning settings (all in MByte)
+*/
+#define DISK_MINIMUM 256
+#define ROOT_MINIMUM 128
+#define SWAP_MINIMUM 32
+#define SWAP_MAXIMUM 256
+
+
#if defined(__powerpc__)
-#define BOOT_PARTITION 32
+#define BOOT_PARTITION 32
#else
-#define BOOT_PARTITION 8
+#define BOOT_PARTITION 8
#endif
-#define ROOT_MINIMUM 200
-#define ROOT_MAXIMUM 8192
-/* Use minix if disk is under this Mb size
- 32 Mb for swap minimal when enought memory
- 20 Mb for the log partition
+
+/*
+ Log and error handles are needed for mysystem helper function.
*/
-#define SMALL_DISK (ROOT_MINIMUM+32+20+BOOT_PARTITION)
+extern FILE *flog;
+extern FILE *fstderr;
-//#include <stdio.h>
-//extern FILE *flog = NULL;
-//extern FILE *fstderr = NULL;
+int mysystem(char *command);
+char *short_ddev(int disk);
+void statuswindow(int width, int height, char *title, char *text, ...);
+/*
+ Definitions and functions for handling of configuration files.
+*/
typedef struct itemkv
{
char *key;
@@ -61,4 +74,30 @@
void read_kv_from_line(NODEKV **list, char *line);
+/*
+
+*/
+extern char **harddisklist;
+extern unsigned int nummodules;
+extern char **modules;
+extern hd_hw_item_t *module_type;
+
+
+/*
+
+*/
+void setlanguage (NODEKV *kv);
+
+
+/*
+
+*/
+extern char **partition_label;
+
+int autopart( int selected_hd, long int disk_size);
+int makedisk( int selected_hd, int *bootpartexist, int autolabel);
+void createinitrd(void);
+void make_bootable(int selected_hd, int bootpartexist);
+
+
#endif
Modified: ipcop/trunk/src/installer/helper.c
===================================================================
--- ipcop/trunk/src/installer/helper.c 2007-05-27 15:58:57 UTC (rev 368)
+++ ipcop/trunk/src/installer/helper.c 2007-05-27 21:42:19 UTC (rev 369)
@@ -1,13 +1,10 @@
-/* IPCop.
+/*
+ * helper.c: helper functions
*
* This program is distributed under the terms of the GNU General Public
* Licence. See the file COPYING for details.
*
- * (c) Franck Bourdonnec, 2006
- * Serie of functions helping the setup program.
- * -manage collection of key=values
- * -unanttended setup
- * -...
+ * (c) 2007, the IPCop team
*
* $Id$
*
@@ -15,9 +12,84 @@
#include <stdio.h>
#include <malloc.h>
+#include <newt.h>
+#include <stdlib.h>
#include <string.h>
#include "common.h"
+
+/* Little wrapper. */
+int
+mysystem(char *command)
+{
+ char mycommand[2000+20]; //we have a 2k buffer for the initrd setup!
+
+#if 0
+ snprintf(mycommand, STRING_SIZE, "%s >>%s 2>>%s", command, flog, flog);
+#else
+ snprintf(mycommand, STRING_SIZE, "%s >> /dev/tty6", command);
+#endif
+ fprintf(flog, "Running command: %s\n", command);
+ return system(mycommand);
+}
+
+
+//
+//helper, returns the name of the device without '/dev/'
+//
+// Note : what if the device name is under a subdir like '/dev/scsi/sda' ?
+char *
+short_ddev(int disk) {
+ //char *p = 1+strrchr (harddisklist[disk],'/');
+ //if ((p == NULL+1))
+ if (strncmp("/dev/", harddisklist[disk],5) != 0)
+ {
+ fprintf(flog, "HARDDISK %s: cannot interprete this name...\n",
+ harddisklist[disk]);
+ exit (1); // fatal!
+ }
+ return harddisklist[disk]+5;
+}
+
+
+void
+statuswindow(int width, int height, char *title, char *text, ...)
+{
+ newtComponent t, f;
+ char *buf = NULL;
+ int size = 0;
+ int i = 0;
+ va_list args;
+
+ va_start(args, text);
+
+ do
+ {
+ size += 1000;
+ if (buf)
+ free(buf);
+ buf = malloc(size);
+ i = vsnprintf(buf, size, text, args);
+ } while (i == size);
+
+ va_end(args);
+
+ newtCenteredWindow(width, height, title);
+
+ t = newtTextbox(1, 1, width - 2, height - 2, NEWT_TEXTBOX_WRAP);
+ newtTextboxSetText(t, buf);
+ f = newtForm(NULL, NULL, 0);
+
+ free(buf);
+
+ newtFormAddComponent(f, t);
+
+ newtDrawForm(f);
+ newtRefresh();
+ newtFormDestroy(f);
+}
+
+
/* insert in front of the list */
void add_kv (NODEKV **kvhead, char *key, char *value)
{
Added: ipcop/trunk/src/installer/language.c
===================================================================
--- ipcop/trunk/src/installer/language.c (rev 0)
+++ ipcop/trunk/src/installer/language.c 2007-05-27 21:42:19 UTC (rev 369)
@@ -0,0 +1,114 @@
+/*
+ * lang.c: Language selection
+ *
+ * This program is distributed under the terms of the GNU General Public
+ * Licence. See the file COPYING for details.
+ *
+ * (c) 2007, the IPCop team
+ *
+ * $Id$
+ *
+ */
+
+
+#include <libintl.h>
+#include <newt.h>
+#include <stdlib.h>
+#include <string.h>
+#include "common.h"
+
+
+void
+setlanguage (NODEKV *kv)
+{
+ int choice=0;
+#ifdef LANG_EN_ONLY
+ char *langnames[] = { "English (British)", NULL };
+ char *install_locale[] = { "en_GB", NULL };
+#else
+ char *langnames[] = { "Portugu\xEAs (Brazil)", "Cestina",
+ "Dansk", "Deutsch",
+ "English (British)", "Espa\xF1ol",
+ "Fran\xE7ais", "Hellenic",
+ "Italiano", "Spanish Latino",
+ "Magyar", "Nederlands",
+ "Norsk", "Polski",
+ "Portugu\xEAs", "Soomali",
+ "Suomi", "Svenska",
+ "T\xFCrk\xE7e", "Tieng Viet",
+ NULL
+ };
+ char *install_locale[] = { "pt_BR", "cs_CZ",
+ "da_DK", "de_DE",
+ "en_GB", "es_ES",
+ "fr_FR", "el_GR",
+ "it_IT", "la_LA",
+ "hu_HU", "nl_NL",
+ "no_NO", "pl_PL",
+ "pt_PT", "so",
+ "fi_FI", "sv_SE",
+ "tr_TR", "vi_VN",
+ NULL
+ };
+ char *langnames_short[] = { "pt", "cs",
+ "da", "de",
+ "en", "es",
+ "fr", "el",
+ "it", "la",
+ "hu", "nl",
+ "no", "pl",
+ "pt", "so",
+ "fi", "sv",
+ "tr", "vi",
+ NULL
+ };
+
+ /* English is the default */
+ for (choice = 0; langnames[choice]; choice++)
+ {
+ if (strcmp(langnames[choice], "English (British)") == 0)
+ break;
+ }
+ if (!langnames[choice]){
+ fprintf(flog, "FATAL erro: english language not found. \n");
+ exit (1);
+ }
+
+ int rc = sizeof(langnames)/sizeof(langnames[0])-1; /* assume not recognized choice */
+ char *lang;
+ if ((lang=find_kv(kv, "lang")) != NULL)
+ for (rc = 0; langnames[rc]; rc++) /* compare to known shortnames */
+ if (strcmp(langnames_short[rc], lang) == 0)
+ break;
+
+ if (langnames[rc]) /* fine, a recognized choice */
+ choice = rc;
+ else /* interactive selection for lang (choice) */
+ newtWinMenu("Language selection",
+ "Select the language you wish to use for the " NAME
+ ".", 50, 5, 5, 8, langnames, &choice, "Ok", NULL);
+
+ if (strcmp(install_locale[choice], "el_GR") == 0)
+ mysystem("/bin/setfont iso07u-16");
+ else if (strcmp(install_locale[choice], "pt_PT") == 0)
+ mysystem("/bin/setfont lat1-16");
+ else if (strcmp(install_locale[choice], "pt_BR") == 0)
+ mysystem("/bin/setfont lat1-16");
+ else if (strcmp(install_locale[choice], "cs_CZ") == 0)
+ mysystem("/bin/setfont lat2-16");
+ else if (strcmp(install_locale[choice], "hu_HU") == 0)
+ mysystem("/bin/setfont lat2-16");
+ else if (strcmp(install_locale[choice], "pl_PL") == 0)
+ mysystem("/bin/setfont lat2-16");
+ else if (strcmp(install_locale[choice], "tr_TR") == 0)
+ mysystem("/bin/setfont lat5-16");
+ else if (strcmp(install_locale[choice], "vi_VN") == 0)
+ mysystem("/bin/setfont viscii10-8x16");
+ else
+#endif
+ mysystem("/bin/setfont lat0-16");
+
+ setlocale(LC_MESSAGES, install_locale[choice]);
+ bindtextdomain("install", "/share/locale");
+ textdomain("install");
+}
Property changes on: ipcop/trunk/src/installer/language.c
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ipcop/trunk/src/installer/main.c
===================================================================
--- ipcop/trunk/src/installer/main.c 2007-05-27 15:58:57 UTC (rev 368)
+++ ipcop/trunk/src/installer/main.c 2007-05-27 21:42:19 UTC (rev 369)
@@ -1,10 +1,13 @@
-/* IPCop firewall.
+/*
+ * main.c: installer main loop
*
* This program is distributed under the terms of the GNU General Public
* Licence. See the file COPYING for details.
*
* Written by Alan Hourihane <al...@fa...>
*
+ * (c) 2007, the IPCop team
+ *
* This is the first stage installer. It detects a source for
* reading ipcop tarball, then it partitions a disk to
* decompress to tarball.
@@ -13,185 +16,26 @@
*
*/
+
+#include <errno.h>
+#include <hd.h>
+#include <libintl.h>
+#include <newt.h>
#include <stdio.h>
-#include <unistd.h>
#include <string.h>
+#include <unistd.h>
#include <stdlib.h>
-#include <errno.h>
-#include <newt.h>
-#include <libintl.h>
-#include <dirent.h>
-#include <sys/stat.h>
-#include <hd.h>
#include "common.h"
-NODEKV *kv = NULL; // contains a list key=value pairs
+
+NODEKV *kv = NULL; // contains a list key=value pairs
FILE *flog = NULL;
FILE *fstderr = NULL;
-// BUG or config problem? GRUB really hates minix filesystem (error 17)
-//#define MINIX
-/* Little wrapper. */
-int
-mysystem(char *command)
-{
- char mycommand[2000+20]; //we have a 2k buffer for the initrd setup!
-
-#if 0
- snprintf(mycommand, STRING_SIZE, "%s >>%s 2>>%s", command, flog, flog);
-#else
- snprintf(mycommand, STRING_SIZE, "%s >> /dev/tty6", command);
-#endif
- fprintf(flog, "Running command: %s\n", command);
- return system(mycommand);
-}
-
-//
-// After sourcefile are decompressed on harddisk, make room on /tmp
-//
-void deletetarballs()
-{
- mysystem("rm -f /tmp/" SNAME "-" VERSION "-varlog.tar.lzma");
- mysystem("rm -f /tmp/" SNAME "-" VERSION "-config.tar.lzma");
- mysystem("rm -f /tmp/" SNAME "-" VERSION ".tar.lzma");
-}
-
-void
-statuswindow(int width, int height, char *title, char *text, ...)
-{
- newtComponent t, f;
- char *buf = NULL;
- int size = 0;
- int i = 0;
- va_list args;
-
- va_start(args, text);
-
- do
- {
- size += 1000;
- if (buf)
- free(buf);
- buf = malloc(size);
- i = vsnprintf(buf, size, text, args);
- } while (i == size);
-
- va_end(args);
-
- newtCenteredWindow(width, height, title);
-
- t = newtTextbox(1, 1, width - 2, height - 2, NEWT_TEXTBOX_WRAP);
- newtTextboxSetText(t, buf);
- f = newtForm(NULL, NULL, 0);
-
- free(buf);
-
- newtFormAddComponent(f, t);
-
- newtDrawForm(f);
- newtRefresh();
- newtFormDestroy(f);
-}
-
-void
-setlanguage (void)
-{
- int choice=0;
-#ifdef LANG_EN_ONLY
- char *langnames[] = { "English (British)", NULL };
- char *install_locale[] = { "en_GB", NULL };
-#else
- char *langnames[] = { "Português (Brazil)", "Cestina",
- "Dansk", "Deutsch",
- "English (British)", "Español",
- "Français", "Hellenic",
- "Italiano", "Spanish Latino",
- "Magyar", "Nederlands",
- "Norsk", "Polski",
- "Português", "Soomali",
- "Suomi", "Svenska",
- "Türkçe", "Tieng Viet",
- NULL
- };
- char *install_locale[] = { "pt_BR", "cs_CZ",
- "da_DK", "de_DE",
- "en_GB", "es_ES",
- "fr_FR", "el_GR",
- "it_IT", "la_LA",
- "hu_HU", "nl_NL",
- "no_NO", "pl_PL",
- "pt_PT", "so",
- "fi_FI", "sv_SE",
- "tr_TR", "vi_VN",
- NULL
- };
- char *langnames_short[] = { "pt", "cs",
- "da", "de",
- "en", "es",
- "fr", "el",
- "it", "la",
- "hu", "nl",
- "no", "pl",
- "pt", "so",
- "fi", "sv",
- "tr", "vi",
- NULL
- };
-
- /* English is the default */
- for (choice = 0; langnames[choice]; choice++)
- {
- if (strcmp(langnames[choice], "English (British)") == 0)
- break;
- }
- if (!langnames[choice]){
- fprintf(flog, "FATAL erro: english language not found. \n");
- exit (1);
- }
-
- int rc = sizeof(langnames)/sizeof(langnames[0])-1; /* assume not recognized choice */
- char *lang;
- if ((lang=find_kv(kv, "lang")) != NULL)
- for (rc = 0; langnames[rc]; rc++) /* compare to known shortnames */
- if (strcmp(langnames_short[rc], lang) == 0)
- break;
- if (langnames[rc]) /* fine, a recognized choice */
- choice = rc;
- else /* interactive selection for lang (choice) */
- newtWinMenu("Language selection",
- "Select the language you wish to use for the " NAME
- ".", 50, 5, 5, 8, langnames, &choice, "Ok", NULL);
-
- if (strcmp(install_locale[choice], "el_GR") == 0)
- mysystem("/bin/setfont iso07u-16");
- else if (strcmp(install_locale[choice], "pt_PT") == 0)
- mysystem("/bin/setfont lat1-16");
- else if (strcmp(install_locale[choice], "pt_BR") == 0)
- mysystem("/bin/setfont lat1-16");
- else if (strcmp(install_locale[choice], "cs_CZ") == 0)
- mysystem("/bin/setfont lat2-16");
- else if (strcmp(install_locale[choice], "hu_HU") == 0)
- mysystem("/bin/setfont lat2-16");
- else if (strcmp(install_locale[choice], "pl_PL") == 0)
- mysystem("/bin/setfont lat2-16");
- else if (strcmp(install_locale[choice], "tr_TR") == 0)
- mysystem("/bin/setfont lat5-16");
- else if (strcmp(install_locale[choice], "vi_VN") == 0)
- mysystem("/bin/setfont viscii10-8x16");
- else
-#endif
- mysystem("/bin/setfont lat0-16");
-
- setlocale(LC_MESSAGES, install_locale[choice]);
- bindtextdomain("install", "/share/locale");
- textdomain("install");
-}
-
-
// Build a list of specified items and load corresponding driver
unsigned int nummodules = 0;
-char **modules = NULL;
+char **modules = NULL;
hd_hw_item_t *module_type = NULL;
unsigned int
@@ -199,7 +43,7 @@
{
char string[STRING_SIZE];
int addedmodule = 0;
- hd_data_t *hd_data;
+ hd_data_t *hd_data;
hd_data = calloc(1, sizeof *hd_data);
driver_info_t *di = NULL;
@@ -209,29 +53,29 @@
// Then issue modprobe commands....
for (; hd; hd = hd->next)
{
- for (di = hd->driver_info; di; di = di->next)
- {
- for (sl1 = di->module.names, sl2 = di->module.mod_args;
- sl1 && sl2; sl1 = sl1->next, sl2 = sl2->next)
- {
- modules = realloc(modules, sizeof(char *) * (nummodules + 1));
- module_type = realloc(module_type, sizeof(hd_hw_item_t) * (nummodules + 1));
+ for (di = hd->driver_info; di; di = di->next)
+ {
+ for (sl1 = di->module.names, sl2 = di->module.mod_args;
+ sl1 && sl2; sl1 = sl1->next, sl2 = sl2->next)
+ {
+ modules = realloc(modules, sizeof(char *) * (nummodules + 1));
+ module_type = realloc(module_type, sizeof(hd_hw_item_t) * (nummodules + 1));
- modules[nummodules] = strdup(sl1->str);
- module_type[nummodules] = item;
+ modules[nummodules] = strdup(sl1->str);
+ module_type[nummodules] = item;
- snprintf(string, STRING_SIZE, "%s %s",
- di->module.modprobe ? "modprobe" : "insmod", sl1->str);
- mysystem(string);
- nummodules++;
- addedmodule++;
- }
- }
+ snprintf(string, STRING_SIZE, "%s %s",
+ di->module.modprobe ? "modprobe" : "insmod", sl1->str);
+ mysystem(string);
+ nummodules++;
+ addedmodule++;
+ }
+ }
}
- hd_free_hd_list(hd); /* free it */
+ hd_free_hd_list(hd); /* free it */
free(hd_data);
- return addedmodule; // number of new item loaded
+ return addedmodule; // number of new item loaded
}
// Device name are stored in Array of strings, last element allways NULL
@@ -252,15 +96,15 @@
pcmcia = initialize_pcmcia();
if (pcmcia)
{
- fprintf(flog, "Detected PCMCIA Controller: %s.\n", pcmcia);
- sprintf(string, "/sbin/modprobe %s", pcmcia);
- mysystem("/sbin/modprobe pcmcia_core");
- mysystem(string);
- mysystem("/sbin/modprobe pcmcia");
+ fprintf(flog, "Detected PCMCIA Controller: %s.\n", pcmcia);
+ sprintf(string, "/sbin/modprobe %s", pcmcia);
+ mysystem("/sbin/modprobe pcmcia_core");
+ mysystem(string);
+ mysystem("/sbin/modprobe pcmcia");
} else
{
- fprintf(flog,
- "Detected No PCMCIA Controller (will re-try later for floppy boot).\n");
+ fprintf(flog,
+ "Detected No PCMCIA Controller (will re-try later for floppy boot).\n");
}
} else
{
@@ -288,15 +132,15 @@
hd = hd_list(hd_data, hw_usb_ctrl, 1, NULL);
if ( strcmp ("1", find_kv(kv,"nousb")) != 0) {
- fprintf(flog, "Probing USB controllers\n");
- probehw(hw_usb_ctrl);
+ fprintf(flog, "Probing USB controllers\n");
+ probehw(hw_usb_ctrl);
}
if ( strcmp ("1", find_kv(kv,"nopcmcia")) != 0) {
- fprintf(flog, "Probing PCMCIA controllers\n");
- probehw(hw_pcmcia_ctrl);
- fprintf(flog, "Probing Cardbus controllers\n");
- probehw(hw_bridge);
+ fprintf(flog, "Probing PCMCIA controllers\n");
+ probehw(hw_pcmcia_ctrl);
+ fprintf(flog, "Probing Cardbus controllers\n");
+ probehw(hw_bridge);
}
fprintf(flog, "Probing storage controllers\n");
@@ -317,17 +161,17 @@
hd = hd_list(hd_data, hw_disk, 1, NULL);
for (i = 0; hd; hd = hd->next, i++)
{
- fprintf(flog, "DevName %s\n", hd->unix_dev_name);
- fprintf(flog, "Model %s\n", hd->model);
- if (hd->detail && hd->detail->type == hd_detail_scsi)
- scsi = 1;
- harddisklist = realloc(harddisklist, sizeof(char *) * (i + 1));
- harddisklist[i] = strdup (hd->unix_dev_name);
+ fprintf(flog, "DevName %s\n", hd->unix_dev_name);
+ fprintf(flog, "Model %s\n", hd->model);
+ if (hd->detail && hd->detail->type == hd_detail_scsi)
+ scsi = 1;
+ harddisklist = realloc(harddisklist, sizeof(char *) * (i + 1));
+ harddisklist[i] = strdup (hd->unix_dev_name);
}
/* end with a null pointer */
harddisklist = realloc(harddisklist, sizeof(char *) * (i + 1));
harddisklist[i] = NULL;
- hd_free_hd_list(hd); /* free it */
+ hd_free_hd_list(hd); /* free it */
mysystem("modprobe usb-storage");
mysystem("modprobe sr_mod");
@@ -338,17 +182,17 @@
hd = hd_list(hd_data, hw_cdrom, 1, NULL);
for (i = 0; hd; hd = hd->next, i++)
{
- fprintf(flog, "DevName %s\n", hd->unix_dev_name);
- fprintf(flog, "Model %s\n", hd->model);
- if (hd->detail && hd->detail->type == hd_detail_scsi)
- scsi = 1;
- cdromlist = realloc(cdromlist, sizeof(char *) * (i + 1));
- cdromlist[i] = strdup (hd->unix_dev_name);
+ fprintf(flog, "DevName %s\n", hd->unix_dev_name);
+ fprintf(flog, "Model %s\n", hd->model);
+ if (hd->detail && hd->detail->type == hd_detail_scsi)
+ scsi = 1;
+ cdromlist = realloc(cdromlist, sizeof(char *) * (i + 1));
+ cdromlist[i] = strdup (hd->unix_dev_name);
}
/* end with a null pointer */
cdromlist = realloc(cdromlist, sizeof(char *) * (i + 1));
cdromlist[i] = NULL;
- hd_free_hd_list(hd); /* free it */
+ hd_free_hd_list(hd); /* free it */
mysystem("modprobe ide-floppy");
@@ -357,43 +201,28 @@
hd = hd_list(hd_data, hw_floppy, 1, NULL);
for (i = 0; hd; hd = hd->next, i++)
{
- fprintf(flog, "DevName %s\n", hd->unix_dev_name);
- fprintf(flog, "DevName2 %s\n", hd->unix_dev_name2);
- if (hd->detail && hd->detail->type == hd_detail_scsi)
- scsi = 1;
- floppylist = realloc(floppylist, sizeof(char *) * (i + 1));
- floppylist[i] = strdup (hd->unix_dev_name);
+ fprintf(flog, "DevName %s\n", hd->unix_dev_name);
+ fprintf(flog, "DevName2 %s\n", hd->unix_dev_name2);
+ if (hd->detail && hd->detail->type == hd_detail_scsi)
+ scsi = 1;
+ floppylist = realloc(floppylist, sizeof(char *) * (i + 1));
+ floppylist[i] = strdup (hd->unix_dev_name);
}
/* end with a null pointer */
floppylist = realloc(floppylist, sizeof(char *) * (i + 1));
floppylist[i] = NULL;
- hd_free_hd_list(hd); /* free it */
+ hd_free_hd_list(hd); /* free it */
hd_free_hd_data(hd_data);
free(hd_data);
fprintf(flog, "Configuration.....\n");
for (i = 0; i < nummodules; i++)
- fprintf(flog, "Modules\t\t%12s\tType\t%d\n", modules[i], module_type[i]);
+ fprintf(flog, "Modules\t\t%12s\tType\t%d\n", modules[i], module_type[i]);
if (scsi)
- fprintf(flog, "SCSI YES\n");
+ fprintf(flog, "SCSI YES\n");
}
-//
-//helper, returns the name of the device without '/dev/'
-//
-// Note : what if the device name is under a subdir like '/dev/scsi/sda' ?
-char *
-short_ddev(int disk) {
- //char *p = 1+strrchr (harddisklist[disk],'/');
- //if ((p == NULL+1))
- if (strncmp("/dev/", harddisklist[disk],5) != 0)
- {
- fprintf(flog, "HARDDISK %s: cannot interprete this name...\n",
- harddisklist[disk]);
- exit (1); // fatal!
- }
- return harddisklist[disk]+5;
-}
+
// Try to load from network the IPCop tarballs
// If success, they are copied in ramdisk "/tmp"
// Interface receive an IP with dhcp
@@ -403,73 +232,73 @@
char string[STRING_SIZE];
int rc;
int assumed_default_network = -1; //future use?
- char *values[] = { "http://10.0.0.2", NULL }; /* pointers for the values. */
+ char *values[] = { "http://10.0.0.2", NULL }; /* pointers for the values. */
/*TR*/
statuswindow(60, 4, TITLE, gettext("Searching Networks.... Please Wait!"));
for (i = 0; i < nummodules; i++)
{
- if (module_type[i] == hw_network_ctrl)
+ if (module_type[i] == hw_network_ctrl)
{
- snprintf(string, STRING_SIZE, "udhcpc -q -n -i eth%d > /dev/null\n", j);
- if (!mysystem(string))
- {
- fprintf(flog, "eth%d DHCP Configured\n", j);
- /* First interface to get a DHCP response
- * is our default interface. */
- if (assumed_default_network == -1)
- assumed_default_network = j;
- } else {
- /* Try and configure a default address */
- snprintf(string, STRING_SIZE, "ifconfig eth%d 192.168.%d.1\n", j, 200+j);
- mysystem(string);
- }
- j++;
+ snprintf(string, STRING_SIZE, "udhcpc -q -n -i eth%d > /dev/null\n", j);
+ if (!mysystem(string))
+ {
+ fprintf(flog, "eth%d DHCP Configured\n", j);
+ /* First interface to get a DHCP response
+ * is our default interface. */
+ if (assumed_default_network == -1)
+ assumed_default_network = j;
+ } else {
+ /* Try and configure a default address */
+ snprintf(string, STRING_SIZE, "ifconfig eth%d 192.168.%d.1\n", j, 200+j);
+ mysystem(string);
+ }
+ j++;
}
}
char message[STRING_SIZE];
while (1)
{
- newtPopWindow();
- struct newtWinEntry entries[] = { {"", &values[0], 0,}, {NULL, NULL, 0} };
- rc = newtWinEntries(TITLE, gettext("TR_ENTER_URL"),
- 60, 5, 5, 50, entries, gettext("TR_OK"),
- gettext("TR_CANCEL"), NULL);
- strncpy(message, values[0], STRING_SIZE);
- fprintf(flog, "URL is %s\n", message);
+ newtPopWindow();
+ struct newtWinEntry entries[] = { {"", &values[0], 0,}, {NULL, NULL, 0} };
+ rc = newtWinEntries(TITLE, gettext("TR_ENTER_URL"),
+ 60, 5, 5, 50, entries, gettext("TR_OK"),
+ gettext("TR_CANCEL"), NULL);
+ strncpy(message, values[0], STRING_SIZE);
+ fprintf(flog, "URL is %s\n", message);
if (strlen(message) == 0)
- return 1; // giveup or fail
+ return 1; // giveup or fail
- /* remove any successive /'s */
- while (message[strlen(message) - 1] == '/')
- message[strlen(message) - 1] = '\0';
+ /* remove any successive /'s */
+ while (message[strlen(message) - 1] == '/')
+ message[strlen(message) - 1] = '\0';
- /* download needed files */
- snprintf(string, STRING_SIZE,
- "/bin/wget -O /tmp/"SNAME "-" VERSION "-varlog.tar.lzma %s/"
- SNAME "-" VERSION "-varlog.tar.lzma", message);
-/*TR*/ statuswindow(60, 4, TITLE, gettext("Downloading tarballs.... Please Wait!"));
- if (!mysystem(string))
- {
- snprintf(string, STRING_SIZE,
- "/bin/wget -O /tmp/"SNAME "-" VERSION "-config.tar.lzma %s/"
- SNAME "-" VERSION "-config.tar.lzma", message);
- if (!mysystem(string))
- {
- // do not test for squashfs, might be absent
- // owes: is this really true ? What do we do if squashfs is absent ?
- snprintf(string, STRING_SIZE,
- "/bin/wget -O /tmp/"SNAME "-" VERSION ".tar.lzma %s/"
- SNAME "-" VERSION ".tar.lzma", message);
- mysystem(string);
- fprintf(flog, "NETWORK INSTALL checked lzma tarball\n");
- newtPopWindow();
- return 0; // success
- }
- }
+ /* download needed files */
+ snprintf(string, STRING_SIZE,
+ "/bin/wget -O /tmp/"SNAME "-" VERSION "-varlog.tar.lzma %s/"
+ SNAME "-" VERSION "-varlog.tar.lzma", message);
+/*TR*/ statuswindow(60, 4, TITLE, gettext("Downloading tarballs.... Please Wait!"));
+ if (!mysystem(string))
+ {
+ snprintf(string, STRING_SIZE,
+ "/bin/wget -O /tmp/"SNAME "-" VERSION "-config.tar.lzma %s/"
+ SNAME "-" VERSION "-config.tar.lzma", message);
+ if (!mysystem(string))
+ {
+ // do not test for squashfs, might be absent
+ // owes: is this really true ? What do we do if squashfs is absent ?
+ snprintf(string, STRING_SIZE,
+ "/bin/wget -O /tmp/"SNAME "-" VERSION ".tar.lzma %s/"
+ SNAME "-" VERSION ".tar.lzma", message);
+ mysystem(string);
+ fprintf(flog, "NETWORK INSTALL checked lzma tarball\n");
+ newtPopWindow();
+ return 0; // success
+ }
+ }
- // owes: we ought to inform our user here that wget failed.
+ // owes: we ought to inform our user here that wget failed.
}
}
@@ -489,74 +318,74 @@
for (i = 0; i < nummodules; i++)
{
- if (module_type[i] == hw_network_ctrl)
- numnetworks++;
+ if (module_type[i] == hw_network_ctrl)
+ numnetworks++;
}
// Choose source for tarball. Very basic
while (1) {
- sprintf (line, gettext("TR_SELECT_INSTALLATION_MEDIA_LONG"));
- rc = newtWinMenu(TITLE,
- line, 50, 5, 5, 8,
- installtypes, &installtype, gettext("TR_OK"),
- gettext("TR_CANCEL"), NULL);
- if (rc == 2){
- return 1; // give up
- }
- if (installtype == NETWORK_INSTALL)
- {
- if (!source_network()) return 0; //success
- } else {
-
- /* Try and mount CDROM */
- if (cdromlist[0])
- {
- /* Try to create a link from the first discovered cdrom to /dev/cdrom */
- fprintf(flog, "Linking %s to /dev/cdrom\n", cdromlist[0]);
- snprintf(string, STRING_SIZE, "ln -sf %s /dev/cdrom", cdromlist[0] );
- if (!mysystem(string))
- {
- fprintf(flog, "Created /dev/cdrom\n");
- } else {
- fprintf(flog, "Couldn't create /dev/cdrom\n");
- }
+ sprintf (line, gettext("TR_SELECT_INSTALLATION_MEDIA_LONG"));
+ rc = newtWinMenu(TITLE,
+ line, 50, 5, 5, 8,
+ installtypes, &installtype, gettext("TR_OK"),
+ gettext("TR_CANCEL"), NULL);
+ if (rc == 2){
+ return 1; // give up
+ }
+ if (installtype == NETWORK_INSTALL)
+ {
+ if (!source_network()) return 0; //success
+ } else {
+
+ /* Try and mount CDROM */
+ if (cdromlist[0])
+ {
+ /* Try to create a link from the first discovered cdrom to /dev/cdrom */
+ fprintf(flog, "Linking %s to /dev/cdrom\n", cdromlist[0]);
+ snprintf(string, STRING_SIZE, "ln -sf %s /dev/cdrom", cdromlist[0] );
+ if (!mysystem(string))
+ {
+ fprintf(flog, "Created /dev/cdrom\n");
+ } else {
+ fprintf(flog, "Couldn't create /dev/cdrom\n");
+ }
-/*TR*/ statuswindow(60, 4, TITLE, gettext("Mounting CDROM.... Please Wait!"));
- /* we should retry here */
- if (mysystem("/bin/mount -o ro /dev/cdrom /cdrom"))
- {
- fprintf(flog, "Failed to mount CDROM\n");
-/*TR*/ newtWinMessage(TITLE, gettext("TR_OK"), gettext("TR_CDROM_ERROR"));
- newtPopWindow();
- continue;
- }
- // move files to /tmp
- if (mysystem("/bin/cp /cdrom/"SNAME "-" VERSION "-varlog.tar.lzma /tmp"))
- {
- fprintf(flog, "Failed to copy from CDROM\n");
-/*TR*/ newtWinMessage(TITLE, gettext("TR_OK"), gettext("TR_CDROM_FILE_ERROR"));
- newtPopWindow();
- continue;
- }
- if (mysystem("/bin/cp /cdrom/"SNAME "-" VERSION "-config.tar.lzma /tmp"))
- {
- newtWinMessage(TITLE, gettext("TR_OK"), gettext("TR_CDROM_FILE_ERROR"));
- newtPopWindow();
- continue;
- }
- if (mysystem("/bin/cp /cdrom/"SNAME "-" VERSION ".tar.lzma /tmp"))
- {
- newtWinMessage(TITLE, gettext("TR_OK"), gettext("TR_CDROM_FILE_ERROR"));
- newtPopWindow();
- continue;
- }
+/*TR*/ statuswindow(60, 4, TITLE, gettext("Mounting CDROM.... Please Wait!"));
+ /* we should retry here */
+ if (mysystem("/bin/mount -o ro /dev/cdrom /cdrom"))
+ {
+ fprintf(flog, "Failed to mount CDROM\n");
+/*TR*/ newtWinMessage(TITLE, gettext("TR_OK"), gettext("TR_CDROM_ERROR"));
+ newtPopWindow();
+ continue;
+ }
+ // move files to /tmp
+ if (mysystem("/bin/cp /cdrom/"SNAME "-" VERSION "-varlog.tar.lzma /tmp"))
+ {
+ fprintf(flog, "Failed to copy from CDROM\n");
+/*TR*/ newtWinMessage(TITLE, gettext("TR_OK"), gettext("TR_CDROM_FILE_ERROR"));
+ newtPopWindow();
+ continue;
+ }
+ if (mysystem("/bin/cp /cdrom/"SNAME "-" VERSION "-config.tar.lzma /tmp"))
+ {
+ newtWinMessage(TITLE, gettext("TR_OK"), gettext("TR_CDROM_FILE_ERROR"));
+ newtPopWindow();
+ continue;
+ }
+ if (mysystem("/bin/cp /cdrom/"SNAME "-" VERSION ".tar.lzma /tmp"))
+ {
+ newtWinMessage(TITLE, gettext("TR_OK"), gettext("TR_CDROM_FILE_ERROR"));
+ newtPopWindow();
+ continue;
+ }
- newtPopWindow();
- return 0; //success
- } else {
- fprintf(flog, "no cdroms\n");
- newtWinMessage(TITLE, gettext("TR_OK"), gettext("TR_NO_CDROM"));
- }
- }
+ newtPopWindow();
+ return 0; //success
+ } else {
+ fprintf(flog, "no cdroms\n");
+ newtWinMessage(TITLE, gettext("TR_OK"), gettext("TR_NO_CDROM"));
+ }
+ }
}
return 0; // compiler warning
}
@@ -566,24 +395,24 @@
//
int
selectdestination ( int *ddisk,
- long int *disk_size
- ) {
+ long int *disk_size
+ ) {
int rc;
char string[STRING_SIZE];
FILE *handle;
// Choose the disk to use
/*TR*/ rc = newtWinMenu(gettext("Select Hard Disk"),
-/*TR*/ gettext("Select the device you wish to use for the installation."),
- 50, 5, 5, 8,
- harddisklist,
- ddisk,
- gettext("TR_OK"),
- "fdisk",
- gettext("TR_CANCEL"), NULL);
+/*TR*/ gettext("Select the device you wish to use for the installation."),
+ 50, 5, 5, 8,
+ harddisklist,
+ ddisk,
+ gettext("TR_OK"),
+ "fdisk",
+ gettext("TR_CANCEL"), NULL);
- if (rc == 3) // cancel choosed!
- return 3;
+ if (rc == 3) // cancel choosed!
+ return 3;
sprintf(string, "/sys/block/%s/size", short_ddev(*ddisk));
@@ -593,758 +422,26 @@
/* value is in 512 byte sectors */
*disk_size = atol(string) >> 11;
- if (*disk_size<60) // 60? dont know why, but!
- {
- fprintf(flog, "HARDDISK %s: really to small.\n", harddisklist[*ddisk]);
- newtWinMessage(TITLE, gettext("TR_OK"), gettext("TR_DISK_TO_SMALL"));
- return 3; // force cancel
+ if (*disk_size < DISK_MINIMUM)
+ {
+ fprintf(flog, "HARDDISK %s: really to small.\n", harddisklist[*ddisk]);
+ newtWinMessage(TITLE, gettext("TR_OK"), gettext("TR_DISK_TO_SMALL"));
+ return 3; // force cancel
}
fclose(handle);
- fprintf(flog, "Hard disk selected %s. Size:%ld Mb\n",
- harddisklist[*ddisk],*disk_size);
+ fprintf(flog, "Hard disk selected %s. Size:%ld MByte\n",
+ harddisklist[*ddisk],*disk_size);
return rc; //(OK or fdisk)
}
-int
-manualpart( int selected_hd)
-{
- /* Would like to write a frontend based on libparted and get
- * rid of cfdisk, as it doesn't understand other partitioning
- * software.
- */
- char string[STRING_SIZE];
- newtFinished();
- snprintf(string, STRING_SIZE, "cfdisk %s", harddisklist[selected_hd]);
- /* dont redirect */
- system(string);
- newtInit();
- newtCls();
- return 0;
-}
-/*
- Calculate for the user a useable disk schema partition
-*/
-int autopart( int selected_hd, long int disk_size)
-{
- long int swap_file, memory=0, boot_partition, log_partition=0;
- long int start_partition, current_free, root_partition=0;
- char string[STRING_SIZE];
- char line[STRING_SIZE];
- FILE *handle;
-
- /* Calculate amount of memory in machine */
- if ((handle = fopen("/proc/meminfo", "r")))
- {
- while (fgets(line, STRING_SIZE - 1, handle))
- {
- if (sscanf(line, "MemTotal: %s kB", string))
- {
- memory = atol(string) / 1024;
- }
- }
-
- fclose(handle);
- }
-
- fprintf(flog, "MEMORY = %ldMb\n", memory);
-
- /* If you need more than this, you should really add physical memory */
- /* Minimum: 192 = 64 real + 128 swap */
- swap_file = memory < 64 ? 2 * memory : 192 - memory;
- swap_file = swap_file < 32 ? 32 : swap_file;
- fprintf(flog, "SWAP = %ldMb\n", swap_file);
-
- start_partition = 1; /* in MB */
- boot_partition = BOOT_PARTITION;
-
- current_free = disk_size - boot_partition - swap_file;
- root_partition = current_free / 4;
- root_partition = root_partition > ROOT_MAXIMUM ? ROOT_MAXIMUM : root_partition;
-
- root_partition = current_free < 860 ? ROOT_MINIMUM : root_partition;
-
- current_free -= root_partition;
- root_partition = root_partition + swap_file;
- log_partition = current_free;
-
- /* stupid parted is unable to bacth correctly. */
- snprintf(string, STRING_SIZE, "dd if=/dev/zero of=%s bs=512 count=1", harddisklist[selected_hd] );
- mysystem(string);
- mysystem("sync");
-
-#if defined(__i386__) || defined(__x86_64__)
- snprintf(string, STRING_SIZE, "/bin/parted -s %s mklabel msdos",
- harddisklist[selected_hd]);
- if (mysystem(string) != 0)
- {
- fprintf(flog, "Unable to create msdos disk label (fatal error)\n");
- /* return 1; */ /* ERROR */
- }
-
- snprintf(string, STRING_SIZE, "/bin/parted -s %s set 1 boot on",
- harddisklist[selected_hd]);
- if (mysystem(string))
- {
- fprintf(flog, "Unable to set the boot flag on the /boot partition (fatal error)\n");
- /* return 1; */ /* ERROR */
- }
-
- snprintf(string, STRING_SIZE, "/bin/parted -s %s mkpart primary %ld %ld",
- harddisklist[selected_hd],
- start_partition,
- boot_partition);
- if (mysystem(string) != 0)
- {
- fprintf(flog, "Unable to create /boot partition (fatal error)\n");
- /* return 1; */ /* ERROR */
- }
-
- snprintf(string, STRING_SIZE, "/bin/parted -s %s mkpart primary %ld %ld",
- harddisklist[selected_hd],
- boot_partition,
- root_partition);
- if (mysystem(string) != 0)
- {
- fprintf(flog, "Unable to create / partition (fatal error)\n");
- /* return 1; */ /* ERROR */
- }
-
- snprintf(string, STRING_SIZE, "/bin/parted -s %s mkpart primary %ld %ld",
- harddisklist[selected_hd],
- root_partition,
- log_partition);
- if (mysystem(string) != 0)
- {
- fprintf(flog, "Unable to create /var/log partition (fatal error)\n");
- /* return 1; */ /* ERROR */
- }
-#endif /* End of i386/x86_64 partitioning block */
-
-#if defined(__powerpc__) || defined(__powerpc64__)
- snprintf(string, STRING_SIZE, "/bin/parted -s %s mklabel mac",
- harddisklist[selected_hd]);
- if (mysystem(string) != 0)
- {
- fprintf(flog, "Unable to create mac disk label (fatal error)\n");
- /* return 1; */ /* ERROR */
- }
-
- snprintf(string, STRING_SIZE,
- "/bin/parted -s %s mkpart primary hfs 33k %ld",
- harddisklist[selected_hd],
- start_partition);
- if (mysystem(string) != 0)
- {
- fprintf(flog, "Unable to create hfs bootstrap partition (fatal error)\n");
- /* return 1; */ /* ERROR */
- }
-
- snprintf(string, STRING_SIZE, "/bin/parted -s %s name 2 bootstrap",
- harddisklist[selected_hd]);
- if (mysystem(string))
- {
- fprintf(flog, "Unable to name bootstrap partition (non-fatal error)\n");
- /* return 1; */ /* ERROR */
- }
-
- snprintf(string, STRING_SIZE, "/bin/parted -s %s set 2 boot on",
- harddisklist[selected_hd]);
- if (mysystem(string))
- {
- fprintf(flog, "Unable to set the boot flag on the hfs bootstrap partition (fatal error)\n");
- /* return 1; */ /* ERROR */
- }
-
- snprintf(string, STRING_SIZE, "/bin/parted -s %s mkpart primary %ld %ld",
- harddisklist[selected_hd],
- start_partition,
- boot_partition);
- if (mysystem(string) != 0)
- {
- fprintf(flog, "Unable to create /boot partition (fatal error)\n");
- /* return 1; */ /* ERROR */
- }
-
- snprintf(string, STRING_SIZE, "/bin/parted -s %s name 3 /boot", harddisklist[selected_hd]);
- if (mysystem(string) != 0)
- {
- fprintf(flog, "Unable to name /boot partition (non-fatal error)\n");
- /* return 1; */ /* ERROR */
- }
-
- snprintf(string, STRING_SIZE, "/bin/parted -s %s mkpart primary %ld %ld",
- harddisklist[selected_hd],
- boot_partition,
- root_partition);
- if (mysystem(string) != 0)
- {
- fprintf(flog, "Unable to create / partition (fatal error)\n");
- /* return 1; */ /* ERROR */
- }
-
- snprintf(string, STRING_SIZE, "/bin/parted -s %s name 4 /", harddisklist[selected_hd]);
- if (mysystem(string) != 0)
- {
- fprintf(flog, "Unable to name / partition (non-fatal error)\n");
- /* return 1; */ /* ERROR */
- }
-
- snprintf(string, STRING_SIZE, "/bin/parted -s %s mkpart primary %ld %ld",
- harddisklist[selected_hd],
- root_partition,
- log_partition);
-
- if (mysystem(string) != 0)
- {
- fprintf(flog, "Unable to create /var/log partition (fatal error)\n");
- /* return 1; */ /* ERROR */
- }
-
- snprintf(string, STRING_SIZE, "/bin/parted -s %s name 5 /var/log",
- harddisklist[selected_hd]);
- if (mysystem(string))
- {
- fprintf(flog, "Unable to name /var/log partition (non-fatal error)\n");
- /* return 1; */ /* ERROR */
- }
-#endif /* End of ppc/ppc64 partitioning block */
-
-#if defined(__sparc__) || defined(__sparc64__)
- snprintf(string, STRING_SIZE, "/bin/parted -s %s mklabel sun",
- harddisklist[selected_hd]);
- if (mysystem(string) != 0)
- {
- fprintf(flog, "Unable to create sun disk label (fatal error)\n");
- /* return 1; */ /* ERROR */
- }
-
- snprintf(string, STRING_SIZE, "/bin/parted -s %s set 1 boot on",
- harddisklist[selected_hd]);
- if (mysystem(string))
- {
- fprintf(flog, "Unable to set the boot flag on the /boot partition (fatal error)\n");
- /* return 1; */ /* ERROR */
- }
-
- snprintf(string, STRING_SIZE, "/bin/parted -s %s mkpart primary %ld %ld",
- harddisklist[selected_hd],
- start_partition,
- boot_partition);
- if (mysystem(string) != 0)
- {
- fprintf(flog, "Unable to create /boot partition (fatal error)\n");
- /* return 1; */ /* ERROR */
- }
-
- snprintf(string, STRING_SIZE, "/bin/parted -s %s mkpart primary %ld %ld",
- harddisklist[selected_hd],
- boot_partition,
- root_partition);
- if (mysystem(string) != 0)
- {
- fprintf(flog, "Unable to create / partition (fatal error)\n");
- /* return 1; */ /* ERROR */
- }
-
- snprintf(string, STRING_SIZE, "/bin/parted -s %s mkpart primary %ld %ld",
- harddisklist[selected_hd],
- root_partition,
- log_partition);
- if (mysystem(string) != 0)
- {
- fprintf(flog, "Unable to create /var/log partition (fatal error)\n");
- /* return 1; */ /* ERROR */
- }
-#endif /* End of sparc/sparc64 partitioning block */
-
-#if defined(__alpha__)
- snprintf(string, STRING_SIZE, "/bin/parted -s %s mklabel bsd",
- harddisklist[selected_hd]);
- if (mysystem(string) != 0)
- {
- fprintf(flog, "Unable to create bsd disk label (fatal error)\n");
- /* return 1; */ /* ERROR */
- }
-
- snprintf(string, STRING_SIZE, "/bin/parted -s %s set 1 boot on",
- harddisklist[selected_hd]);
- if (mysystem(string))
- {
- fprintf(flog, "Unable to set the boot flag on the /boot partition (fatal error)\n");
- /* return 1; */ /* ERROR */
- }
-
- snprintf(string, STRING_SIZE, "/bin/parted -s %s mkpart primary %ld %ld",
- harddisklist[selected_hd],
- start_partition,
- boot_partition);
- if (mysystem(string) != 0)
- {
- fprintf(flog, "Unable to create /boot partition (fatal error)\n");
- /* return 1; */ /* ERROR */
- }
-
- snprintf(string, STRING_SIZE, "/bin/parted -s %s mkpart primary %ld %ld",
- harddisklist[selected_hd],
- boot_partition,
- root_partition);
- if (mysystem(string) != 0)
- {
- fprintf(flog, "Unable to create / partition (fatal error)\n");
- /* return 1; */ /* ERROR */
- }
-
- snprintf(string, STRING_SIZE, "/bin/parted -s %s mkpart primary %ld %ld",
- harddisklist[selected_hd],
- root_partition,
- log_partition);
- if (mysystem(string) != 0)
- {
- fprintf(flog, "Unable to create /var/log partition (fatal error)\n");
- /* return 1; */ /* ERROR */
- }
-#endif /* End of sparc/sparc64 partitioning block */
-
- return 0; /* SUCCESS */
-} /* End of int autopart() */
-
-
-
-/*
- Small disk receives a unique filesystem (minix)
-*/
int
-makesmalldisk( int selected_hd)
-{
- char string[STRING_SIZE];
- fprintf(flog, "DOING SMALL DISK\n");
-
- //stupid parted is unable to bacth correctly.
- snprintf(string, STRING_SIZE, "dd if=/dev/zero of=%s bs=512 count=1",
- harddisklist[selected_hd]);
- mysystem(string);
- mysystem("sync");
-
- snprintf(string, STRING_SIZE, "/bin/parted -s %s mklabel msdos",
- harddisklist[selected_hd]);
- mysystem(string);
-
- snprintf(string, STRING_SIZE, "/bin/parted -s %s mkpart primary 1 100%%",
- harddisklist[selected_hd]);
- mysystem(string);
-
- /* Update device files after partitioning */
- mysystem("/sbin/udevstart");
-
-#if defined(MINIX)
- snprintf(string, STRING_SIZE, "/bin/mkfs.minix -i 100 %s1",
-#else
- mysystem("/bin/modprobe ext3");
- snprintf(string, STRING_SIZE, "/sbin/mke2fs -j -q %s1",
-#endif
- harddisklist[selected_hd]);
- mysystem(string);
-
-#if defined(MINIX)
- snprintf(string, STRING_SIZE, "/bin/mount -t minix %s1 /mnt",
-#else
- snprintf(string, STRING_SIZE, "/bin/mount -t ext3 %s1 /mnt",
-#endif
- harddisklist[selected_hd]);
- mysystem(string);
-
- mysystem("/bin/tar -C /harddisk -xaf /tmp/" SNAME "-" VERSION ".tar.lzma");
-
- // and extract /var/ipcop
- mysystem("/bin/tar -C /harddisk -xaf /tmp/" SNAME "-" VERSION "-config.tar.lzma");
-
- deletetarballs(); // no more needed
-
- return 0; //success
-}
-
-
-// Format and copy ipcop files.
-// Input : autolabel flag
-// Return value : indexe of boot partition (zero if not)
-// use two global var to unmount properly partition at end.
-char **partition_label = NULL;
-//callback helper funct, select something
-int special_filter_helper;
-int
-filter (const struct dirent *b)
-{
- return (strstr(b->d_name, short_ddev(special_filter_helper))) ? 1 : 0;
-}
-int
-makebigdisk( int selected_hd,
- int *bootpartexist,
- int autolabel)
-{
- char string[STRING_SIZE];
- char message[STRING_SIZE];
- FILE *handle;
- struct dirent **names;
- int i;
- int alllabelled = 0;
- int found = 0;
- int numpartitions = 0;
- char **partitions = NULL;
- char **partitionslist = NULL;
- int choice=0, rc;
- char *values[] = { NULL, NULL }; /* pointers for the values. */
- struct newtWinEntry entries[] = { {"", &values[0], 0,}, {NULL, NULL, 0} };
-
- fprintf(flog, "DOING BIG DISK\n");
-
- // Get existing partitions names
- sprintf(string, "/sys/block/%s", short_ddev(selected_hd));
- special_filter_helper = selected_hd; // call back needs global var.
- numpartitions = scandir(string, &names, &filter, alphasort);
-
- fprintf(flog, "Number of Partitions: %d\n", numpartitions);
-
- if (numpartitions == 0)
- {
- newtWinMessage(TITLE, gettext("TR_OK"), gettext("TR_UNABLE_TO_PARTITION"));
- return 1; // cancel
- }
- partitions = calloc(1, sizeof(char *) * (numpartitions + 1));
- partition_label = calloc(1, sizeof(char *) * (numpartitions + 1));
- for (i = 0; i < numpartitions; i++)
- {
- partitions[i] = calloc(1, strlen(names[i]->d_name) + 1);
- strcpy(partitions[i], names[i]->d_name);
- partition_label[i] = "";
- free(names[i]);
- }
- free(names);
-
- /* end with a null pointer */
- partitions[numpartitions] = NULL;
-
- for (i = 0; i < numpartitions; i++)
- fprintf(flog, "PARTITIONS ARE : %s\n", partitions[i]);
-
- /* auto partitioned, so auto label */
- if (autolabel == 1)
- {
- alllabelled = TRUE;
- }
- partition_label[0] = "/boot";
- partition_label[1] = "/";
- partition_label[2] = "/var/log";
-
- while (!alllabelled)
- {
- //reconstruct part + label in a string...
- partitionslist = calloc(1, sizeof(char *) * (numpartitions + 1));
- for (i = 0; i < numpartitions; i++)
- {
- partitionslist[i] = calloc(1, strlen(partitions[i])
- + strlen(partition_label[i]) + 10);
- sprintf(partitionslist[i],"%s => %s", partitions[i],partition_label[i]);
- }
- partitionslist[i] = NULL;
-
-/*TR*/ rc = newtWinMenu(gettext("Label Partitions"),
-/*TR*/ gettext("Select the partition to label."), 50,
- 5, 5, 8, partitionslist, &choice,
-/*TR*/ gettext("TR_EDIT"),
- gettext("TR_DONE"),
- gettext("TR_CANCEL"), NULL);
-
- for (i = 0; i < numpartitions; i++)
- {
- free (partitionslist[i]);
- }
- free (partitionslist);
-
- if (rc == 3)
- return 1; // cancel
-
- if ((rc == 1) || (rc == 0)) {
- char *v = strdup (partition_label[choice]);
- free (values[0]);
- values[0] = v;
-/*TR*/ sprintf(message, gettext("Enter Label"));
- sprintf(string, "%s %s",
-/*TR*/ gettext("Enter the mount point for the partition"),
- partitions[choice]);
-/*TR*/ if( 2 == newtWinEntries(gettext("Label Partition"),
- string, 50, 5, 5, 18,
- entries,
- gettext("TR_OK"),
- gettext("TR_CANCEL"), NULL))
- continue;
-
- fprintf(flog, "CHOICE %d VALUE %s\n", choice, values[0]);
-
- /* Ensure first char is / */
- if (values[0][0] == '/')
- strcpy(string,"");
- else
- strcpy(string,"/");
- strcat (string,values[0]);
- partition_label[choice] = calloc(1, strlen(string) + 1);
- strcpy(partition_label[choice], string);
- fprintf(flog, "MOUNT POINT FOR %s is %s\n",
- partitions[choice], partition_label[choice]);
- }
-
- /* test for all labelled up */
- if (rc == 2)
- {
- alllabelled = 1;
- found = 0;
- for (i = 0; i < numpartitions; i++)
- {
- if (partition_label[i] == NULL)
- alllabelled = 0;
- /* make sure we've found the root partition */
- else if (strlen(partition_label[i]) == 1)
- found = 1;
- }
- if (!found)
- alllabelled = 0;
- }
- }
-/*TR*/
- statuswindow(60, 4, TITLE, gettext("TR_MAKING_FILESYSTEMS"));
-
- if ((handle=fopen("/etc/fstab", "w")))
- {
- for (i = 0; i < numpartitions; i++)
- {
- if (!strcmp(partition_label[i], "swap"))
- {
- sprintf(string, "/sbin/mkswap /dev/%s", partitions[i]);
- mysystem(string);
- fprintf(handle, "/dev/%s\tnone%s\tswap\n",
- partitions[i], partition_label[i]);
- mysystem("/bin/swapon -a");
- } else {
- sprintf(string, "/sbin/mke2fs -L %s -q -j /dev/%s",
- partition_label[i],
- partitions[i]);
- mysystem(string);
-// sprintf(string, "/sbin/tune2fs -L %s /dev/%s",
-// partition_label[i], partitions[i]);
-// mysystem(string);
- fprintf(handle, "/dev/%s\t/harddisk%s\text3\n",
- partitions[i], partition_label[i]);
- }
- }
- fclose(handle);
- }
- newtPopWindow();
-
- /* Update device files after partitioning */
- mysystem("/sbin/udevstart");
-/*TR*/
- statuswindow(60, 4, TITLE, gettext("TR_MOUTING_FILESYSTEMS"));
-
- /* load ext3 now */
- mysystem("/bin/modprobe ext3");
- mysystem("/bin/mount /harddisk/");
-
- *bootpartexist = 0;
- for (i = 0; i < numpartitions; i++)
- {
- sprintf(string, "/bin/mkdir -p /harddisk%s", partition_label[i]);
- mysystem(string);
- if (!strcmp(partition_label[i], "/boot"))
- {
- *bootpartexist = i + 1;
- }
- }
- /* this can fail */
- mysystem("/bin/mount -a");
- newtPopWindow();
-
- /* populate files on the partitions */
- statuswindow(60, 4, TITLE, gettext("TR_INSTALLING_FILES"));
- mysystem("/bin/tar -C /harddisk -xaf /tmp/" SNAME "-" VERSION "-varlog.tar.lzma");
- mysystem("/bin/tar -C /harddisk -xaf /tmp/" SNAME "-" VERSION "-config.tar.lzma");
- mysystem("/bin/tar -C /harddisk -xaf /tmp/" SNAME "-" VERSION ".tar.lzma");
- deletetarballs();
-
- /* complete fstab */
- if ((handle = fopen("/harddisk" CONFIG_ROOT "/etc/fstab", "a")))
- {
- for (i = 0; i < numpartitions; i++)
- {
- if (!strcmp(partition_label[i], "swap"))
- fprintf(handle, "/dev/%s\t\t%s\t\tswap\tdefaults\t0 0\n",
- partitions[i], partition_label[i]);
- else
-#if 1
- fprintf(handle, "LABEL=%s\t\t%s\t\text3\tnoatime\t1 1\n",
- partition_label[i], partition_label[i]);
-#else
- fprintf(handle, "/dev/%s\t\t%s\t\text3\tnoatime\t1 1\n",
- partitions[i], partition_label[i]);
-#endif
-
- }
- fclose(handle);
- }
- newtPopWindow();
-
- for (i = 0; i < numpartitions; i++)
- free(partitions[numpartitions]);
- free(partitions);
- return 0; // success
-}
-
-void
-createinitrd(int bigdisk)
-{
- char bigstring[2000]; // many modules maybe!
- char *p;
- int i;
-
- //pivot_root for initrd
- mkdir("/harddisk/initrd", S_IRWXU | S_IRWXG | S_IRWXO);
-
- //this is only for debug, get the 'mkinitrd' script from installer because
- //it is much more rapid to test (no fullcdrom to build)
- mysystem("cp /bin/mkinitrd /harddisk/tmp");
- strcpy(bigstring, "/bin/chroot /harddisk /tmp/mkinitrd -v");
- //strcpy(bigstring, "/bin/chroot /harddisk /sbin/mkinitrd -v");
- if (!bigdisk)
- strcat (bigstring, " --nosquashfs");
- strcat (bigstring, " --with=ext3 --with=scsi_mod --with=sd_mod --with=sr_mod --with=libata");
- strcat (bigstring, " --with=ohci-hcd --with=uhci-hcd --with=ehci-hcd --with=usbhid");
- strcat (bigstring, " --fstab=" CONFIG_ROOT "/etc/fstab");
-
- //add each module ...
- for (i = 0; i < nummodules; i++)
- {
- if (module_type[i] == hw_storage_ctrl)
- {
- strcat(bigstring, " --with=");
- strcat(bigstring, modules[i]);
- }
- }
- //memorize the string for SMP version
- p=bigstring+strlen(bigstring);
-
- strcat(bigstring, " /boot/ipcoprd.img " KERNEL_VERSION " >/dev/null 2>&1");
- mysystem(bigstring);
-}
-
-/* Make the new installation bootable */
-void make_bootable(int selected_hd, int bootpartexist, int bigdisk)
-{
- char string[STRING_SIZE];
-
-#if defined (__i386__)
-
- mysystem("/bin/cp -f /harddisk/boot/grub/grubbatch /harddisk/tmp");
- snprintf(string, STRING_SIZE,
- "/bin/sed -i -e 's+DEVICE+%s+g' /harddisk/tmp/grubbatch",
- harddisklist[selected_hd]);
- mysystem(string);
-
- // Minix => replace the LABEL=/ with the real device, partition 1
- if (!bigdisk)
- {
- snprintf(string, STRING_SIZE,
- "/bin/sed -i -e 's+LABEL=/+%s1+g' /harddisk/boot/grub/grub.conf",
- harddisklist[selected_hd]);
- mysystem(string);
- }
-
- /* /boot is not a partition. Just correct grub load location */
- if (!bootpartexist)
- { // correct kernel initrd & splashimage
- mysystem("/bin/sed -i -e 's+kernel /+kernel /boot/+g' /harddisk/boot/grub/grub.conf");
- mysystem("/bin/sed -i -e 's+initrd /+initrd /boot/+g' /harddisk/boot/grub/grub.conf");
- mysystem("/bin/sed -i -e 's+/grub/ipcop.xpm.gz+/boot/grub/ipcop.xpm.gz+' /harddisk/boot/grub/grub.conf");
- }
-
- //FIX BUG. savedefaults annoys grub
- mysystem("/bin/sed -i -e '/savedefault/d' /harddisk/boot/grub/grub.conf");
-
- /* restore permissions */
- chmod("/harddisk/tmp/grubbatch",
- S_IXUSR | S_IRUSR | S_IXGRP | S_IRGRP | S_IXOTH | S_IROTH);
-
- mysystem("/bin/chroot /harddisk /tmp/grubbatch");
-#endif
-
-#if defined (__powerpc__) || defined (__powerpc64__)
- int newworld = 1; /* 1 = NewWorld powerpc; 0 = OldWorld. Partitions are the same, bootloaders are not */
- FILE *cpufile = NULL;
- char line[STRING_SIZE];
-
- /* Let's first detect if this is a newworld or an oldworld mac */
- if (! (cpufile = fopen("/proc/cpuinfo", "r")))
- {
- fprintf(flog, "Couldn't open cpufile: /proc/cpuinfo\n");
- } else {
- while (fgets(line, STRING_SIZE, cpufile))
- {
- if (sscanf (line, "pmac-generation : %s", string))
- {
- if (strcmp(string, "NewWorld") == 0)
- {
- newworld = 1;
- } else if (strcmp(string, "OldWorld") == 0) {
- newworld = 0;
- }
- }
- }
-
- fprintf(flog, "Found %s mac.\n", string);
- fclose(cpufile);
- }
-
- fprintf(flog, "Making this machine bootable\n");
-
- if(newworld)
- {
- fprintf(flog, "Configuring Open Firmware (NewWorld)\n");
- snprintf(string, STRING_SIZE, "/bin/chroot /harddisk /usr/sbin/mkofboot --force -b %s2",
- harddisklist[selected_hd]);
- mysystem(string);
-
- snprintf(string, STRING_SIZE, "/bin/sed -i -e 's+BOOTSTRAP_DEV+%s2+g' /harddisk/etc/yaboot.conf",
- harddisklist[selected_hd]);
- mysystem(string);
-
- fprintf(flog, "Running ybin\n");
- snprintf(string, STRING_SIZE, "/bin/chroot /harddisk /usr/sbin/ybin");
- mysystem(string);
- } else {
- fprintf(flog, "Configuring Open Firmware (OldWorld)\n");
- snprintf(string, STRING_SIZE, "/bin/chroot /harddisk /usr/local/bin/install-quik.sh %s3 %s4",
- harddisklist[selected_hd],harddisklist[selected_hd]);
- mysystem(string);
- }
-#endif
-
-#if defined (__sparc__) || defined (__sparc64__)
- fprintf(flog, "Installing silo\n");
- snprintf(string, STRING_SIZE, "/bin/sed -i -e 's+ROOT_DEV+%s2+g' /harddisk/etc/silo.conf",
- harddisklist[selected_hd]);
- mysystem(string);
-
- snprintf(string, STRING_SIZE, "/bin/chroot /harddisk /sbin/silo");
- mysystem(string);
-#endif
-}
-
-
-int
main(int argc, char **argv)
{
int i;
int BootedCDROM = 0;
FILE *handle;
- char line[STRING_SIZE]; //general purpose buffer
+ char line[STRING_SIZE]; //general purpose buffer
if (!(flog=fopen("/dev/tty5", "w+")))
{
@@ -1357,24 +454,24 @@
// read the parameters from the kernel cmdline
if (! (handle = fopen("/proc/cmdline", "r")))
{
- fprintf(flog, "Couldn't open commandline: /proc/cmdline\n");
+ fprintf(flog, "Couldn't open commandline: /proc/cmdline\n");
}
else
{
- fgets(line, STRING_SIZE, handle);
- fclose (handle);
- read_kv_from_line(&kv, line);
+ fgets(line, STRING_SIZE, handle);
+ fclose (handle);
+ read_kv_from_line(&kv, line);
}
if ( (handle = fopen("/CDROMBOOT", "r")))
{
- BootedCDROM = 1;
- fclose(handle);
+ BootedCDROM = 1;
+ fclose(handle);
}
newtInit();
newtCls();
- setlanguage();
+ setlanguage(kv);
char *install_status = gettext("TR_INSTALLATION_CANCELED");
@@ -1384,72 +481,66 @@
newtWinMessage(TITLE, gettext("TR_OK"), line);
/*TR*/
statuswindow(60, 4, TITLE, gettext("Probing Hardware.... Please Wait!"));
- scanhardware(); // find nics cdrom harddisk & floppies
- mysystem("/sbin/udevstart"); // Create device files now
+ scanhardware(); // find nics cdrom harddisk & floppies
+ mysystem("/sbin/udevstart"); // Create device files now
newtPopWindow();
if (!harddisklist[0])
{
- fprintf(flog, "NO HARDDRIVES\n");
- goto EXIT;
+ fprintf(flog, "NO HARDDRIVES\n");
+ goto EXIT;
}
// find location of tarballs
if (findsource())
{
- fprintf(flog, "NO Source selected\...
[truncated message content] |
|
From: <ges...@us...> - 2007-05-27 15:58:54
|
Revision: 368
http://ipcop.svn.sourceforge.net/ipcop/?rev=368&view=rev
Author: gespinasse
Date: 2007-05-27 08:58:57 -0700 (Sun, 27 May 2007)
Log Message:
-----------
Reword the comments related to RFC1035
Modified Paths:
--------------
ipcop/trunk/config/cfgroot/general-functions.pl
Modified: ipcop/trunk/config/cfgroot/general-functions.pl
===================================================================
--- ipcop/trunk/config/cfgroot/general-functions.pl 2007-05-27 15:43:55 UTC (rev 367)
+++ ipcop/trunk/config/cfgroot/general-functions.pl 2007-05-27 15:58:57 UTC (rev 368)
@@ -211,6 +211,7 @@
sub validhostname
{
+ # Checks a hostname against less strict rules than RFC1035
my $hostname = $_[0];
# Each part should be at least two characters in length
@@ -233,7 +234,7 @@
{
my $part;
- # Checks a domain name against a less strict rule than RFC1035
+ # Checks a domain name against less strict rules than RFC1035
my $domainname = $_[0];
my @parts = split (/\./, $domainname); # Split hostname at the '.'
@@ -259,7 +260,8 @@
{
my $part;
- # Checks a fully qualified domain name against a less strict rule than RFC1035
+ # Checks a fully qualified domain name against less strict rules than RFC1035
+ # url like 0.us.pool.ntp.org are used
my $fqdn = $_[0];
my @parts = split (/\./, $fqdn); # Split hostname at the '.'
if (scalar(@parts) < 2) { # At least two parts should
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ges...@us...> - 2007-05-27 15:43:53
|
Revision: 367
http://ipcop.svn.sourceforge.net/ipcop/?rev=367&view=rev
Author: gespinasse
Date: 2007-05-27 08:43:55 -0700 (Sun, 27 May 2007)
Log Message:
-----------
Revert code for validhostname, validdomainename and validfqdn to the code used from 1.4.4 to 1.4.13.
Just update the comment that we use less strict rules than RFC1035 because names like 0.us.pool.ntp.org are used in the wild.
Modified Paths:
--------------
ipcop/trunk/config/cfgroot/general-functions.pl
Modified: ipcop/trunk/config/cfgroot/general-functions.pl
===================================================================
--- ipcop/trunk/config/cfgroot/general-functions.pl 2007-05-24 22:21:36 UTC (rev 366)
+++ ipcop/trunk/config/cfgroot/general-functions.pl 2007-05-27 15:43:55 UTC (rev 367)
@@ -211,51 +211,74 @@
sub validhostname
{
- # Checks a hostname against RFC1035
+ my $hostname = $_[0];
# Each part should be at least two characters in length
# but no more than 63 characters
-
- # from RFC 1035
- # <domain> ::= <subdomain> | " "
- # <subdomain> ::= <label> | <subdomain> "." <label>
- # <label> ::= <letter> [ [ <ldh-str> ] <let-dig> ]
- # <ldh-str> ::= <let-dig-hyp> | <let-dig-hyp> <ldh-str>
- # <let-dig-hyp> ::= <let-dig> | "-"
- # <let-dig> ::= <letter> | <digit>
- # <letter> ::= any one of the 52 alphabetic characters A through Z in
- # upper case and a through z in lower case
- # <digit> ::= any one of the ten digits 0 through 9
-
- my $hostname = shift;
- return ($hostname =~ /^[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]$/)
- && (length ($hostname) <= 63)
+ if (length ($hostname) < 1 || length ($hostname) > 63) {
+ return 0;}
+ # Only valid characters are a-z, A-Z, 0-9 and -
+ if ($hostname !~ /^[a-zA-Z0-9-]*$/) {
+ return 0;}
+ # First character can only be a letter or a digit
+ if (substr ($hostname, 0, 1) !~ /^[a-zA-Z0-9]*$/) {
+ return 0;}
+ # Last character can only be a letter or a digit
+ if (substr ($hostname, -1, 1) !~ /^[a-zA-Z0-9]*$/) {
+ return 0;}
+ return 1;
}
sub validdomainname
{
- # Checks a domain name against RFC1035
- my $domainname = $_[0];
+ my $part;
+
+ # Checks a domain name against a less strict rule than RFC1035
+ my $domainname = $_[0];
my @parts = split (/\./, $domainname); # Split hostname at the '.'
- my $part;
foreach $part (@parts) {
- return 0 if (! validhostname($part));
+ # Each part should be at least two characters in length
+ # but no more than 63 characters
+ if (length ($part) < 2 || length ($part) > 63) {
+ return 0;}
+ # Only valid characters are a-z, A-Z, 0-9 and -
+ if ($part !~ /^[a-zA-Z0-9-]*$/) {
+ return 0;}
+ # First character can only be a letter or a digit
+ if (substr ($part, 0, 1) !~ /^[a-zA-Z0-9]*$/) {
+ return 0;}
+ # Last character can only be a letter or a digit
+ if (substr ($part, -1, 1) !~ /^[a-zA-Z0-9]*$/) {
+ return 0;}
}
return 1;
}
sub validfqdn
{
- # Checks a fully qualified domain name against RFC1035
- my $fqdn = $_[0];
+ my $part;
+
+ # Checks a fully qualified domain name against a less strict rule than RFC1035
+ my $fqdn = $_[0];
my @parts = split (/\./, $fqdn); # Split hostname at the '.'
if (scalar(@parts) < 2) { # At least two parts should
return 0;} # exist in a FQDN
# (i.e. hostname.domain)
- my $part;
foreach $part (@parts) {
- return 0 if (! validhostname($part));
+ # Each part should be at least one character in length
+ # but no more than 63 characters
+ if (length ($part) < 1 || length ($part) > 63) {
+ return 0;}
+ # Only valid characters are a-z, A-Z, 0-9 and -
+ if ($part !~ /^[a-zA-Z0-9-]*$/) {
+ return 0;}
+ # First character can only be a letter or a digit
+ if (substr ($part, 0, 1) !~ /^[a-zA-Z0-9]*$/) {
+ return 0;}
+ # Last character can only be a letter or a digit
+ if (substr ($part, -1, 1) !~ /^[a-zA-Z0-9]*$/) {
+ return 0;}
}
return 1;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ch...@us...> - 2007-05-24 22:21:35
|
Revision: 366
http://ipcop.svn.sourceforge.net/ipcop/?rev=366&view=rev
Author: chepati
Date: 2007-05-24 15:21:36 -0700 (Thu, 24 May 2007)
Log Message:
-----------
2.6.2x sparc kernels have a bug in the ATI fb so right now we disable atyfb and use the openprom fb sepport. It's a bit slow, but at least it's useful
Modified Paths:
--------------
ipcop/trunk/config/sparc/silo-install.conf
ipcop/trunk/config/sparc/silo.conf
Modified: ipcop/trunk/config/sparc/silo-install.conf
===================================================================
--- ipcop/trunk/config/sparc/silo-install.conf 2007-05-23 19:16:19 UTC (rev 365)
+++ ipcop/trunk/config/sparc/silo-install.conf 2007-05-24 22:21:36 UTC (rev 366)
@@ -8,4 +8,4 @@
image[sun4u]=/boot/vmlinuz64
label=install
initrd=/boot/instroot.img
- append="console=tty0 console=ttyS0,9600n8"
+ append="console=tty0 console=ttyS0,9600n8 video=atyfb:off"
Modified: ipcop/trunk/config/sparc/silo.conf
===================================================================
--- ipcop/trunk/config/sparc/silo.conf 2007-05-23 19:16:19 UTC (rev 365)
+++ ipcop/trunk/config/sparc/silo.conf 2007-05-24 22:21:36 UTC (rev 366)
@@ -4,5 +4,5 @@
label = ipcop
root = ROOT_DEV
initrd=/ipcoprd.img
- append="console=tty0 console=ttyS0,9600n8"
+ append="console=tty0 console=ttyS0,9600n8 video=atyfb:off"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ch...@us...> - 2007-05-23 19:16:17
|
Revision: 365
http://ipcop.svn.sourceforge.net/ipcop/?rev=365&view=rev
Author: chepati
Date: 2007-05-23 12:16:19 -0700 (Wed, 23 May 2007)
Log Message:
-----------
This didn't really look right. Fixed
Modified Paths:
--------------
ipcop/trunk/config/i486/syslinux.cfg
Modified: ipcop/trunk/config/i486/syslinux.cfg
===================================================================
--- ipcop/trunk/config/i486/syslinux.cfg 2007-05-23 19:12:25 UTC (rev 364)
+++ ipcop/trunk/config/i486/syslinux.cfg 2007-05-23 19:16:19 UTC (rev 365)
@@ -17,4 +17,4 @@
APPEND initrd=instroot.img ide=nodma nousb nopcmcia
LABEL dma
KERNEL vmlinuz
- APPEND initrd=instroot
+ APPEND initrd=instroot.img
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ch...@us...> - 2007-05-23 19:12:23
|
Revision: 364
http://ipcop.svn.sourceforge.net/ipcop/?rev=364&view=rev
Author: chepati
Date: 2007-05-23 12:12:25 -0700 (Wed, 23 May 2007)
Log Message:
-----------
Ok, been meaning to commit this for a few weeks. squashfs without lzma compression is marginally better (or often slightly worse) than gzip. lzma compression only works for x86. So there's no real benefit to all ipcop-supported architectures in using squashfs. Therefore I suggest we use initramfs as it's emerging as a viable replacement for initrd, works on all architectures and offers flexibility. I've tested initramfs on x86, ppc and sparc and they all work fine. The only remaining issue is getting floppy installation working with initramfs, which I did almost two months ago, but haven't pursued since. I'll do that next and then we'll have the same functionality using initramfs as we currently have with squashfs. I also changed the installer to do hard disk detection before cdrom detection because I had a problem where the cdrom became /dev/hda and the harddisk /dev/hdc. Rearranging detection didn't really help. There's a similar problem in ppc, but a kernel option in IDE subsystem fixes it. I'll need to spend some more work on this.
Modified Paths:
--------------
ipcop/trunk/config/i486/syslinux.cfg
ipcop/trunk/config/install/fstab
ipcop/trunk/config/install/rc
ipcop/trunk/lfs/initrd
ipcop/trunk/src/installer/main.c
Added Paths:
-----------
ipcop/trunk/config/install/init
Modified: ipcop/trunk/config/i486/syslinux.cfg
===================================================================
--- ipcop/trunk/config/i486/syslinux.cfg 2007-05-23 18:29:47 UTC (rev 363)
+++ ipcop/trunk/config/i486/syslinux.cfg 2007-05-23 19:12:25 UTC (rev 364)
@@ -5,16 +5,16 @@
LABEL install
KERNEL vmlinuz
- APPEND ide=nodma initrd=instroot.img root=/dev/ram0 rw
+ APPEND initrd=instroot.img ide=nodma
LABEL nopcmcia
KERNEL vmlinuz
- APPEND ide=nodma initrd=instroot.img root=/dev/ram0 rw nopcmcia
+ APPEND initrd=instroot.img ide=nodma nopcmcia
LABEL nousb
KERNEL vmlinuz
- APPEND ide=nodma initrd=instroot.img root=/dev/ram0 rw nousb
+ APPEND initrd=instroot.img ide=nodma nousb
LABEL nousborpcmcia
KERNEL vmlinuz
- APPEND ide=nodma initrd=instroot.img root=/dev/ram0 rw nousb nopcmcia
+ APPEND initrd=instroot.img ide=nodma nousb nopcmcia
LABEL dma
KERNEL vmlinuz
- APPEND initrd=instroot root=/dev/ram0 rw
+ APPEND initrd=instroot
Modified: ipcop/trunk/config/install/fstab
===================================================================
--- ipcop/trunk/config/install/fstab 2007-05-23 18:29:47 UTC (rev 363)
+++ ipcop/trunk/config/install/fstab 2007-05-23 19:12:25 UTC (rev 364)
@@ -1,5 +1,3 @@
-/dev/ram0 / squashfs
-/dev/fd0 / squashfs
/proc /proc proc
none /sys sysfs
none /tmp tmpfs
Added: ipcop/trunk/config/install/init
===================================================================
--- ipcop/trunk/config/install/init (rev 0)
+++ ipcop/trunk/config/install/init 2007-05-23 19:12:25 UTC (rev 364)
@@ -0,0 +1,3 @@
+#!/bin/sh -e
+
+exec busybox init
Property changes on: ipcop/trunk/config/install/init
___________________________________________________________________
Name: svn:executable
+ *
Modified: ipcop/trunk/config/install/rc
===================================================================
--- ipcop/trunk/config/install/rc 2007-05-23 18:29:47 UTC (rev 363)
+++ ipcop/trunk/config/install/rc 2007-05-23 19:12:25 UTC (rev 364)
@@ -1,10 +1,5 @@
#!/bin/ash
-echo -ne "Mounting /tmp ... "
-mount -n -t tmpfs tmpfs /tmp -o mode=1777
-cp /etc/fstab.boot /tmp/fstab
-echo "Done"
-
echo -ne "Mounting /proc ... "
mount -n -t proc none /proc
echo "Done"
@@ -43,10 +38,6 @@
mount -n -t devpts devpts /dev/pts
echo "Done"
-echo -ne "Mounting /root ... "
-mount -n -t ramfs none /root
-echo "Done"
-
echo -ne "Starting syslogd ... "
syslogd -O /dev/tty4
echo "Done"
Modified: ipcop/trunk/lfs/initrd
===================================================================
--- ipcop/trunk/lfs/initrd 2007-05-23 18:29:47 UTC (rev 363)
+++ ipcop/trunk/lfs/initrd 2007-05-23 19:12:25 UTC (rev 364)
@@ -67,8 +67,7 @@
# Finish up initrd directory
cd $(INSTALLER_DIR)/initrd/etc && rm -f fstab
cp -aRf $(DIR_SRC)/config/install/* $(INSTALLER_DIR)/initrd/etc/
- mv -f $(INSTALLER_DIR)/initrd/etc/fstab $(INSTALLER_DIR)/initrd/etc/fstab.boot
- cd $(INSTALLER_DIR)/initrd/etc && ln -s /tmp/fstab fstab
+ cd $(INSTALLER_DIR)/initrd && mv etc/init .
rm -rf $(INSTALLER_DIR)/initrd/etc{,/udev,/udev/rules.d}/.svn
rm -rf $(INSTALLER_DIR)/initrd/usr/share/man
chmod 755 $(INSTALLER_DIR)/initrd/etc/halt $(INSTALLER_DIR)/initrd/etc/rc
@@ -141,8 +140,7 @@
cd $(INSTALLER_DIR)/mnt && lzma d $(INSTALLER_DIR)/images/drivers-$(VERSION).img -so | tar xf -
cd $(INSTALLER_DIR)/mnt && lzma d $(INSTALLER_DIR)/images/scsidrv-$(VERSION).img -so | tar xf -
touch $(INSTALLER_DIR)/mnt/CDROMBOOT
- mksquashfs $(INSTALLER_DIR)/mnt $(INSTALLER_DIR)/images/cdinitrd.img
+ cd $(INSTALLER_DIR)/mnt && find . | cpio -o -H newc | gzip -9 > $(INSTALLER_DIR)/images/cdinitrd.img
rm -rf $(INSTALLER_DIR)/mnt/*
-
@$(POSTBUILD)
Modified: ipcop/trunk/src/installer/main.c
===================================================================
--- ipcop/trunk/src/installer/main.c 2007-05-23 18:29:47 UTC (rev 363)
+++ ipcop/trunk/src/installer/main.c 2007-05-23 19:12:25 UTC (rev 364)
@@ -305,27 +305,6 @@
fprintf(flog, "Probing network cards\n");
probehw(hw_network_ctrl);
- mysystem("modprobe usb-storage");
- mysystem("modprobe sr_mod");
- mysystem("modprobe ide-cd");
-
- fprintf(flog, "Probing CD/DVD drives\n");
- //CHECK: hd_list returns really the head AND add tohd_data???
- hd = hd_list(hd_data, hw_cdrom, 1, NULL);
- for (i = 0; hd; hd = hd->next, i++)
- {
- fprintf(flog, "DevName %s\n", hd->unix_dev_name);
- fprintf(flog, "Model %s\n", hd->model);
- if (hd->detail && hd->detail->type == hd_detail_scsi)
- scsi = 1;
- cdromlist = realloc(cdromlist, sizeof(char *) * (i + 1));
- cdromlist[i] = strdup (hd->unix_dev_name);
- }
- /* end with a null pointer */
- cdromlist = realloc(cdromlist, sizeof(char *) * (i + 1));
- cdromlist[i] = NULL;
- hd_free_hd_list(hd); /* free it */
-
mysystem("modprobe sd_mod");
mysystem("modprobe ide-disk");
@@ -350,6 +329,28 @@
harddisklist[i] = NULL;
hd_free_hd_list(hd); /* free it */
+ mysystem("modprobe usb-storage");
+ mysystem("modprobe sr_mod");
+ mysystem("modprobe ide-cd");
+
+ fprintf(flog, "Probing CD/DVD drives\n");
+ //CHECK: hd_list returns really the head AND add tohd_data???
+ hd = hd_list(hd_data, hw_cdrom, 1, NULL);
+ for (i = 0; hd; hd = hd->next, i++)
+ {
+ fprintf(flog, "DevName %s\n", hd->unix_dev_name);
+ fprintf(flog, "Model %s\n", hd->model);
+ if (hd->detail && hd->detail->type == hd_detail_scsi)
+ scsi = 1;
+ cdromlist = realloc(cdromlist, sizeof(char *) * (i + 1));
+ cdromlist[i] = strdup (hd->unix_dev_name);
+ }
+ /* end with a null pointer */
+ cdromlist = realloc(cdromlist, sizeof(char *) * (i + 1));
+ cdromlist[i] = NULL;
+ hd_free_hd_list(hd); /* free it */
+
+
mysystem("modprobe ide-floppy");
fprintf(flog, "Probing Floppy Disk drives\n");
@@ -1112,7 +1113,7 @@
/*TR*/
statuswindow(60, 4, TITLE, gettext("TR_MAKING_FILESYSTEMS"));
- if ((handle=fopen("/tmp/fstab", "w")))
+ if ((handle=fopen("/etc/fstab", "w")))
{
for (i = 0; i < numpartitions; i++)
{
@@ -1215,7 +1216,8 @@
if (!bigdisk)
strcat (bigstring, " --nosquashfs");
strcat (bigstring, " --with=ext3 --with=scsi_mod --with=sd_mod --with=sr_mod --with=libata");
- strcat (bigstring, " --with-usb --fstab=" CONFIG_ROOT "/etc/fstab");
+ strcat (bigstring, " --with=ohci-hcd --with=uhci-hcd --with=ehci-hcd --with=usbhid");
+ strcat (bigstring, " --fstab=" CONFIG_ROOT "/etc/fstab");
//add each module ...
for (i = 0; i < nummodules; i++)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ch...@us...> - 2007-05-23 18:29:45
|
Revision: 363
http://ipcop.svn.sourceforge.net/ipcop/?rev=363&view=rev
Author: chepati
Date: 2007-05-23 11:29:47 -0700 (Wed, 23 May 2007)
Log Message:
-----------
Removed an obsolete variable, ROOT.
Modified Paths:
--------------
ipcop/trunk/lfs/linux
Modified: ipcop/trunk/lfs/linux
===================================================================
--- ipcop/trunk/lfs/linux 2007-05-23 17:53:54 UTC (rev 362)
+++ ipcop/trunk/lfs/linux 2007-05-23 18:29:47 UTC (rev 363)
@@ -141,7 +141,7 @@
cd $(DIR_SRC) && tar jxf $(DIR_DL)/patch-o-matic-ng-20070405.tar.bz2
cd $(DIR_SRC)/patch-o-matic-ng* && \
- ./runme --batch --kernel-path=$(ROOT)/usr/src/$(THISAPP)/ --iptables-path=$(ROOT)/usr/src/iptables/ \
+ ./runme --batch --kernel-path=/usr/src/$(THISAPP)/ --iptables-path=/usr/src/iptables/ \
TARPIT h323-conntrack-nat cuseeme-nat \
sip-conntrack-nat
# rtsp-conntrack-nat quake3-conntrack-nat mms-conntrack-nat
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ch...@us...> - 2007-05-23 17:53:58
|
Revision: 362
http://ipcop.svn.sourceforge.net/ipcop/?rev=362&view=rev
Author: chepati
Date: 2007-05-23 10:53:54 -0700 (Wed, 23 May 2007)
Log Message:
-----------
Upgraded snort and vim to the latest versions, thanks go to Chris Hemsing on ipcop-devel. Also upgraded logwatch as the old version is no longer available
Modified Paths:
--------------
ipcop/trunk/lfs/logwatch
ipcop/trunk/lfs/snort
ipcop/trunk/lfs/vim
Modified: ipcop/trunk/lfs/logwatch
===================================================================
--- ipcop/trunk/lfs/logwatch 2007-05-21 21:51:20 UTC (rev 361)
+++ ipcop/trunk/lfs/logwatch 2007-05-23 17:53:54 UTC (rev 362)
@@ -33,7 +33,7 @@
include Config
PKG_NAME = logwatch
-VER = 7.3.4
+VER = 7.3.6
HOST_ARCH = all
OTHER_SRC = yes
@@ -51,7 +51,7 @@
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_MD5 = 2e257bf514a5de6bc7a3dd05d677d156
+$(DL_FILE)_MD5 = 937d982006b2a76a83edfcfd2e5a9d7d
install : $(TARGET)
Modified: ipcop/trunk/lfs/snort
===================================================================
--- ipcop/trunk/lfs/snort 2007-05-21 21:51:20 UTC (rev 361)
+++ ipcop/trunk/lfs/snort 2007-05-23 17:53:54 UTC (rev 362)
@@ -33,7 +33,7 @@
include Config
PKG_NAME = snort
-VER = 2.6.1.4
+VER = 2.6.1.5
HOST_ARCH = all
OTHER_SRC = yes
@@ -59,8 +59,8 @@
snortrules-pr-2.4.tar.gz = http://www.snort.org/pub-bin/downloads.cgi/Download/vrt_pr/snortrules-pr-2.4.tar.gz
-$(DL_FILE)_MD5 = 70e7f297c9fcf1f46d6fa3e1bb4aae49
-Community-Rules-CURRENT.tar.gz_MD5 = 273e18bf10b8b550a09d30aba35be0f2
+$(DL_FILE)_MD5 = e52a7ea6ba9743a8f8ca397cd26fa1bf
+Community-Rules-CURRENT.tar.gz_MD5 = f236b8a4ac12e99d3e7bd81bf3b5a482
snortrules-pr-2.4.tar.gz_MD5 = 35d9a2486f8c0280bb493aa03c011927
install : $(TARGET)
Modified: ipcop/trunk/lfs/vim
===================================================================
--- ipcop/trunk/lfs/vim 2007-05-21 21:51:20 UTC (rev 361)
+++ ipcop/trunk/lfs/vim 2007-05-23 17:53:54 UTC (rev 362)
@@ -33,14 +33,14 @@
include Config
PKG_NAME = vim
-VER = 7.0
+VER = 7.1
HOST_ARCH = all
OTHER_SRC = yes
THISAPP = vim-$(VER)
DL_FILE = $(THISAPP).tar.bz2
DL_FROM = ftp://ftp.vim.org/pub/vim/unix
-DIR_APP = $(DIR_SRC)/vim70
+DIR_APP = $(DIR_SRC)/vim71
TARGET = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP)
###############################################################################
@@ -48,15 +48,12 @@
###############################################################################
objects = $(DL_FILE) \
-$(THISAPP)-fixes-16.patch \
$(THISAPP)-mandir-1.patch
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(THISAPP)-fixes-16.patch = $(URL_LFS_DEV)/$(THISAPP)-fixes-16.patch
$(THISAPP)-mandir-1.patch = $(URL_LFS_DEV)/$(THISAPP)-mandir-1.patch
-$(DL_FILE)_MD5 = 4ca69757678272f718b1041c810d82d8
-$(THISAPP)-fixes-16.patch_MD5 = 031bbd27553e4fac022f628c5db7094b
+$(DL_FILE)_MD5 = 44c6b4914f38d6f9aa959640b89da329
$(THISAPP)-mandir-1.patch_MD5 = b6426eb4192faba1e867ddd502323f5b
install : $(TARGET)
@@ -88,7 +85,6 @@
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
- cd $(DIR_APP) && patch -Np1 -i $(DIR_DL)/$(THISAPP)-fixes-16.patch
cd $(DIR_APP) && patch -Np1 -i $(DIR_DL)/$(THISAPP)-mandir-1.patch
cd $(DIR_APP) && echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h
cd $(DIR_APP) && ./configure --prefix=/usr \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ch...@us...> - 2007-05-21 21:51:20
|
Revision: 361
http://ipcop.svn.sourceforge.net/ipcop/?rev=361&view=rev
Author: chepati
Date: 2007-05-21 14:51:20 -0700 (Mon, 21 May 2007)
Log Message:
-----------
Added support for binary firmware. Right now only needed for a few qlogic HBAs on a few models of ultrasparcs, but these fiberchannel adapters are also used on other architechures as well. The binary-firmware-all makefile can be used for any other binary firmware we may want to add that is supported on all architectures. If you need to add firmware for a specific platform, then create binary-firmware-arch and add it to make.sh. Also make sure to read the specific firmware license to make sure we meet the redistribution conditions.
Modified Paths:
--------------
ipcop/trunk/lfs/stage2
ipcop/trunk/lfs/stage5
ipcop/trunk/make.sh
Added Paths:
-----------
ipcop/trunk/config/rootfiles/common/binary-firmware-all
ipcop/trunk/lfs/binary-firmware-all
Added: ipcop/trunk/config/rootfiles/common/binary-firmware-all
===================================================================
--- ipcop/trunk/config/rootfiles/common/binary-firmware-all (rev 0)
+++ ipcop/trunk/config/rootfiles/common/binary-firmware-all 2007-05-21 21:51:20 UTC (rev 361)
@@ -0,0 +1,8 @@
+## binary-firmware-all
+##
+lib/firmware/LICENSE.qlogic
+lib/firmware/ql2100_fw.bin
+lib/firmware/ql2200_fw.bin
+lib/firmware/ql2300_fw.bin
+lib/firmware/ql2322_fw.bin
+lib/firmware/ql2400_fw.bin
Added: ipcop/trunk/lfs/binary-firmware-all
===================================================================
--- ipcop/trunk/lfs/binary-firmware-all (rev 0)
+++ ipcop/trunk/lfs/binary-firmware-all 2007-05-21 21:51:20 UTC (rev 361)
@@ -0,0 +1,103 @@
+###############################################################################
+# This file is part of the IPCop Firewall. #
+# #
+# IPCop is free software; you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation; either version 2 of the License, or #
+# (at your option) any later version. #
+# #
+# IPCop is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with IPCop; if not, write to the Free Software #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
+# #
+# Makefiles are based on LFSMake, which is #
+# Copyright (C) 2002 Rod Roard <ro...@su...> #
+# #
+# Modifications by: #
+# ??-12-2003 Mark Wormgoor < ma...@wo...> #
+# - Modified Makefile for IPCop build #
+# #
+# $Id: binary-firmware-all 329 2007-05-01 06:25:54Z chepati $
+# #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include Config
+
+PKG_NAME = binary-firmware-all
+HOST_ARCH = all
+OTHER_SRC = yes
+
+THISAPP = binary-firmware-all
+DIR_APP = $(DIR_SRC)/$(THISAPP)
+TARGET = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP)
+
+###############################################################################
+# Top-level Rules
+###############################################################################
+
+objects = ql2100_fw.bin \
+ ql2200_fw.bin \
+ ql2300_fw.bin \
+ ql2322_fw.bin \
+ ql2400_fw.bin \
+ LICENSE.qlogic
+
+ql2100_fw.bin = ftp://ftp.qlogic.com/outgoing/linux/firmware/ql2100_fw.bin
+ql2200_fw.bin = ftp://ftp.qlogic.com/outgoing/linux/firmware/ql2200_fw.bin
+ql2300_fw.bin = ftp://ftp.qlogic.com/outgoing/linux/firmware/ql2300_fw.bin
+ql2322_fw.bin = ftp://ftp.qlogic.com/outgoing/linux/firmware/ql2322_fw.bin
+ql2400_fw.bin = ftp://ftp.qlogic.com/outgoing/linux/firmware/ql2400_fw.bin
+LICENSE.qlogic = ftp://ftp.qlogic.com/outgoing/linux/firmware/LICENSE
+
+ql2100_fw.bin_MD5 = 12c35a92429131323f9ed2764fc457df
+ql2200_fw.bin_MD5 = 44567f365ce6f668c69c6c40279cd878
+ql2300_fw.bin_MD5 = e27385f97c2f5ad2d5eb07a38081320a
+ql2322_fw.bin_MD5 = 37d2a8ba7d49fc0fb72483341f559e46
+ql2400_fw.bin_MD5 = 0a297cc86c4183abc0246cf609379ade
+LICENSE.qlogic_MD5 = 4005328a134054f0fa077bdc37aa64f2
+
+install : $(TARGET)
+
+check : $(patsubst %,$(DIR_CHK)/%,$(objects))
+
+download :$(patsubst %,$(DIR_DL)/%,$(objects))
+
+md5 : $(subst %,%_MD5,$(objects))
+
+###############################################################################
+# Downloading, checking, md5sum
+###############################################################################
+
+$(patsubst %,$(DIR_CHK)/%,$(objects)) :
+ @$(CHECK)
+
+$(patsubst %,$(DIR_DL)/%,$(objects)) :
+ @$(LOAD)
+
+$(subst %,%_MD5,$(objects)) :
+ @$(MD5)
+
+###############################################################################
+# Installation Details
+###############################################################################
+
+$(TARGET) : $(firstword $(MAKEFILE_LIST)) $(patsubst %,$(DIR_DL)/%,$(objects))
+ @$(PREBUILD)
+
+ cp -af $(DIR_DL)/ql2100_fw.bin /lib/firmware/
+ cp -af $(DIR_DL)/ql2200_fw.bin /lib/firmware/
+ cp -af $(DIR_DL)/ql2300_fw.bin /lib/firmware/
+ cp -af $(DIR_DL)/ql2322_fw.bin /lib/firmware/
+ cp -af $(DIR_DL)/ql2400_fw.bin /lib/firmware/
+ cp -af $(DIR_DL)/LICENSE.qlogic /lib/firmware/
+
+ @$(POSTBUILD)
Modified: ipcop/trunk/lfs/stage2
===================================================================
--- ipcop/trunk/lfs/stage2 2007-05-12 06:27:38 UTC (rev 360)
+++ ipcop/trunk/lfs/stage2 2007-05-21 21:51:20 UTC (rev 361)
@@ -59,7 +59,7 @@
@$(PREBUILD)
# Create directories
- -mkdir -p /{bin,boot,dev,home,lib,mnt,proc}
+ -mkdir -p /{bin,boot,dev,home,lib,lib/firmware,mnt,proc}
-mkdir -p /{root,sbin,sys,tmp,usr/local,var,opt}
-for dirname in /usr /usr/local; do \
mkdir -p $$dirname/{bin,include,lib,sbin,share,src}; \
Modified: ipcop/trunk/lfs/stage5
===================================================================
--- ipcop/trunk/lfs/stage5 2007-05-12 06:27:38 UTC (rev 360)
+++ ipcop/trunk/lfs/stage5 2007-05-21 21:51:20 UTC (rev 361)
@@ -66,6 +66,7 @@
# Next make sure some directories exist
mkdir -p $(INSTALLER_DIR)/initrd/{usr,bin,lib,dev,etc,mnt,root,cdrom,dev,harddisk,proc,tmp,sys}
mkdir -p $(INSTALLER_DIR)/initrd/{usr/share/terminfo/l,var/run}
+ mkdir -p $(INSTALLER_DIR)/initrd/lib/firmware
ln -s /bin $(INSTALLER_DIR)/initrd/sbin
ln -s /bin $(INSTALLER_DIR)/initrd/usr/bin
ln -s /bin $(INSTALLER_DIR)/initrd/usr/sbin
@@ -154,4 +155,7 @@
install -c -D /usr/lib/libparted-1.8.so.6.0.0 $(INSTALLER_DIR)/initrd/lib/libparted-1.8.so.6.0.0
ln -sf libparted-1.8.so.6.0.0 $(INSTALLER_DIR)/initrd/lib/libparted-1.8.so.6
+ # Copy over any binary firmware that may be needed by the installer. We also copy the LICENSE files.
+ cp -a /lib/firmware/* $(INSTALLER_DIR)/initrd/lib/firmware/
+
@$(POSTBUILD)
Modified: ipcop/trunk/make.sh
===================================================================
--- ipcop/trunk/make.sh 2007-05-12 06:27:38 UTC (rev 360)
+++ ipcop/trunk/make.sh 2007-05-21 21:51:20 UTC (rev 361)
@@ -1357,6 +1357,7 @@
ipcop_make binutils-cross-compile
ipcop_make gcc-cross-compile
ipcop_make linux
+ ipcop_make binary-firmware-all
ipcop_make 3cp4218
ipcop_make amedyn2 # DEBUG -- broken on ppc and sparc
ipcop_make CnxADSL
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ges...@us...> - 2007-05-12 06:27:37
|
Revision: 360
http://ipcop.svn.sourceforge.net/ipcop/?rev=360&view=rev
Author: gespinasse
Date: 2007-05-11 23:27:38 -0700 (Fri, 11 May 2007)
Log Message:
-----------
Upgrade squid to stable13
Fix rebuild by removing simlink before installing files or it fail because
file exist.
Modified Paths:
--------------
ipcop/trunk/lfs/squid
Modified: ipcop/trunk/lfs/squid
===================================================================
--- ipcop/trunk/lfs/squid 2007-05-10 19:14:34 UTC (rev 359)
+++ ipcop/trunk/lfs/squid 2007-05-12 06:27:38 UTC (rev 360)
@@ -33,7 +33,7 @@
include Config
PKG_NAME = squid
-VER = 2.6.STABLE12
+VER = 2.6.STABLE13
HOST_ARCH = all
OTHER_SRC = yes
@@ -51,7 +51,7 @@
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_MD5 = a830ccc95cb39cdfa5e5b773add0bb0d
+$(DL_FILE)_MD5 = fdc4ece264b47bab1b112d8f6f842b8b
install : $(TARGET)
@@ -106,11 +106,11 @@
--enable-referer-log \
--with-pthreads
cd $(DIR_APP) && make -j $(PARALLELISM)
+ rm -f $(CONFIG_ROOT)/etc/squid/squid.conf
+ rm -f $(CONFIG_ROOT)/etc/squid/errors
cd $(DIR_APP) && make install
- rm -f $(CONFIG_ROOT)/etc/squid/squid.conf
ln -sf $(CONFIG_ROOT)/proxy/squid.conf $(CONFIG_ROOT)/etc/squid/squid.conf
- rm -f $(CONFIG_ROOT)/etc/squid/errors
ln -sf /usr/lib/squid/errors/English $(CONFIG_ROOT)/etc/squid/errors
-mkdir -p /var/log/cache
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ch...@us...> - 2007-05-10 19:14:34
|
Revision: 359
http://ipcop.svn.sourceforge.net/ipcop/?rev=359&view=rev
Author: chepati
Date: 2007-05-10 12:14:34 -0700 (Thu, 10 May 2007)
Log Message:
-----------
Added a note about setting PARALLELISM too high
Modified Paths:
--------------
ipcop/trunk/make.sh
Modified: ipcop/trunk/make.sh
===================================================================
--- ipcop/trunk/make.sh 2007-05-09 16:02:29 UTC (rev 358)
+++ ipcop/trunk/make.sh 2007-05-10 19:14:34 UTC (rev 359)
@@ -114,7 +114,8 @@
# How nice should we be?
NICE=10
-# How many concurrent jobs to run
+# How many concurrent jobs to run (NOTE: Don't use too high a value, or packages may have timing issues. At least
+# openssh fails if this is too high. It's safe to set this to number of CPUs + 1)
PARALLELISM=3
# How many times should prefetch try to download a package. Don't set to too high a value and hammer sites
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ch...@us...> - 2007-05-09 16:02:28
|
Revision: 358
http://ipcop.svn.sourceforge.net/ipcop/?rev=358&view=rev
Author: chepati
Date: 2007-05-09 09:02:29 -0700 (Wed, 09 May 2007)
Log Message:
-----------
Fixed missing patches at download location
Modified Paths:
--------------
ipcop/trunk/lfs/readline
ipcop/trunk/lfs/vim
Modified: ipcop/trunk/lfs/readline
===================================================================
--- ipcop/trunk/lfs/readline 2007-05-08 20:27:41 UTC (rev 357)
+++ ipcop/trunk/lfs/readline 2007-05-09 16:02:29 UTC (rev 358)
@@ -50,13 +50,13 @@
###############################################################################
objects = $(DL_FILE) \
-$(THISAPP)-fixes-2.patch
+$(THISAPP)-fixes-3.patch
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(THISAPP)-fixes-2.patch = $(URL_LFS_DEV)/$(THISAPP)-fixes-2.patch
+$(THISAPP)-fixes-3.patch = $(URL_LFS_DEV)/$(THISAPP)-fixes-3.patch
$(DL_FILE)_MD5 = e39331f32ad14009b9ff49cc10c5e751
-$(THISAPP)-fixes-2.patch_MD5 = 8ece212267b7e4ad39fe15955ed7d87f
+$(THISAPP)-fixes-3.patch_MD5 = dfa4b750f226cf9ea034ec753a78a742
install : $(TARGET)
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
@@ -88,7 +88,7 @@
cd $(DIR_APP) && sed -i '/MV.*old/d' Makefile.in
cd $(DIR_APP) && sed -i '/{OLDSUFF}/c:' support/shlib-install
- cd $(DIR_APP) && patch -Np1 -i $(DIR_DL)/$(THISAPP)-fixes-2.patch
+ cd $(DIR_APP) && patch -Np1 -i $(DIR_DL)/$(THISAPP)-fixes-3.patch
cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/readline-5.0-parallel.patch
cd $(DIR_APP) && ./configure --prefix=/usr \
--libdir=/lib
Modified: ipcop/trunk/lfs/vim
===================================================================
--- ipcop/trunk/lfs/vim 2007-05-08 20:27:41 UTC (rev 357)
+++ ipcop/trunk/lfs/vim 2007-05-09 16:02:29 UTC (rev 358)
@@ -48,15 +48,15 @@
###############################################################################
objects = $(DL_FILE) \
-$(THISAPP)-fixes-15.patch \
+$(THISAPP)-fixes-16.patch \
$(THISAPP)-mandir-1.patch
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(THISAPP)-fixes-15.patch = $(URL_LFS_DEV)/$(THISAPP)-fixes-15.patch
+$(THISAPP)-fixes-16.patch = $(URL_LFS_DEV)/$(THISAPP)-fixes-16.patch
$(THISAPP)-mandir-1.patch = $(URL_LFS_DEV)/$(THISAPP)-mandir-1.patch
$(DL_FILE)_MD5 = 4ca69757678272f718b1041c810d82d8
-$(THISAPP)-fixes-15.patch_MD5 = dab355f17ce870d63456edbf38108c90
+$(THISAPP)-fixes-16.patch_MD5 = 031bbd27553e4fac022f628c5db7094b
$(THISAPP)-mandir-1.patch_MD5 = b6426eb4192faba1e867ddd502323f5b
install : $(TARGET)
@@ -88,7 +88,7 @@
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
- cd $(DIR_APP) && patch -Np1 -i $(DIR_DL)/$(THISAPP)-fixes-15.patch
+ cd $(DIR_APP) && patch -Np1 -i $(DIR_DL)/$(THISAPP)-fixes-16.patch
cd $(DIR_APP) && patch -Np1 -i $(DIR_DL)/$(THISAPP)-mandir-1.patch
cd $(DIR_APP) && echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h
cd $(DIR_APP) && ./configure --prefix=/usr \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ow...@us...> - 2007-05-08 20:27:41
|
Revision: 357
http://ipcop.svn.sourceforge.net/ipcop/?rev=357&view=rev
Author: owes
Date: 2007-05-08 13:27:41 -0700 (Tue, 08 May 2007)
Log Message:
-----------
build iptables NAT modules
Modified Paths:
--------------
ipcop/trunk/config/kernel/kernel.config.i486
Modified: ipcop/trunk/config/kernel/kernel.config.i486
===================================================================
--- ipcop/trunk/config/kernel/kernel.config.i486 2007-05-08 15:02:36 UTC (rev 356)
+++ ipcop/trunk/config/kernel/kernel.config.i486 2007-05-08 20:27:41 UTC (rev 357)
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.21.1
-# Sat Apr 28 07:50:50 2007
+# Tue May 8 19:54:00 2007
#
CONFIG_X86_32=y
CONFIG_GENERIC_TIME=y
@@ -502,7 +502,21 @@
CONFIG_IP_NF_TARGET_REJECT=y
CONFIG_IP_NF_TARGET_LOG=y
CONFIG_IP_NF_TARGET_ULOG=y
-# CONFIG_NF_NAT is not set
+CONFIG_NF_NAT=m
+CONFIG_NF_NAT_NEEDED=y
+CONFIG_IP_NF_TARGET_MASQUERADE=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
+CONFIG_IP_NF_TARGET_NETMAP=m
+CONFIG_IP_NF_TARGET_SAME=m
+# CONFIG_NF_NAT_SNMP_BASIC is not set
+CONFIG_NF_NAT_PROTO_GRE=m
+CONFIG_NF_NAT_FTP=m
+CONFIG_NF_NAT_IRC=m
+CONFIG_NF_NAT_TFTP=m
+CONFIG_NF_NAT_AMANDA=m
+CONFIG_NF_NAT_PPTP=m
+CONFIG_NF_NAT_H323=m
+CONFIG_NF_NAT_SIP=m
CONFIG_IP_NF_MANGLE=y
CONFIG_IP_NF_TARGET_TOS=y
CONFIG_IP_NF_TARGET_ECN=y
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ch...@us...> - 2007-05-08 15:02:34
|
Revision: 356
http://ipcop.svn.sourceforge.net/ipcop/?rev=356&view=rev
Author: chepati
Date: 2007-05-08 08:02:36 -0700 (Tue, 08 May 2007)
Log Message:
-----------
Removed an obsolete comment
Modified Paths:
--------------
ipcop/trunk/lfs/installer
Modified: ipcop/trunk/lfs/installer
===================================================================
--- ipcop/trunk/lfs/installer 2007-05-08 01:10:07 UTC (rev 355)
+++ ipcop/trunk/lfs/installer 2007-05-08 15:02:36 UTC (rev 356)
@@ -55,8 +55,7 @@
###############################################################################
# Installation Details
###############################################################################
-# cd $(DIR_APP) && make CFLAGS="$(CFLAGS) -I$(OPT_DIR)/$(MACHINE)-uClibc/usr/include \
-#
+
$(TARGET) : $(firstword $(MAKEFILE_LIST))
@$(PREBUILD)
@rm -rf $(DIR_APP) && mkdir $(DIR_APP) && cp -R $(DIR_SRC)/src/installer/* $(DIR_APP)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ch...@us...> - 2007-05-08 01:10:06
|
Revision: 355
http://ipcop.svn.sourceforge.net/ipcop/?rev=355&view=rev
Author: chepati
Date: 2007-05-07 18:10:07 -0700 (Mon, 07 May 2007)
Log Message:
-----------
Copy the right kernel image for sparc
Modified Paths:
--------------
ipcop/trunk/lfs/linux
Modified: ipcop/trunk/lfs/linux
===================================================================
--- ipcop/trunk/lfs/linux 2007-05-08 01:03:22 UTC (rev 354)
+++ ipcop/trunk/lfs/linux 2007-05-08 01:10:07 UTC (rev 355)
@@ -194,7 +194,7 @@
ifeq "$(MACHINE)" "sparc"
cd $(DIR_APP) && make -j $(PARALLELISM) all
- cd $(DIR_APP) && gzip -9c vmlinux > /boot/vmlinuz-$(VER)
+ cd $(DIR_APP) && cp -f vmlinux /boot/vmlinuz-$(VER)
cd $(DIR_APP) && cp -f System.map /boot/System.map-$(VER)
ln -sf vmlinuz-$(VER) /boot/vmlinuz
ln -sf System.map-$(VER) /boot/System.map
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ch...@us...> - 2007-05-08 01:03:21
|
Revision: 354
http://ipcop.svn.sourceforge.net/ipcop/?rev=354&view=rev
Author: chepati
Date: 2007-05-07 18:03:22 -0700 (Mon, 07 May 2007)
Log Message:
-----------
Oops, didn't mean to commit these yet. Revert for now until I've fully tested them on sparc
Modified Paths:
--------------
ipcop/trunk/config/install/fstab
ipcop/trunk/config/install/rc
ipcop/trunk/config/ppc/yaboot-cdinstall.conf
ipcop/trunk/lfs/amedyn2
ipcop/trunk/lfs/initrd
ipcop/trunk/src/installer/main.c
Modified: ipcop/trunk/config/install/fstab
===================================================================
--- ipcop/trunk/config/install/fstab 2007-05-08 00:52:07 UTC (rev 353)
+++ ipcop/trunk/config/install/fstab 2007-05-08 01:03:22 UTC (rev 354)
@@ -1,3 +1,5 @@
+/dev/ram0 / squashfs
+/dev/fd0 / squashfs
/proc /proc proc
none /sys sysfs
none /tmp tmpfs
Modified: ipcop/trunk/config/install/rc
===================================================================
--- ipcop/trunk/config/install/rc 2007-05-08 00:52:07 UTC (rev 353)
+++ ipcop/trunk/config/install/rc 2007-05-08 01:03:22 UTC (rev 354)
@@ -1,5 +1,10 @@
#!/bin/ash
+echo -ne "Mounting /tmp ... "
+mount -n -t tmpfs tmpfs /tmp -o mode=1777
+cp /etc/fstab.boot /tmp/fstab
+echo "Done"
+
echo -ne "Mounting /proc ... "
mount -n -t proc none /proc
echo "Done"
@@ -38,6 +43,10 @@
mount -n -t devpts devpts /dev/pts
echo "Done"
+echo -ne "Mounting /root ... "
+mount -n -t ramfs none /root
+echo "Done"
+
echo -ne "Starting syslogd ... "
syslogd -O /dev/tty4
echo "Done"
Modified: ipcop/trunk/config/ppc/yaboot-cdinstall.conf
===================================================================
--- ipcop/trunk/config/ppc/yaboot-cdinstall.conf 2007-05-08 00:52:07 UTC (rev 353)
+++ ipcop/trunk/config/ppc/yaboot-cdinstall.conf 2007-05-08 01:03:22 UTC (rev 354)
@@ -6,6 +6,6 @@
image=/boot/vmlinuz
label=install
initrd=/boot/instroot.img
- append="video=ofonly"
+ append="root=/dev/ram0 video=ofonly"
read-only
Modified: ipcop/trunk/lfs/amedyn2
===================================================================
--- ipcop/trunk/lfs/amedyn2 2007-05-08 00:52:07 UTC (rev 353)
+++ ipcop/trunk/lfs/amedyn2 2007-05-08 01:03:22 UTC (rev 354)
@@ -34,7 +34,7 @@
PKG_NAME = amedyn2
VER = 2006-09-28
-HOST_ARCH = i486
+HOST_ARCH = all
OTHER_SRC = yes
KERNEL_MOD = yes
Modified: ipcop/trunk/lfs/initrd
===================================================================
--- ipcop/trunk/lfs/initrd 2007-05-08 00:52:07 UTC (rev 353)
+++ ipcop/trunk/lfs/initrd 2007-05-08 01:03:22 UTC (rev 354)
@@ -67,9 +67,8 @@
# Finish up initrd directory
cd $(INSTALLER_DIR)/initrd/etc && rm -f fstab
cp -aRf $(DIR_SRC)/config/install/* $(INSTALLER_DIR)/initrd/etc/
- #mv -f $(INSTALLER_DIR)/initrd/etc/fstab $(INSTALLER_DIR)/initrd/etc/fstab.boot
- #cd $(INSTALLER_DIR)/initrd/etc && ln -s /tmp/fstab fstab
- cd $(INSTALLER_DIR)/initrd && mv etc/init .
+ mv -f $(INSTALLER_DIR)/initrd/etc/fstab $(INSTALLER_DIR)/initrd/etc/fstab.boot
+ cd $(INSTALLER_DIR)/initrd/etc && ln -s /tmp/fstab fstab
rm -rf $(INSTALLER_DIR)/initrd/etc{,/udev,/udev/rules.d}/.svn
rm -rf $(INSTALLER_DIR)/initrd/usr/share/man
chmod 755 $(INSTALLER_DIR)/initrd/etc/halt $(INSTALLER_DIR)/initrd/etc/rc
@@ -142,8 +141,7 @@
cd $(INSTALLER_DIR)/mnt && lzma d $(INSTALLER_DIR)/images/drivers-$(VERSION).img -so | tar xf -
cd $(INSTALLER_DIR)/mnt && lzma d $(INSTALLER_DIR)/images/scsidrv-$(VERSION).img -so | tar xf -
touch $(INSTALLER_DIR)/mnt/CDROMBOOT
- #mksquashfs $(INSTALLER_DIR)/mnt $(INSTALLER_DIR)/images/cdinitrd.img
- cd $(INSTALLER_DIR)/mnt && find . | cpio -o -H newc | gzip -9 > $(INSTALLER_DIR)/images/cdinitrd.img
+ mksquashfs $(INSTALLER_DIR)/mnt $(INSTALLER_DIR)/images/cdinitrd.img
rm -rf $(INSTALLER_DIR)/mnt/*
Modified: ipcop/trunk/src/installer/main.c
===================================================================
--- ipcop/trunk/src/installer/main.c 2007-05-08 00:52:07 UTC (rev 353)
+++ ipcop/trunk/src/installer/main.c 2007-05-08 01:03:22 UTC (rev 354)
@@ -1112,7 +1112,7 @@
/*TR*/
statuswindow(60, 4, TITLE, gettext("TR_MAKING_FILESYSTEMS"));
- if ((handle=fopen("/etc/fstab", "w")))
+ if ((handle=fopen("/tmp/fstab", "w")))
{
for (i = 0; i < numpartitions; i++)
{
@@ -1215,8 +1215,7 @@
if (!bigdisk)
strcat (bigstring, " --nosquashfs");
strcat (bigstring, " --with=ext3 --with=scsi_mod --with=sd_mod --with=sr_mod --with=libata");
- strcat (bigstring, " --with=ohci-hcd --with=uhci-hcd --with=ehci-hcd --with=usbhid");
- strcat (bigstring, " --fstab=" CONFIG_ROOT "/etc/fstab");
+ strcat (bigstring, " --with-usb --fstab=" CONFIG_ROOT "/etc/fstab");
//add each module ...
for (i = 0; i < nummodules; i++)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ch...@us...> - 2007-05-08 00:52:05
|
Revision: 353
http://ipcop.svn.sourceforge.net/ipcop/?rev=353&view=rev
Author: chepati
Date: 2007-05-07 17:52:07 -0700 (Mon, 07 May 2007)
Log Message:
-----------
Copy the right kernel image for ppc
Modified Paths:
--------------
ipcop/trunk/config/install/fstab
ipcop/trunk/config/install/rc
ipcop/trunk/config/ppc/yaboot-cdinstall.conf
ipcop/trunk/lfs/amedyn2
ipcop/trunk/lfs/initrd
ipcop/trunk/lfs/linux
ipcop/trunk/src/installer/main.c
Modified: ipcop/trunk/config/install/fstab
===================================================================
--- ipcop/trunk/config/install/fstab 2007-05-08 00:49:59 UTC (rev 352)
+++ ipcop/trunk/config/install/fstab 2007-05-08 00:52:07 UTC (rev 353)
@@ -1,5 +1,3 @@
-/dev/ram0 / squashfs
-/dev/fd0 / squashfs
/proc /proc proc
none /sys sysfs
none /tmp tmpfs
Modified: ipcop/trunk/config/install/rc
===================================================================
--- ipcop/trunk/config/install/rc 2007-05-08 00:49:59 UTC (rev 352)
+++ ipcop/trunk/config/install/rc 2007-05-08 00:52:07 UTC (rev 353)
@@ -1,10 +1,5 @@
#!/bin/ash
-echo -ne "Mounting /tmp ... "
-mount -n -t tmpfs tmpfs /tmp -o mode=1777
-cp /etc/fstab.boot /tmp/fstab
-echo "Done"
-
echo -ne "Mounting /proc ... "
mount -n -t proc none /proc
echo "Done"
@@ -43,10 +38,6 @@
mount -n -t devpts devpts /dev/pts
echo "Done"
-echo -ne "Mounting /root ... "
-mount -n -t ramfs none /root
-echo "Done"
-
echo -ne "Starting syslogd ... "
syslogd -O /dev/tty4
echo "Done"
Modified: ipcop/trunk/config/ppc/yaboot-cdinstall.conf
===================================================================
--- ipcop/trunk/config/ppc/yaboot-cdinstall.conf 2007-05-08 00:49:59 UTC (rev 352)
+++ ipcop/trunk/config/ppc/yaboot-cdinstall.conf 2007-05-08 00:52:07 UTC (rev 353)
@@ -6,6 +6,6 @@
image=/boot/vmlinuz
label=install
initrd=/boot/instroot.img
- append="root=/dev/ram0 video=ofonly"
+ append="video=ofonly"
read-only
Modified: ipcop/trunk/lfs/amedyn2
===================================================================
--- ipcop/trunk/lfs/amedyn2 2007-05-08 00:49:59 UTC (rev 352)
+++ ipcop/trunk/lfs/amedyn2 2007-05-08 00:52:07 UTC (rev 353)
@@ -34,7 +34,7 @@
PKG_NAME = amedyn2
VER = 2006-09-28
-HOST_ARCH = all
+HOST_ARCH = i486
OTHER_SRC = yes
KERNEL_MOD = yes
Modified: ipcop/trunk/lfs/initrd
===================================================================
--- ipcop/trunk/lfs/initrd 2007-05-08 00:49:59 UTC (rev 352)
+++ ipcop/trunk/lfs/initrd 2007-05-08 00:52:07 UTC (rev 353)
@@ -67,8 +67,9 @@
# Finish up initrd directory
cd $(INSTALLER_DIR)/initrd/etc && rm -f fstab
cp -aRf $(DIR_SRC)/config/install/* $(INSTALLER_DIR)/initrd/etc/
- mv -f $(INSTALLER_DIR)/initrd/etc/fstab $(INSTALLER_DIR)/initrd/etc/fstab.boot
- cd $(INSTALLER_DIR)/initrd/etc && ln -s /tmp/fstab fstab
+ #mv -f $(INSTALLER_DIR)/initrd/etc/fstab $(INSTALLER_DIR)/initrd/etc/fstab.boot
+ #cd $(INSTALLER_DIR)/initrd/etc && ln -s /tmp/fstab fstab
+ cd $(INSTALLER_DIR)/initrd && mv etc/init .
rm -rf $(INSTALLER_DIR)/initrd/etc{,/udev,/udev/rules.d}/.svn
rm -rf $(INSTALLER_DIR)/initrd/usr/share/man
chmod 755 $(INSTALLER_DIR)/initrd/etc/halt $(INSTALLER_DIR)/initrd/etc/rc
@@ -141,7 +142,8 @@
cd $(INSTALLER_DIR)/mnt && lzma d $(INSTALLER_DIR)/images/drivers-$(VERSION).img -so | tar xf -
cd $(INSTALLER_DIR)/mnt && lzma d $(INSTALLER_DIR)/images/scsidrv-$(VERSION).img -so | tar xf -
touch $(INSTALLER_DIR)/mnt/CDROMBOOT
- mksquashfs $(INSTALLER_DIR)/mnt $(INSTALLER_DIR)/images/cdinitrd.img
+ #mksquashfs $(INSTALLER_DIR)/mnt $(INSTALLER_DIR)/images/cdinitrd.img
+ cd $(INSTALLER_DIR)/mnt && find . | cpio -o -H newc | gzip -9 > $(INSTALLER_DIR)/images/cdinitrd.img
rm -rf $(INSTALLER_DIR)/mnt/*
Modified: ipcop/trunk/lfs/linux
===================================================================
--- ipcop/trunk/lfs/linux 2007-05-08 00:49:59 UTC (rev 352)
+++ ipcop/trunk/lfs/linux 2007-05-08 00:52:07 UTC (rev 353)
@@ -181,7 +181,7 @@
ifeq "$(MACHINE)" "ppc"
cd $(DIR_APP) && make -j $(PARALLELISM) all
- cd $(DIR_APP) && cp -f arch/powerpc/boot/zImage /boot/vmlinuz-$(VER)
+ cd $(DIR_APP) && cp -f vmlinux /boot/vmlinuz-$(VER)
cd $(DIR_APP) && cp -f arch/powerpc/boot/zImage.coff /boot/vmlinuz.coff
cd $(DIR_APP) && cp -f arch/powerpc/boot/zImage.miboot /boot/vmlinuz.miboot
cd $(DIR_APP) && cp -f System.map /boot/System.map-$(VER)
Modified: ipcop/trunk/src/installer/main.c
===================================================================
--- ipcop/trunk/src/installer/main.c 2007-05-08 00:49:59 UTC (rev 352)
+++ ipcop/trunk/src/installer/main.c 2007-05-08 00:52:07 UTC (rev 353)
@@ -1112,7 +1112,7 @@
/*TR*/
statuswindow(60, 4, TITLE, gettext("TR_MAKING_FILESYSTEMS"));
- if ((handle=fopen("/tmp/fstab", "w")))
+ if ((handle=fopen("/etc/fstab", "w")))
{
for (i = 0; i < numpartitions; i++)
{
@@ -1215,7 +1215,8 @@
if (!bigdisk)
strcat (bigstring, " --nosquashfs");
strcat (bigstring, " --with=ext3 --with=scsi_mod --with=sd_mod --with=sr_mod --with=libata");
- strcat (bigstring, " --with-usb --fstab=" CONFIG_ROOT "/etc/fstab");
+ strcat (bigstring, " --with=ohci-hcd --with=uhci-hcd --with=ehci-hcd --with=usbhid");
+ strcat (bigstring, " --fstab=" CONFIG_ROOT "/etc/fstab");
//add each module ...
for (i = 0; i < nummodules; i++)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ch...@us...> - 2007-05-08 00:49:59
|
Revision: 352
http://ipcop.svn.sourceforge.net/ipcop/?rev=352&view=rev
Author: chepati
Date: 2007-05-07 17:49:59 -0700 (Mon, 07 May 2007)
Log Message:
-----------
Upgrade cpio
Modified Paths:
--------------
ipcop/trunk/config/rootfiles/common/cpio
ipcop/trunk/lfs/cpio
Modified: ipcop/trunk/config/rootfiles/common/cpio
===================================================================
--- ipcop/trunk/config/rootfiles/common/cpio 2007-05-05 15:34:42 UTC (rev 351)
+++ ipcop/trunk/config/rootfiles/common/cpio 2007-05-08 00:49:59 UTC (rev 352)
@@ -1,6 +1,6 @@
## cpio-2.6
##
-usr/bin/cpio
+bin/cpio
#usr/libexec/rmt
#usr/share/info/cpio.info
#usr/share/locale/da/LC_MESSAGES/cpio.mo
Modified: ipcop/trunk/lfs/cpio
===================================================================
--- ipcop/trunk/lfs/cpio 2007-05-05 15:34:42 UTC (rev 351)
+++ ipcop/trunk/lfs/cpio 2007-05-08 00:49:59 UTC (rev 352)
@@ -33,7 +33,7 @@
include Config
PKG_NAME = cpio
-VER = 2.6
+VER = 2.7
HOST_ARCH = all
OTHER_SRC = yes
@@ -47,12 +47,14 @@
# Top-level Rules
###############################################################################
-objects = $(DL_FILE)
+objects = $(DL_FILE) \
+$(THISAPP)-upstream_fixes-1.patch
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
+$(THISAPP)-upstream_fixes-1.patch = http://www.linuxfromscratch.org/patches/blfs/svn/cpio-2.7-upstream_fixes-1.patch
-$(DL_FILE)_MD5 = 25e0e8725bc60ed3460c9cde92752674
-
+$(DL_FILE)_MD5 = 69ad6cb3d288aafe5f969f68d9fd0fb7
+$(THISAPP)-upstream_fixes-1.patch_MD5 = d8351a813fcb1d522d768ad8a6013196
install : $(TARGET)
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
@@ -82,12 +84,16 @@
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
- cd $(DIR_APP) && ./configure --prefix=/usr \
- --libexecdir=/tmp \
- --with-rmt=/usr/bin/rmt \
- --disable-nls
+ cd $(DIR_APP) && patch -Np1 -i $(DIR_DL)/$(THISAPP)-upstream_fixes-1.patch
+ cd $(DIR_APP) && ./configure CPIO_MT_PROG=mt --prefix=/usr \
+ --bindir=/bin \
+ --libexecdir=/tmp \
+ --with-rmt=/usr/sbin/rmt \
+ --disable-nls
cd $(DIR_APP) && make
cd $(DIR_APP) && make install
+ #install -m 0755 $(DIR_SRC)/src/install+setup/install/cpioinitrd /boot
+
@rm -rf $(DIR_APP)
@$(POSTBUILD)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ch...@us...> - 2007-05-05 15:34:42
|
Revision: 351
http://ipcop.svn.sourceforge.net/ipcop/?rev=351&view=rev
Author: chepati
Date: 2007-05-05 08:34:42 -0700 (Sat, 05 May 2007)
Log Message:
-----------
Fixed the size of one of the ppc fdinitrds.
Modified Paths:
--------------
ipcop/trunk/lfs/boot.img
Modified: ipcop/trunk/lfs/boot.img
===================================================================
--- ipcop/trunk/lfs/boot.img 2007-05-05 15:18:20 UTC (rev 350)
+++ ipcop/trunk/lfs/boot.img 2007-05-05 15:34:42 UTC (rev 351)
@@ -73,7 +73,7 @@
ifeq "$(MACHINE)" "ppc"
# First make coff image, bootable directly from Open Firmware
# as some machines may need this
- dd if=/dev/zero of=$(INSTALLER_DIR)/images/bootofw.img bs=2048 count=5640
+ dd if=/dev/zero of=$(INSTALLER_DIR)/images/bootofw.img bs=1024 count=1440
hformat -l "IPCop OF Boot Disk" $(INSTALLER_DIR)/images/bootofw.img
hmount $(INSTALLER_DIR)/images/bootofw.img
hcopy -r /boot/vmlinuz.coff :ipcop-install
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ch...@us...> - 2007-05-05 15:18:19
|
Revision: 350
http://ipcop.svn.sourceforge.net/ipcop/?rev=350&view=rev
Author: chepati
Date: 2007-05-05 08:18:20 -0700 (Sat, 05 May 2007)
Log Message:
-----------
Removed a old command we were no longer using
Modified Paths:
--------------
ipcop/trunk/lfs/cpio
Modified: ipcop/trunk/lfs/cpio
===================================================================
--- ipcop/trunk/lfs/cpio 2007-05-04 05:22:40 UTC (rev 349)
+++ ipcop/trunk/lfs/cpio 2007-05-05 15:18:20 UTC (rev 350)
@@ -89,7 +89,5 @@
cd $(DIR_APP) && make
cd $(DIR_APP) && make install
- #install -m 0755 $(DIR_SRC)/src/install+setup/install/cpioinitrd /boot
-
@rm -rf $(DIR_APP)
@$(POSTBUILD)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ch...@us...> - 2007-05-04 05:22:38
|
Revision: 349
http://ipcop.svn.sourceforge.net/ipcop/?rev=349&view=rev
Author: chepati
Date: 2007-05-03 22:22:40 -0700 (Thu, 03 May 2007)
Log Message:
-----------
The sparc kernel already has support for console on serial, just enable it at boot time.
Modified Paths:
--------------
ipcop/trunk/config/sparc/silo-install.conf
ipcop/trunk/config/sparc/silo.conf
Modified: ipcop/trunk/config/sparc/silo-install.conf
===================================================================
--- ipcop/trunk/config/sparc/silo-install.conf 2007-05-04 05:20:45 UTC (rev 348)
+++ ipcop/trunk/config/sparc/silo-install.conf 2007-05-04 05:22:40 UTC (rev 349)
@@ -3,9 +3,9 @@
timeout=600
message=/boot/message
default=install
-append="cdrom"
# This will only work on Ultrasparcs
image[sun4u]=/boot/vmlinuz64
label=install
initrd=/boot/instroot.img
+ append="console=tty0 console=ttyS0,9600n8"
Modified: ipcop/trunk/config/sparc/silo.conf
===================================================================
--- ipcop/trunk/config/sparc/silo.conf 2007-05-04 05:20:45 UTC (rev 348)
+++ ipcop/trunk/config/sparc/silo.conf 2007-05-04 05:22:40 UTC (rev 349)
@@ -4,4 +4,5 @@
label = ipcop
root = ROOT_DEV
initrd=/ipcoprd.img
+ append="console=tty0 console=ttyS0,9600n8"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|