Advertisement
Guest User

Untitled

a guest
Jan 18th, 2014
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Ubuntu for Sunxi:
  2. ------------------
  3. Host OS: Ubuntu
  4. Target: sunxi
  5. assumprion: kernel + script.bin ready to go
  6.  
  7.  
  8. ##### STAGE 1 #####
  9.  
  10. sudo debootstrap --arch=armel --foreign precise ubuntu/ http://archive.ubuntu.com/ubuntu/
  11. (cd ubuntu ;  tar jcf ../ubuntu_debootstrat_armel.tar.bz2 .)
  12.  
  13. #creating ext4 on sd partition 2
  14. mkfs.ext4 /dev/sdc2
  15. mount /dev/sdc2 /mnt
  16.  
  17. #extract the rootfs to sd
  18. tar jxf ubuntu_debootstrat_armel.tar.bz2 -C /mnt/
  19.  
  20. #add some tewaks
  21. cd /mnt
  22. echo "proc /proc proc none 0 0" >>etc/fstab
  23. echo "ubuntu-sunxi" > etc/hostname
  24.  
  25. sync
  26.  
  27.  
  28.  
  29.  
  30. ##### STAGE 2 #####
  31.  
  32. #now put sd in machine and stop in uboot
  33. in uboot make sure kernal args include:
  34. rootfs=ext4 init=/bin/sh
  35. #with a command like: setenv extraargs "rootfs=ext4 init=/bin/sh"
  36.  
  37. #boot the kernel
  38. #After the kernel is bootet you should be in bin/sh #:
  39. #in console type:
  40.  
  41. mount /proc /proc -t proc
  42. export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  43. #start the 2nd stage deboostrapping, grabb some coffee as this will take a while
  44. /debootstrap/debootstrap --second-stage
  45.  
  46. #at the end: I: Base system installed successfully.
  47.  
  48.  
  49.  
  50. ##### STAGE 3 - Optimization #####
  51.  
  52. #after this is completed
  53.  
  54.  
  55. #define your new password
  56. passwd
  57.  
  58.  
  59. rm /etc/init/tty2.conf
  60. rm /etc/init/tty3.conf
  61. rm /etc/init/tty4.conf
  62. rm /etc/init/tty5.conf
  63. rm /etc/init/tty6.conf
  64.  
  65. vi /etc/init/tty1.conf
  66. and modify to:
  67. ------------------------------------------------------
  68. # ttyS0 - getty
  69. #
  70. # This service maintains a getty on ttyS0 from the point the system is
  71. # started until it is shut down again.
  72.  
  73. start on stopped rc RUNLEVEL=[2345] and (
  74.             not-container or
  75.             container CONTAINER=lxc or
  76.             container CONTAINER=lxc-libvirt)
  77.  
  78. stop on runlevel [!2345]
  79.  
  80. respawn
  81. ------------------------------------------------------
  82.  
  83.  
  84.  
  85. sync
  86.  
  87. #now restart the system
  88. in uboot make sure your kernel args contain
  89. rootfs=ext4 init=/sbin/init
  90. #with a command like: setenv extraargs "rootfs=ext4 init=/sbin/init"
  91.  
  92.  
  93.  
  94.  
  95. #Done
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104. evola:
  105. Ubuntu 12.04 LTS ubuntu-sunxi ttyS0
  106.  
  107. ubuntu-sunxi login: root
  108. Password:
  109. Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.4.43+ armv7l)
  110.  
  111.  * Documentation:  https://help.ubuntu.com/
  112.  
  113. The programs included with the Ubuntu system are free software;
  114. the exact distribution terms for each program are described in the
  115. individual files in /usr/share/doc/*/copyright.
  116.  
  117. Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
  118. applicable law.
  119.  
  120. root@ubuntu-sunxi:~# uname -r
  121. 3.4.43+
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement