|
|
(2 intermediate revisions by 2 users not shown) |
Line 28: |
Line 28: |
| | | |
| | | |
− |
| |
− |
| |
− |
| |
− | = Ubuntu 16.04 =
| |
− |
| |
− | download and extract ubuntu-xenial
| |
− | <pre>wget http://cdimage.ubuntu.com/ubuntu-base/releases/16.04/release/ubuntu-base-16.04-core-armhf.tar.gz
| |
− | sudo tar -xpf ubuntu-base-16.04-core-armhf.tar.gz
| |
− | </pre>
| |
− |
| |
− | copy qemu
| |
− | <pre>sudo apt-get install qemu-user-static
| |
− | sudo cp /usr/bin/qemu-arm-static usr/bin/
| |
− | </pre>
| |
− |
| |
− | copy host's dns to rootfs
| |
− | <pre>sudo cp -b /etc/resolv.conf etc/resolv.conf
| |
− | </pre>
| |
− |
| |
− | add the following repository to etc/apt/sources.list(for compiling xserver)
| |
− | <pre># See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
| |
− | # newer versions of the distribution.
| |
− |
| |
− | deb http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted
| |
− | deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted
| |
− |
| |
− | ## Major bug fix updates produced after the final release of the
| |
− | ## distribution.
| |
− | deb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted
| |
− | deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted
| |
− |
| |
− | ## Uncomment the following two lines to add software from the 'universe'
| |
− | ## repository.
| |
− | ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
| |
− | ## team. Also, please note that software in universe WILL NOT receive any
| |
− | ## review or updates from the Ubuntu security team.
| |
− | deb http://ports.ubuntu.com/ubuntu-ports/ xenial universe
| |
− | deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial universe
| |
− | deb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates universe
| |
− | deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-updates universe
| |
− |
| |
− | ## N.B. software from this repository may not have been tested as
| |
− | ## extensively as that contained in the main release, although it includes
| |
− | ## newer versions of some applications which may provide useful features.
| |
− | ## Also, please note that software in backports WILL NOT receive any review
| |
− | ## or updates from the Ubuntu security team.
| |
− | deb http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted
| |
− | deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted
| |
− |
| |
− | deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted
| |
− | deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted
| |
− | #deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security universe
| |
− | #deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security universe
| |
− | #deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security multiverse
| |
− | #deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security multiverse
| |
− |
| |
− | deb http://ports.ubuntu.com/ubuntu-ports/ xenial-proposed main restricted
| |
− | deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-proposed main restricted
| |
− | </pre>
| |
− |
| |
− | chroot to target rootfs<br/> [https://github.com/wzyy2/Scripts/blob/master/ch-mount.sh ch-mount.sh]
| |
− | <pre>ch-mount.sh -m ubuntu/
| |
− | </pre>
| |
− |
| |
− | install desktop
| |
− | <pre>apt-get update
| |
− | apt-get install lightdm vim git
| |
− | apt-get build-dep xserver-xorg-core
| |
− | </pre>
| |
− |
| |
− | extract libmali-rk-dev_1.4-4_armhf.deb and libmali-rk-midgard0_1.4-4_armhf.deb(only debian/ubutnu, link by yourself if you are using other distributions) and copy them to target system.<br/> delete origin egl,gles library(For insurance)
| |
− | <pre>rm -rf /usr/lib/arm-linux-gnueabihf/mesa-egl
| |
− | </pre>
| |
− |
| |
− | download xserver
| |
− | <pre>git clone https://github.com/rockchip-linux/xserver.git
| |
− | </pre>
| |
− |
| |
− | delete those in configure.ac
| |
− | <pre>AC_CHECK_DECL(GBM_BO_USE_LINEAR,
| |
− | [AC_DEFINE(GLAMOR_HAS_GBM_LINEAR, 1, [Have GBM_BO_USE_LINEAR])], []
| |
− | </pre>
| |
− |
| |
− | build xserver<br/> (You can also use 'make install DESTDIR=/opt/x-build' to get files and copy them to a clean system)<br/> (This method is easy but slow, it'better to cross compile xserver under the ubuntu/debian multiarch environment)
| |
− | <pre>./autogen.sh --prefix=/usr --enable-aiglx --enable-composite --enable-record --enable-xv --enable-xvmc --enable-dga --enable-screensaver --enable-xdmcp --enable-xdm-auth-1 --enable-glx --enable-dri --enable-dri2 --enable-glamor --enable-dri3 --enable-libdrm --enable-present --enable-xinerama --enable-xf86vidmode --enable-xace --enable-xselinux --enable-xfree86-utils --enable-xwayland --enable-systemd-logind --with-systemd-daemon --enable-suid-wrapper --enable-dmx --enable-xvfb --enable-xnest --enable-kdrive --enable-xephyr --enable-xmir --with-sha1=libgcrypt --enable-xcsecurity --with-log-dir=/var/log
| |
− | make
| |
− | make install
| |
− | </pre>
| |
− |
| |
− | set password
| |
− | <pre>useradd -s '/bin/bash' -m -G adm,sudo rk
| |
− | echo "Set password for rk:"
| |
− | passwd rk
| |
− | echo "Set password for root:"
| |
− | passwd root
| |
− | </pre>
| |
− |
| |
− | exit chroot
| |
− | <pre>exit
| |
− | ch-mount.sh -u ubuntu/
| |
− | </pre>
| |
− |
| |
− | <br/> copy ttyS2.conf and udev directory to target rootfs from [https://github.com/rockchip-linux/rk-rootfs-build/tree/master/overlay rk-rootfs.build]
| |
− |
| |
− | make image
| |
− | <pre>dd if=/dev/zero of=ubuntu.img bs=1M count=3000
| |
− | sudo mkfs.ext4 ubuntu.img
| |
− | mkdir ubuntu-mount
| |
− | sudo mount ubuntu.img ubuntu-mount
| |
− | sudo cp -rfp ubuntu ubuntu-mount
| |
− | sudo umount ubuntu-mount
| |
− | e2fsck -p -f ubuntu.img
| |
− | resize2fs -M ubuntu.img
| |
− | </pre>
| |
− |
| |
− | ==== Build from packages ====
| |
− |
| |
− | There is a ubuntu build script in our [https://github.com/rockchip-linux/rk-rootfs-build rootfs-build] repo. It's different from the above example, it unpack the debian packages rather than compile from source.<br/> Please refer to the readme.
| |
| | | |
| = See also = | | = See also = |
| | | |
− | [[Yocto|yocto]]
| + | |
− | | |
− | [[Buildroot|buildroot]]
| |
The release rootfs image is based on linaro-alip-jessie.If you want to use other distributions, you need to compile and install components we provide.Do not install the deb under rk-rootfs-build directly.
We currently provide several components, the guide below only help you make xserver work.
For more details Please refer to each package's wiki.
There are also many other districbutions support by community or developers.
Here is the guide from Arch Linux to support RK3288 and RK3399 based Chromebook: