Author: pebender
Date: Tue May 19 17:34:52 2009
New Revision: 4793

Modified:
    trunk/gar-minimyth/html/minimyth/document-changelog.txt
     
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf.pm
     
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_CPU.pm
     
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_HARDWARE.pm
     
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_LIRC.pm
     
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_PLUGIN.pm
     
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_X.pm
     
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/obsolete
     
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/lirc.pm
     
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/modules_manual.pm
    trunk/gar-minimyth/script/minimyth.conf.mk

Log:
- Added the LIRC kernel module to the manual kernel module list.
       - A modprobe.conf file is created for the LIRC kernel module
         options.
- Added the MythPhone kernel module to the manual kernel module list.



Modified: trunk/gar-minimyth/html/minimyth/document-changelog.txt
==============================================================================
--- trunk/gar-minimyth/html/minimyth/document-changelog.txt     (original)
+++ trunk/gar-minimyth/html/minimyth/document-changelog.txt     Tue May 19  
17:34:52 2009
@@ -37,7 +37,8 @@
              there should be no need to load hardware modules so early.
      - Moved init/modules_manual.pm so that it starts earlier in the init  
process.
            - Now init/modules_manual.pm so that it is called just after  
running
-            init/modules_automatic.pm and determining  
MM_HARDWARE_KERNEL_MODULES.
+            init/modules_automatic.pm and determining the manual kernel
+            module list.
      - Added timeout on waiting for /minimyth for local boot so that users  
can
        telnet in and debug when it occurs.
      - Changed splash screen so that it starts on an otherwise empty screen.
@@ -45,6 +46,10 @@
        and ends.
      - Switched to using persistent device symlinks rather than device names
        for LCDproc, LIRC and event devices when possible.
+    - Added the LIRC kernel module to the manual kernel module list.
+          - A modprobe.conf file is created for the LIRC kernel module
+            options.
+    - Added the MythPhone kernel module to the manual kernel module list.

  Improved MythV slave backend support.
      - Added support for DVB USB devices that make use of the  
dvb-usb-dib0700

Modified:  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf.pm
==============================================================================
---  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf.pm
        
(original)
+++  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf.pm
        
Tue May 19 17:34:52 2009
@@ -26,7 +26,7 @@
  #   (10) Process MM_FIRMWARE_FILE_LIST,
  #        including fetching any hardware firmware files.
  #   (11) Load automatic kernel modules.
-#   (12) Process MM_HARDWARE_KERNEL_MODULES.
+#   (12) Process MM_HARDWARE_KERNEL_MODULE_LIST.
  #   (13) Load manual kernel modules.
  #   (14) (Re)process all configuration variables.
  sub start
@@ -231,7 +231,7 @@
      }

      # Load the manual kernel modules.
-    $self->_run($minimyth, 'MM_HARDWARE_KERNEL_MODULES');
+    $self->_run($minimyth, 'MM_HARDWARE_KERNEL_MODULE_LIST');
      $minimyth->package_require(q(init::modules_manual));
      if ($minimyth->package_member_require(q(init::modules_manual),  
q(start)))
      {
@@ -294,8 +294,7 @@

      my %var_list;

-    # Get the variable handlers from each of the variable group packages  
in the MM directory,
-    # discarding the variable handlers for variables that do not match the  
filter.
+    # Get the variable handlers from each of the variable group packages  
in the MM directory.
      my $dir = Cwd::abs_path(File::Basename::dirname(__FILE__)) . '/conf';

      if ((-d $dir) && (opendir(DIR, $dir)))
@@ -319,7 +318,7 @@
                      $success = 0;
                      return $success;
                  }
-                foreach (grep( /^$filter$/, keys %{$group_var_list}))
+                foreach (keys %{$group_var_list})
                  {
                      $var_list{$_} = $group_var_list->{$_};
                  }
@@ -328,8 +327,8 @@
          closedir(DIR);
      }

-    # Make sure that all variables (re)initialize.
-    foreach (keys %var_list)
+    # Make sure that all variables that match the filter (re)initialize.
+    foreach (grep( /^$filter$/, keys %var_list))
      {
          $var_list{$_}->{'complete'} = 0;
      }
@@ -337,8 +336,8 @@
      # Run variable initialization handler for MM_MINIMYTH_BOOT_URL because  
it is needed when fetching files.
      $self->_run_var($minimyth, \%var_list, 'MM_MINIMYTH_BOOT_URL');

-    # Run the variable initialization handlers for each variable.
-    foreach (keys %var_list)
+    # Run the variable initialization handlers for each variable that  
matches the filter .
+    foreach (grep( /^$filter$/, keys %var_list))
      {
          $self->_run_var($minimyth, \%var_list, $_) || ($success = 0);
      }

Modified:  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_CPU.pm
==============================================================================
---  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_CPU.pm
         
