wiki:jazz/11-09-27

Version 2 (modified by jazz, 13 years ago) (diff)

--

2011-09-27

  • 為何 rock 要把 bridge.ko 加入 /usr/bin/mkpxeinitrd-net 呢?答案很明顯是跟 brctl 有關!
    root@debian:~# lsmod > before
    root@debian:~# brctl addbr br0
    root@debian:~# lsmod > after
    root@debian:~# diff before after 
    1a2,3
    > bridge                 39662  0 
    > stp                     1440  1 bridge
    
    • /usr/bin/mkpxeinitrd-net

      old new  
      3737# uncompress the compress kernel module. This is special for Mandriva case. It uses compressed kernel module, e.g. pcnet32.ko.gz. Before we used modprobe from busybox, we have to uncompress that. Now the modprobe program is from the OS (See variable include_bin_prog_from_server), so we should allow this type of kernel modules.
      3838use_compressed_kernel_module="yes"
      3939# Some required bin programs to be included in the PXE initrd, which are not provided by busybox or the one provided by busybox does not support the function we want. E.g. sleep (we need "sleep 0.1", while sleep from busybox does not support 0.1 secs).
      40 include_bin_prog_from_server="sleep lspci insmod modprobe rmmod lsmod pkill strings mount umount mount.nfs umount.nfs"
       40# drbl-virt add
       41include_bin_prog_from_server='sleep lspci insmod modprobe rmmod lsmod pkill strings brctl ip egrep awk gawk seq fgrep dirname expr bash'
      4142
      4243# No need to use sudo if we are root
      4344if [ $UID -eq 0 ]; then
       
      303304     cp -a --parents $i $initrd/lib/modules/$kernel_ver/
      304305   done
      305306
       307# drbl-virt add
       308cp -a --parents kernel/net/bridge/bridge.ko $initrd/lib/modules/$kernel_ver/
       309cp -a --parents kernel/drivers/xen/netback/netloop.ko $initrd/lib/modules/$kernel_ver/
      306310   # Deal with firmwares!
      307311   # The following is borrowed from Debian's /usr/share/initramfs-tools/hook-functions
      308312   if [ "$copy_all_firmwares" = "yes" ]; then

Attachments (7)

Download all attachments as: .zip