ODroid N2+ Support

This is for ARMv8 based devices

Re: ODroid N2+ Support

Postby pudge » Wed Jun 07, 2023 11:36 pm

$this->bbcode_second_pass_quote('', ' ')I would appreciate it if you have a way to point me to the Odroid N2/N2+ image you're using


Go to
https://github.com/endeavouros-arm/images/releases/tag/ddimg-odroid-n2-20230601

click on the image file and the sha512sum file to download them.
In the directory where the files downloaded to, run the checksum

sha512sum -c enosLinuxARM-odroid-n2-latest.img.xz.sha512sum

should check OK

Now use dd, rpi-imager, gnome-disk-utility, or your favorite image burning app to transfer the img.xz file to uSD or eMMC or USB SSD
Plug the uSD or eMMC or USB SSD to the Odroid N2+ and boot it up. Follow the instructions.
pudge
 
Posts: 24
Joined: Thu Mar 29, 2018 5:38 pm

Re: ODroid N2+ Support

Postby yossarian » Fri Jun 09, 2023 1:09 am

Micro SD and eMMC Creation

Replace sdX in the following instructions with the device name for the SD card as it appears on your computer. Use the provided micro SD to eMMC adapter card to install to eMMC.

Zero the beginning of the SD card or eMMC module:

$this->bbcode_second_pass_code('', 'dd if=/dev/zero of=/dev/sdX bs=1M count=8')

Partition the SD card with parted:

$this->bbcode_second_pass_code('', 'parted -s /dev/sdX mklabel msdos mkpart primary fat32 1MiB 256MiB set 1 boot on mkpart primary ext4 256MiB 100%')

Create the FAT and ext4 filesystems:

$this->bbcode_second_pass_code('', 'mkfs.vfat -n BOOT /dev/sdX1
mkfs.ext4 -L ROOT /dev/sdX2')

Mount the filesystems:

$this->bbcode_second_pass_code('', 'mkdir -p root
mount /dev/sdX2 root
mkdir -p root/boot
mount /dev/sdX1 root/boot')

Download and extract the root filesystem (as root, not via sudo):

$this->bbcode_second_pass_code('', 'wget https://storage.googleapis.com/archlinuxarm/ArchLinuxARM-odroid-n2plus-latest.tar.gz
bsdtar -xpf ArchLinuxARM-odroid-n2plus-latest.tar.gz -C root')

Write the bootloader:

$this->bbcode_second_pass_code('', 'dd if=root/boot/u-boot.bin of=/dev/sdX conv=fsync,notrunc bs=512 seek=1')

(Optional) Set the screen resolution for your monitor:
Open the file root/boot/boot.ini with a text editor.
Copy the desired resolution configuration into the hdmimode variable.
Save and close the file.

Unmount the partitions:

$this->bbcode_second_pass_code('', 'umount -R root')

Move the boot selector switch to MMC.
Insert the micro SD card or eMMC module into the device, connect ethernet, and apply 12V power.
Use the serial console or SSH to the IP address given to the board by your router.
Login as the default user alarm with the password alarm.
The default root password is root.

Initialize the pacman keyring and populate the Arch Linux ARM package signing keys:

$this->bbcode_second_pass_code('', 'pacman-key --init
pacman-key --populate archlinuxarm')
yossarian
 
Posts: 22
Joined: Thu Dec 08, 2011 5:55 pm

Re: ODroid N2+ Support

Postby woody » Fri Jun 09, 2023 7:33 pm

@yossarian
Thanks for the detailed instructions. I followed your installation procedure, but I ran into a problem getting it to boot in petitboot. Usually, I put the boot files in sda1 and petitboot detects them and boots from there. On your installation, the boot files are in sda2, and petitboot doesn't see them. Did you have to manually enter the parameters in petitboot to get this installation to boot?
woody
 
Posts: 88
Joined: Tue Dec 11, 2012 2:40 pm

Re: ODroid N2+ Support

Postby yossarian » Sat Jun 10, 2023 3:03 pm

Maybe you did something wrong? The boot file should all be on /dev/sda1. Read the instructions again carefully and see if you swapped something.
yossarian
 
Posts: 22
Joined: Thu Dec 08, 2011 5:55 pm

Re: ODroid N2+ Support

Postby woody » Sat Jun 10, 2023 10:43 pm

Ok, after a lot of testing here's what I see:
1. Your installation seems to be the same as the one I'm using, except for your boot.ini.
2. I can boot using the sdcard slot from either installation, but I can't get either to boot using petitboot with the sdcard in a USB adapter.
3. I was unable to use the meson-g12b-odroid-n2.dtb to boot before. I discovered that the way to boot with that dtb is to use a label in the bootargs. The meson64_odroidn2.dtb only works with a /dev/sxx or UUID in the bootargs.

So, are you able to boot using petitboot with an sdcard or USB drive? That's still what I'm trying to get to.
Thanks for your help!
woody
 
Posts: 88
Joined: Tue Dec 11, 2012 2:40 pm

Re: ODroid N2+ Support

Postby yossarian » Sun Jun 11, 2023 3:09 pm

I haven't tried with Petitbook on the N2+, I don't see the benefit. On my M1 I use petitboot because I don't have a working uboot there. Uboot seems preferable though. Can you explain the benefit of petitboot and how you're using it?
yossarian
 
Posts: 22
Joined: Thu Dec 08, 2011 5:55 pm

Re: ODroid N2+ Support

Postby karog » Sun Jun 11, 2023 5:43 pm

@yossarian, I wrote the third post in this thread when I had trouble booting a new N2+ migrating from an N2. The details are in that post but the short version is that via console output I saw that there is memory training very early in the boot process and it was failing. Then I discovered a different uboot that is configured to try the training twice such that booting consistently fails the first training but also consistently passes the second training and so that is what I now use.

I am wondering whether you can verify when you boot your N2+ do you also see the training fail then succeed or whether perhaps your N2+ succeeds on the first training. Again, the details are in the third post of this thread.Thanks.
karog
 
Posts: 298
Joined: Thu Jan 05, 2012 7:55 pm

Re: ODroid N2+ Support

Postby yossarian » Sun Jun 11, 2023 8:24 pm

I have my uboot set to display a pretty boot logo so I don't see anything until the kernel starts.
yossarian
 
Posts: 22
Joined: Thu Dec 08, 2011 5:55 pm

Re: ODroid N2+ Support

Postby woody » Sun Jun 11, 2023 9:18 pm

@yossarian
My goal is to eliminate the EMMC/sdcard and to boot directly into a USB drive. I've been doing this for several years but that arrangement stopped working when I got to kernel 6.0+.

The only way I know to do that is to boot using petitboot. Are you able to boot directly into a USB drive using u-boot instead of petitboot? How would you do that? I think this might be a problem with petitboot, but I'm not sure.

Anyway, one thing I learned from testing with your installation is that I need to use drive labels in bootargs and also in fstab. The meson-12b-odroid-n2 dtb file seems to only work with labels. That dtb seems better than the one I was using before. Now, if I can figure out how to boot into a USB drive, everything will be good.
woody
 
Posts: 88
Joined: Tue Dec 11, 2012 2:40 pm

Re: ODroid N2+ Support

Postby yossarian » Sun Jun 11, 2023 9:31 pm

I can't imagine that there's any relationship between the DTB and the use of partition labels. Something else must be going on that makes it seem that way.

I always use labels for BOOT and ROOT because it simplifies my automated tooling, and I don't have to edit files to insert UUIDs that change each time. There are 3 places that the labels matter:

1) You have to specify the labels when you run mkfs. The command line switch is different for vfat and ext4.
2) Line 50 of /boot/boot.ini specifies root=LABEL=ROOT instead of using an UUID or a device name.
3) Both lines of /etc/fstab refer to partitions by label name rather than a UUID or device name.

I now understand why you prefer petitboot. I suspect you don't need uboot at all if you're using petitboot, and if you can get it configured just right. For my application, an SD card is fine so I've never tried it your way. I'll let you know if I manage to have any success making petitboot work.
yossarian
 
Posts: 22
Joined: Thu Dec 08, 2011 5:55 pm

PreviousNext

Return to ARMv8 Devices

Who is online

Users browsing this forum: No registered users and 2 guests