Dockerized Cross-Compiler & Disk Image Tools with CI
Posted: Thu Jun 07, 2018 12:03 am
I've decided to start getting back into OS development today after 10 years (see viewtopic.php?f=2&t=29464), and I've made some tools available on Docker Hub and GitHub. I did so mainly because I wanted to be able to run builds for my OS anywhere (linux, mac, cloud, windows), without having to rebuild all the tools.
i686-elf cross compiler with nasm:
https://hub.docker.com/r/joshwyant/gcc-cross/
This is set up with Travis continuous integration, and GitHub shows a build status indicator.
FAT32 disk image tools:
https://hub.docker.com/r/joshwyant/vdisk-tools/
Readme: https://github.com/joshwyant/vdisk-tools
I won't explain how to use Docker here (there are many resources available on the web), but it makes builds really easy as you don't have to install any dependencies on the host build system. Most CI systems allow you to build inside Docker containers and retrieve the artifacts for further build stages. For example, the disk image tools are written in C#, but you wouldn't know just by running the vmkimg command.
You can try it out:
After the first run, any commands will run instantly inside the container, since the VM image only needs to be downloaded once.
If you fork and create a pull request (https://github.com/joshwyant/gcc-cross), you should be able to see your build in Travis CI.
i686-elf cross compiler with nasm:
https://hub.docker.com/r/joshwyant/gcc-cross/
This is set up with Travis continuous integration, and GitHub shows a build status indicator.
FAT32 disk image tools:
https://hub.docker.com/r/joshwyant/vdisk-tools/
Readme: https://github.com/joshwyant/vdisk-tools
I won't explain how to use Docker here (there are many resources available on the web), but it makes builds really easy as you don't have to install any dependencies on the host build system. Most CI systems allow you to build inside Docker containers and retrieve the artifacts for further build stages. For example, the disk image tools are written in C#, but you wouldn't know just by running the vmkimg command.
You can try it out:
Code: Select all
$ docker run -it joshwyant/gcc-cross bash
# i686-elf-gcc --version
i686-elf-gcc (GCC) 8.1.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
If you fork and create a pull request (https://github.com/joshwyant/gcc-cross), you should be able to see your build in Travis CI.