|
From: <ow...@us...> - 2008-01-15 21:14:52
|
Revision: 1009
http://ipcop.svn.sourceforge.net/ipcop/?rev=1009&view=rev
Author: owes
Date: 2008-01-15 13:13:46 -0800 (Tue, 15 Jan 2008)
Log Message:
-----------
Installer asks for root-extra.img floppy when booting from floppy
Rearrange files in floppy root.img and root-extra.img to make installer
work with utf8 and languages
Modified Paths:
--------------
ipcop/trunk/lfs/initramfs
ipcop/trunk/src/installer/installer.c
Modified: ipcop/trunk/lfs/initramfs
===================================================================
--- ipcop/trunk/lfs/initramfs 2008-01-14 19:33:17 UTC (rev 1008)
+++ ipcop/trunk/lfs/initramfs 2008-01-15 21:13:46 UTC (rev 1009)
@@ -181,7 +181,7 @@
# Copy over udhcp settings for busybox
install -m 0755 $(DIR_SRC)/config/busybox/default.script \
- $(INITRAMFS_DIR)/usr/share/udhcpc/default.script
+ $(INITRAMFS_DIR)/usr/bin/udhcpc.script
# Finish up initramfs directory
install --owner=root --group=root $(DIR_SRC)/config/install/* $(INITRAMFS_DIR)/etc/
@@ -403,17 +403,20 @@
$(INITRAMFS_DIR)/lib/modules/$(KVER)/kernel/fs/jbd \
$(FLOPPY_ROOT_DIR)/lib/modules/$(KVER)/kernel/fs/
- # Copy the CDROM kernel modules
- cp -a $(INITRAMFS_DIR)/lib/modules/$(KVER)/kernel/drivers/cdrom \
- $(FLOPPY_ROOT_DIR)/lib/modules/$(KVER)/kernel/drivers/
+ # Copy some extra binaries
+ mkdir -p $(FLOPPY_ROOT_DIR)/usr
+ cp -a $(INITRAMFS_DIR)/usr/bin $(FLOPPY_ROOT_DIR)/usr/
- # Copy the IDE kernel modules
- cp -a $(INITRAMFS_DIR)/lib/modules/$(KVER)/kernel/drivers/ide \
- $(FLOPPY_ROOT_DIR)/lib/modules/$(KVER)/kernel/drivers/
+ # Now copy the extra libraries we need for the extra binaries
+ mkdir -p $(FLOPPY_ROOT_DIR)/usr/lib
+ # Copy the locale archive
+ mkdir -p $(FLOPPY_ROOT_DIR)/usr/lib/locale
+ cp -a /usr/lib/locale/locale-archive $(FLOPPY_ROOT_DIR)/usr/lib/locale/locale-archive
+
# Copy some final files
mkdir -p $(FLOPPY_ROOT_DIR)/usr/share
- for directory in discover kbd terminfo udhcpc; do \
+ for directory in kbd terminfo; do \
cp -a /$(INITRAMFS_DIR)/usr/share/$$directory $(FLOPPY_ROOT_DIR)/usr/share/; \
done
@@ -450,22 +453,21 @@
#################################################################################################
# START of root-extra floppy section #
#################################################################################################
- # Copy the the locale archive to the extra floppy root directory
- # owes: working on this
- #mkdir -p $(FLOPPY_ROOT_DIR)/lib
- #cp -a $(INITRAMFS_DIR)/usr/lib/locale $(FLOPPY_ROOT_DIR)/lib/
+ # Just a stupid flag file
+ touch $(FLOPPY_ROOT_DIR)/FLOPPYXTRA
# Copy the installer i18n messages
mkdir -p $(FLOPPY_ROOT_DIR)/usr/share
cp -a $(INITRAMFS_DIR)/usr/share/locale $(FLOPPY_ROOT_DIR)/usr/share/
- # Copy some extra binaries
- cp -a $(INITRAMFS_DIR)/usr/bin $(FLOPPY_ROOT_DIR)/usr/
+ # Copy some final files
+ mkdir -p $(FLOPPY_ROOT_DIR)/usr/share
+ for directory in discover; do \
+ cp -a /$(INITRAMFS_DIR)/usr/share/$$directory $(FLOPPY_ROOT_DIR)/usr/share/; \
+ done
- # Now copy the extra libraries we need for the extra binaries
- mkdir -p $(FLOPPY_ROOT_DIR)/usr/lib
-
# And remove those libraries that are already included on the first root floppy
+ mkdir -p $(FLOPPY_ROOT_DIR)/usr/lib
cp -a $(INITRAMFS_DIR)/lib/*.so.* $(FLOPPY_ROOT_DIR)/usr/lib/
for lib in `ldd $(INITRAMFS_DIR)/bin/installer | awk '{print $$1}' | grep -v linux-gate`; do \
rm -f $(FLOPPY_ROOT_DIR)/usr/lib/$$(basename $$lib); \
@@ -474,6 +476,13 @@
# Create the kernel modules directory
mkdir -p $(FLOPPY_ROOT_DIR)/lib/modules/$(KVER)/kernel/drivers
+ # Copy the CDROM kernel modules
+ cp -a $(INITRAMFS_DIR)/lib/modules/$(KVER)/kernel/drivers/cdrom \
+ $(FLOPPY_ROOT_DIR)/lib/modules/$(KVER)/kernel/drivers/
+
+ # Copy the IDE kernel modules
+ cp -a $(INITRAMFS_DIR)/lib/modules/$(KVER)/kernel/drivers/ide \
+ $(FLOPPY_ROOT_DIR)/lib/modules/$(KVER)/kernel/drivers/
# Copy the ATA kernel modules
cp -a $(INITRAMFS_DIR)/lib/modules/$(KVER)/kernel/drivers/ata \
$(FLOPPY_ROOT_DIR)/lib/modules/$(KVER)/kernel/drivers/
Modified: ipcop/trunk/src/installer/installer.c
===================================================================
--- ipcop/trunk/src/installer/installer.c 2008-01-14 19:33:17 UTC (rev 1008)
+++ ipcop/trunk/src/installer/installer.c 2008-01-15 21:13:46 UTC (rev 1009)
@@ -77,7 +77,7 @@
{
/* maybe fancy progress bar here */
- snprintf(string, STRING_SIZE, "udhcpc -q -n -i eth%d > /dev/null\n", j);
+ snprintf(string, STRING_SIZE, "udhcpc -q -n -i eth%d -s /usr/bin/udhcpc.script > /dev/null\n", j);
if ( !mysystem(string) )
{
fprintf(flog, "eth%d DHCP Configured\n", j);
@@ -116,7 +116,7 @@
newtPopWindow();
struct newtWinEntry entries[] = { {"", &values[0], 0,}, {NULL, NULL, 0} };
rc = newtWinEntries(ipcop_gettext("TR_TITLE_SOURCE"), ipcop_gettext("TR_ENTER_URL"),
- 72, 5, 5, 50, entries, ipcop_gettext("TR_OK"),
+ 65, 5, 5, 50, entries, ipcop_gettext("TR_OK"),
ipcop_gettext("TR_CANCEL"), NULL);
strncpy(message, values[0], STRING_SIZE);
fprintf(flog, "URL is %s\n", message);
@@ -191,7 +191,7 @@
{
snprintf (line, STRING_SIZE_LARGE, ipcop_gettext("TR_SELECT_INSTALLATION_MEDIA_LONG"), NAME);
rc = newtWinMenu(ipcop_gettext("TR_TITLE_SOURCE"),
- line, 72, 5, 5, 8,
+ line, 65, 5, 5, 8,
installtypes, &installtype, ipcop_gettext("TR_OK"),
ipcop_gettext("TR_CANCEL"), NULL);
if ( rc == 2 )
@@ -304,7 +304,7 @@
// Choose the disk to use
rc = newtWinMenu(ipcop_gettext("TR_SELECT_HARDDISK"),
ipcop_gettext("TR_SELECT_DEVICE_FOR_INSTALLATION"),
- 72, 5, 5, 8,
+ 65, 5, 5, 8,
harddisklist,
&c,
ipcop_gettext("TR_OK"), ipcop_gettext("TR_CANCEL"), NULL);
@@ -382,18 +382,29 @@
read_kv_from_line(&kv, line);
}
+ newtInit();
+ newtCls();
+
/* Determine boot medium */
- if ( access("/FLOPPYBOOT", 0) != -1 )
+ if ( access("/CDROMBOOT", 0) != -1 )
{
+ /* CDROM, PXE, USB stick, boot floppy + CDROM detected */
+ medium_boot = cdrom;
+ fprintf(flog, "Boot is cdrom (or others)\n");
+ }
+ else if ( access("/FLOPPYBOOT", 0) != -1 )
+ {
+ /* boot + root floppy */
medium_boot = floppy;
fprintf(flog, "Boot is floppy\n");
+
+ while ( access("/FLOPPYXTRA", 0) )
+ {
+ /* Lets try and get the root-extra floppy */
+ newtWinMessage(get_title(), "OK", "Insert the root-extra.img floppy and press Enter");
+ mysystem("cd / && cat /dev/fd0 | gzip -dc | cpio -i");
+ }
}
- else if ( access("/CDROMBOOT", 0) != -1 )
- {
- /* currently also PXE and USB stick */
- medium_boot = cdrom;
- fprintf(flog, "Boot is cdrom (or others)\n");
- }
else
{
/* actually this cannot be, boot must have used something */
@@ -404,8 +415,6 @@
/* USB keyboard modules are already loaded so no need to load them */
/* usbcore, ehci_hcd, ohci_hcd, uhci_hcd, usbhid */
- newtInit();
- newtCls();
/* first things first, installer language */
handlelanguage(kv);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|