ArchLinuxARM on LX2162a

Hi

I have some question about this guide

Is this working with LX2162a and is it possible to use grub behind u-boot?

 apt install btrfs-progs
 mkfs.btrfs /dev/nvme0n1p1
 mount /dev/nvme0n1p1 /mnt
 cd /mnt
# change 20200609 with what's available here http://distfiles.gentoo.org/experimental/arm64/
 wget http://distfiles.gentoo.org/experimental/arm64/stage3-arm64-20200609.tar.bz2
 mount --rbind /dev dev
 mount --make-rslave dev
 mount -t proc /proc proc
 mount --rbind /sys sys
 mount --make-rslave sys
 mount --rbind /tmp tmp
 cp /etc/resolv.conf etc
 chroot . /bin/bash
 env-update && . /etc/profile
 emerge-webrsync
 emerge superadduser openssh vim
# Set the root password
 passwd 
# enable root login
 vim /etc/ssh/sshd_config 
# or create your user
 superadduser your_user
 ln -s /etc/init.d/net.{lo,eth0}
 rc-update add sshd default
 reboot

I tried to adapt this guide to ArchLinuxARM but it doesn’t boot with the generic image on
libera.chat they said that will be a problem with u-boot. Is there a way to adapt u-boot for ArchLinux?

This is currently not supported by NXP’s BSP. They have a newer BSP which may make this possible, but that is still a WIP from our part.

OK. Thanks for reply.

Accordding this link

https://solidrun.atlassian.net/wiki/spaces/developer/pages/199131187/ClearFog+LX2162A+Quick+Start+Guide

Should be possible to install gentoo or even this information is wrong?

If yes, why Gentoo is working with u-boot and ArchLinux not?

Those instructions should be correct. What those instructions are doing is only using Gentoo userspace from a different storage medium. The LX2162a is still booting from the eMMC using the vendor bootloader and kernel, and then switching to a Gentoo based userspace.

This is not working! Even when I do root=/dev/mmcblk0p1 in extlinux/extlinux.conf it’s booting from eMMC. Why?

I tried with gentoo on systemd and archlinux also with systemd to boot from the uSD after installing userspace of the distribution.

I would need to see the console log output to answer that question. It is most likely u-boot is overriding that in the distro boot scripts.

I’ll upload you a output of console log in the evening when I’m at home.

Is /extlinux/extlinux.conf only a copy of /boot/extlinux/extlinux.conf and I have to adjust in the /boot folder?

@jnettlet

userspace.log (51.5 KB)

root@localhost:~# cat /extlinux/extlinux.conf
  timeout 30
  default linux
  menu title linux-lx2160a boot options
  label primary
    menu label primary kernel
    linux /boot/Image.gz
    fdtdir /boot/
    APPEND console=ttyAMA0,115200 earlycon=pl011,mmio32,0x21c0000 default_hugepagesz=1024m hugepagesz=1024m hugepages=2 pci=pcie_bus_perf root=/dev/mmcblk1p1 rwrootwait

@jnettlet Here we go…

@jnettlet

Are there any news?

I am a bit confused here. What is the problem? According to the logs u-boot is trying mmc0 and failing and switching to mmc1 where it finds the extlinux.conf and is loading /boot/Image.gz and the .dtb from mmc 1:1, the kernel is booting and then initializing mmcblk1p1 as the rootfs.

If you want to change the rootfs then you need to change the root= line in the extlinux.conf on the eMMC filesystem to point to your sata/usb/nvme device.

gentoo.log (50.6 KB)

Here is my log again to try boot gentoo userspace.

/extlinux/extlinux.conf is on emmc and looks like this

  timeout 30
  default linux
  menu title linux-lx2160a boot options
  label primary
    menu label primary kernel
    linux /boot/Image.gz
    fdtdir /boot/
    APPEND console=ttyAMA0,115200 earlycon=pl011,mmio32,0x21c0000 default_hugepagesz=1024m hugepagesz=1024m hugepages=2 pci=pcie_bus_perf root=/dev/mmcblk1p1 rw rootwait

Still booting full Ubuntu with Userspace from emmc instead only the kernel and the userpace from uSD

This is a all new installation with latest solidrun builded image

root@localhost:~# uname -a
Linux localhost 5.10.35-00078-ga532d8583614 #1 SMP PREEMPT Wed Jul 31 09:30:10 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux

https://solid-run-images.sos-de-fra-1.exo.io/LX2k/lx2160a_build/20240731-2a7ab21/lx2160acex7_2000_700_3200_LX2162A_CLEARFOG_3_9_0-2a7ab21.img.xz

and still not working

Cheers

I’m more than stupid … I misspelled the root=/dev/…