(original)
+++  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_CPU.pm
         
Tue May 19 17:34:52 2009
@@ -121,5 +121,55 @@
      file           => {name_remote => '/microcode.dat',
                         name_local  => '/etc/firmware/microcode.dat'}
  };
+$var_list{'MM_CPU_KERNEL_MODULE_LIST'} =
+{
+    prerequisite   => [ 'MM_CPU_FAMILY', 'MM_CPU_MODEL', 'MM_CPU_VENDOR' ],
+    value_clean    => sub
+    {
+        my $minimyth = shift;
+        my $name     = shift;
+
+        $minimyth->var_set($name, 'auto');
+
+        return 1;
+    },
+    value_default  => 'auto',
+    value_valid    => 'auto',
+    value_auto     => sub
+    {
+        my $minimyth = shift;
+        my $name     = shift;
+
+        my @kernel_modules;
+
+        my $vendor = $minimyth->var_get('MM_CPU_VENDOR');
+        my $family = $minimyth->var_get('MM_CPU_FAMILY');
+        my $model  = $minimyth->var_get('MM_CPU_MODEL');
+        if ($vendor)
+        {
+            if ((-f  '/etc/hardware.d/cpu2kernel.map') &&  
open(FILE, '<', '/etc/hardware.d/cpu2kernel.map'))
+            {
+                foreach (grep((! /^ *$/) && (! /^ *#/), (<FILE>)))
+                {
+                    chomp;
+                    s/ +/ /g;
+                    s/^ //;
+                    s/ $//;
+                    s/ ?, ?/,/g;
+                    if (/^($vendor),([^,]*),([^,]*),([^,]*)$/)
+                    {
+                        if (((! $2) || ($2 eq $family)) &&
+                            ((! $3) || ($3 eq $model )))
+                        {
+                            push(@kernel_modules, split(/ /, $4));
+                        }
+                    }
+                }
+            }
+        }
+
+        return join(' ', @kernel_modules);
+    }
+};

  1;

Modified:  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_HARDWARE.pm
==============================================================================
---  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_HARDWARE.pm
    
(original)
+++  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_HARDWARE.pm
    
Tue May 19 17:34:52 2009
@@ -13,71 +13,27 @@
      return \%var_list;
  }

-$var_list{'MM_HARDWARE_KERNEL_MODULES'} =
+$var_list{'MM_HARDWARE_KERNEL_MODULE_LIST'} =
  {
-    prerequisite   =>  
['MM_CPU_VENDOR', 'MM_CPU_FAMILY', 'MM_CPU_MODEL', 'MM_X_DRIVER'],
+    prerequisite   =>  
['MM_CPU_KERNEL_MODULE_LIST', 'MM_LIRC_KERNEL_MODULE_LIST', 
'MM_PLUGIN_KERNEL_MODULE_LIST', 'MM_X_KERNEL_MODULE_LIST'],
      value_default  => '',
      extra          => sub
      {
          my $minimyth = shift;
          my $name     = shift;

-        my @kernel_modules = split(/  +/, $minimyth->var_get($name));
+        my @kernel_modules = split(/ +/, $minimyth->var_get($name));

-        # Get CPU related kernel modules.
+        foreach my $delta_name ('CPU', 'LIRC', 'PLUGIN', 'X')
          {
-            my $vendor = $minimyth->var_get('MM_CPU_VENDOR');
-            my $family = $minimyth->var_get('MM_CPU_FAMILY');
-            my $model  = $minimyth->var_get('MM_CPU_MODEL');
-            if ($vendor)
+            my $delta_kernel_modules = $minimyth->var_get('MM_' .  
$delta_name . '_KERNEL_MODULE_LIST');
+            if ($delta_kernel_modules)
              {
-                if ((-f  '/etc/hardware.d/cpu2kernel.map') &&  
open(FILE, '<', '/etc/hardware.d/cpu2kernel.map'))
-                {
-                    foreach (grep((! /^ *$/) && (! /^ *#/), (<FILE>)))
-                    {
-                        chomp;
-                        s/ +/ /g;
-                        s/^ //;
-                        s/ $//;
-                        s/ ?, ?/,/g;
-                        if (/^($vendor),([^,]*),([^,]*),([^,]*)$/)
-                        {
-                            if (((! $2) || ($2 eq $family)) &&
-                                ((! $3) || ($3 eq $model )))
-                            {
-                                push(@kernel_modules, split(/ /, $4));
-                            }
-                        }
-                    }
-                }
+                push(@kernel_modules, split(/ +/, $delta_kernel_modules));
              }
          }

-        # Get X related kernel modules.
-        {
-            my $x_driver = $minimyth->var_get('MM_X_DRIVER');
-            if ($x_driver)
-            {
-                if ((-f  '/etc/hardware.d/x2kernel.map') &&  
open(FILE, '<', '/etc/hardware.d/x2kernel.map'))
-                {
-                    foreach (grep((! /^ *$/) && (! /^ *#/), (<FILE>)))
-                    {
-                        chomp;
-                        s/ +/ /g;
-                        s/^ //;
-                        s/ $//;
-                        s/ ?, ?/,/g;
-                        if (/^($x_driver),([^,]*)$/)
-                        {
-                            push(@kernel_modules, split(/ /, $2));
-                            last;
-                        }
-                    }
-                }
-            }
-        }
-
-        # Remove any dumplicates.
+        # Remove any duplicates.
          {
              my $prev = '';
              @kernel_modules = grep($_ ne $prev && (($prev) = $_),  
sort(@kernel_modules));

Modified:  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_LIRC.pm
==============================================================================
---  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_LIRC.pm
        
(original)
+++  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_LIRC.pm
        
Tue May 19 17:34:52 2009
@@ -103,7 +103,7 @@
          }
          return $auto;
      },
-    value_none     => '',
+    value_none     => ''
  };
  $var_list{'MM_LIRC_KERNEL_MODULE_OPTIONS'} =
  {
@@ -231,6 +231,51 @@
          }

          return join(' ', @device_list);
+    }
+};
+$var_list{'MM_LIRC_KERNEL_MODULE_LIST'} =
+{
+    prerequisite   =>  
['MM_LIRC_KERNEL_MODULE', 'MM_LIRC_KERNEL_MODULE_OPTIONS'],
+    value_clean    => sub
+    {
+        my $minimyth = shift;
+        my $name     = shift;
+
+        $minimyth->var_set($name, 'auto');
+
+        return 1;
+    },
+    value_default  => 'auto',
+    value_valid    => 'auto',
+    value_auto     => sub
+    {
+        my $minimyth = shift;
+        my $name     = shift;
+
+        return $minimyth->var_get('MM_LIRC_KERNEL_MODULE');
+    },
+    extra          => sub
+    {
+        my $minimyth = shift;
+        my $name     = shift;
+
+        # Create a modprobe configuration file with the LIRC kernel module  
options.
+        my $kernel_module         =  
$minimyth->var_get('MM_LIRC_KERNEL_MODULE');
+        my $kernel_module_options =  
$minimyth->var_get('MM_LIRC_KERNEL_MODULE_OPTIONS');
+        if (($kernel_module) && ($kernel_module_options))
+        {
+            my $modprobe_file = "/etc/modprobe.d/init::conf::MM_LIRC.conf";
+            if ((open(FILE, '>', $modprobe_file)))
+            {
+                print FILE "# autogenerated by init::conf::MM_LIRC\n";
+                print FILE "options $kernel_module  
$kernel_module_options\n";
+            }
+            else
+            {
+                return 0;
+            }
+        }
+        return 1;
      }
  };


Modified:  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_PLUGIN.pm
==============================================================================
---  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_PLUGIN.pm
      
(original)
+++  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_PLUGIN.pm
      
Tue May 19 17:34:52 2009
@@ -221,5 +221,35 @@
      },
      value_valid    => 'no|yes'
  };
+$var_list{'MM_PLUGIN_KERNEL_MODULE_LIST'} =
+{
+    prerequisite   => ['MM_PLUGIN_PHONE_ENABLED'],
+    value_clean    => sub
+    {
+        my $minimyth = shift;
+        my $name     = shift;
+
+        $minimyth->var_set($name, 'auto');
+
+        return 1;
+    },
+    value_default  => 'auto',
+    value_valid    => 'auto',
+    value_auto     => sub
+    {
+        my $minimyth = shift;
+        my $name     = shift;
+
+        my @kernel_modules;
+
+        # MythPhone uses OSS not ALSA.
+        if ($minimyth->var_get('MM_PLUGIN_PHONE_ENABLED') eq 'yes')
+        {
+            push(@kernel_modules, 'snd-pcm-oss');
+        }
+
+        return join(' ', @kernel_modules);
+    }
+};

  1;

Modified:  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_X.pm
==============================================================================
---  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_X.pm
   
(original)
+++  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_X.pm
   
Tue May 19 17:34:52 2009
@@ -1020,4 +1020,49 @@
      }
  };

+$var_list{'MM_X_KERNEL_MODULE_LIST'} =
+{
+    prerequisite   => ['MM_X_DRIVER'],
+    value_clean    => sub
+    {
+        my $minimyth = shift;
+        my $name     = shift;
+
+        $minimyth->var_set($name, 'auto');
+
+        return 1;
+    },
+    value_default  => 'auto',
+    value_valid    => 'auto',
+    value_auto     => sub
+    {
+        my $minimyth = shift;
+        my $name     = shift;
+
+        my @kernel_modules;
+
+        my $x_driver = $minimyth->var_get('MM_X_DRIVER');
+        if ($x_driver)
+        {
+            if ((-f  '/etc/hardware.d/x2kernel.map') &&  
open(FILE, '<', '/etc/hardware.d/x2kernel.map'))
+            {
+                foreach (grep((! /^ *$/) && (! /^ *#/), (<FILE>)))
+                {
+                    chomp;
+                    s/ +/ /g;
+                    s/^ //;
+                    s/ $//;
+                    s/ ?, ?/,/g;
+                    if (/^($x_driver),([^,]*)$/)
+                    {
+                        push(@kernel_modules, split(/ /, $2));
+                        last;
+                    }
+                }
+            }
+        }
+        return join(' ', @kernel_modules);
+    }
+};
+
  1;

Modified:  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/obsolete
==============================================================================
---  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/obsolete
  
(original)
+++  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/obsolete
  
Tue May 19 17:34:52 2009
@@ -20,6 +20,7 @@
  MM_HARDWARE_AUDIO
  MM_HARDWARE_CHIPSET
  MM_HARDWARE_CPU
+MM_HARDWARE_KERNEL_MODULES
  MM_HARDWARE_LAN
  MM_HARDWARE_MOTHERBOARD
  MM_HARDWARE_NORTHBRIDGE

Modified:  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/lirc.pm
==============================================================================
---  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/lirc.pm
        
(original)
+++  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/lirc.pm
        
Tue May 19 17:34:52 2009
@@ -145,29 +145,6 @@

      $minimyth->message_output('info', "starting remote control(s) ...");

-    my $device                = $minimyth->var_get('MM_LIRC_DEVICE');
-    my $driver                = $minimyth->var_get('MM_LIRC_DRIVER');
-    my $kernel_module         =  
$minimyth->var_get('MM_LIRC_KERNEL_MODULE');
-    my $kernel_module_options =  
$minimyth->var_get('MM_LIRC_KERNEL_MODULE_OPTIONS');
-
-    # Load user configured kernel module.
-    if ($kernel_module)
-    {
-        system(qq(/sbin/modprobe $kernel_module $kernel_module_options));
-        # Wait up to 60 seconds for the device to appear in the device  
file system.
-        # Wait up to 60 seconds for the device to appear in the device  
file system.
-        for (my $delay = 0 ; ($delay < 60) && (! -e $device) ; $delay++)
-        {
-            $minimyth->message_output('info', "waiting for remote control  
device ($delay seconds) ...");
-            sleep 1;
-        }
-        if (! -e $device)
-        {
-            $minimyth->message_output('err', "timed out waiting for remote  
control device.");
-            return 0;
-        }
-    }
-
      # Determine master LIRC daemon.
      # The master LIRC daemon combines the LIRC daemons for multiple LIRC  
devices.
      # Therefore, if there is more than one LIRC device, then we need a  
master LIRC daemon.

Modified:  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/modules_manual.pm
==============================================================================
---  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/modules_manual.pm
      
(original)
+++  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/modules_manual.pm
      
Tue May 19 17:34:52 2009
@@ -19,19 +19,9 @@
      $minimyth->message_output('info', "loading kernel modules  
(manual) ...");

      # Load hardware based kernel modules that are not auto-detected.
-    my @kernel_modules = split(/ +/,  
$minimyth->var_get('MM_HARDWARE_KERNEL_MODULES'));
+    my @kernel_modules = split(/ +/,  
$minimyth->var_get('MM_HARDWARE_KERNEL_MODULE_LIST'));
      foreach my $kernel_module (@kernel_modules)
      {
-        if (system(qq(/sbin/modprobe $kernel_module > $devnull 2>&1)) != 0)
-        {
-            $minimyth->message_output('warn', "failed to load kernel  
module: $kernel_module");
-        }
-    }
-
-    # MythPhone uses OSS not ALSA.
-    if ($minimyth->var_get('MM_PLUGIN_PHONE_ENABLED') eq 'yes')
-    {
-        my $kernel_module = 'snd-pcm-oss';
          if (system(qq(/sbin/modprobe $kernel_module > $devnull 2>&1)) != 0)
          {
              $minimyth->message_output('warn', "failed to load kernel  
module: $kernel_module");

Modified: trunk/gar-minimyth/script/minimyth.conf.mk
==============================================================================
--- trunk/gar-minimyth/script/minimyth.conf.mk  (original)
+++ trunk/gar-minimyth/script/minimyth.conf.mk  Tue May 19 17:34:52 2009
@@ -18,7 +18,7 @@
                                )

  # Configuration file (minimyth.conf) version.
-mm_CONF_VERSION           ?= 42
+mm_CONF_VERSION           ?= 43

   
#-------------------------------------------------------------------------------
  # Variables that you are likely to be override based on your environment.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"minimyth-commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/minimyth-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to