AW: [Voyage-linux] Minor changes of voyage-0.7.0 and some questions

Beat Meier (spam-protected)
Sun Jun 12 21:37:24 HKT 2011


Hello Hermann

Sorry. I was pretty busy and had no time to go on with voyage-0.7
Now I'm back :-)

My solution is quick and dirty for the modules file.
I have 2 now 2 modules file (in voyage-0.5 I could load everything in 
modules and the wrong ones
were not loaded, now they would load all, so I had to go other way...)
I have 2 files:
/etc/modules.alix
/etc/modules.wrap
with the corresponding modules there in
and I have modified
   /etc/init.d/module-init-tools
to load the corresponding modules file instead of /etc/modules IF the 
correspondig file is present
and you are on this plattform.

And I have also a init script which sets the plattform in the 
/etc/voyage.conf  file (I should change
this to use other file but I have to change all scripts which use this 
file too) because I have
for example scripts to get tempratue of board and this als checks on 
which plattform you are
to get the correct directory to get the temperature.

Here comes the dirty part. I don't check very well only what you 
suggested. I check the famili part
and that's it. For me this is ok but of course this could not be 
implemented so to voyage because
there are other plattforms with the same cpu model type ...
This script runs before modules-init and works very well. You can put 
the flash in either a wrap
or alix board an startups nice. This is what I need because I have a lot 
of wireless repeaters
and I don't want to care to change a board and afte that it will not be 
anymore accessible because
I change from wrap to alix or the other way round...

Here my changes if any is interested ...

lrwxrwxrwx 1 root root 23 Jun 10 18:07 /etc/rcS.d/S07arch_specific -> 
../init.d/arch_specific

/etc/init.d/arch_specific
#############################################
#! /bin/sh

### BEGIN INIT INFO
# Provides:             arch_specific
# Required-Start:       mountdevsubfs hostname
# Required-Stop:
# Should-Start:
# Should-Stop:
# Default-Start:        S
# Default-Stop:
# X-Start-Before:       module-init-tools
# Short-Description:    Get architecture and do specific stuff if needed
# Description:          Get architecture and do specific stuff if needed
### END INIT INFO

PATH=/bin:/usr/bin:/sbin:/usr/sbin

case "$1" in
   start)
         /usr/local/sbin/remountrw
         cpu_model=`grep model /proc/cpuinfo  | grep -v "^model name" | 
awk '{print $3}'`

         if [ "$cpu_model" = "10" ]; then
                 cat /etc/voyage.conf | sed  
"/VOYAGE_PROFILE/c\VOYAGE_PROFILE=ALIX" > /etc/voyage.conf.startup
         elif [ "$cpu_model" = "9" ]; then
                 cat /etc/voyage.conf | sed  
"/VOYAGE_PROFILE/c\VOYAGE_PROFILE=WRAP" > /etc/voyage.conf.startup
         fi
         mv /etc/voyage.conf.startup /etc/voyage.conf
         /usr/local/sbin/remountro
esac

exit 0
#############################################

diff -c ~/module-init-tools module-init-tools
#############################################
*** /home/bmeier/module-init-tools      2011-06-12 10:34:47.000000000 -0300
--- module-init-tools   2011-06-11 01:12:31.000000000 -0300
***************
*** 32,37 ****
--- 32,54 ----
     MODULES_FILE=/etc/modules
   fi

+ . /etc/voyage.conf
+ if [ "$VOYAGE_PROFILE" = "ALIX" ]; then
+   echo "Check modules file for ALIX"
+   if [ -f /etc/modules.alix ]; then
+     echo "Using modules file for ALIX"
+     MODULES_FILE=/etc/modules.alix
+   fi
+ elif [ "$VOYAGE_PROFILE" = "WRAP" ]; then
+   echo "Check modules file for WRAP"
+   if [ -f /etc/modules.wrap ]; then
+     echo "Using modules file for WRAP"
+     MODULES_FILE=/etc/modules.wrap
+   fi
+ else
+   true
+ fi
+
   load_module() {
     local module args
     module="$1"
#############################################

On 04/01/2011 04:55 AM, Hofer, Hermann wrote:
> Hi Beat,
>
> Q1:  why do you belief there should by anything in /etc/initramfs-tools/modules ?
>
> Q2:  this is a problem of using the debian package. A possible (dirty) workaround could be: delete this file on every reboot if it exists and trigger a reboot
>
> Q3:  include module 'rtc' in /etc/modules, add 'HCTOSYS_DEVICE=rtc' in /etc/default/rcS and hwclock should work (tested with alix). You have alix boards with battery?
>
> Q4:   maybe you can use the infos from /proc/cpuinfo. 'cpu family' is the same but 'model' is different on WRAP and ALIX. How will you handle the different modules needed for ALIX and WRAP?
>
>
> regards,
>   Hermann
>
> -----Ursprüngliche Nachricht-----
> Von: voyage-linux-bounces+h.hofer=ahsnet.de at list.voyage.hk [mailto:voyage-linux-bounces+h.hofer=ahsnet.de at list.voyage.hk] Im Auftrag von Beat Meier
> Gesendet: Donnerstag, 31. März 2011 23:14
> An: Voyage-linux at voyage.hk
> Betreff: [Voyage-linux] Minor changes of voyage-0.7.0 and some questions
>
> Hello
>
> Some comments about voyage-0.7.0
>
> 1.
> /etc/modprobe.d/hostap-utils should be renamed to
> /etc/modprobe.d/hostap-utils.conf
> to prevent messages like
>    WARNING: All config files need .conf: /etc/modprobe.d/madwifi, it will
> be ignored in a future release.
>    WARNING: All config files need .conf: /etc/modprobe.d/hostap-utils, it
> will be ignored in a future release.
> by inserting a module with
>    modprobe ath_pci
> and of course to be prepared for the future...
>
> 2.
> /etc/modprobe.d/madwifi should be rename to /etc/modprobe.d/madwifi.conf
> or removed if current /etc/modprobe.d/madwifi.conf should be active file
> but I think
> /etc/modprobe.d/madwifi is the right file (so it should be renamed)
> Same reasons as above :-)
>
> Now my Questions:
>
> 1.
> With which modules initrd was built?
> There are no modules in /etc/initramfs-tools/modules :-(
> Would be nice to insert all used modules of orig initrd of voyage
>
> 2.
> I have read a lot of the problem of renaming eth0 to eth1 etc. if you
> put a cfcard in an other board
> because the creation of
>    /etc/udev/rules.d/70-persistent-net.rules
> but have not found a solution to disable it.
> I think this should be disabled on an system like voyage which will be
> used mostly on embedded systems
> (as the homepages already defines voyage :-))
>
> 3.
> hwclock does not work anymore nor an alix nor on wrap boards so time is
> always wrong
> after power loss :-(
>
> root at voyage:~# hwclock
> Cannot access the Hardware Clock via any known method.
> Use the --debug option to see the details of our search for an access
> method.
>
> What is the clue? Is this also in 0.6 a problem or only with new kernel
> in 0.7?
>
> 4.
> How can I detect if I'm on wrap or alix board?
> In voyage-0.5 I could insert module geodewdt and if it was loaded I knew
> that i'm on alix
> if not on wrap (for my case of coures working only with this 2 boards)
> With this I could modify at startup /etc/voyage.conf and put
> VOYAGE_PROFILE=ALIX
> or
> VOYAGE_PROFILE=wrap
> And so to some wrap/alix spefici stuff at boot up.
> So I can interchange alix/wrap borads in case of failure of an AP with
> voyage running which is really nice
> Anybody using such en enviroment in voyage>  0.5?
>
>
> Ok I admit a lot of question ;-) but I'm still using 0.5.2 and really
> want to go as soon to 0.7
>
>
> Greetings and thanks
>
> Beat
>
>
>
> _______________________________________________
> Voyage-linux mailing list
> Voyage-linux at list.voyage.hk
> http://list.voyage.hk/mailman/listinfo/voyage-linux
>
> _______________________________________________
> Voyage-linux mailing list
> Voyage-linux at list.voyage.hk
> http://list.voyage.hk/mailman/listinfo/voyage-linux
>





More information about the Voyage-linux mailing list