busybox: build dynamically and fix directories

This commit is contained in:
Muhammad Herdiansyah 2019-07-20 23:56:09 +07:00
parent 8ef0f3d472
commit be1c3ba858
6 changed files with 10 additions and 126 deletions

View File

@ -6,6 +6,12 @@ make install
# Work around no 'DESTDIR'.
cp -a _install/. "$1"
# Fix package filesystem.
mv "$1/bin/"* "$1/usr/bin"
mv "$1/sbin/"* "$1/usr/bin"
mv "$1/usr/sbin/"* "$1/usr/bin"
rmdir "$1/bin" "$1/usr/sbin" "$1/sbin"
# Install runit services.
install -Dm755 acpid.run "$1/etc/sv/acpid/run"
install -Dm755 crond.run "$1/etc/sv/crond/run"
@ -13,6 +19,3 @@ install -Dm755 syslogd.run "$1/etc/sv/syslogd/run"
ln -s /run/runit/supervise.acpid "$1/etc/sv/acpid/supervise"
ln -s /run/runit/supervise.crond "$1/etc/sv/crond/supervise"
ln -s /run/runit/supervise.syslogd "$1/etc/sv/syslogd/supervise"
# Install mdev config.
cp mdev.conf "$1/etc/mdev.conf"

View File

@ -1,6 +1,5 @@
3d1d04a4dbd34048f4794815a5c48ebb9eb53c5277e09ffffc060323b95dfbdc busybox-1.30.1.tar.bz2
79178c0d52767fc76208c366d20ec774cb5380786b6387486be3389a6493b4f6 .config
544cbd08a836d63a4d98d0982a395612f37c0a2a122c7bf7137e1d731cc39454 .config
6c3eb5cf839c7a31c337df0cd8388b397e1415ffa7a63e9678552c9c63dd869f acpid.run
814dea14ac612125e97dcc1d619219b2c9dfc14850bf48d858421fb2c98eca12 crond.run
4a5981f4b0d791fe9b84b0b2e01ae905f6565c8245b3cd603e6decf34ddad71a syslogd.run
0dd496b956e664f2f267fbcf3563977a4b16ca01f9af208653fff25d8b0da431 mdev.conf

View File

@ -40,8 +40,8 @@ CONFIG_PLATFORM_LINUX=y
#
# Build Options
#
CONFIG_STATIC=y
# CONFIG_PIE is not set
# CONFIG_STATIC is not set
CONFIG_PIE=y
# CONFIG_NOMMU is not set
# CONFIG_BUILD_LIBBUSYBOX is not set
# CONFIG_FEATURE_LIBBUSYBOX_STATIC is not set

View File

@ -1,117 +0,0 @@
# mdev-like-a-boss
# Syntax:
# [-]devicename_regex user:group mode [=path]|[>path]|[!] [@|$|*cmd args...]
# [-]$ENVVAR=regex user:group mode [=path]|[>path]|[!] [@|$|*cmd args...]
# [-]@maj,min[-min2] user:group mode [=path]|[>path]|[!] [@|$|*cmd args...]
#
# [-]: do not stop on this match, continue reading mdev.conf
# =: move, >: move and create a symlink
# !: do not create device node
# @|$|*: run cmd if $ACTION=remove, @cmd if $ACTION=add, *cmd in all cases
# support module loading on hotplug
$MODALIAS=.* root:root 660 @modprobe -b "$MODALIAS"
# null may already exist; therefore ownership has to be changed with command
null root:root 666 @chmod 666 $MDEV
zero root:root 666
full root:root 666
random root:root 444
urandom root:root 444
hwrandom root:root 444
grsec root:root 660
# Kernel-based Virtual Machine.
kvm root:kvm 660
# vhost-net, to be used with kvm.
vhost-net root:kvm 660
kmem root:root 640
mem root:root 640
port root:root 640
# console may already exist; therefore ownership has to be changed with command
console root:tty 600 @chmod 600 $MDEV
ptmx root:tty 666
pty.* root:tty 660
# Typical devices
tty root:tty 666
tty[0-9]* root:tty 660
vcsa*[0-9]* root:tty 660
ttyS[0-9]* root:uucp 660
# block devices
ram([0-9]*) root:disk 660 >rd/%1
loop([0-9]+) root:disk 660 >loop/%1
sd[a-z].* root:disk 660 */opt/mdev/helpers/storage-device
vd[a-z].* root:disk 660 */opt/mdev/helpers/storage-device
hd[a-z].* root:disk 660 */opt/mdev/helpers/storage-device
md[0-9]* root:disk 660 */opt/mdev/helpers/storage-device
dm-[0-9]* root:disk 660 */opt/mdev/helpers/storage-device
bcache[0-9]* root:disk 660 */opt/mdev/helpers/storage-device
mmcblk[0-9].* root:disk 660 */opt/mdev/helpers/storage-device
sr[0-9]* root:cdrom 660 @ln -sf $MDEV cdrom
fd[0-9]* root:floppy 660
# Run settle-nics every time new NIC appear.
# If you don't want to auto-populate /etc/mactab with NICs, run 'settle-nis' without '--write-mactab' param.
-SUBSYSTEM=net;DEVPATH=.*/net/.*;.* root:root 600 @/opt/mdev/helpers/settle-nics --write-mactab
net/tun[0-9]* root:kvm 660
net/tap[0-9]* root:root 600
# alsa sound devices and audio stuff
SUBSYSTEM=sound;.* root:audio 660 @/opt/mdev/helpers/sound-control
adsp root:audio 660 >sound/
audio root:audio 660 >sound/
dsp root:audio 660 >sound/
mixer root:audio 660 >sound/
sequencer.* root:audio 660 >sound/
# raid controllers
cciss!(.*) root:disk 660 =cciss/%1
ida!(.*) root:disk 660 =ida/%1
rd!(.*) root:disk 660 =rd/%1
fuse root:root 666
card[0-9] root:video 660 =dri/
agpgart root:root 660 >misc/
psaux root:root 660 >misc/
rtc root:root 664 >misc/
# input stuff
SUBSYSTEM=input;.* root:input 660
# v4l stuff
vbi[0-9] root:video 660 >v4l/
video[0-9] root:video 660 >v4l/
# dvb stuff
dvb.* root:video 660
# drm etc
dri/.* root:video 660
# Don't create old usbdev* devices.
usbdev[0-9].[0-9]* root:root 660 !
# Stop creating x:x:x:x which looks like /dev/dm-*
[0-9]+\:[0-9]+\:[0-9]+\:[0-9]+ root:root 660 !
# /dev/cpu support.
microcode root:root 600 =cpu/
cpu([0-9]+) root:root 600 =cpu/%1/cpuid
msr([0-9]+) root:root 600 =cpu/%1/msr
# Populate /dev/bus/usb.
SUBSYSTEM=usb;DEVTYPE=usb_device;.* root:root 660 */opt/mdev/helpers/dev-bus-usb
# Catch-all other devices, Right now useful only for debuging.
#.* root:root 660 */opt/mdev/helpers/catch-all

View File

@ -3,4 +3,3 @@ files/.config
files/acpid.run
files/crond.run
files/syslogd.run
files/mdev.conf

View File

@ -1 +1 @@
1.30.1 11
1.30.1 12