mirror of
https://github.com/kou029w/yama.git
synced 2025-01-18 16:08:11 +00:00
install deps in setup-yama
This commit is contained in:
parent
8c5bf0bf54
commit
807b168367
6 changed files with 8 additions and 21 deletions
|
@ -29,7 +29,7 @@ bin/build
|
|||
- Docker
|
||||
- Docker Compose
|
||||
- qemu-user-static
|
||||
- awk, curl, fallocate, gzip, losetup, mkfs.ext4, mkfs.fat, parted, python3, tar, xargs
|
||||
- curl, fallocate, gzip, losetup, mkfs.ext4, mkfs.fat, parted, python3, tar, xargs
|
||||
|
||||
## ライセンス
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@ bin/download "${version}" dist
|
|||
docker compose run --rm minirootfs sh -c 'apk update && apk add'
|
||||
cp -a src/bootfs/* cache -t dist
|
||||
bin/overlay-gen dist/overlay.img
|
||||
docker compose run --rm builder
|
||||
tar czf dist/localhost.apkovl.tar.gz --owner=0 --group=0 -C src/rootfs .
|
||||
tar czf yama-armhf.tar.gz --owner=0 --group=0 -C dist .
|
||||
bin/img-gen yama-armhf.img
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#!/bin/sh
|
||||
# デバイスイメージファイルの生成
|
||||
# Usage: bin/img-gen yama-armhf.img
|
||||
# Required: gzip awk fallocate parted xargs losetup mkfs.fat tar
|
||||
# Required: gzip fallocate parted xargs losetup mkfs.fat tar
|
||||
cd -- "$(dirname -- "$0")/.."
|
||||
set -eux
|
||||
size="$(gzip -l yama-armhf.tar.gz | awk 'END{printf"%.f",$2*1.02}')"
|
||||
size=768m
|
||||
image="$1"
|
||||
fallocate -l "${size}" "${image}"
|
||||
xargs -l parted -s "${image}" <<EOF
|
||||
|
|
15
compose.yml
15
compose.yml
|
@ -5,18 +5,3 @@ services:
|
|||
- ./cache:/etc/apk/cache
|
||||
- ./src/rootfs/etc/apk/repositories:/etc/apk/repositories
|
||||
- ./src/rootfs/etc/apk/world:/etc/apk/world
|
||||
builder:
|
||||
image: ghcr.io/kou029w/yama/minirootfs
|
||||
volumes:
|
||||
- ./cache:/etc/apk/cache
|
||||
- ./src/rootfs/etc/apk/repositories:/etc/apk/repositories
|
||||
- ./src/rootfs/etc/apk/world:/etc/apk/world
|
||||
- ./fstab:/etc/fstab
|
||||
- ./dist/overlay.img:/overlay.img
|
||||
privileged: true
|
||||
command: |
|
||||
sh -c '
|
||||
mkdir -p /mnt/overlay
|
||||
mount -a \
|
||||
&& apk add g++ linux-headers make nodejs npm python3
|
||||
'
|
||||
|
|
2
fstab
2
fstab
|
@ -1,2 +0,0 @@
|
|||
/overlay.img /mnt/overlay ext4 rw,relatime,errors=remount-ro 0 0
|
||||
overlay /usr overlay lowerdir=/usr,upperdir=/mnt/overlay/upper/usr,workdir=/mnt/overlay/work/usr 0 0
|
|
@ -7,6 +7,10 @@ ssid=""
|
|||
passphrase=""
|
||||
authorized_key=""
|
||||
|
||||
install_packages() {
|
||||
# apk add g++ linux-headers make nodejs npm python3
|
||||
}
|
||||
|
||||
if [ -n "$ssid" ]; then
|
||||
wpa_passphrase "$ssid" "$passphrase" > /etc/wpa_supplicant/wpa_supplicant.conf
|
||||
service wpa_supplicant restart
|
||||
|
@ -23,5 +27,6 @@ fi
|
|||
|
||||
lbu include /root
|
||||
lbu commit -d mmcblk0p1
|
||||
install_packages
|
||||
rm -f -- "$0"
|
||||
echo ok
|
||||
|
|
Loading…
Add table
Reference in a new issue