mirror of
https://github.com/yuk7/AlpineWSL.git
synced 2026-01-18 16:47:21 +01:00
initial arm64 build
This commit is contained in:
59
Makefile
59
Makefile
@@ -1,62 +1,25 @@
|
||||
OUT_ZIP=Alpine.zip
|
||||
LNCR_EXE=Alpine.exe
|
||||
|
||||
ARCH=x64
|
||||
|
||||
DLR=curl
|
||||
DLR_FLAGS=-L
|
||||
BASE_URL=http://dl-cdn.alpinelinux.org/alpine/v3.13/releases/x86_64/alpine-minirootfs-3.13.4-x86_64.tar.gz
|
||||
LNCR_ZIP_URL=https://github.com/yuk7/wsldl/releases/download/21020500/icons.zip
|
||||
LNCR_ZIP_EXE=Alpine.exe
|
||||
|
||||
all: $(OUT_ZIP)
|
||||
|
||||
zip: $(OUT_ZIP)
|
||||
$(OUT_ZIP): ziproot
|
||||
@echo -e '\e[1;31mBuilding $(OUT_ZIP)\e[m'
|
||||
cd ziproot; bsdtar -a -cf ../$(OUT_ZIP) *
|
||||
$(OUT_ZIP): $(ARCH)
|
||||
|
||||
ziproot: Launcher.exe rootfs.tar.gz
|
||||
@echo -e '\e[1;31mBuilding ziproot...\e[m'
|
||||
mkdir ziproot
|
||||
cp Launcher.exe ziproot/${LNCR_EXE}
|
||||
cp rootfs.tar.gz ziproot/
|
||||
x64:
|
||||
cd src_x64 && $(MAKE)
|
||||
mv src_x64/$(OUT_ZIP) ./
|
||||
|
||||
exe: Launcher.exe
|
||||
Launcher.exe: icons.zip
|
||||
@echo -e '\e[1;31mExtracting Launcher.exe...\e[m'
|
||||
bsdtar -xvf icons.zip $(LNCR_ZIP_EXE)
|
||||
mv $(LNCR_ZIP_EXE) Launcher.exe
|
||||
|
||||
icons.zip:
|
||||
@echo -e '\e[1;31mDownloading icons.zip...\e[m'
|
||||
$(DLR) $(DLR_FLAGS) $(LNCR_ZIP_URL) -o icons.zip
|
||||
|
||||
rootfs.tar.gz: rootfs
|
||||
@echo -e '\e[1;31mBuilding rootfs.tar.gz...\e[m'
|
||||
cd rootfs; sudo tar -zcpf ../rootfs.tar.gz `sudo ls`
|
||||
sudo chown `id -un` rootfs.tar.gz
|
||||
|
||||
rootfs: base.tar.gz profile
|
||||
@echo -e '\e[1;31mBuilding rootfs...\e[m'
|
||||
mkdir rootfs
|
||||
sudo tar -zxpf base.tar.gz -C rootfs
|
||||
sudo cp -f /etc/resolv.conf rootfs/etc/resolv.conf
|
||||
sudo cp -f profile rootfs/etc/profile
|
||||
sudo chroot rootfs /sbin/apk update
|
||||
sudo chroot rootfs /sbin/apk add bash
|
||||
echo "# This file was automatically generated by WSL. To stop automatic generation of this file, remove this line." | sudo tee rootfs/etc/resolv.conf
|
||||
sudo rm -rf `sudo find rootfs/var/cache/apk/ -type f`
|
||||
sudo chmod +x rootfs
|
||||
|
||||
base.tar.gz:
|
||||
@echo -e '\e[1;31mDownloading base.tar.gz...\e[m'
|
||||
$(DLR) $(DLR_FLAGS) $(BASE_URL) -o base.tar.gz
|
||||
arm64:
|
||||
cd src_arm64 && $(MAKE)
|
||||
mv src_arm64/$(OUT_ZIP) ./
|
||||
|
||||
clean:
|
||||
@echo -e '\e[1;31mCleaning files...\e[m'
|
||||
-rm ${OUT_ZIP}
|
||||
-rm -r ziproot
|
||||
-rm Launcher.exe
|
||||
-rm icons.zip
|
||||
-rm rootfs.tar.gz
|
||||
-sudo rm -r rootfs
|
||||
-rm base.tar.gz
|
||||
cd src_x64 && make clean
|
||||
cd src_arm64 && make clean
|
||||
60
src_arm64/Makefile
Normal file
60
src_arm64/Makefile
Normal file
@@ -0,0 +1,60 @@
|
||||
OUT_ZIP=Alpine.zip
|
||||
LNCR_EXE=Alpine.exe
|
||||
|
||||
DLR=curl
|
||||
DLR_FLAGS=-L
|
||||
BASE_URL=https://dl-cdn.alpinelinux.org/alpine/v3.9/releases/aarch64/alpine-minirootfs-3.9.6-aarch64.tar.gz
|
||||
LNCR_ZIP_URL=https://github.com/yuk7/wsldl/releases/download/21062500/icons_arm64.zip
|
||||
LNCR_ZIP_EXE=Alpine.exe
|
||||
|
||||
all: $(OUT_ZIP)
|
||||
|
||||
zip: $(OUT_ZIP)
|
||||
$(OUT_ZIP): ziproot
|
||||
@echo -e '\e[1;31mBuilding $(OUT_ZIP)\e[m'
|
||||
cd ziproot; bsdtar -a -cf ../$(OUT_ZIP) *
|
||||
|
||||
ziproot: Launcher.exe rootfs.tar.gz
|
||||
@echo -e '\e[1;31mBuilding ziproot...\e[m'
|
||||
mkdir ziproot
|
||||
cp Launcher.exe ziproot/${LNCR_EXE}
|
||||
cp rootfs.tar.gz ziproot/
|
||||
|
||||
exe: Launcher.exe
|
||||
Launcher.exe: icons.zip
|
||||
@echo -e '\e[1;31mExtracting Launcher.exe...\e[m'
|
||||
bsdtar -xvf icons.zip $(LNCR_ZIP_EXE)
|
||||
mv $(LNCR_ZIP_EXE) Launcher.exe
|
||||
|
||||
icons.zip:
|
||||
@echo -e '\e[1;31mDownloading icons.zip...\e[m'
|
||||
$(DLR) $(DLR_FLAGS) $(LNCR_ZIP_URL) -o icons.zip
|
||||
|
||||
rootfs.tar.gz: rootfs
|
||||
@echo -e '\e[1;31mBuilding rootfs.tar.gz...\e[m'
|
||||
cd rootfs; sudo tar -zcpf ../rootfs.tar.gz `sudo ls`
|
||||
sudo chown `id -un` rootfs.tar.gz
|
||||
|
||||
rootfs: base.tar.gz profile
|
||||
@echo -e '\e[1;31mBuilding rootfs...\e[m'
|
||||
mkdir rootfs
|
||||
sudo tar -zxpf base.tar.gz -C rootfs
|
||||
sudo cp -f /etc/resolv.conf rootfs/etc/resolv.conf
|
||||
sudo cp -f profile rootfs/etc/profile
|
||||
echo "# This file was automatically generated by WSL. To stop automatic generation of this file, remove this line." | sudo tee rootfs/etc/resolv.conf
|
||||
sudo rm -rf `sudo find rootfs/var/cache/apk/ -type f`
|
||||
sudo chmod +x rootfs
|
||||
|
||||
base.tar.gz:
|
||||
@echo -e '\e[1;31mDownloading base.tar.gz...\e[m'
|
||||
$(DLR) $(DLR_FLAGS) $(BASE_URL) -o base.tar.gz
|
||||
|
||||
clean:
|
||||
@echo -e '\e[1;31mCleaning files...\e[m'
|
||||
-rm ${OUT_ZIP}
|
||||
-rm -r ziproot
|
||||
-rm Launcher.exe
|
||||
-rm icons.zip
|
||||
-rm rootfs.tar.gz
|
||||
-sudo rm -r rootfs
|
||||
-rm base.tar.gz
|
||||
11
src_arm64/profile
Normal file
11
src_arm64/profile
Normal file
@@ -0,0 +1,11 @@
|
||||
export CHARSET=UTF-8
|
||||
export LANG=C.UTF-8
|
||||
export PAGER=less
|
||||
export PS1='\h:\w\$ '
|
||||
umask 022
|
||||
|
||||
for script in /etc/profile.d/*.sh ; do
|
||||
if [ -r $script ] ; then
|
||||
. $script
|
||||
fi
|
||||
done
|
||||
62
src_x64/Makefile
Normal file
62
src_x64/Makefile
Normal file
@@ -0,0 +1,62 @@
|
||||
OUT_ZIP=Alpine.zip
|
||||
LNCR_EXE=Alpine.exe
|
||||
|
||||
DLR=curl
|
||||
DLR_FLAGS=-L
|
||||
BASE_URL=https://dl-cdn.alpinelinux.org/alpine/v3.9/releases/x86_64/alpine-minirootfs-3.9.6-x86_64.tar.gz
|
||||
LNCR_ZIP_URL=https://github.com/yuk7/wsldl/releases/download/21062500/icons.zip
|
||||
LNCR_ZIP_EXE=Alpine.exe
|
||||
|
||||
all: $(OUT_ZIP)
|
||||
|
||||
zip: $(OUT_ZIP)
|
||||
$(OUT_ZIP): ziproot
|
||||
@echo -e '\e[1;31mBuilding $(OUT_ZIP)\e[m'
|
||||
cd ziproot; bsdtar -a -cf ../$(OUT_ZIP) *
|
||||
|
||||
ziproot: Launcher.exe rootfs.tar.gz
|
||||
@echo -e '\e[1;31mBuilding ziproot...\e[m'
|
||||
mkdir ziproot
|
||||
cp Launcher.exe ziproot/${LNCR_EXE}
|
||||
cp rootfs.tar.gz ziproot/
|
||||
|
||||
exe: Launcher.exe
|
||||
Launcher.exe: icons.zip
|
||||
@echo -e '\e[1;31mExtracting Launcher.exe...\e[m'
|
||||
bsdtar -xvf icons.zip $(LNCR_ZIP_EXE)
|
||||
mv $(LNCR_ZIP_EXE) Launcher.exe
|
||||
|
||||
icons.zip:
|
||||
@echo -e '\e[1;31mDownloading icons.zip...\e[m'
|
||||
$(DLR) $(DLR_FLAGS) $(LNCR_ZIP_URL) -o icons.zip
|
||||
|
||||
rootfs.tar.gz: rootfs
|
||||
@echo -e '\e[1;31mBuilding rootfs.tar.gz...\e[m'
|
||||
cd rootfs; sudo tar -zcpf ../rootfs.tar.gz `sudo ls`
|
||||
sudo chown `id -un` rootfs.tar.gz
|
||||
|
||||
rootfs: base.tar.gz profile
|
||||
@echo -e '\e[1;31mBuilding rootfs...\e[m'
|
||||
mkdir rootfs
|
||||
sudo tar -zxpf base.tar.gz -C rootfs
|
||||
sudo cp -f /etc/resolv.conf rootfs/etc/resolv.conf
|
||||
sudo cp -f profile rootfs/etc/profile
|
||||
sudo chroot rootfs /sbin/apk update
|
||||
sudo chroot rootfs /sbin/apk add bash
|
||||
echo "# This file was automatically generated by WSL. To stop automatic generation of this file, remove this line." | sudo tee rootfs/etc/resolv.conf
|
||||
sudo rm -rf `sudo find rootfs/var/cache/apk/ -type f`
|
||||
sudo chmod +x rootfs
|
||||
|
||||
base.tar.gz:
|
||||
@echo -e '\e[1;31mDownloading base.tar.gz...\e[m'
|
||||
$(DLR) $(DLR_FLAGS) $(BASE_URL) -o base.tar.gz
|
||||
|
||||
clean:
|
||||
@echo -e '\e[1;31mCleaning files...\e[m'
|
||||
-rm ${OUT_ZIP}
|
||||
-rm -r ziproot
|
||||
-rm Launcher.exe
|
||||
-rm icons.zip
|
||||
-rm rootfs.tar.gz
|
||||
-sudo rm -r rootfs
|
||||
-rm base.tar.gz
|
||||
11
src_x64/profile
Normal file
11
src_x64/profile
Normal file
@@ -0,0 +1,11 @@
|
||||
export CHARSET=UTF-8
|
||||
export LANG=C.UTF-8
|
||||
export PAGER=less
|
||||
export PS1='\h:\w\$ '
|
||||
umask 022
|
||||
|
||||
for script in /etc/profile.d/*.sh ; do
|
||||
if [ -r $script ] ; then
|
||||
. $script
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user