Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate

Advertising

testing alsa install script
Monday, December 31st, 2007 at 12:42:55am UTC 

  1. #!/bin/bash
  2. TRUE=1
  3. FALSE=0
  4. echo Script Designed to Install a newer version of the alsa module and drivers
  5. echo For Ubuntu. Taken from information from the ALSA Ubuntu wiki page.
  6. echo -----------------------------------------------------------------------------
  7. echo ------------------- THIS SCRIPT IS VERY UNTESTED ----------------------------
  8. echo ------------------- You may need to fix things.. ----------------------------
  9. echo -----------------------------------------------------------------------------
  10. echo THE INSTALL LINES ARE COMMENTED OUT. Just to be safe.
  11. echo -----------------------------------------------------------------------------
  12.  
  13. # In an attmpt to make the script a little easier if ran more then once
  14. # Settings are Here.
  15. #
  16. DOWNLOADALSA=$FALSE
  17. #DOWNLOADALSA=$TRUE
  18.  
  19. UPDATESYSTEM=$FALSE
  20. #UPDATESYSTEM=$TRUE
  21.  
  22. GRABPACKAGES=$FALSE
  23. #GRABPACKAGES=$TRUE
  24.  
  25.  
  26. #  Do a System Update and Upgrade to be sure the system is up to date first.
  27. #  if a KERNEL was updated  - this can mess things up.
  28. #  since the alsa module wont get compiled for the new kernel. But the currently
  29. #  running one.  If that happens - the user will need to reboot and
  30. #  rerun this script to recompile the modules for the proper kernel
  31. if  [ "$UPDATESYSTEM" -eq "$TRUE" ]
  32. then
  33.         echo Updateing the System to get things in a sane state.
  34.         sudo apt-get update
  35.         sudo apt-get upgrade
  36.         echo If the Kernel was updated. I suggest rebooting and using the new kernel. and
  37.         echo reruning this script
  38. fi
  39.  
  40.  
  41. if [ "$GRABPACKAGES" -eq "$TRUE" ]
  42. then
  43.         echo -----------------------------------------------------------------------------
  44.         echo  Installing  the Needed parts required to  Compile the Modules
  45.         echo -----------------------------------------------------------------------------
  46.         echo  Installing the unp program also.
  47.         echo  Because it makes unarchiving things SO much easier
  48.         echo  and its so tiny and handy.
  49.         sudo apt-get install unp
  50.         sudo apt-get install build-essential ncurses-dev gettext
  51.         sudo apt-get install linux-headers-`uname -r`
  52.         sudo apt-get install libncurses5-dev
  53. fi
  54.  
  55. echo Starting the Main Part of the Program - Grabbing the ALSA source and putting it
  56. echo In the Proper place to compile it - /usr/src/alsa
  57. echo -----------------------------------------------------------------------------
  58.  
  59. # really should test to make sure the dir is not already there.
  60. sudo mkdir /usr/src/alsa
  61. cd /usr/src/alsa/
  62.  
  63. if [ "$DOWNLOADALSA" -eq "$TRUE" ]
  64. then
  65. echo ----------------------------------------------------------------------------
  66.         echo Getting the Latest versions of the files at the time this script was written
  67.         echo Dec 18 2007
  68.         echo need to make an easier way to change these Filenames, but then i also have to
  69.         echo fix the dir names used later.
  70.         echo ----------------------------------------------------------------------------
  71.         sudo  wget ftp://ftp.alsa-project.org/pub/driver/alsa-driver-1.0.15rc3.tar.bz2
  72.         sudo  wget ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.15rc3.tar.bz2
  73.         sudo  wget ftp://ftp.alsa-project.org/pub/utils/alsa-utils-1.0.15rc1.tar.bz2
  74.  
  75. # See what i mean... Small simple command that uncompresses all the archives 
  76.     sudo unp *.bz2 
  77. fi
  78.  
  79. echo -----------------------------------------------------------------------------
  80. echo ----- NOW THE SOURCE IS READY TO COMPILE                           ----------
  81. echo -----------------------------------------------------------------------------
  82.  
  83. ## Straight forward way to compile the stuff. note that the
  84. ## sudo make install lines are COMMENTED OUT. Just to allow for safer testing
  85. ##  I need to find a cleaner way to have the file names, and dirs changeable
  86.  
  87.  
  88.  
  89. cd /usr/src/alsa/alsa-driver-1.0.15rc3
  90. sudo ./configure --with-cards=hda-intel
  91. sudo make
  92. ## Commented out to make testing of the script easier.
  93. #sudo make install
  94.  
  95. echo -----------------------------------------------------------------------------
  96. echo ------------- Alsa-Driver compile Done                                   ----
  97. echo -----------------------------------------------------------------------------
  98.  
  99.  
  100.  
  101. cd /usr/src/alsa-lib-1.0.15rc3   
  102. sudo ./configure
  103. sudo make
  104. # Commented Out
  105. #sudo make install
  106.  
  107. echo -----------------------------------------------------------------------------
  108. echo ------------ Alsa-Lib Compile Done                                       ----
  109. echo -----------------------------------------------------------------------------
  110.  
  111.  
  112. cd /usr/src/alsa/alsa-utils-1.0.15rc1
  113. sudo ./configure 
  114. sudo make
  115. #commented out
  116. #sudo make install
  117. echo -----------------------------------------------------------------------------
  118. echo ------------ Alsa-utils Compile Done                                     ----
  119. echo -----------------------------------------------------------------------------
  120.  
  121.  
  122. echo -_-_-_--_-_-_--_-_-_--_-_-_--_-_-_--_-_-_--_-_-_--_-_-_--_-_-_--_-_-_--_-_-_-
  123. echo Ta Da - Hopefull it all worked.  Reboot to find out.
  124. echo If not - i suggest a reread of the Ubuntu alsa wiki page.
  125. echo -_-_-_--_-_-_--_-_-_--_-_-_--_-_-_--_-_-_--_-_-_--_-_-_--_-_-_--_-_-_--_-_-_-_

advertising

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will not expire by default. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

comments powered by Disqus
worth-right