BTRFS as root fs on Rock64

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

BTRFS as root fs on Rock64

Postby eule » Sun Feb 20, 2022 4:38 pm

Hello all,

I tried to setup ALARM on Rock64 using a BTRFS partition as root fs. Unfortunately without success.
What I did:

- mainly followed the installation instructions: https://archlinuxarm.org/platforms/armv ... hip/rock64
- converted boot.scr to boot.script suing this: $this->bbcode_second_pass_code('', 'dd if=boot.scr of=boot.script bs=72 skip=1')
- added this "rootflags=subvol=root" to the "setenv" line
- wrote the created new boot.scr by using uboot-tools on a "normal" Arch linux: $this->bbcode_second_pass_code('', 'mkimage -A arm -O linux -T script -C none -n "U-Boot boot script" -d boot.script boot.scr')
- added the label "root" to my btrfs partition (not sure if this is needed)

When I connect the serial console, I get this:

$this->bbcode_second_pass_code('', '
-Boot TPL 2020.07-1 (Aug 18 2020 - 01:45:07)
LPDDR3, 800MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
Trying to boot from BOOTROM
Returning to boot ROM...

U-Boot SPL 2020.07-1 (Aug 18 2020 - 01:45:07 +0000)
Trying to boot from MMC1
NOTICE: BL31: v2.3():
NOTICE: BL31: Built : 01:45:07, Aug 18 2020
NOTICE: BL31:Rockchip release version: v1.2


U-Boot 2020.07-1 (Aug 18 2020 - 01:45:07 +0000) Arch Linux ARM

Model: Pine64 Rock64
DRAM: 2 GiB
PMIC: RK8050 (on=0x40, off=0x00)
MMC: mmc@ff500000: 1, mmc@ff520000: 0
Loading Environment from MMC... *** Warning - bad CRC, using default environment

In: serial@ff130000
Out: serial@ff130000
Err: serial@ff130000
Model: Pine64 Rock64
Net: eth0: ethernet@ff540000
Hit any key to stop autoboot: 2  1  0
Card did not respond to voltage select!
switch to partitions #0, OK
mmc1 is current device
** Unrecognized filesystem type **
starting USB...
Bus usb@ff5c0000: USB EHCI 1.00
Bus usb@ff5d0000: USB OHCI 1.0
Bus usb@ff580000: USB DWC2
scanning bus usb@ff5c0000 for devices... 1 USB Device(s) found
scanning bus usb@ff5d0000 for devices... 1 USB Device(s) found
scanning bus usb@ff580000 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found

Device 0: unknown device
Speed: 1000, full duplex
BOOTP broadcast 1
DHCP client bound to address 192.168.178.33 (6 ms)
*** Warning: no boot file name; using 'C0A8B221.img'
Using ethernet@ff540000 device
TFTP from server 192.168.178.1; our IP address is 192.168.178.33
Filename 'C0A8B221.img'.
Load address: 0x800800
Loading: *T T T
')
eule
 
Posts: 7
Joined: Sun Feb 20, 2022 4:25 pm

Re: BTRFS as root fs on Rock64

Postby Kabbone » Sun Feb 20, 2022 7:15 pm

With this version I simply guess you can't. Last time I checked (should be the time of this version about 2 years ago) root BTRFS was just implemented and I didn't get it work with self compiling.
Easiest would be making a boot partition and only root in BTRFS the other option would be compiling your own U-Boot with BTRFS support (it's not too hard to be fair after you got a bit into it)
here is my PKGBUILD from back then, even with btrfs comments left. Versions must be adjusted ideally and you probably don't need to lower memory clocks, mine was unstable with the default clocks
Kabbone
 
Posts: 155
Joined: Thu Jul 25, 2013 9:20 am

Re: BTRFS as root fs on Rock64

Postby summers » Mon Feb 21, 2022 1:26 am

You probably need to make sure is in the initrd, and that is in a partition uboot can read. Is due to that complication that I never bothered doing this... But if I was, first make /boot a separate partition, then check the config for mkinitcpio.

I've not tried this, but in /etc/mkinitcpio.conf do
$this->bbcode_second_pass_code('', 'MODULES=(btrfs)')
summers
 
Posts: 995
Joined: Sat Sep 06, 2014 12:56 pm


Return to ARMv8

Who is online

Users browsing this forum: No registered users and 25 guests