• Stars
    star
    104
  • Rank 330,604 (Top 7 %)
  • Language Makefile
  • License
    MIT License
  • Created about 10 years ago
  • Updated about 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🐧 Kernels on Scaleway

Kernel Config

Build Status

https://community.cloud.online.net/t/official-linux-kernel-new-modules-optimizations-hacks/226

The kernel is built with the official mainline kernel, here are the .config files used.

The list of Scaleway's bootscripts is available at http://devhub.scaleway.com/#/bootscripts.

Modifications

We added kernel module to simulate some virtualization features:

  • serial console activation
  • remote soft reset trigger

How to build a custom kernel module

You'll need the usual toolchain for kernel compilation, which on Ubuntu is generally fulfilled by apt-get install build-essential libssl-dev. Then, the following script can be run.

# Determine versions
arch="$(uname -m)"
release="$(uname -r)"
upstream="${release%%-*}"
local="${release#*-}"

# Get kernel sources
mkdir -p /usr/src
wget -O "/usr/src/linux-${upstream}.tar.xz" "https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-${upstream}.tar.xz"
tar xf "/usr/src/linux-${upstream}.tar.xz" -C /usr/src/
ln -fns "/usr/src/linux-${upstream}" /usr/src/linux
ln -fns "/usr/src/linux-${upstream}" "/lib/modules/${release}/build"

# Prepare kernel
zcat /proc/config.gz > /usr/src/linux/.config
printf 'CONFIG_LOCALVERSION="%s"\nCONFIG_CROSS_COMPILE=""\n' "${local:+-$local}" >> /usr/src/linux/.config
wget -O /usr/src/linux/Module.symvers "http://mirror.scaleway.com/kernel/${arch}/${release}/Module.symvers"
apt-get install -y libssl-dev # adapt to your package manager
make -C /usr/src/linux prepare modules_prepare

Then you can make your module as usual by configuring KDIR=/lib/modules/$(uname -r)/build/

Alternatively, you can now build a DKMS-based kernel module, for instance: apt-get install zfsutils-linux

Kernels

Name Maintainer Sources Target Links
3.2.34 Marvell Closed C1 n/a
3.18.20 Linux community Open C1 Sources
3.19.8 Linux community Open C1 Sources
4.1.6 Linux community Open C1 Sources
4.2 Linux community Open C1 Sources

Build a custom kernel using Docker

Run a make menuconfig for 3-18-std/.config

make menuconfig KERNEL=3.18-std

Build a kernel with 3.17-std/.config file

make build KERNEL=3.17-std

Advanced options

Create a new 3.10-new/.config file from scratch for kernel 3.10

make create defconfig KERNEL=3.10-new

Make oldconfig a 3.18-std kernel

make oldconfig KERNEL=3.18-std

Run a shell in the container for easy debugging and run custom commands

make shell KERNEL=3.17-std

Test a kernel with QEMU

You should use a config file made for versatile.

Build a 3.18 kernel for versatile:

make build KERNEL=3.18-defconfig_versatile

Run the kernel in qemu

make qemu KERNEL=3.18-defconfig_versatile

How to upgrade a kernel

An example with 4.0.8-docker

You should move the directory

git mv 4.0.8-docker 4.0.9-docker

Run a make oldconfig with the newest version

make oldconfig KERNEL=4.0.9-docker

Build a custom kernel from scratch (without Docker)

Prerequisites:

  • An arm(hf) compiler:
    • a cross-compiler on non-armhf host, ie gcc-arm-linux-gnueabihf
    • a standard compiler from an armhf host (you can build a kernel from your C1)
  • Theses packages: git, wget, make

Steps:

  • Configure environment

export VERSION=3.17 export ARCH=arm export ARTIFACTS=artifacts


- Download archive via web
  ```bash
wget https://kernel.org/pub/linux/kernel/v3.x/linux-$VERSION.tar.xz && tar xf linux-$VERSION.tar.xz

or via git

git clone -b v$VERSION --single-branch git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux-$VERSION
  • Generate a base .config file by building it

make ARCH=arm mvebu_v7_defconfig

  or by fetching our one

wget -O .config https://raw.githubusercontent.com/scaleway/kernel-tools/master/$VERSION/.config


- Tune the .config
  ```bash
make ARCH=arm menuconfig
# ... configure using console interface
  • Building kernel and modules

make -j $(echo nproc ' * 2' | bc) uImage modules LOADADDR=0x8000


