ODROID-M1

This is for ARMv8 based devices

Re: ODROID-M1

Postby rmsc » Mon Oct 24, 2022 4:08 pm

There were a few important modules missing from the config, but with the latest PR it should work.

Would you care to test it again? Thanks!
rmsc
 
Posts: 6
Joined: Tue Oct 18, 2022 10:50 pm

Re: ODROID-M1

Postby Refutationalist » Wed Oct 26, 2022 10:39 pm

I've recompiled the kernel, and I now have HDMI output. It does appear to turn on fairly late in the boot process, so I'm missing bootup and only seeing a login screen. Thank you!
Refutationalist
 
Posts: 4
Joined: Tue May 16, 2017 1:05 am

Re: ODROID-M1

Postby kreise » Mon Nov 21, 2022 10:44 am

Thanks rsmc for taking the time to add the dtb

I can easily install Arch on x86_64 but usually fail to do so for arm. f.e. i cannot compile the kernel due to missing vboot-utils in arch which won't compile from any AUR or manually.

Can you do a release of the kernel until your dtbs get added to mainline?

If i manage to get arch on that lovely little thing ill give a try on updating the official wiki as i think arch is the best choice in terms of customization.

Thanks again
kreise
 
Posts: 2
Joined: Mon Nov 21, 2022 10:41 am

Re: ODROID-M1

Postby glenno » Wed Dec 21, 2022 11:07 pm

Ive been trying to trace back through to where the wait is before Arch as a Odroid-M1 can be an official build.

Are we waiting on the rockchip git.kernel.org patches for 6.1-rc to make it into the stable kernel. And then the main aarch64 move from 6.0-rc to 6.1?

I thought I read that u-boot doesnt support NVME, so the final solution looks like boot from SD card then mount system on nvme etc.

Anyway, the rest of my house is running on Arch, and ive got an M1 running Debian im keen to move to Arch also!
glenno
 
Posts: 17
Joined: Tue Jan 11, 2011 11:33 am

Re: ODROID-M1

Postby lukaso » Mon Jan 09, 2023 1:47 am

Hello and thanks to rmsc for maintaining the kernel.

I compiled 6.1.rc1-2 (commit 3b0cf33)
and everything was working except for my SATA drive.
I.e. the system booted directly from NVMe drive using petitboot;
ethernet, HDMI, USBs, microSD, GPIO working.

The SATA drive (3.5" HDD with external power adaptor)
was not recognized at all though SATA controller seemed to be present in sysfs.
I solved the issue by adding the following line to kernel config file:

$this->bbcode_second_pass_code('', '
CONFIG_AHCI_DWC=m')

(I also changed several things from y to m, but assume it's not important.)
lukaso
 
Posts: 1
Joined: Sun Jan 08, 2023 11:55 pm

Re: ODROID-M1

Postby wrength » Mon Jan 16, 2023 8:50 pm

Hi, I'm new to ARM SBCs and M1 is my first board. I also built rmsc's kernel, and did the config change lukaso mentioned too and got the kernel working on a fresh install. So thanks, it's nice having a running system already, before official support!

I have a minor contribution to make myself, that I didn't see mentioned in the thread yet. I don't know if this is common knowledge, but Petitboot supports several foreign configuration formats, and instead of using the U-Boot support, I'm using a GRUB config file myself - I found the format nicer because it's just a plain text file, and it seemed more straightforward overall to someone who hasn't used U-Boot before. So anyway, here's the grub.cfg I have put into the boot partition, as an example:
$this->bbcode_second_pass_code('', 'menuentry "Arch Linux ARM" {
devicetree /dtbs/rockchip/rk3568-odroid-m1.dtb
initrd /initramfs-linux.img
linux /Image.gz root=/dev/nvme0n1p2 console=ttyS2,1500000
}')All the filenames refer to existing files on the same partition. GRUB itself doesn't need to be installed anywhere, as Petitboot only reads the config file. I bootstrapped the ALARM install to an NVMe drive from a netinstalled Debian (on an SSD), and cargoculted that console parameter from over the Debian side, because it seemed to prevent the system messages from spamming the HDMI screen view (and redirected them to the UART console instead).

The GRUB config parser also supports other filenames and paths, at least in the official repo version. Petitboot also has a native configuration file format, but I couldn't get petitboot.conf to work. Might have been some stupid mistake, though, or this is another place where M1's Petitboot differs from the official version - the boot.scr support seems to be an ODROID-specific thing too.
wrength
 
Posts: 2
Joined: Mon Jan 16, 2023 4:00 pm

Re: ODROID-M1

Postby yossarian » Sat Jan 28, 2023 2:13 am

I wanted to chime in that I just compiled mainline Linux 6.2-rc5 with no patches whatsoever and it boots fine on the ODROID-M1. Everything I've tried so far works. Thanks all for the suggestions in this thread.
yossarian
 
Posts: 22
Joined: Thu Dec 08, 2011 5:55 pm

Installation Instructions

Postby kreise » Tue Jan 31, 2023 6:29 am

Hey @all

i have Arch Linux ARM running now with 6.2 rc5.

- Install any recent ubuntu image on m1 or use legendary https://jamesachambers.com/legendary-od ... tu-images/
- boot it!
- i created arch partitions on an sd-card, you can use any device. 256MB ext2 for /boot, rest ext4 for /
- mount both partitions and extract the latest aarch64 tarball on root (tutorial here: https://archlinuxarm.org/platforms/armv8/generic)
- mount the /proc /sys /dev and /run into f.e. /mnt/archroot:
$this->bbcode_second_pass_code('', '
mount -t proc /proc /mnt/archroot/proc/
mount -t sysfs /proc /mnt/archroot/sys/
mount -o bind /dev /mnt/archroot/dev/
mount -o bind /run /mnt/archroot/run/
')

you need the /run directory mounted for internet to work after chroot

chroot into /mnt/archroot
update the system with pacman -Syu
get partition ids from blkid and update /etc/fstab with /boot and / or use device names like i did:
$this->bbcode_second_pass_code('', '
/dev/mmcblk1p2 / ext4 rw,noatime 0 1
/dev/mmcblk1p1 /boot ext2 rw,noatime 0 1
')

install the 6.2 rc5 kernel. You can makepkg the kernel by yourself, instructions here: viewtopic.php?f=23&t=6565#p36628 (core/linux-aarch64-rc instead of raspberrypi)
You can edit /etc/makepkg.conf and enable MAKEFLAGS=-j4 to speed up compiling (will still take an hour or two, but works)

My build still failed because of this: https://github.com/archlinuxarm/PKGBUILDs/pull/1970
You can patch the package from there or simply get the compiled rc6-kernel package in the last comment. Download it into your chroot and install with
$this->bbcode_second_pass_code('', 'pacman -U linux-aarch64-rc-6.2.rc6-1-aarch64.pkg.tar.zst')

copy everything from /mnt/archroot/boot into the mounted boot-partition and insert the grub.cfg file like this:

$this->bbcode_second_pass_code('', '
menuentry "Arch Linux ARM" {
devicetree /dtbs/rockchip/rk3568-odroid-m1.dtb
initrd /initramfs-linux.img
linux /Image.gz root=/dev/mmcblk1p1 console=ttyS2,1500000
}
')

Nothing more is needed to boot, no grub-install or similiar. Clean the boot folder in the root partition

exit chroot, sync and unmount all and thats it!

Happy arching!
kreise
 
Posts: 2
Joined: Mon Nov 21, 2022 10:41 am

Re: ODROID-M1

Postby CounterPillow » Sat Feb 25, 2023 7:19 pm

leming didn't turn on certain kernel options required for the ODROID M1 in the 6.2.0 kernel he pushed, and blocked me from the github org so I can't send in a PR for it (not that he'd ever merge it), so I decided to make my own kernel package.

The options I changed are:
  • CONFIG_AHCI_DWC=y for SATA support
  • CONFIG_CHARGER_RK817=m just because there is a RK817 on this board
  • CONFIG_PHY_ROCKCHIP_NANENG_COMBO_PHY=y instead of m to be able to load modules from SATA without including naneng in the initramfs
  • CONFIG_PHY_ROCKCHIP_SNPS_PCIE3=y for the M.2 PCIe3 slot
I haven't set up a repo because I don't feel like keeping this updated, as I'll switch my ODROID M1 away from ALARM as soon as is convenient. Here, have a one-off kernel package you can install to replace the stock kernel. Updates are on yourself, switch back to linux-aarch64 if leming ever turns on the required config options. For a first time setup, arch-chroot into your mounted ODROID M1's ALARM rootfs (with qemu-user-static and binfmt set up if doing this from an x86_64 machine) and pacman -U the package.

kernel: https://overviewer.org/~pillow/up/21707 ... kg.tar.zst
headers: https://overviewer.org/~pillow/up/5131d ... kg.tar.zst
CounterPillow
 
Posts: 23
Joined: Mon May 24, 2021 2:59 pm

Re: ODROID-M1

Postby CounterPillow » Sun Feb 26, 2023 12:57 am

leming turned on the PCIe3 PHY in his push of 6.2.1, so you no longer need this updated kernel package unless you want to boot from or use SATA, but here it is anyway:

kernel: https://overviewer.org/~pillow/up/1da84 ... kg.tar.zst
headers: https://overviewer.org/~pillow/up/b0d42 ... kg.tar.zst
CounterPillow
 
Posts: 23
Joined: Mon May 24, 2021 2:59 pm

PreviousNext

Return to ARMv8 Devices

Who is online

Users browsing this forum: No registered users and 6 guests