3 ms·
If you're a developer who doesn't know very well how Linux distributions (or operating systems in general) work, you should spend a weekend or two playing aroun
by peterwwillis 12y ago
If you're a developer who doesn't know very well how Linux distributions (or operating systems in general) work, you should spend a weekend or two playing around with an embedded Linux distro like this. Unfortunately DSLR's build environment does not seem like the easiest to understand for first-timers.
For example, instead of Makefiles per package, there's a package-specific shell script which incorporates some magic from scripts/build_package and is then sourced by the same to add some functions, with references to patches in a separate directory, and build dependencies tracked by a Makefile.deps file that's included by the root Makefile before the build_package script is run, which incidentally has tons of package-specific logic built in. You'd be re-reading 10 files over and over any time you build or troubleshoot a package.
All of this inside of a chroot using a bootstrapped cross compiler, which lord knows most people have never dealt with before. And the dependencies for building the cross-compiler aren't built from source, meaning this isn't a fully bootstrapped build environment, to say nothing of tracking versions. The resulting packages will vary from system to system, and it will be more difficult to port to non-x86.
- sroerick 12y agoWhat would be a good distribution for playing around like you described?
- peterwwillis 12y agoLinux From Scratch [1] is the de-facto standard in building a Linux system from the ground up, with more detail in CLFS [2]. You can look at Buildroot [3] as a model for embedded systems. SLAX [4] is a bootable embedded distro with tons of friendly documentation, and is a derivative of Slackware that also uses buildroot/busybox. [1] http://www.linuxfromscratch.org/ http://www.linuxfromscratch.org/ [2] http://trac.cross-lfs.org/ http://trac.cross-lfs.org/ [3] http://buildroot.uclibc.org/ http://buildroot.uclibc.org/ [4] http://www.slax.org/ http://www.slax.org/
- walterbell 12y agoWhat do you think of https://www.yoctoproject.org/ https://www.yoctoproject.org/ as an alternative?
- peterwwillis 12y agoYocto seems to be an attempt to make a standards body for embedded Linux development. It's neat and probably a huge boon for corporate-sponsored development, but overkill for the casual developer to learn more about Linux. All you need is a HOWTO to step you through building a toolchain and setting up the files needed to boot up with some programs running at start time, which LFS provides. Here's a guide for 'old' Linux distros http://www.linuxfromscratch.org/lfs/view/stable/ http://www.linuxfromscratch.org/lfs/view/stable/ and here's a guide using systemd http://www.linuxfromscratch.org/lfs/view/stable-systemd/ http://www.linuxfromscratch.org/lfs/view/stable-systemd/