-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
49a37d4
commit ee877a5
Showing
20 changed files
with
136 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,7 @@ isofs/ | |
rootfs/ | ||
*.img | ||
*.iso | ||
*.tar.xz | ||
*.tar.gz | ||
*.sha256 | ||
pacman.ewe.conf |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
echo "eweos-diskimage" >/etc/hostname |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
cat <<EOF >/etc/motd | ||
Welcome to eweOS! | ||
* Mainpage: https://os.ewe.moe | ||
* Wiki: https://os-wiki.ewe.moe | ||
* Packages: https://os.ewe.moe/pkglist | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
TARGET_ARCH=${2:-x86_64} | ||
PROFILE=${1:-tarball-minimal} | ||
|
||
. utils/log.sh | ||
. utils/pacman-config.sh | ||
. utils/function_crsh.sh | ||
. utils/cleanup.sh | ||
. utils/install.sh | ||
. utils/collect.sh |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ base | |
greetd | ||
tinyramfs | ||
linux | ||
efistub-tools | ||
limine | ||
neofetch | ||
vim | ||
sudo | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
base | ||
linux | ||
neofetch | ||
vim | ||
sudo | ||
dinit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/env sh | ||
|
||
_logtxt "#### cleaning up env" | ||
|
||
sudo rm -r rootfs || true | ||
sudo rm -r isofs || true | ||
rm bootfs.img || true | ||
|
||
mkdir -p rootfs | ||
mkdir -p isofs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/env sh | ||
|
||
_logtxt "#### collecting result" | ||
|
||
if [[ $PROFILE == liveimage* ]]; then | ||
sudo mksquashfs ./rootfs ./isofs/root.sfs | ||
sudo xorriso -as mkisofs \ | ||
-o eweos-$TARGET_ARCH-$PROFILE.iso \ | ||
-J -v -d -N \ | ||
-x eweos-$TARGET_ARCH-$PROFILE.iso \ | ||
-partition_offset 16 \ | ||
-no-pad \ | ||
-hide-rr-moved \ | ||
-no-emul-boot \ | ||
-append_partition 2 0xef bootfs.img \ | ||
-appended_part_as_gpt \ | ||
-eltorito-platform efi \ | ||
-e --interval:appended_partition_2:all:: \ | ||
-V "EWE_ISO" \ | ||
-A "eweOS Live ISO" \ | ||
-iso-level 3 \ | ||
-partition_cyl_align all \ | ||
isofs | ||
sha256sum eweos-$TARGET_ARCH-$PROFILE.iso > eweos-$TARGET_ARCH-$PROFILE.iso.sha256 | ||
fi | ||
|
||
if [[ $PROFILE == tarball* ]]; then | ||
# wait for arch-chroot to release mountpoint | ||
sleep 5 | ||
sudo tar cJf eweos-$TARGET_ARCH-$PROFILE.tar.xz -C ./rootfs . | ||
sha256sum eweos-$TARGET_ARCH-$PROFILE.tar.xz > eweos-$TARGET_ARCH-$PROFILE.tar.xz.sha256 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/env sh | ||
|
||
function crsh(){ | ||
cp $1 ./rootfs/config.sh && chmod +x ./rootfs/config.sh | ||
sudo arch-chroot rootfs bash -c "/config.sh" | ||
sudo rm ./rootfs/config.sh | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/erv sh | ||
|
||
|
||
mkdir -p rootfs | ||
|
||
if [[ $PROFILE == liveimage* ]]; then | ||
_logtxt "#### creating boot partition" | ||
mkdir -p isofs | ||
dd if=/dev/zero of=bootfs.img bs=1M count=48 | ||
mkfs.vfat ./bootfs.img | ||
sudo mkdir -p ./rootfs/boot | ||
sudo mount ./bootfs.img ./rootfs/boot | ||
fi | ||
|
||
_logtxt "#### bootstrapping system" | ||
|
||
sudo pacstrap -G -M -C ./pacman.ewe.conf ./rootfs `cat profiles/$PROFILE/packages.txt | xargs` | ||
|
||
function concat_config() { | ||
for configsh in $1; do | ||
echo "echo \"#### setting up [`basename $configsh`]\"" >> $chrconf | ||
cat $configsh >> $chrconf | ||
done | ||
} | ||
|
||
_logtxt "#### setting up system" | ||
|
||
chrconf=`mktemp` | ||
echo "#!/bin/bash" > $chrconf | ||
concat_config "./config/common/*.sh" | ||
if [[ $PROFILE == liveimage* ]]; then | ||
concat_config "./config/liveimage/*.sh" | ||
fi | ||
if [[ $PROFILE == tarball* ]]; then | ||
concat_config "./config/tarball/*.sh" | ||
fi | ||
if [ -f "./profiles/$PROFILE/config.sh" ]; then | ||
cat ./profiles/$PROFILE/config.sh >> $chrconf | ||
fi | ||
crsh $chrconf | ||
sudo umount ./rootfs/boot || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
function _logtxt() { | ||
echo "$(tput bold)${1}$(tput sgr0)" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/env sh | ||
|
||
_logtxt "#### setting up pacman.conf" | ||
|
||
if [ ! -f "pacman.ewe.conf" ]; then | ||
if [ "`cat /etc/os-release | grep ^ID || true`" != "ID=ewe" ]; then | ||
wget https://raw.githubusercontent.com/eweOS/packages/pacman/pacman.conf -O pacman.ewe.conf | ||
else | ||
sudo pacman -Sy --noconfirm arch-install-scripts util-linux | ||
cp /etc/pacman.conf ./pacman.ewe.conf | ||
fi | ||
fi | ||
sed -i "s/Architecture = .*/Architecture = $TARGET_ARCH/g" pacman.ewe.conf |