Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gentoo on Cubieboard2, part1
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Irre
Guru
Guru


Joined: 09 Nov 2013
Posts: 434
Location: Stockholm

PostPosted: Thu Nov 27, 2014 10:16 pm    Post subject: gentoo on Cubieboard2, part1 Reply with quote

Installing

Installation to an external usb-disk (dev/sda1) in this example. Allocate at least 8G for partition sda1. Log in to an existing linux in Cubieboard2, if you have keyboard and monitor connected. Otherwise log in via Windows/putty or linux/ssh. In my case, running Linux is aruntu 3.4.101-sun7i+ http://cubiuntu.com/downloads/. Following text is not applicable for other linux versions.

Create and fill filesystem..
Code:
umount /dev/sda1
mkfs -t ext3 /dev/sda1
mkdir /mnt/gentoo
mount /dev/sda1 /mnt/gentoo
cd /mnt/gentoo
wget ftp.df.lth.se/pub/gentoo/releases/arm/autobuilds/current-stage3-armv7a_hardfp/stage3-armv7a_hardfp-20141023.tar.bz2 
tar xvjpf stage3-*.tar.bz2
rm stage3-*.tar.bz2
cp -L /etc/resolv.conf /mnt/gentoo/etc/

chroot..
Code:
mount -t proc proc /mnt/gentoo/proc
mount --rbind /sys /mnt/gentoo/sys
mount --rbind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash

replacing an invalid link
Code:
rm /dev/shm   
mkdir /dev/shm

emerge..
Code:
emerge-webrsync (takes a very long time)
eselect news read
emerge --sync

Configure..
Code:
nano -w /etc/locale.gen
locale-gen
eselect locale list
eselect locale set en_US.utf8
env-update && source /etc/profile
eselect profile list
eselect profile set default/linux/arm/13.0/armv7a/desktop
echo "Europe/Stockholm" > /etc/timezone
nano -w /etc/conf.d/keymaps
nano -w /etc/conf.d/hwclock
emerge --config sys-libs/timezone-data
cd /etc/init.d
ln -s net.lo net.eth0
rc-update add net.eth0 default
echo 'FEATURES="${FEATURES} nodoc noinfo"' >> /etc/portage/make.conf
echo 'USE="bindist libkms symlink -test"' >> /etc/portage/make.conf
echo 'MAKEOPTS="-j3"' >> /etc/portage/make.conf
emerge -v gpm
rc-config add gpm
rc-config add sshd

set root's password! Do not forget this step..
Code:
passwd

Now is it time to leave chroot-environment:
Code:
exit
umount /mnt/gentoo/dev
umount /mnt/gentoo/sys (failed)
umount /mnt/gentoo/proc

We have no gentoo-kernel yet, but we can reboot using existing kernel. But first we need to copy modules. And change a config file.
Code:
cp -avi /lib/modules /mnt/gentoo/lib
cp /uEnv.cb2 /uEnv.cb2-aruntu (keep original)

change two lines:
Code:
nano -w /uEnv.cb2

#root=/dev/mmcblk0p1 rootwait rootfstype=ext4
root=/dev/sda1 rootwait rootfstype=ext3

cp /uEnv.cb2 /uEnv.cb2-gentoo (keep a copy)

reboot and login to new gentoo :)

Reference: http://www.gentoo.org/doc/en/handbook/handbook-arm.xml?full=1
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum