From 5f81d06e8b879e1778649405b314d60234934dfc Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Tue, 29 May 2012 10:12:40 -0400 Subject: initalize buildroot later, and out outside of hooks mkinitcpio needs to be able to more tightly control the layout of the image. By moving this outside the control of the base hook, it's more reasonable to believe that a drop-in replacement for the base hook could be written, as it now only contains the utilities required for the /init that it provides. Being that initialize_buildroot is outside of a hook, we can make "raw" calls to coreutils that create the directories and symlinks, saving some overhead and forking. This also symlinks /usr/local/{lib,bin} into the common /usr/lib and /usr/bin, respectively, so that there's always a way to override libs and bins, and they're automatically pulled into our strict early init path of /usr/bin. Finally, we lump all this generally a little "later" in the early setup. This addresses an unseen "bug" wherein an extra temp directory that never gets used is created when leveraging a preset. Signed-off-by: Dave Reisner --- install/base | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'install/base') diff --git a/install/base b/install/base index 30ad3fa..7bb23a8 100644 --- a/install/base +++ b/install/base @@ -1,16 +1,7 @@ #!/bin/bash build() { - local dir applet - - for dir in new_root proc sys dev run tmp usr/bin; do - add_dir "/$dir" - done - - add_symlink /lib usr/lib - add_symlink /sbin usr/bin - add_symlink /bin usr/bin - add_symlink /usr/sbin bin + local applet add_binary /usr/lib/initcpio/busybox /bin/busybox -- cgit v1.2.3-24-g4f1b