Compiling-on-AMD64.text 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. Compiling toolchain and source on an AMD64/IA64 system
  2. ======================================================
  3. NOTE: This method has be superseded by using schroot
  4. as described in the file: Using-schroot.text
  5. # get a root shell, (on ?ubuntu use this)
  6. sudo su -
  7. # install deboostrap (if you do not already have it)
  8. apt-get install debootstrap
  9. # make a directory for the 32 bit system
  10. mkdir /sid-i386
  11. # create a flag file in so 'ls /' will show where you are
  12. touch /sid-i386/This_is_sid-i386
  13. # in the next line s/us/tw/ or whatever you nearest repository is called
  14. debootstrap --arch=i386 sid /sid-i386 http://ftp.us.debian.org/debian/
  15. # watch it download the whole system ...
  16. # modify /etc/fstab (if your /home is symlink, use the absolute path)
  17. echo "proc /sid-i386/proc proc defaults 0 0" >> /etc/fstab
  18. echo "/home /sid-i386/home bind defaults,bind 0 0" >> /etc/fstab
  19. # OPTIONAL:
  20. # if it is necessary to use RS232 from this chroot than maybe
  21. # the device directory should be mounted. Only useful
  22. # if the command 'make flash-bootloader' is going to be used
  23. # and need access to /dev/ttyUSBx
  24. echo "/dev /sid-i386/dev bind defaults,bind 0 0" >> /etc/fstab
  25. # mount the above
  26. mount /sid-i386/proc
  27. mount /sid-i386/home
  28. # OPTIONAL: if the device directory was included above
  29. mount /sid-i386/dev
  30. # OPTIONAL: add your favorite configs to sid's root e.g.
  31. cp -p /root/.joverc /sid-i386/root/
  32. cp -p /root/.bash* /sid-i386/root/
  33. # chroot into sid
  34. chroot /sid-i386 su -
  35. # install necessary packages
  36. apt-get update
  37. apt-get install gcc g++ gawk flex bison make patch wget
  38. apt-get install libgd2-noxpm-dev
  39. apt-get install --no-install-recommends libqt4-dev
  40. apt-get install libncurses5-dev
  41. # OPTIONAL: add your favorite programs e.g. jove editor
  42. apt-get --no-install-recommends jove
  43. # exit from the sid-i386 chroot
  44. exit
  45. # set up your username and group for sid
  46. ME=myusername
  47. grep "^${ME}:' /etc/passwd >> /sid-i386/etc/passwd
  48. grep "^${ME}:' /etc/shadow >> /sid-i386/etc/shadow
  49. ME=mygroup # If different
  50. grep "^${ME}:' /etc/group >> /sid-i386/etc/group
  51. grep "^${ME}:' /etc/gshadow >> /sid-i386/etc/gshadow
  52. # exit from sudo root shell
  53. exit
  54. # now back to your normal login account
  55. # login as yourself under sid
  56. sudo chroot /sid-i386 su -l myusername
  57. # cd to your source
  58. cd wikipediardware
  59. make clean
  60. make
  61. # watch it build ...