Commit f4ada1b9 authored by Dan Johansen's avatar Dan Johansen

Added sopine and rock64 devices and synced settings with arm-tool

parent ce9adc52
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# Set globals # Set globals
TMPDIR=/var/tmp/manjaro-arm-installer TMPDIR=/var/tmp/manjaro-arm-installer
ARCH='aarch64' ARCH='aarch64'
NSPAWN='sudo systemd-nspawn --timezone=off -D' NSPAWN='sudo systemd-nspawn -q --resolv-conf=copy-host --timezone=off -D'
# clearing variables # clearing variables
DEVICE="" DEVICE=""
...@@ -114,10 +114,6 @@ create_install() { ...@@ -114,10 +114,6 @@ create_install() {
$NSPAWN $TMPDIR/root systemctl enable systemd-networkd.service getty.target haveged.service dhcpcd.service 1> /dev/null 2>&1 $NSPAWN $TMPDIR/root systemctl enable systemd-networkd.service getty.target haveged.service dhcpcd.service 1> /dev/null 2>&1
$NSPAWN $TMPDIR/root systemctl enable $SRV_EDITION 1> /dev/null 2>&1 $NSPAWN $TMPDIR/root systemctl enable $SRV_EDITION 1> /dev/null 2>&1
if [[ "$DEVICE" = "oc1" ]] || [[ "$DEVICE" = "oc2" ]]; then
$NSPAWN $TMPDIR/root systemctl enable amlogic.service 1> /dev/null 2>&1
fi
msg "Applying overlay for $EDITION..." msg "Applying overlay for $EDITION..."
sudo cp -ap $TMPDIR/arm-profiles/overlays/$EDITION/* $TMPDIR/root/ sudo cp -ap $TMPDIR/arm-profiles/overlays/$EDITION/* $TMPDIR/root/
...@@ -156,7 +152,7 @@ create_install() { ...@@ -156,7 +152,7 @@ create_install() {
echo "audio_pwm_mode=2" | sudo tee --append $TMPDIR/root/boot/config.txt echo "audio_pwm_mode=2" | sudo tee --append $TMPDIR/root/boot/config.txt
echo "/dev/mmcblk0p1 /boot vfat defaults 0 0" | sudo tee --append $TMPDIR/root/etc/fstab echo "/dev/mmcblk0p1 /boot vfat defaults 0 0" | sudo tee --append $TMPDIR/root/etc/fstab
elif [[ "$DEVICE" = "oc1" ]] || [[ "$DEVICE" = "oc2" ]]; then elif [[ "$DEVICE" = "oc1" ]] || [[ "$DEVICE" = "oc2" ]]; then
echo "No device setups for $DEVICE..." $NSPAWN $TMPDIR/root systemctl enable amlogic.service 1> /dev/null 2>&1
elif [[ "$DEVICE" = "rock64" ]] || [[ "$DEVICE" = "rockpro64" ]]; then elif [[ "$DEVICE" = "rock64" ]] || [[ "$DEVICE" = "rockpro64" ]]; then
echo "No device setups for $DEVICE..." echo "No device setups for $DEVICE..."
elif [[ "$DEVICE" = "pinebook" ]]; then elif [[ "$DEVICE" = "pinebook" ]]; then
...@@ -219,8 +215,8 @@ prepare_card () { ...@@ -219,8 +215,8 @@ prepare_card () {
sudo chmod 777 -R $TMPDIR/root sudo chmod 777 -R $TMPDIR/root
sudo mount ${SDCARD}1 $TMPDIR/root sudo mount ${SDCARD}1 $TMPDIR/root
# For pinebook device # For pine devices
elif [[ "$DEVICE" = "pinebook" ]]; then elif [[ "$DEVICE" = "pinebook" ]] || [[ "$DEVICE" = "sopine" ]]; then
#Clear first 8mb #Clear first 8mb
sudo dd if=/dev/zero of=${SDCARD} bs=1M count=8 1> /dev/null 2>&1 sudo dd if=/dev/zero of=${SDCARD} bs=1M count=8 1> /dev/null 2>&1
...@@ -237,14 +233,14 @@ prepare_card () { ...@@ -237,14 +233,14 @@ prepare_card () {
sudo mount ${SDCARD}1 $TMPDIR/root sudo mount ${SDCARD}1 $TMPDIR/root
# For rockpro64 device # For rockpro64 device
elif [[ "$DEVICE" = "rockpro64" ]]; then elif [[ "$DEVICE" = "rock64" ]] || [[ "$DEVICE" = "rockpro64" ]]; then
#Clear first 8mb #Clear first 8mb
sudo dd if=/dev/zero of=${SDCARD} bs=1M count=8 1> /dev/null 2>&1 sudo dd if=/dev/zero of=${SDCARD} bs=1M count=32 1> /dev/null 2>&1
#partition with a single root partition #partition with a single root partition
sudo parted -s $SDCARD mklabel msdos 1> /dev/null 2>&1 sudo parted -s $SDCARD mklabel msdos 1> /dev/null 2>&1
sudo parted -s $SDCARD mkpart primary ext4 0% 100% 1> /dev/null 2>&1 sudo parted -s $SDCARD mkpart primary ext4 32M 100% 1> /dev/null 2>&1
sudo partprobe $SDCARD 1> /dev/null 2>&1 sudo partprobe $SDCARD 1> /dev/null 2>&1
sudo mkfs.ext4 -O ^metadata_csum,^64bit ${SDCARD}1 1> /dev/null 2>&1 sudo mkfs.ext4 -O ^metadata_csum,^64bit ${SDCARD}1 1> /dev/null 2>&1
...@@ -281,7 +277,7 @@ cleanup () { ...@@ -281,7 +277,7 @@ cleanup () {
sudo partprobe $SDCARD 1> /dev/null 2>&1 sudo partprobe $SDCARD 1> /dev/null 2>&1
# For pinebook device # For pinebook device
elif [[ "$DEVICE" = "pinebook" ]]; then elif [[ "$DEVICE" = "pinebook" ]] || [[ "$DEVICE" = "sopine" ]]; then
#flash bootloader #flash bootloader
sudo dd if=$TMPDIR/root/boot/u-boot-sunxi-with-spl-$DEVICE.bin of=${SDCARD} bs=8k seek=1 1> /dev/null 2>&1 sudo dd if=$TMPDIR/root/boot/u-boot-sunxi-with-spl-$DEVICE.bin of=${SDCARD} bs=8k seek=1 1> /dev/null 2>&1
...@@ -292,7 +288,7 @@ cleanup () { ...@@ -292,7 +288,7 @@ cleanup () {
# For rockpro64 device # For rockpro64 device
elif [[ "$DEVICE" = "rockpro64" ]]; then elif [[ "$DEVICE" = "rock64" ]] || [[ "$DEVICE" = "rockpro64" ]]; then
#flash bootloader #flash bootloader
sudo dd if=$TMPDIR/root/boot/idbloader.img of=${SDCARD} seek=64 conv=notrunc 1> /dev/null 2>&1 sudo dd if=$TMPDIR/root/boot/idbloader.img of=${SDCARD} seek=64 conv=notrunc 1> /dev/null 2>&1
sudo dd if=$TMPDIR/root/boot/uboot.img of=${SDCARD} seek=16384 conv=notrunc 1> /dev/null 2>&1 sudo dd if=$TMPDIR/root/boot/uboot.img of=${SDCARD} seek=16384 conv=notrunc 1> /dev/null 2>&1
...@@ -313,6 +309,8 @@ DEVICE=$(dialog --clear --title "Manjaro ARM Installer" \ ...@@ -313,6 +309,8 @@ DEVICE=$(dialog --clear --title "Manjaro ARM Installer" \
"rpi3" "Raspberry Pi 3" \ "rpi3" "Raspberry Pi 3" \
"oc2" "Odroid C2" \ "oc2" "Odroid C2" \
"pinebook" "Pinebook" \ "pinebook" "Pinebook" \
"sopine" "Sopine/Pine64-LTS" \
"rock64" "Rock64" \
"rpi2" "Raspberry Pi 2 (unmaintained)" \ "rpi2" "Raspberry Pi 2 (unmaintained)" \
"oc1" "Odroid C1/C1+ (unmaintained)" \ "oc1" "Odroid C1/C1+ (unmaintained)" \
"xu4" "Odroid XU4 (unmaintained)" 3>&1 1>&2 2>&3 3>&-) "xu4" "Odroid XU4 (unmaintained)" 3>&1 1>&2 2>&3 3>&-)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment