Difference between revisions of "PinePhone Pro/Create a multi-distribution image using rk2aw"
Jump to navigation
Jump to search
(→Flash aw2rk BootLoader to SPI & Multidistro SDcard: No br tags in the wiki, typo) |
|||
Line 26: | Line 26: | ||
#* └─sdb disk | #* └─sdb disk | ||
# <code>sudo dd if=/dev/zero of=/dev/sdb bs=1M status=progress</code> ''# erase sd card'' | # <code>sudo dd if=/dev/zero of=/dev/sdb bs=1M status=progress</code> ''# erase sd card'' | ||
# '' | # ''Partition sd card'' | ||
sudo sfdisk /dev/sdb <<EOF | sudo sfdisk /dev/sdb <<EOF | ||
label: gpt | label: gpt | ||
Line 36: | Line 36: | ||
size=+, name="ALarm", attrs="RequiredPartition,LegacyBIOSBootable" | size=+, name="ALarm", attrs="RequiredPartition,LegacyBIOSBootable" | ||
EOF | EOF | ||
# lsblk ''# list partitions on sd and mounted distro images'' | # <code>lsblk</code> ''# list partitions on sd and mounted distro images'' | ||
##* Device Start End Sectors Size Type | ##* Device Start End Sectors Size Type | ||
##* /dev/sdb1 64 32767 32704 16M unknown | ##* /dev/sdb1 64 32767 32704 16M unknown | ||
Line 43: | Line 43: | ||
##* /dev/sdb4 37781504 60524543 22743040 10.8G Linux filesystem | ##* /dev/sdb4 37781504 60524543 22743040 10.8G Linux filesystem | ||
# ''Copy files for ManJaro'' | # ''Copy files for ManJaro'' | ||
## sudo dd if=/dev/loop0p2 of=/dev/sdb2 bs=1M status=progress conv=fsync # copy rootfs to sd part2 | ## <code>sudo dd if=/dev/loop0p2 of=/dev/sdb2 bs=1M status=progress conv=fsync</code> # copy rootfs to sd part2 | ||
## sudo scp -r /media/xxx/BOOT_MNJRO/* /media/gio/ROOT_MNJRO/boot # copy bootfs to to part2/boot | ## <code>sudo scp -r /media/xxx/BOOT_MNJRO/* /media/gio/ROOT_MNJRO/boot</code> # copy bootfs to to part2/boot | ||
## sudo nano /media/xxx/ROOT_MNJRO/etc/fstab # edit address to UUID=a871300c-a20c-4601-80f5-c91585bf79ed | ## <code>sudo nano /media/xxx/ROOT_MNJRO/etc/fstab</code> # edit address to UUID=a871300c-a20c-4601-80f5-c91585bf79ed | ||
## mv /media/xxx/ROOT_MNJRO/boot/boot.scr /media/xxx/ROOT_MNJRO/boot/boot.scrORIG # hide auto-menu item | ## <code>mv /media/xxx/ROOT_MNJRO/boot/boot.scr /media/xxx/ROOT_MNJRO/boot/boot.scrORIG</code> # hide auto-menu item | ||
## sudo mkdir /media/xxx/ROOT_MNJRO/boot/extlinux # add directory | ## <code>sudo mkdir /media/xxx/ROOT_MNJRO/boot/extlinux</code> # add directory | ||
## sudo nano /media/xxx/ROOT_MNJRO/boot/extlinux/extlinux.conf #add file | ## /code>sudo nano /media/xxx/ROOT_MNJRO/boot/extlinux/extlinux.conf</code> #add file | ||
/boot/extlinux/extlinux.conf | /boot/extlinux/extlinux.conf | ||
MENU TITLE Pinephone Pro Boot Menu | MENU TITLE Pinephone Pro Boot Menu |
Revision as of 20:10, 5 August 2023
Flash aw2rk BootLoader to SPI & Multidistro SDcard
References: https://xff.cz/kernels/rk2aw/rk2aw-rk3399-pinephone-pro/INSTALL and https://xnux.eu/rk2aw/
Requirements: SSH connection from linux machine to PinePhonePro, internet connection
Download and Run Aw2rk SPI Flasher
ssh <user>@<phoneip>
# set a connectioncd ~/Downloads
# enter to directorycurl -O https://xff.cz/kernels/bootloaders/ppp.tar.gz
# download installertar -xvzf ppp.tar.gz -C ~/Downloads
# extract- ##
scp -r ~/Downloads/ppp <user>@<phoneip>:~/Downloads
# copy to phone sudo ./spinor-flash-initial-setup.sh
# flash SPI
Flash MultiDistro SD Card
- Get distro compressend images and decompress them
- Mount distro images /boot, /root for each
lsblk
# find /loop, /sd references- ├─loop0p1 /media/xxx/BOOT_MNJRO
- └─loop0p2 /media/xxx/ROOT_MNJRO
- ├─loop1p1
- └─loop1p2 /media/xxx/rootfs
- ├─loop2p1
- └─loop2p2 /media/xxx/3d99072c-9fd6-4316-8526-9192e192c441
- └─sdb disk
sudo dd if=/dev/zero of=/dev/sdb bs=1M status=progress
# erase sd card- Partition sd card
sudo sfdisk /dev/sdb <<EOF label: gpt first-lba: 64 table-length: 8 start=64, size=32704, type=D7B1F817-AA75-2F4F-830D-84818A145370, name="loader", attrs=RequiredPartition size=9G, name="ManJaro", attrs="RequiredPartition,LegacyBIOSBootable" size=9G, name="MObian", attrs="RequiredPartition,LegacyBIOSBootable" size=+, name="ALarm", attrs="RequiredPartition,LegacyBIOSBootable" EOF
lsblk
# list partitions on sd and mounted distro images- Device Start End Sectors Size Type
- /dev/sdb1 64 32767 32704 16M unknown
- /dev/sdb2 32768 18907135 18874368 9G Linux filesystem
- /dev/sdb3 18907136 37781503 18874368 9G Linux filesystem
- /dev/sdb4 37781504 60524543 22743040 10.8G Linux filesystem
- Copy files for ManJaro
sudo dd if=/dev/loop0p2 of=/dev/sdb2 bs=1M status=progress conv=fsync
# copy rootfs to sd part2sudo scp -r /media/xxx/BOOT_MNJRO/* /media/gio/ROOT_MNJRO/boot
# copy bootfs to to part2/bootsudo nano /media/xxx/ROOT_MNJRO/etc/fstab
# edit address to UUID=a871300c-a20c-4601-80f5-c91585bf79edmv /media/xxx/ROOT_MNJRO/boot/boot.scr /media/xxx/ROOT_MNJRO/boot/boot.scrORIG
# hide auto-menu itemsudo mkdir /media/xxx/ROOT_MNJRO/boot/extlinux
# add directory- /code>sudo nano /media/xxx/ROOT_MNJRO/boot/extlinux/extlinux.conf #add file
/boot/extlinux/extlinux.conf MENU TITLE Pinephone Pro Boot Menu LABEL l0 MENU LABEL ManJaro FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb KERNEL /boot/Image INITRD /boot/initramfs-linux.img APPEND root=UUID=a871300c-a20c-4601-80f5-c91585bf79ed console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait fbcon=rotate:0 pinephone_keyboard.disable_input
- Copy files for MObian
- sudo dd if=/dev/loop1p2 of=/dev/sdb3 bs=1M status=progress conv=fsync # copy rootfs to sd part3
- sudo scp -r /media/xx/boot/* /media/xx/rootfs/boot # copy bootfs to to part3/boot
- sudo nano /media/xxx/rootfs/etc/fstab # edit address to UID=57d51edc-c461-4157-8d10-242b4082fc75
- sudo nano /media/xxx/rootfs/boot/extlinux/extlinux.conf # edit path from /bootfs to /part3/boot
>linux /boot/vmlinuz-6.1-rockchip >initrd /boot/initrd.img-6.1-rockchip >fdtdir /boot/dtb-6.1-rockchip/
- copy files for Arch Linux ARM
- sudo dd if=/dev/loop2p2 of=/dev/sdb4 bs=1M status=progress conv=fsync # copy rootfs to sd part4
- sudo scp -r /media/xxx/52CA-6165/* /media/xxx/3d99072c-9fd6-4316-8526-9192e192c441/boot # copy bootfs to to part4/boot
- sudo mkdir /media/xxx/3d99072c-9fd6-4316-8526-9192e192c441/boot/extlinux # add directory
- sudo nano /media/gio/rootfs/etc/fstab # edit address to UUID=3d99072c-9fd6-4316-8526-9192e192c441
- sudo nano /media/xxx/3d99072c-9fd6-4316-8526-9192e192c441/boot/extlinux/extlinux.conf # add file
/boot/extlinux/extlinux.conf begin MENU TITLE Pinephone Pro Boot Menu LABEL l0 MENU LABEL ALarm FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb KERNEL /boot/Image INITRD /boot/initramfs-linux.img APPEND root=UUID=3d99072c-9fd6-4316-8526-9192e192c441 console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait fbcon=rotate:0 pinephone_keyboard.disable_input /boot/extlinux/extlinux.conf end