Skip to content

Commit

Permalink
add support for building in ram
Browse files Browse the repository at this point in the history
  • Loading branch information
Maccraft123 committed Jun 11, 2021
1 parent 323a98a commit 2a69620
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 9 additions & 1 deletion build-all
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ sleep 1 # let's give user time if they commit a typo
# build-all <file> <size>

[ -z "$1" ] && exit 1
[ $IN_RAM = true -a -z "$2" ] && exit 2


if [ -n "$2" ]; then
echo "Warning,"
Expand All @@ -22,10 +24,15 @@ if [ -n "$2" ]; then
sleep 2
fi

umount $CADMIUMROOT/tmp 2>/dev/null || true

if [ $IN_RAM = true ]; then
mount -t tmpfs tmpfs $CADMIUMROOT/tmp
fi

# it deals with env vars
source $CADMIUMROOT/bootfw/$BOOTFW/prepare_parts


# build, package and write kernel
$CADMIUMROOT/kernel/build

Expand Down Expand Up @@ -53,3 +60,4 @@ losetup -d $DEVICE 2>/dev/null || true
sync

echo "Done!"
[ $IN_RAM = true ] && echo "Don't forget to umount $CADMIUMROOT/tmp"
3 changes: 3 additions & 0 deletions config
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ B_OXIDE=1
# Which kernel should be built. disables firmware
# kernelorg: from kernel.org libre: from linux-libre.fsfla.org
KERNEL=kernelorg

# Build Cadmium inside tmpfs?
IN_RAM=false

0 comments on commit 2a69620

Please sign in to comment.