bless
This commit is contained in:
parent
c6732e14e9
commit
fd7081778b
29
Makefile
29
Makefile
@ -40,31 +40,40 @@ PLATFORM := arm64
|
|||||||
QEMU_VM := qemu-system-aarch64
|
QEMU_VM := qemu-system-aarch64
|
||||||
QEMU_IMG := qemu-img
|
QEMU_IMG := qemu-img
|
||||||
|
|
||||||
|
SSH_AUTH_KEYS := $(ALPINE)/authorized_keys
|
||||||
|
|
||||||
all: $(TARGET)
|
all: $(TARGET)
|
||||||
|
|
||||||
$(TARGET): $(TOOLCHAIN) $(SRC) $(BUILD_DIR) $(LIB)
|
$(TARGET): $(TOOLCHAIN) $(SRC) $(BUILD_DIR) $(LIB)
|
||||||
echo $(HOME)
|
echo $(HOME)
|
||||||
$(CC) $(CFLAGS) -o $(TARGET) $(SRC) $(LIB)
|
$(CC) $(CFLAGS) -o $(TARGET) $(SRC) $(LIB)
|
||||||
|
|
||||||
get: $(ASSETS) $(ALPINE) $(ALPINE_TAR) $(ALPINE_HEADLESS)
|
get: $(ASSETS) $(ALPINE_TAR) $(ALPINE_HEADLESS)
|
||||||
rm -rf $(ALPINE)/*
|
rm -rf $(ALPINE)/*
|
||||||
tar xvf $(ALPINE_TAR) -C $(ALPINE)
|
tar xvf $(ALPINE_TAR) -C $(ALPINE)
|
||||||
|
cp $(ALPINE_HEADLESS) $(ALPINE)
|
||||||
|
|
||||||
qemu: $(ALPINE_CUSTOM_IMG) img
|
qemu: $(ALPINE_CUSTOM_IMG) img
|
||||||
$(QEMU_VM) -M virt -cpu cortex-a72 -smp 2 -m 1G \
|
$(QEMU_VM) -machine raspi3ap -cpu cortex-a53 -smp 4 -m 512M \
|
||||||
-kernel $(ALPINE_KERNEL) \
|
-drive format=raw,file=$(ALPINE_CUSTOM_IMG) \
|
||||||
-initrd $(ALPINE_INITFRAM_FS) \
|
-nographic
|
||||||
-append "console=ttyAMA0 root=/dev/vda rw" \
|
#$(QEMU_VM) -M virt -cpu cortex-a72 -smp 2 -m 1G \
|
||||||
-drive format=raw,file=fat:rw:$(ALPINE)/ \
|
# -kernel $(ALPINE_KERNEL) \
|
||||||
-nographic \
|
# -initrd $(ALPINE_INITFRAM_FS) \
|
||||||
-virtfs local,path=$(BUILD_DIR),mount_tag=$(BUILD_DIR),security_model=none
|
# -append "console=ttyAMA0 root=/dev/vda rw" \
|
||||||
|
# -drive format=raw,file=fat:rw:$(ALPINE)/ \
|
||||||
|
# -nographic \
|
||||||
|
# -virtfs local,path=$(BUILD_DIR),mount_tag=$(BUILD_DIR),security_model=none
|
||||||
|
|
||||||
img: $(ALPINE) get
|
img: get $(ALPINE) $(BUILD_DIR)
|
||||||
$(QEMU_IMG) create -f raw $(ALPINE_CUSTOM_IMG) 512M
|
$(QEMU_IMG) create -f raw $(ALPINE_CUSTOM_IMG) 512M
|
||||||
mformat -i $(ALPINE_CUSTOM_IMG) -F ::
|
mformat -i $(ALPINE_CUSTOM_IMG) -F ::
|
||||||
mcopy -i $(ALPINE_CUSTOM_IMG) -s $(ALPINE)/* ::
|
mcopy -i $(ALPINE_CUSTOM_IMG) -s $(ALPINE)/* ::
|
||||||
|
|
||||||
bootable: $(ALPINE) get
|
$(SSH_AUTH_KEYS):
|
||||||
|
cp ~/.ssh/authorized_keys $(ALPINE)
|
||||||
|
|
||||||
|
bootable: $(ALPINE) $(WPA_CONFIG) get
|
||||||
tar czf $(MINIROOTFS) -C $(ALPINE) ./
|
tar czf $(MINIROOTFS) -C $(ALPINE) ./
|
||||||
|
|
||||||
$(ALPINE_HEADLESS):
|
$(ALPINE_HEADLESS):
|
||||||
|
|||||||
10
static/config.txt
Normal file
10
static/config.txt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# do not modify this file as it will be overwritten on upgrade.
|
||||||
|
# create and/or modify usercfg.txt instead.
|
||||||
|
# https://www.raspberrypi.com/documentation/computers/config_txt.html
|
||||||
|
|
||||||
|
kernel=boot/vmlinuz-rpi
|
||||||
|
initramfs boot/initramfs-rpi
|
||||||
|
arm_64bit=1
|
||||||
|
dtoverlay=dwc2
|
||||||
|
include usercfg.txt
|
||||||
|
|
||||||
13
static/unattended.sh
Normal file
13
static/unattended.sh
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo "dwc2" >> /etc/modules
|
||||||
|
echo "g_ether" >> /etc/modules
|
||||||
|
modprobe dwc2
|
||||||
|
modprobe g_ether
|
||||||
|
|
||||||
|
cat >> /etc/network/interfaces << EOF
|
||||||
|
auto usb0
|
||||||
|
iface usb0 inet static
|
||||||
|
address 192.168.7.2
|
||||||
|
netmask 255.255.255.0
|
||||||
|
EOF
|
||||||
Loading…
x
Reference in New Issue
Block a user