{"id":14109159,"url":"https://github.com/scaleway/kernel-tools","last_synced_at":"2026-03-15T14:56:48.306Z","repository":{"id":21969366,"uuid":"25294136","full_name":"scaleway/kernel-tools","owner":"scaleway","description":":penguin: Kernels on Scaleway","archived":false,"fork":false,"pushed_at":"2017-10-18T12:01:40.000Z","size":15174,"stargazers_count":104,"open_issues_count":68,"forks_count":36,"subscribers_count":30,"default_branch":"master","last_synced_at":"2024-08-14T10:14:09.164Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://devhub.scaleway.com/#/bootscripts","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scaleway.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-16T08:55:50.000Z","updated_at":"2024-04-02T18:58:54.000Z","dependencies_parsed_at":"2022-08-20T03:21:38.939Z","dependency_job_id":null,"html_url":"https://github.com/scaleway/kernel-tools","commit_stats":null,"previous_names":[],"tags_count":64,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scaleway%2Fkernel-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scaleway%2Fkernel-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scaleway%2Fkernel-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scaleway%2Fkernel-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scaleway","download_url":"https://codeload.github.com/scaleway/kernel-tools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228351678,"owners_count":17906533,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-14T10:02:07.211Z","updated_at":"2025-12-17T00:19:26.806Z","avatar_url":"https://github.com/scaleway.png","language":"Makefile","funding_links":[],"categories":["Makefile"],"sub_categories":[],"readme":"# Kernel Config\n[![Build Status](https://travis-ci.org/scaleway/kernel-tools.svg?branch=master)](https://travis-ci.org/scaleway/kernel-tools)\n\nhttps://community.cloud.online.net/t/official-linux-kernel-new-modules-optimizations-hacks/226\n\nThe kernel is built with the official mainline kernel, here are the .config files used.\n\nThe list of Scaleway's bootscripts is available at http://devhub.scaleway.com/#/bootscripts.\n\n## Modifications\n\nWe added kernel module to simulate some virtualization features:\n- serial console activation\n- remote soft reset trigger\n\n---\n\n## How to build a custom kernel module\n\nYou'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.\n\n```bash\n# Determine versions\narch=\"$(uname -m)\"\nrelease=\"$(uname -r)\"\nupstream=\"${release%%-*}\"\nlocal=\"${release#*-}\"\n\n# Get kernel sources\nmkdir -p /usr/src\nwget -O \"/usr/src/linux-${upstream}.tar.xz\" \"https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-${upstream}.tar.xz\"\ntar xf \"/usr/src/linux-${upstream}.tar.xz\" -C /usr/src/\nln -fns \"/usr/src/linux-${upstream}\" /usr/src/linux\nln -fns \"/usr/src/linux-${upstream}\" \"/lib/modules/${release}/build\"\n\n# Prepare kernel\nzcat /proc/config.gz \u003e /usr/src/linux/.config\nprintf 'CONFIG_LOCALVERSION=\"%s\"\\nCONFIG_CROSS_COMPILE=\"\"\\n' \"${local:+-$local}\" \u003e\u003e /usr/src/linux/.config\nwget -O /usr/src/linux/Module.symvers \"http://mirror.scaleway.com/kernel/${arch}/${release}/Module.symvers\"\napt-get install -y libssl-dev # adapt to your package manager\nmake -C /usr/src/linux prepare modules_prepare\n```\n\nThen you can make your module as usual by configuring `KDIR=/lib/modules/$(uname -r)/build/`\n\nAlternatively, you can now build a DKMS-based kernel module, for instance: `apt-get install zfsutils-linux`\n\n## Kernels\n\nName              | Maintainer      | Sources | Target | Links\n------------------|-----------------|---------|--------|-------\n3.2.34            | Marvell         | Closed  | C1     | n/a\n3.18.20           | Linux community | Open    | C1     | [Sources](https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/?id=v3.18.20)\n3.19.8            | Linux community | Open    | C1     | [Sources](https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/?id=v3.19.8)\n4.1.6             | Linux community | Open    | C1     | [Sources](https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/?id=v4.1.6)\n4.2               | Linux community | Open    | C1     | [Sources](https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/?id=v4.2)\n\n---\n\n## Build a custom kernel using Docker\n\nRun a `make menuconfig` for `3-18-std/.config`\n\n    make menuconfig KERNEL=3.18-std\n\nBuild a kernel with `3.17-std/.config` file\n\n    make build KERNEL=3.17-std\n\n## Advanced options\n\nCreate a new `3.10-new/.config` file from scratch for kernel `3.10`\n\n    make create defconfig KERNEL=3.10-new\n\nMake oldconfig a `3.18-std` kernel\n\n    make oldconfig KERNEL=3.18-std\n\nRun a shell in the container for easy debugging and run custom commands\n\n    make shell KERNEL=3.17-std\n\n## Test a kernel with QEMU\n\nYou should use a config file made for `versatile`.\n\nBuild a `3.18` kernel for `versatile`:\n\n    make build KERNEL=3.18-defconfig_versatile\n\nRun the kernel in qemu\n\n    make qemu KERNEL=3.18-defconfig_versatile\n\n## How to upgrade a kernel\n\n**An example with 4.0.8-docker**\n\nYou should move the directory\n\n    git mv 4.0.8-docker 4.0.9-docker\n\nRun a `make oldconfig` with the newest version\n\n    make oldconfig KERNEL=4.0.9-docker\n\n---\n\n## Build a custom kernel from scratch (without Docker)\n\n### Prerequisites:\n\n- An arm(hf) compiler:\n  - a cross-compiler on non-armhf host, ie `gcc-arm-linux-gnueabihf`\n  - a standard compiler from an armhf host (you can build a kernel from your C1)\n- Theses packages: git, wget, make\n\n\n### Steps:\n\n- Configure environment\n  ```bash\nexport VERSION=3.17\nexport ARCH=arm\nexport ARTIFACTS=artifacts\n```\n\n- Download archive via web\n  ```bash\nwget https://kernel.org/pub/linux/kernel/v3.x/linux-$VERSION.tar.xz \u0026\u0026 tar xf linux-$VERSION.tar.xz\n  ```\n  or via git\n  ```bash\ngit clone -b v$VERSION --single-branch git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux-$VERSION\n```\n\n- Generate a base `.config` file by building it\n  ```\nmake ARCH=arm mvebu_v7_defconfig\n```\n  or by fetching our one\n  ```\nwget -O .config https://raw.githubusercontent.com/scaleway/kernel-tools/master/$VERSION/.config\n```\n\n- Tune the .config\n  ```bash\nmake ARCH=arm menuconfig\n# ... configure using console interface\n```\n\n- Building kernel and modules\n  ```bash\nmake -j $(echo `nproc` ' * 2' | bc) uImage modules LOADADDR=0x8000\n```\n\n- Export the artifacts (kernel, header, modules) to `$ARTIFACTS` directory\n  ```bash\nmkdir -p $ARTIFACTS\ncp arch/arm/boot/uImage $ARTIFACTS/\ncp System.map $ARTIFACTS/\ncp .config $ARTIFACTS/\nmake headers_install INSTALL_HDR_PATH=$ARTIFACTS/ \u003e /dev/null\nfind $ARTIFACTS/include -name \".install\" -or -name \"..install.cmd\" -delete\nmake modules_install INSTALL_MOD_PATH=$ARTIFACTS/ \u003e /dev/null\nrm -rf $ARTIFACTS/modules \u0026\u0026 \\\n   mv $ARTIFACTS/lib/modules $ARTIFACTS \u0026\u0026 \\\n   rmdir $ARTIFACTS/lib \u0026\u0026 \\\n   rm $ARTIFACTS/modules/*/source $ARTIFACTS/modules/*/build\n```\n\n### Minimal configuration for C1 servers\n\n```gherkin\n- Networking support\n  - Networking options\n    - 802.1Q/802.1ad VLAN Support -\u003e **YES**\n    - Packet socket -\u003e **YES**\n    - Unix domain sockets -\u003e **YES**\n- Device Drivers\n  - Network device support\n    - PHY Device support and infrastructure\n      - Driver for MDIO Bus/PHY emulation with fixed speed/link PHYs -\u003e **YES**\n  - Block devices\n    - Network block device support -\u003e **YES**\n- Kernel hacking\n  - Kernel low-level debugging functions -\u003e **YES**\n  - Early prink -\u003e **YES**\n- File systems\n  - The Extended 4 (ext4) filesystem -\u003e **YES**\n```\n\n### How to bump multiple kernels at once\n\n```bash\n# It's an example to bump the kernels from 4.5.7 to 4.6.4\ngit mv x86_64/4.{5.7,6.4}-std\ngit mv x86_64/4.{5.7,6.4}-docker\ngit mv x86_64/4.{5.7,6.4}-apparmor\ngit mv x86_64/4.{5.7,6.4}-coreos\ngit mv x86_64/4.{5.7,6.4}-fedora\ngit mv x86_64/4.{5.7,6.4}-rancher\ngit mv armv7l/4.{5.7,6.4}-std\ngit mv armv7l/4.{5.7,6.4}-apparmor\ngit mv armv7l/4.{5.7,6.4}-debug\ngit mv armv7l/4.{5.7,6.4}-docker\ngit mv armv7l/4.{5.7,6.4}-fedora\nfor kernel in `find x86_64 -name \"4.6.4-*\"`; do make oldconfig KERNEL=$kernel; done\nfor kernel in `find armv7l -name \"4.6.4-*\"`; do make oldconfig KERNEL=$kernel; done\n```\n\n### How to bump a kernel\n\n```bash\ngit mv x86_64/4.{5.7,6.4}-std\nmake oldconfig KERNEL=x86_64/4.6.4-std\n```\n\n\n## Licensing\n\n© 2014-2015 Scaleway - [MIT License](https://github.com/scaleway/kernel-tools/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscaleway%2Fkernel-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscaleway%2Fkernel-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscaleway%2Fkernel-tools/lists"}