Skip to content
Permalink
Browse files

Support for RockPro64

  • Loading branch information...
NEMS Linux
NEMS Linux committed Mar 30, 2019
1 parent 8186b9d commit 1a411290cee662d7e944348d1a6cd7dc14600c5e
Showing with 59 additions and 2 deletions.
  1. +24 −0 build/013-rc.local
  2. +33 −0 build/160-pine_rockpro64
  3. +2 −2 nems-cleanup.sh
@@ -0,0 +1,24 @@
#!/bin/bash
echo $0 > /var/www/html/userfiles/nems-build.cur

# enable rc.local service
if [[ ! -e /etc/systemd/system/rc-local.service ]]; then
echo "[Unit]
Description=/etc/rc.local Compatibility
ConditionPathExists=/etc/rc.local
[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
SysVStartPriority=99
[Install]
WantedBy=multi-user.target" > /etc/systemd/system/rc-local.service
fi

chmod +x /etc/rc.local

systemctl enable rc-local
@@ -0,0 +1,33 @@
#!/bin/bash
echo $0 > /var/www/html/userfiles/nems-build.cur

platform=$(/usr/local/share/nems/nems-scripts/info.sh platform)

if (( $platform >= 48 )) && (( $platform <= 49 )); then

# Install the latest kernel and patches from Ayufan
apt -y install linux-rockpro64

# Get the needed commands for resize_rootfs.sh from the gdisk package command
apt -y install gdisk

# first-boot service
# Eventually move this to rc.local since I've enabled it on NEMS
if [[ ! -d /usr/local/sbin/ ]]; then
mkdir /usr/local/sbin
fi

if [[ ! -e /etc/systemd/system/first-boot.service ]]; then
cp -f -p /root/nems/nems-migrator/data/1.4/platforms/pine64/rock64/first-boot.service /etc/systemd/system/
fi

if [[ ! -e /usr/local/sbin/rock64_first_boot.sh ]]; then
cp -f -p /root/nems/nems-migrator/data/1.4/platforms/pine64/rock64/rock64_first_boot.sh /usr/local/sbin/
fi

if [[ ! -e /usr/local/sbin/resize_rootfs.sh ]]; then
cp -f -p /root/nems/nems-migrator/data/1.4/platforms/pine64/rock64/resize_rootfs.sh /usr/local/sbin/
fi

fi

@@ -235,8 +235,8 @@ nameserver 2001:4860:4860::8844
rm -rf /root/scripts
fi

if (( $platform >= 45 )) && (( $platform <= 47 )); then
# ROCK64
if (( $platform >= 45 )) && (( $platform <= 49 )); then
# ROCK64 and ROCKPRO64
rm -rf /var/lib/rock64 # Ayufan's build places a file in that folder which stops it from resizing on boot
fi

0 comments on commit 1a41129

Please sign in to comment.
You can’t perform that action at this time.