mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-25 14:24:18 +08:00
Extract architecture specific parts of init.rc
To allow reusing the platform independent part of init.rc without having to copy it for each platform. Also add a bunch of comments explaining the purpose of each section.
This commit is contained in:
parent
8ed22afa5b
commit
d84357ee65
@ -1,25 +0,0 @@
|
||||
export PATH /bin
|
||||
export RUST_BACKTRACE 1
|
||||
nulld
|
||||
zerod
|
||||
randd
|
||||
inputd
|
||||
vesad
|
||||
unset FRAMEBUFFER_ADDR FRAMEBUFFER_VIRT FRAMEBUFFER_WIDTH FRAMEBUFFER_HEIGHT FRAMEBUFFER_STRIDE
|
||||
#TODO: unset FRAMEBUFFER1 and beyond?
|
||||
fbbootlogd
|
||||
fbcond 2
|
||||
logd /scheme/debug /scheme/fbbootlog
|
||||
stdio /scheme/log
|
||||
ramfs logging
|
||||
acpid
|
||||
pcid
|
||||
pcid-spawner /etc/pcid/initfs.toml
|
||||
lived
|
||||
unset DISK_LIVE_ADDR DISK_LIVE_SIZE
|
||||
redoxfs --uuid $REDOXFS_UUID file $REDOXFS_BLOCK
|
||||
unset REDOXFS_UUID REDOXFS_BLOCK REDOXFS_PASSWORD_ADDR REDOXFS_PASSWORD_SIZE
|
||||
set-default-scheme file
|
||||
cd /
|
||||
export PATH /usr/bin
|
||||
run.d /usr/lib/init.d /etc/init.d
|
||||
@ -1,23 +0,0 @@
|
||||
export PATH /bin
|
||||
export RUST_BACKTRACE 1
|
||||
nulld
|
||||
zerod
|
||||
randd
|
||||
inputd
|
||||
vesad
|
||||
unset FRAMEBUFFER_ADDR FRAMEBUFFER_VIRT FRAMEBUFFER_WIDTH FRAMEBUFFER_HEIGHT FRAMEBUFFER_STRIDE
|
||||
#TODO: unset FRAMEBUFFER1 and beyond?
|
||||
fbbootlogd
|
||||
fbcond 2
|
||||
logd /scheme/debug /scheme/fbbootlog
|
||||
stdio /scheme/log
|
||||
ramfs logging
|
||||
lived
|
||||
unset DISK_LIVE_ADDR DISK_LIVE_SIZE
|
||||
bcm2835-sdhcid
|
||||
redoxfs --uuid $REDOXFS_UUID file $REDOXFS_BLOCK
|
||||
unset REDOXFS_UUID REDOXFS_BLOCK REDOXFS_PASSWORD_ADDR REDOXFS_PASSWORD_SIZE
|
||||
set-default-scheme file
|
||||
cd /
|
||||
export PATH /usr/bin
|
||||
run.d /usr/lib/init.d /etc/init.d
|
||||
@ -0,0 +1,3 @@
|
||||
acpid
|
||||
pcid
|
||||
pcid-spawner /etc/pcid/initfs.toml
|
||||
@ -0,0 +1 @@
|
||||
bcm2835-sdhcid
|
||||
@ -1,8 +1,12 @@
|
||||
# Various daemons that relibc needs to function as well as a bunch of env vars
|
||||
# that should be set for every program.
|
||||
export PATH /bin
|
||||
export RUST_BACKTRACE 1
|
||||
nulld
|
||||
zerod
|
||||
randd
|
||||
|
||||
# Logging and graphics infrastructure
|
||||
inputd
|
||||
vesad
|
||||
unset FRAMEBUFFER_ADDR FRAMEBUFFER_VIRT FRAMEBUFFER_WIDTH FRAMEBUFFER_HEIGHT FRAMEBUFFER_STRIDE
|
||||
@ -12,14 +16,17 @@ fbcond 2
|
||||
logd /scheme/debug /scheme/fbbootlog
|
||||
stdio /scheme/log
|
||||
ramfs logging
|
||||
ps2d us
|
||||
acpid
|
||||
pcid
|
||||
pcid-spawner /etc/pcid/initfs.toml
|
||||
|
||||
# Drivers
|
||||
run /scheme/initfs/etc/init_drivers.rc
|
||||
|
||||
# Mount rootfs
|
||||
lived
|
||||
unset DISK_LIVE_ADDR DISK_LIVE_SIZE
|
||||
redoxfs --uuid $REDOXFS_UUID file $REDOXFS_BLOCK
|
||||
unset REDOXFS_UUID REDOXFS_BLOCK REDOXFS_PASSWORD_ADDR REDOXFS_PASSWORD_SIZE
|
||||
|
||||
# Exit initfs
|
||||
set-default-scheme file
|
||||
cd /
|
||||
export PATH /usr/bin
|
||||
|
||||
4
recipes/core/initfs/init_drivers.rc
Normal file
4
recipes/core/initfs/init_drivers.rc
Normal file
@ -0,0 +1,4 @@
|
||||
ps2d us
|
||||
acpid
|
||||
pcid
|
||||
pcid-spawner /etc/pcid/initfs.toml
|
||||
@ -19,10 +19,11 @@ cp -r "${COOKBOOK_SYSROOT}/"* "${COOKBOOK_BUILD}/initfs"
|
||||
|
||||
# TODO: Move init.rc to another recipe, perhaps initfs-misc? Then it can be installed as a regular dependency.
|
||||
cp "${COOKBOOK_RECIPE}/init.rc" "${COOKBOOK_BUILD}/initfs/etc/init.rc"
|
||||
if [ -e ${COOKBOOK_RECIPE}/${TARGET}/init.rc.${BOARD} ]; then
|
||||
cp "${COOKBOOK_RECIPE}/${TARGET}/init.rc.${BOARD}" "${COOKBOOK_BUILD}/initfs/etc/init.rc"
|
||||
elif [ -e ${COOKBOOK_RECIPE}/${TARGET}/init.rc ]; then
|
||||
cp "${COOKBOOK_RECIPE}/${TARGET}/init.rc" "${COOKBOOK_BUILD}/initfs/etc/init.rc"
|
||||
cp "${COOKBOOK_RECIPE}/init_drivers.rc" "${COOKBOOK_BUILD}/initfs/etc/init_drivers.rc"
|
||||
if [ -e ${COOKBOOK_RECIPE}/${TARGET}/init_drivers.rc.${BOARD} ]; then
|
||||
cp "${COOKBOOK_RECIPE}/${TARGET}/init_drivers.rc.${BOARD}" "${COOKBOOK_BUILD}/initfs/etc/init_drivers.rc"
|
||||
elif [ -e ${COOKBOOK_RECIPE}/${TARGET}/init_drivers.rc ]; then
|
||||
cp "${COOKBOOK_RECIPE}/${TARGET}/init_drivers.rc" "${COOKBOOK_BUILD}/initfs/etc/init_drivers.rc"
|
||||
fi
|
||||
|
||||
# Move /usr folders to / and remove links
|
||||
|
||||
Loading…
Reference in New Issue
Block a user