It now actually works.

Improved how it can be used, added a description at the top of the file, too.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9974 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2004-11-16 02:25:16 +00:00
parent 0e0ff3af72
commit d2b3371adc
+51 -15
View File
@@ -1,22 +1,53 @@
#!/bin/sh
# This script will compile all files needed to create a bootable Haiku image,
# create such an image, and copy the files to the correct location.
#
# You need the Userland FS Server package from Ingo Weinhold to successfully
# create the image, and you also need to have the UserlandFSServer running
# in the background when you start the script.
#
# Usage: makehdimage [image path]
# If you don't specify the image, $sourceDir/haiku.image will be used. In
# the current default configuration, you have to start this script in the
# "current" directory of the Haiku tree. A 40 MB image will be created there.
#
# You may want to change it to suit your needs. Have fun!
# path of the checked out Haiku sources
sourceDir=/boot/home/develop/openbeos/current
sourceDir=.
# disk image path, size in MB
imagePath=/media/haiku.image
if [ "$1" == "" ]; then
imagePath=$sourceDir/haiku.image
else
imagePath=$1
fi
imageSize=40
# ufs_mount path
ufsMount=/boot/home/develop/other/userlandfs/generated/distro/ufs_mount/ufs_mount
ufsMount=/boot/home/config/bin/ufs_mount
# build everything needed
previousDir=`pwd`
cd $sourceDir
sourceDir=`pwd`
# we accept relative source directories as well
echo "Building $imageSize MB image at $imagePath..."
RUN_WITHOUT_APP_SERVER=1
BEOS_BIN="touch sync ln listattr listsem listport du rm \
true false ls df mount unmount cp mv ps sh"
BEOS_SYSTEM_LIB="libbe.so libstdc++.r4.so libnet.so"
jam -q kernel boot_loader config_manager pci isa ide scsi \
ide_isa bfs blkman fast_log ide_adapter locked_pool \
scsi_periph intel keyboard scsi_dsk scsi_cd libbe.so \
rld.so libroot.so init kernel_false consoled \
kernel_fortune kernel_true ls df mount unmount \
kernel_uname df libnet.so null zero random tty sh ps || exit 1
scsi_periph intel keyboard scsi_dsk scsi_cd \
rld.so kernel_fortune consoled \
$BEOS_BIN $BEOS_SYSTEM_LIB \
kernel_uname libnet.so null zero random \<driver\>tty || exit 1
# create the image and the directory structure
@@ -40,7 +71,7 @@ mkdir -p beos/bin
mkdir -p beos/system/lib
mkdir -p beos/system/boot
mkdir -p beos/etc
mkdir -p home
mkdir -p home/config
# modules
@@ -82,21 +113,26 @@ cp $sourceDir/objects/x86.R1/kernel/kernel /haiku/beos/system/kernel_x86
# libs
cd $sourceDir/distro/x86.R1/beos/system/lib
cp libbe.so /haiku/beos/system/lib/
cp $BEOS_SYSTEM_LIB /haiku/beos/system/lib/
cd $sourceDir/objects/x86.R1/kernel/
cp rld.so libroot.so /haiku/beos/system/lib/
cp /system/lib/libstdc++.r4.so /haiku/beos/system/lib/
# apps
cd $sourceDir/objects/x86.R1/kernel
for f in false fortune ls ps true uname; do
for f in fortune uname; do
cp kernel_$f /haiku/beos/bin/$f
done
cp $sourceDir/src/kernel/apps/fortune/fortunes /haiku/beos/etc/
cp $sourceDir/distro/x86.R1/beos/bin/df /haiku/beos/bin/
cd /haiku/beos/bin/
cd $sourceDir/distro/x86.R1/beos/bin
cp ../apps/consoled $BEOS_BIN /haiku/beos/bin/
# scripts and data files
cd $sourceDir
cp data/system/boot/Bootscript data/system/boot/SetupEnvironment /haiku/beos/system/boot/
cp data/etc/profile /haiku/beos/etc/
cp src/kernel/apps/fortune/fortunes /haiku/beos/etc/
# boot loader
cd /haiku/beos/system
@@ -127,6 +163,6 @@ for f in drivers/dev/keyboard drivers/dev/null drivers/dev/tty drivers/dev/zero
done
cd /
cd $previousDir
sync
unmount /haiku