OSDev.org

The Place to Start for Operating System Developers
It is currently Wed Aug 22, 2018 2:17 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Dockerized Cross-Compiler & Disk Image Tools with CI
PostPosted: Thu Jun 07, 2018 12:03 am 
Offline
Member
Member

Joined: Wed Mar 05, 2008 4:41 pm
Posts: 45
Location: Menlo Park, California, USA
I've decided to start getting back into OS development today after 10 years (see https://forum.osdev.org/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:
Code:
$ 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.


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.

_________________
https://github.com/joshwyant
https://linkedin.com/in/joshwyant


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot] and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group