create directories required by busybox
Signed-off-by: Nico Schottelius <nico@wurzel.schottelius.org>
This commit is contained in:
parent
7ba6c0a44a
commit
7d7aa60e19
4 changed files with 5 additions and 2 deletions
30
hacking/v3-busybox/create_initramfs.sh
Executable file
30
hacking/v3-busybox/create_initramfs.sh
Executable file
|
|
@ -0,0 +1,30 @@
|
|||
#!/bin/sh
|
||||
set -ex
|
||||
|
||||
|
||||
initramfs_dir=$(mktemp -d /tmp/cdist-preos.XXXXXXX)
|
||||
# initramfs_dir=$1
|
||||
|
||||
for dir in bin sbin etc proc sys newroot usr/bin usr/sbin; do
|
||||
mkdir -p ${initramfs_dir}/$dir
|
||||
done
|
||||
touch ${initramfs_dir}/etc/mdev.conf
|
||||
|
||||
cp init "${initramfs_dir}/init"
|
||||
cp $(which busybox) "${initramfs_dir}/bin"
|
||||
|
||||
for link in sh mount; do
|
||||
ln -fs busybox "${initramfs_dir}/bin/$link"
|
||||
done
|
||||
|
||||
cd "${initramfs_dir}"
|
||||
find . | cpio -H newc -o | gzip
|
||||
|
||||
exit 0
|
||||
|
||||
# TODO:
|
||||
# - Kernel modules
|
||||
# - ssh
|
||||
# - various mkfs
|
||||
# - libs
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue