Git Product home page Git Product logo

rock960_docker_build's Introduction

Build a Rock960 debian image inside Docker

This Dockerfile provides a development environment to build system images for the Rock960 dev board. The instructions are broadly identical to: http://rageworx.ddns.net/index.php/easy-way-to-build-rock960-arm64-system-image/

There are a few kernel configuration options that I've added to enable containerisation.

To run, simply run make_image.sh which will:

  1. Build the Docker container
  2. Make a folder called data in the current folder
  3. Run the container with the build script

Everything except deboostrap is run during the container build phase, so currently kernel options are hardcoded into the Dockerfile.

The container must be launched in privileged mode, otherwise certain build operations will fail. The Dockerfile will build a desktop environment using the default settings, with overlayfs support. If you want a base image, then simply change the target to "base".

The system image will be copied to the data folder where you can flash it as usual:

sudo rkdeveloptool db rk3399_loader_v1.12.112.bin
sudo rkdeveloptool wl 0 data/system.img
sudo rkdeveloptool rd

Or you can write this image to an SD card using Etcher or dd.

For some reason the official instructions neglect making kernel modules or installing them. I've had a long look to try and figure out what I'm missing, but I've given up. Essentially the system builds with a bunch of modules built, but the /lib/modules folder never gets installed. Additionally the Stretch installation nukes the rootfs/binary folder so you can't just run modules_install into there. What a faff. So, the modified mk-kernel script builds the kernel in deb-pkg mode, which produces a bunch of dpkg install files that get installed prior to the system image being created. This is also slightly cleaner. These packages are exported along with the system image, but the deb files are removed from the image to save space after installation.

Customisation

This setup will build Debian Buster with some extra kernel options. It also builds a newer version of the kernel than is currently available on 96rocks or Vammrs. It's not quite mainline, but there are quite a few backported improvements by the looks of the repo. In the future the plan is to add mainline linux instead of the rockchip fork.

ssh-keygen is run pre-install so that you can ssh in right away. Docker-ce is also baked in.

The system hostname is set to the usual linaro-alip with the user linaro.

Extras are found in mk-rootfs-extra.sh, you can pre-install packages, add users, whatever you like in there. Just make sure you add stuff in the chroot section.

This is also a good place to try adding e.g. networking setup so that you can automatically connect to a known wifi hotspot on first boot.

Notes

The first thing you should do after flashing this image is disable wlan power management. If you don't do this, SSH over the network will be incredibly slow. The instructions are here:

Open /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf and change the contents to:

[connection]
wifi.powersave = 2

then run sudo iwconfig. You may need to run a cron job to fix this permanently otherwise it resets after a minute or so.

For example:

sudo crontab -e

and add:

* * * * * /sbin/iw wlan0 set power_save off

rock960_docker_build's People

Contributors

jveitchmichaelis avatar

Stargazers

Henrik Vendelbo avatar Allan CORNET avatar  avatar Tom Cubie avatar

Watchers

James Cloos avatar  avatar

rock960_docker_build's Issues

add new package in the package

Hey , I'm novice in linux and first of all thanks for provide this script. I want to know what if i want to install new packages in my image ?
Same like other packages like Xserver i add one package echo -e "\033[36m Setup xyz.................... \033[0m"
dpkg -i /packages/xyz/*
apt-get install -f -y
and add its .deb file in packages ,will this thing add this package in my image .?
and second question is what if i want put a .py file inside my xyz file ,how to do that because the location at which i want to put this .py file is generate after the installing of this package and this package will install during building only.
echo -e "\033[36m Setup xyz.................... \033[0m"
dpkg -i /packages/xyz/*
apt-get install -f -y
cp ggg.py xyz/example/"destination" .
will this thing work?

direct url to download rock960 image

your docker is very great :)
But I am more interested by direct image
Where can we find .img (buster) to flash directly on rock960 with etcher ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.