NanoPi M3 image required

This forum is for topics dealing with problems with software specifically in the AArch64 repo.

NanoPi M3 image required

Postby Renich » Thu Aug 24, 2017 12:09 am

Hello,

I'd love to be able to run ArchLinux on the NanoPI M3. Can anyone help me with the image creation process?
Renich
 
Posts: 7
Joined: Fri Aug 26, 2016 10:00 pm

Re: NanoPi M3 image required

Postby Renich » Thu Aug 24, 2017 1:25 am

FYI, I am trying the following script, without success. I dunno what is to be done next.

$this->bbcode_second_pass_code('', '
#!/usr/bin/env bash

# settings
umask 022
HOME=/home/renich
cd $HOME/Downloads/linux/nanopc
device='/dev/sdd'
arch_image='/home/renich/Downloads/linux/embeded/ArchLinuxARM-aarch64-latest.tar.gz'
arch_image_url='http://archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz'
mountpoint='/mnt/arch'

# cleanup
umount ${device}*
dd if=/dev/zero of=${device} bs=1M count=8
partprobe

# bootstrap
mkdir -p $mountpoint/{boot,root}
cd $mountpoint

# partition
## delete partition table
sfdisk --delete -w auto $device
partprobe

## create partitions
sfdisk $device << EOF
, +100M, c
, +27G, 83
,+2G, 82
EOF
partprobe

## create FS
mkfs.vfat ${device}1
mkfs.ext4 ${device}2
mkswap ${device}3

mount ${device}2 root
mkdir root/boot
mount ${device}1 root/boot


# get image
if [[ ! -f $arch_image ]]; then
wget \
-c \
-O $arch_image \
$arch_image_url
fi

# install
bsdtar -xpf $arch_image -C $mountpoint/root
sync
umount -l root

# cleanup
cd
rm -fr $mountpoint
')
Renich
 
Posts: 7
Joined: Fri Aug 26, 2016 10:00 pm


Return to ARMv8

Who is online

Users browsing this forum: No registered users and 5 guests