Skip to content

Instantly share code, notes, and snippets.

@marineam
Last active May 21, 2018 12:47
Show Gist options
  • Save marineam/9914debc25c8d7dc458f to your computer and use it in GitHub Desktop.
Save marineam/9914debc25c8d7dc458f to your computer and use it in GitHub Desktop.
CoreOS dev container

Pending real documentation.... We do have a development container which includes the same toolchain version that was used to build CoreOS but it works under systemd-nspawn, not docker, and isn't documented. But here is a quick guide that may be a useful starting place.

# on coreos
wget http://alpha.release.core-os.net/amd64-usr/current/coreos_developer_container.bin.bz2
bunzip2 coreos_developer_container.bin.bz2
sudo systemd-nspawn -i coreos_developer_container.bin --share-system
# inside container:
emerge-gitclone
emerge -gKav coreos-sources
cd /usr/src/linux
zcat /proc/config.gz >.config
make modules_prepare

After that you should be able to build both internal and external modules, but there is a major quirk here: /lib/modules is read-only so you cannot install them there, use depmod, or use modprobe. You can still load them with insmod by path but it is up to you to load them in the right order if you are building something complicated with lots of modules like ALSA. The Nvidia case does have an advantage here, being a single module there aren't dependencies to deal with.

@marineam
Copy link
Author

@crawford sure sounds like a bug in nspawn or udev is being a brat. (or something else unknown, there is a claim that the "Device or resource busy" errors in coreos-install are actually not udev's fault after all, for all I know this may be related)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment