Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Steps to boot gentoo linux for Allwinnnr h616 based OrangePI
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
Harshil.Soni.849
n00b
n00b


Joined: 10 Jun 2024
Posts: 4

PostPosted: Mon Jun 10, 2024 5:46 am    Post subject: Steps to boot gentoo linux for Allwinnnr h616 based OrangePI Reply with quote

Hello There ,

For one of our project i have tried so many steps to compile/install/boot gentoo linux for Allwinner H616 (Arm cortex-A53) based orangePI zero 2,
but not got any success till now.
can you suggest any guide or steps for the same ?
request you to please guide us for the same
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 31268
Location: here

PostPosted: Mon Jun 10, 2024 6:53 am    Post subject: Reply with quote

Moved from Installing Gentoo to Gentoo on ARM.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Harshil.Soni.849
n00b
n00b


Joined: 10 Jun 2024
Posts: 4

PostPosted: Tue Jun 11, 2024 4:48 am    Post subject: Reply with quote

fedeliallalinea wrote:
Moved from Installing Gentoo to Gentoo on ARM.


Hello there ,

Request you to please update for my requirement
Back to top
View user's profile Send private message
TJNII
l33t
l33t


Joined: 09 Nov 2003
Posts: 648
Location: for(;;);

PostPosted: Wed Jun 12, 2024 4:57 am    Post subject: Reply with quote

https://wiki.gentoo.org/wiki/Orange_Pi_PC/Quick_Start worked for me with the following differences:

- I started from Armbian_23.02.2_Orangepizero_jammy_current_5.15.93, just copied /boot over entirely
- I used the OpenRC Gentoo stage3, not SystemD
- In boot/armbianEnv.txt set:
-- verbosity=7
-- console=serial
-- rootdev= the new root UUID
- I wasn't able to loop mount the initrd on my main machine. I instead copied the modules over from the initrd to the root disk in the initrd when it failed to boot the first time. (Had rootdev in boot/armbianEnv.txt wrong.)

Other than that it was pretty painless. Put up less of a fight than Armbian, to be honest.

Board I'm messing with:

CPU: Allwinner H3 (SUN8I 1680)
Model: Xunlong Orange Pi Zero

Now that said that's just getting the board booted into Linux with a serial TTY. I haven't compiled or installed anything yet. That's not a job for a SBC with a BogoMIPS of 48, so be ready to compile somewhere else.
Back to top
View user's profile Send private message
Harshil.Soni.849
n00b
n00b


Joined: 10 Jun 2024
Posts: 4

PostPosted: Wed Jun 12, 2024 5:06 am    Post subject: Reply with quote

TJNII wrote:
https://wiki.gentoo.org/wiki/Orange_Pi_PC/Quick_Start worked for me with the following differences:

- I started from Armbian_23.02.2_Orangepizero_jammy_current_5.15.93, just copied /boot over entirely
- I used the OpenRC Gentoo stage3, not SystemD
- In boot/armbianEnv.txt set:
-- verbosity=7
-- console=serial
-- rootdev= the new root UUID
- I wasn't able to loop mount the initrd on my main machine. I instead copied the modules over from the initrd to the root disk in the initrd when it failed to boot the first time. (Had rootdev in boot/armbianEnv.txt wrong.)

Other than that it was pretty painless. Put up less of a fight than Armbian, to be honest.

Board I'm messing with:

CPU: Allwinner H3 (SUN8I 1680)
Model: Xunlong Orange Pi Zero

Now that said that's just getting the board booted into Linux with a serial TTY. I haven't compiled or installed anything yet. That's not a job for a SBC with a BogoMIPS of 48, so be ready to compile somewhere else.


Hello There ,

Thank you for your reply
and what about ethernet and wifi ? have you done any changes for that ?
or it is directly started after the steps you mentioned .
Back to top
View user's profile Send private message
TJNII
l33t
l33t


Joined: 09 Nov 2003
Posts: 648
Location: for(;;);

PostPosted: Wed Jun 12, 2024 12:41 pm    Post subject: Reply with quote

Harshil.Soni.849 wrote:

and what about ethernet and wifi ? have you done any changes for that ?
or it is directly started after the steps you mentioned .


Haven't gotten that far yet, just got it booting yesterday. Wired ethernet seems to be fine, it was able to get a DHCP address and ping it. I haven't started investigating the wifi module yet. I don't have a environment set up to compile for ARM yet so I'm only just past the "can I boot and log in to it" hurdle.

My impression is past this point it's just regular Gentoo config, but in this case it's still using the Armbian built kernel. When trying to boot full Armbian I was getting panics when plugging in the ethernet cable. That doesn't appear to be happening here, and I couldn't debug the Armbian install as the tty didn't work (which is why I'm now here), so that might be a userspace problem but know there may be issues. I recommend getting it booting and going from there. Set up a compile environment if you haven't already, unless things have changed drastically in the 10 years I've been away from Gentoo you'll need it.

For any other greybeards reading this thread, is the process on these ARM SBCs to compile your own kernel, or to use a pre-made, already patched kernel? I'm new to ARM SBCs and getting the impression the common process is to use a premade kernel as these SBCs are all so nonstandard. Seems like compiling your own kernel for these is a "you really need to know what you're doing" exercise beyond the scope of most users, due to all the patching. Is that impression correct?
Back to top
View user's profile Send private message
Harshil.Soni.849
n00b
n00b


Joined: 10 Jun 2024
Posts: 4

PostPosted: Wed Jun 12, 2024 12:52 pm    Post subject: Reply with quote

TJNII wrote:
Harshil.Soni.849 wrote:

and what about ethernet and wifi ? have you done any changes for that ?
or it is directly started after the steps you mentioned .


Haven't gotten that far yet, just got it booting yesterday. Wired ethernet seems to be fine, it was able to get a DHCP address and ping it. I haven't started investigating the wifi module yet. I don't have a environment set up to compile for ARM yet so I'm only just past the "can I boot and log in to it" hurdle.

My impression is past this point it's just regular Gentoo config, but in this case it's still using the Armbian built kernel. When trying to boot full Armbian I was getting panics when plugging in the ethernet cable. That doesn't appear to be happening here, and I couldn't debug the Armbian install as the tty didn't work (which is why I'm now here), so that might be a userspace problem but know there may be issues. I recommend getting it booting and going from there. Set up a compile environment if you haven't already, unless things have changed drastically in the 10 years I've been away from Gentoo you'll need it.

For any other greybeards reading this thread, is the process on these ARM SBCs to compile your own kernel, or to use a pre-made, already patched kernel? I'm new to ARM SBCs and getting the impression the common process is to use a premade kernel as these SBCs are all so nonstandard. Seems like compiling your own kernel for these is a "you really need to know what you're doing" exercise beyond the scope of most users, due to all the patching. Is that impression correct?



Hello there ,

Actually i have used latest arm64 desktop systemd version for gentoo porting
https://www.gentoo.org/downloads/#arm64

and after bootup eth0 was not by default started
I have to do : ifconfig eth0 up

after doing this ethernet cable got detected but Only IPv6 address was coming
no DHCP server info and route info is updated
as well as there is no "udhcpc" binary for dynamically getting IP on ethernet

So can you provide your thought for the same ?
Back to top
View user's profile Send private message
TJNII
l33t
l33t


Joined: 09 Nov 2003
Posts: 648
Location: for(;;);

PostPosted: Thu Jun 13, 2024 2:19 pm    Post subject: Reply with quote

Harshil.Soni.849 wrote:

Actually i have used latest arm64 desktop systemd version for gentoo porting
https://www.gentoo.org/downloads/#arm64

and after bootup eth0 was not by default started
I have to do : ifconfig eth0 up


Did you get it booting with the Armbian kernel like I did or a Gentoo kernel?

As for the ethernet problem that should be getting into regular system config. I don't like SystemD and avoid it when possible so someone else will need to help with that.
Back to top
View user's profile Send private message
JumboAg
Apprentice
Apprentice


Joined: 03 Mar 2007
Posts: 205
Location: Dallas, TX

PostPosted: Thu Jun 13, 2024 8:24 pm    Post subject: Reply with quote

Easiest thing to do: use 2 SD cards. Boot the board in armbian and then do a modified amd64 handbook install to the second. if you have access to the orangepi-build tools, you can build the debian files for u-boot and the kernel and just unzip them to the new drive and run the u-boot installer. If you dont then install armbian to the SECOND SD card as well and then delete the partitions, doing a handbook install. (be careful to start the new first partition at the same location as the previous one so you dont nuke u-boot. That board is older so it probably users a dos format, but check. Use the same format and boot drive filesystem to reduce the chance of a conflict. Once you're comfortable with the process you can experiment.

skip the kernel section of the handbook manual. Use the kernel and header deb files available from orangepi build or just copy from the original SD card. Use orangepi's kernel.

One warning, and an issue I currently have on both an orangepi 3 and 4 - Gentoo doesnt like something about the armbian 6.6 kernels with some orangepi boards. Console (whether local or serial) is badly misbehaving on both of my boards. I do NOT have that problem with older kernel versions. I have not figured out the cause yet. The kernels available directly from orangepi-build work fine, its the newer armbian 6.6 ones that for me are problematic.

Post your progress here and I'll try to help you out if you get stuck. I've put gentoo on OrangePI 3, 4 and 5's as well as all the libre computer boards and actual raspberry pi 4's and 5s. Newer boards that have a built in mmc with u-boot and firmware are definitely easier to use but its definitely possible to get them all working. I'm actually going through and rebuilding most of mine at the moment in a dual boot configuration with both ubuntu and gentoo on them so the install is somewhat fresh in my mind.

I have an older post in the arm forum from my original 3 LTS install where Pingtoo helped me a TON with learning how u-boot works. I'd recommend searching for that post as well.
Back to top
View user's profile Send private message
TJNII
l33t
l33t


Joined: 09 Nov 2003
Posts: 648
Location: for(;;);

PostPosted: Sun Jun 16, 2024 3:03 pm    Post subject: Reply with quote

I was just able to do a full Gentoo install onto a OrangePi Zero building everything myself and it wasn't bad at all. The OrangePi Allwinner H2+ SoC is fully mainlined so I didn't have any trouble getting a 5.15 Gentoo Sources kernel built, though I did use Armbian's .config. (DTB/DTS was a bit of a pain, but not awful.) U-Boot worked with the packaged defconfig, and installing u-boot is actually super easy. The OrangePi Zero SoC boots UBoot from 0x8000* on the SD card so all that needs to be done to prepare the SD card is:

- Zero the first 1MB
- Create the partitions / filesystems as normal
- Install U-Boot with
Code:
dd if=[path]/u-boot-sunxi-with-spl.bin of=/dev/[sd_card] bs=1k seek=8


Note this is only true for the OrangePi Zero H2+ / H3 boards where the embedded boot rom reads this specific address, other boards will behave differently.

I haven't tried a 6.6 kernel yet, just got it working with everything built myself matching known good versions. Now that most the unknowns are known I can start messing about. I'm finding this to be a good starter board, it's well documented with examples and datasheets available.

* Ref: https://linux-sunxi.org/Bootable_SD_card#SD_Card_Layout
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum