Topic: Arch Linux on Novena

I will, eventually, try to install Arch on the Novena.
Arch can presently run on Raspberry Pi so why not Novena?

I did not look at the boot process of the Novena, yet. nor the compilation of Arch on ARM.

Any suggestions will be appreciated.

Re: Arch Linux on Novena

I don't think there's anything too special about the boot process. I mean, uboot handles the really low-level stuff, then hands off control to the Linux system. It really shouldn't care what distro that is.

Anyway, you probably want to look here:

http://archlinuxarm.org/

The Wandboard uses the same chip as the Novena. It wouldn't surprise me if the rootfs for the Wandboard would at least boot on a Novena:

http://archlinuxarm.org/platforms/armv7 … /wandboard


You probably want to put the Novena kernel on there, though. My recollection is that the kernel is largely stock, so it might work OK-ish without it, but that's one source of problems that should be pretty easy to eliminate.

I'm not sure about the video output- I don't know enough about the Wandboard to know if it uses the LVDS interface on the chip, plus I believe you need to set up the timings for the specific LCD you have. HDMI would probably be OK.


In short, I think you should be able to dump a Wandboard rootfs on SSD/microSD, set up the Novena to boot from the appropriate medium, and go from there. Probably having an HDMI display and/or serial terminal handy. Embedded systems are always fun in these regards.

3 (edited by honos 2015-03-28 07:56:44)

Re: Arch Linux on Novena

Thank you dbtayl.

I had a look at ArchLinux ARM but did not know witch board uses the same CPU as the Novena.
And I did not think about the LVDS. Your suggestion might be very useful.
I'll try that and post my progress.

Re: Arch Linux on Novena

I have made a partition sda1 in my ssd.
I installed the ArchLinuxarm wandboard in it.

Question:
To change the boot sequence from the mmc to the sda I can use the eeprom-gui, but if I cannot boot onto my ssd how will I be able to revert back to the mmc?

Thx

Re: Arch Linux on Novena

If you hold down the user button on the Novena mainboard during bootup it will force it to boot the recovery images and root fs on the micro SD card.

6 (edited by honos 2015-03-28 22:42:24)

Re: Arch Linux on Novena

Here is what I did:
After changing the boot order with the EEPROM-GUI to sata, I tried to boot.
The Novena boots and detects my usb devices and then wait a second or two and stop after
random: nonblocking pool is initialized.

It does that even when I hold down the user button.

thx

PS: the first error I can see on the screen is:
USB 1-1.3: string descriptor 0 read error: -22

and then:
USB 1-1.3: Direct firmware load for ar3k/AthrBT ... (Bluetooth probably not related to my problem)

Finally:
ath3k: probe of 1-1.3:1.0 failed with error -2

Re: Arch Linux on Novena

The kernel uses the disk ID to identify disks.  It uses the third partition as the rootfs.

Use fdisk on /dev/sda, hit "x", "i", and make the partition ID "0x4e6f7653" (ascii 'NovS').  "r" to return to the main menu, "w" to write it out, and you should be able to use the SATA disk as your root filesystem.

As was pointed out, hold the User button to go back to the internal MMC.

8 (edited by honos 2015-03-29 04:09:44)

Re: Arch Linux on Novena

Thank you xobs, I'll try to change the ID of the partition.

Meanwhile, the user button has no effect while booting.
Maybe my MMC also lost its ID because with or without holding the user button the result remains the same, it starts to boot and stops after detecting the usb devices. I can see it is still running and active because if I plug or unplug my mouse it shows the result on the screen. But I still can't access the shell.

***** EDIT *****
I tried again.
The user button did work this time.
Thx

Re: Arch Linux on Novena

Yes, what you're seeing is it waiting for the root filesystem.  If you plug in a USB drive with that same volume ID, it will use it as the root filesystem.  But it's hanging at that screen watching for a valid boot partition.

You need to hold down the User button while it boots.  It takes about ten seconds total, to the point where the kernel is running.

10 (edited by honos 2015-04-01 20:23:42)

Re: Arch Linux on Novena

I got Arch Linux running on Novena!

Actually it is more like  walking than running but it'll run.

