I paused Rabbit development for a week or two, as I’m very busy. I’ve got many things to do in the upcoming week … In my spare time, I’m writing a script that automates the construction of the toolchain.
I still don’t know whether it’s possible to write a script that uses chroot and continues to run inside the chroot’ed environment, I’ll do some experiments with this … If it proves to be reliable, I’ll extend the script to construct parts of the final system, at least the core.
The script is based on LFS, but with many many modifications to make it easier and simpler. Also, it uses different methods for some things, to make sure it doesn’t kill the host system: all the work is done with a regular user.
Currently, it is able to construct a basic cross-compiling suite, that is used to compile the final system’s packages. You just give it the package versions and it does all the dirty work for you.
There’s only three problems so far:
- The script needs permissions to create a symlink in /.
- The script needs the LFS patch for GCC.
- The script automatically sets the minimum kernel version supported by glibc to the kernel used for the distro, so I can’t test the toolchain on my Arch – it uses the stable 2.6.32.x instead of the early 2.6.33.x kernels.
It’s quite stupid, I know, but it’s fun. I think I’m going to do a 64-bit build of Rabbit when I get X and JWM ready. I want this thing to be a simple replacement for projects like T2: it saves time and automates all the hard work. As I said, if the script can run inside a chroot environment, I can make it build the whole system instead.
The biggest issue with this script is the fact that the whole thing is static, as things change, the script must be changed. The only way to solve this problem is creating some scripting mechanism or XML-parsing functions that read a set of actions to perform on each step and translate it into Bash syntax or something.
This can be easily done with Python: I’ll consider this. Just imagine the endless possibilities this approach offers – you just give it the commands LFS tells you to run, without all the explainations, and it does everything automatically.