skeeto / w64devkit

Portable C and C++ Development Kit for x64 (and x86) Windows
The Unlicense
2.7k stars 185 forks source link

Busybox only environment bootstrapping #38

Open d-faure opened 1 year ago

d-faure commented 1 year ago

For the record, you'll find here:

https://gist.github.com/d-faure/5f89d9d2692f24d54cf336a8c12dda98

my way to start a portable busybox environment "from scratch"

skeeto commented 1 year ago

Does this solve a problem missed by setting $HOME before starting the shell? I've been using a "portable busybox" for a few months now via w64devkit.ini and haven't noticed issues particular to busybox-w32. I unzip w64devkit on a thumb drive, "home = .." in the .ini, create a shortcut to w64devkit.exe in the root (still haven't figure out how to construct a "relative" shortcut), then place my .profile, .gdbinit, .gitconfig, and _vimrc in the thumb drive root. That gives me a dev environment entirely local to the thumb drive: plug-and-develop.

I also have an ISO version, built via script, which also includes Git, Go, and an autorun to bring up a shell. Here's a slightly-trimmed version of that script (note: can't be built on Windows itself):

https://gist.github.com/skeeto/f3a70ce1cce659c67d2c0881094de02b

That's mainly useful for testing in virtual machines. I can spin up a fresh install snapshot, mount this ISO via the VM console, and begin my testing mere seconds after the VM boots up because everything is already "installed" in the ISO.

Speaking of bootstrap and in case you didn't know, the latest busybox-w32, FRP-4784-g5507c8744, is easily built in the w64devkit environment, so you can hack on busybox-w32 in its native environment, which is pretty neat and handy.

https://frippery.org/busybox/release-notes/FRP-4784.html