I actually use the sata-install.sh to install debian on my ssd.
It created all the partitions (3) for me. With the right name.
I formated sda3 in ext4
Then untar the ArchLinux for the wandboard as suggested by dbtayl in the sda3 partition.

Change the boot from mmc to sata and voila!
I had to configure a fix IP DNS Gateway to get the network properly working.
and pacman -Syy ...

For now I cannot get X to run. Video driver problem.
Does anyone have a suggestion on wich one to choose or how to compile the one for Novena Debian?

Thanks

Re: Arch Linux on Novena

For X11, use DRM.  Debian calls it xserver-xorg-video-modesetting.

You may need to create /etc/X11/xorg.conf with something like:

Section "Device"
    Driver "modesetting"
    Option "SWcursor" "true"
    Option "kmsdev" "/dev/dri/card0"
    BusID "platform:/sys/devices/soc0/display-subsystem/drm/card0"
EndSection

Older versions required either the "kmsdev" or the "BusID" arguments, but that might not be necessary with Arch.

Re: Arch Linux on Novena

Got X11 working.
Thanks

Another step closer

Re: Arch Linux on Novena

I had a problem with an invisible mouse pointer.
The section below was lacking the identifier.
I added:

Section "Device"
    Identifier             "Device0"
    Driver "modesetting"
    Option "SWcursor" "true"
    Option "kmsdev" "/dev/dri/card0"
    BusID "platform:/sys/devices/soc0/display-subsystem/drm/card0"
EndSection

Mouse pointer is back

Re: Arch Linux on Novena

Novena-eeprom and other Novena specific...

I can use the binaries from Debian to run on Arch.
I've tested the Novena-eeprom and the gui and both are running.

But if I wanted to compile them, as I tried with the Novena-gpbb-example, I ran into trouble.

I tried 'make -j4' and got failed messages.
I'm missing something here...

I have gcc and all the base-devel installed.

Re: Arch Linux on Novena

i2c headers are a bit funny.  You sometimes need the Linux sources, and sometimes need i2c devel sources, and sometimes don't need anything.

You need the "struct i2c_msg" and the "struct i2c_rdwr_ioctl_data" definitions.  On Debian they're in a file called "i2c-dev.h", but on Arch they may be elsewhere.  Try grepping for them in /usr/include/.

Re: Arch Linux on Novena

Thanks again for your useful insights.
I'll never say it enough, it is appreciated.

Arch has those files in /usr/include/linux

#include <linux/i2c-dev.h> was already included in adc108s022.c and dac101c085.c
I just add #include <linux/i2c.h>

And now it compiles.


Next I had a look at configure.sh to send the bitstream to the FPGA,
(By the way I tested it on Debian and all went well.)

The script writes in gpio135:
echo out > /sys/class/gpio/gpio135/direction 2> /dev/null

When I list the folder, it doesn't contains gpio135

ls /sys/class/gpio/
export  gpio143  gpiochip0  gpiochip128  gpiochip160  gpiochip192  gpiochip32  gpiochip64  gpiochip96  unexport

Would it be created on demand?

Re: Arch Linux on Novena

gpio135 is created earlier on in the script when it writes "135" to the "export" file.  To remove gpio135, echo 135 to the "unexport" file.

The full sysfs API is documented in the kernel, under https://github.com/xobs/novena-linux/bl … /sysfs.txt

Re: Arch Linux on Novena

FPGA is working fine. LEDs lighting up.

Re: Arch Linux on Novena

xobs wrote:

The kernel uses the disk ID to identify disks.  It uses the third partition as the rootfs.

Use fdisk on /dev/sda, hit "x", "i", and make the partition ID "0x4e6f7653" (ascii 'NovS').  "r" to return to the main menu, "w" to write it out, and you should be able to use the SATA disk as your root filesystem.

Interestingly, I had the same issue, but I had to set the partition ID to "0x4e6f764d" ("NovM"?) I got the ID by interrupting u-boot and entering 'env print'.

Re: Arch Linux on Novena

Make sure you have sataroot enable in the eeprom otherwise it'll choose NovM instead of NovS.

21 (edited by Thra11 2015-05-02 17:50:47)

Re: Arch Linux on Novena

Ah yes, that explains it. I was running arch from microSD, not SATA.