- Export the artifacts (kernel, header, modules) to `$ARTIFACTS` directory
  ```bash
mkdir -p $ARTIFACTS
cp arch/arm/boot/uImage $ARTIFACTS/
cp System.map $ARTIFACTS/
cp .config $ARTIFACTS/
make headers_install INSTALL_HDR_PATH=$ARTIFACTS/ > /dev/null
find $ARTIFACTS/include -name ".install" -or -name "..install.cmd" -delete
make modules_install INSTALL_MOD_PATH=$ARTIFACTS/ > /dev/null
rm -rf $ARTIFACTS/modules && \
   mv $ARTIFACTS/lib/modules $ARTIFACTS && \
   rmdir $ARTIFACTS/lib && \
   rm $ARTIFACTS/modules/*/source $ARTIFACTS/modules/*/build

Minimal configuration for C1 servers

- Networking support
  - Networking options
    - 802.1Q/802.1ad VLAN Support -> **YES**
    - Packet socket -> **YES**
    - Unix domain sockets -> **YES**
- Device Drivers
  - Network device support
    - PHY Device support and infrastructure
      - Driver for MDIO Bus/PHY emulation with fixed speed/link PHYs -> **YES**
  - Block devices
    - Network block device support -> **YES**
- Kernel hacking
  - Kernel low-level debugging functions -> **YES**
  - Early prink -> **YES**
- File systems
  - The Extended 4 (ext4) filesystem -> **YES**

How to bump multiple kernels at once

# It's an example to bump the kernels from 4.5.7 to 4.6.4
git mv x86_64/4.{5.7,6.4}-std
git mv x86_64/4.{5.7,6.4}-docker
git mv x86_64/4.{5.7,6.4}-apparmor
git mv x86_64/4.{5.7,6.4}-coreos
git mv x86_64/4.{5.7,6.4}-fedora
git mv x86_64/4.{5.7,6.4}-rancher
git mv armv7l/4.{5.7,6.4}-std
git mv armv7l/4.{5.7,6.4}-apparmor
git mv armv7l/4.{5.7,6.4}-debug
git mv armv7l/4.{5.7,6.4}-docker
git mv armv7l/4.{5.7,6.4}-fedora
for kernel in `find x86_64 -name "4.6.4-*"`; do make oldconfig KERNEL=$kernel; done
for kernel in `find armv7l -name "4.6.4-*"`; do make oldconfig KERNEL=$kernel; done

How to bump a kernel

git mv x86_64/4.{5.7,6.4}-std
make oldconfig KERNEL=x86_64/4.6.4-std

Licensing

© 2014-2015 Scaleway - MIT License.

More Repositories

1

scaleway-cli

Command Line Interface for Scaleway
Go
843
star
2

docker-machine-driver-scaleway

🐳 Scaleway driver for Docker Machine
Go
248
star
3

terraform-provider-scaleway

Terraform Scaleway provider
Go
198
star
4

frontalization

Pytorch deep learning face frontalization model
Python
198
star
5

postal-address

📯 Parse, normalize and render postal addresses.
Python
174
star
6

natasha

Natasha is a fast and scalable, DPDK powered, stateless NAT44 packet processor
C
125
star
7

image-tools

🔩 Scripts used to create Images on Scaleway - https://github.com/scaleway-community
Shell
117
star
8

python-scaleway

🐍 Python SDK to query Scaleway APIs.
Python
114
star
9

ultraviolet

A monorepo Design System with React components.
TypeScript
104
star
10

scaleway-sdk-go

Integrate Scaleway with your Go application
Go
103
star
11

netbox-netprod-importer

Poll data from network devices in production and import it into netbox
Roff
94
star
12

c14-cli

[EOL] 💻 Manage your C14 Online Cold Storage from Command Line
Go
89
star
13

docs-content

Scaleway Documentation contents
MDX
78
star
14

serverless-scaleway-functions

Plugin for Serverless Framework to allow users to deploy their serverless applications on Scaleway Functions
JavaScript
69
star
15

image-builder

📐 build server images on Scaleway
Dockerfile
66
star
16

scaleway-csi

Container Storage Interface (CSI) Driver for https://www.scaleway.com/block-storage/
Go
57
star
17

scaleway-cloud-controller-manager

Kubernetes Cloud Controller Manager for Scaleway
Go
53
star
18

initrd

🔧 Initrd builder with qemu nbd metadata for Scaleway boot (armhf + x86_64)
Shell
51
star
19

action-scw

Github action to install and use scaleway-cli
TypeScript
49
star
20

serverless-examples

Example projects and patterns for use with Scaleway's serverless products
HCL
48
star
21

netbox2netshot

Inventory synchronization tool between Netbox and Netshot
Rust
46
star
22

python-netboxapi

Python client API for Netbox
Python
30
star
23

scaleway-sdk-js

Integrate Scaleway with your JS application
TypeScript
28
star
24

cert-manager-webhook-scaleway

A Scaleway DNS ACME webhook for cert-manager
Go
27
star
25

taskor

Async queued task library for Go
Go
27
star
26

juju-scaleway

☁️ Scaleway driver for Juju
Python
26
star
27

prometheus-scw-sd

Prometheus Service Discovery for Scaleway
Go
25
star
28

scaleway-operator

Scaleway Operator for Kubernetes
Go
25
star
29

scaleway-lib

scaleway-lib is a set of NPM packages used at Scaleway
TypeScript
25
star
30

scaleway-sdk-python

Integrate Scaleway with your Python applications
Python
24
star
31

serverless-gateway

Serverless API Gateway running on Scaleway
Python
18
star
32

crossplane-provider-scaleway

Crossplane Scaleway Provider
Go
16
star
33

homebrew-scaleway

🍺 `brew tap scaleway/scaleway`
Ruby
11
star
34

packer-plugin-scaleway

Packer plugin for Scaleway Builder
Go
10
star
35

serverless-functions-python

Utilities for testing your Python functions for Scaleway Serverless Functions.
Python
10
star
36

scaleway-form

Build amazing forms with Scaleway-ui and React-final-form 🚀🚀
TypeScript
9
star
37

ansible

Ansible Collection for Scaleway
Python
8
star
38

scaleway-ui-website

Open Source Component Library
TypeScript
8
star
39

scaleway-functions-runtimes

Runtimes for Scaleway Function As A Service Platform
Go
8
star
40

serverless-api-framework-python

Framework for writing serverless APIs in Python, using Scaleway functions and containers.
Python
8
star
41

serverless-offline-scaleway

JavaScript
7
star
42

qa

💔 Cloud testing suite
Makefile
6
star
43

action-scw-secret

TypeScript
6
star
44

serverless-functions-node

Offline testing for Scaleway Serverless Functions
TypeScript
6
star
45

sentry-wrapper

Log exceptions of a non sentry-capable setuptools entrypoint to Sentry
Python
6
star
46

cq-source-scaleway

CloudQuery Provider for Scaleway
Go
5
star
47

helm-charts

Scaleway Helm Charts
Mustache
5
star
48

octodns-scaleway

Scaleway provider for octoDNS
Python
5
star
49

terraform-scaleway-vpc-module

Terraform module for configuring a VPC
HCL
5
star
50

design-tokens

JSON design tokens used in Scaleway UI library
5
star
51

python2-secrets

Backport python3.6 secrets to python2
Python
5
star
52

serverless-functions-go

Scaleway Serverless Functions (FaaS) framework to increase developer experience, local testing and more
Go
5
star
53

port-range

🐍 A python module for port-range
Python
4
star
54

qiskit-scaleway

Scaleway provider implementation for Qiskit SDK
Python
4
star
55

waypoint-plugin-scaleway

Waypoint provider for Scaleway
Go
4
star
56

learn-nomad-cluster-setup

Infrastructure configuration to deploy a Nomad cluster on Scaleway
Shell
3
star
57

python-dkim

User-friendly interface as well as python bindings for libopendkim.
Python
3
star
58

kernels

Kernel repository used at Scaleway (branch-oriented)
3
star
59

tink-go-scwkms

Extension to Tink Go that provides Scaleway's Key Manager integration
Go
3
star
60

scaleway-packages

Repository of the RPM packages used in Scaleway Instance Images
2
star
61

demo-scaleway-ansible-baremetal

Scaleday 2019 demo baremetal
Python
2
star
62

tim

TIM is a plugin for testinfra parametrizing tests as described by a yaml file.
Python
1
star
63

snippets

Snippets to use Scaleway services
Python
1
star
64

tutorial-tem-serverless-terraform

HTML
1
star
65

terraform-scaleway-lb-module

HCL
1
star
66

dagster-scaleway

Python
1
star