Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Ubuntu for Sunxi:
- ------------------
- Host OS: Ubuntu
- Target: sunxi
- assumprion: kernel + script.bin ready to go
- ##### STAGE 1 #####
- sudo debootstrap --arch=armel --foreign precise ubuntu/ http://archive.ubuntu.com/ubuntu/
- (cd ubuntu ; tar jcf ../ubuntu_debootstrat_armel.tar.bz2 .)
- #creating ext4 on sd partition 2
- mkfs.ext4 /dev/sdc2
- mount /dev/sdc2 /mnt
- #extract the rootfs to sd
- tar jxf ubuntu_debootstrat_armel.tar.bz2 -C /mnt/
- #add some tewaks
- cd /mnt
- echo "proc /proc proc none 0 0" >>etc/fstab
- echo "ubuntu-sunxi" > etc/hostname
- sync
- ##### STAGE 2 #####
- #now put sd in machine and stop in uboot
- in uboot make sure kernal args include:
- rootfs=ext4 init=/bin/sh
- #with a command like: setenv extraargs "rootfs=ext4 init=/bin/sh"
- #boot the kernel
- #After the kernel is bootet you should be in bin/sh #:
- #in console type:
- mount /proc /proc -t proc
- export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
- #start the 2nd stage deboostrapping, grabb some coffee as this will take a while
- /debootstrap/debootstrap --second-stage
- #at the end: I: Base system installed successfully.
- ##### STAGE 3 - Optimization #####
- #after this is completed
- #define your new password
- passwd
- rm /etc/init/tty2.conf
- rm /etc/init/tty3.conf
- rm /etc/init/tty4.conf
- rm /etc/init/tty5.conf
- rm /etc/init/tty6.conf
- vi /etc/init/tty1.conf
- and modify to:
- ------------------------------------------------------
- # ttyS0 - getty
- #
- # This service maintains a getty on ttyS0 from the point the system is
- # started until it is shut down again.
- start on stopped rc RUNLEVEL=[2345] and (
- not-container or
- container CONTAINER=lxc or
- container CONTAINER=lxc-libvirt)
- stop on runlevel [!2345]
- respawn
- ------------------------------------------------------
- sync
- #now restart the system
- in uboot make sure your kernel args contain
- rootfs=ext4 init=/sbin/init
- #with a command like: setenv extraargs "rootfs=ext4 init=/sbin/init"
- #Done
- evola:
- Ubuntu 12.04 LTS ubuntu-sunxi ttyS0
- ubuntu-sunxi login: root
- Password:
- Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.4.43+ armv7l)
- * Documentation: https://help.ubuntu.com/
- The programs included with the Ubuntu system are free software;
- the exact distribution terms for each program are described in the
- individual files in /usr/share/doc/*/copyright.
- Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
- applicable law.
- root@ubuntu-sunxi:~# uname -r
- 3.4.43+
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement