Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
X session fails with ATI Radeon HD 4670 - KMS /radeon driver
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4  Next  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Pums
n00b
n00b


Joined: 03 Jun 2020
Posts: 52

PostPosted: Sat Jul 18, 2020 3:43 pm    Post subject: Reply with quote

I was wrong about dbus, it's been installed for a while:

Code:
# genlop -i dbus
 * sys-apps/dbus


   Total builds: 1
   Global build time: 58 seconds.

   Info about currently installed ebuild:

   * sys-apps/dbus-1.12.18
   Install date: Thu Jul  9 18:12:33 2020
   USE="elogind kernel_linux X -debug -doc -selinux -static-libs -systemd -test -user-session"


But its service was not enabled on default runlevel.

I've done it and rebooted (added dbus to global use flags but it affects no other package). I still get a black screen in the same conditions.

After starting "blindly" an empty X session : http://dpaste.com/23V61YW

Seems that X actually starts and works:

Code:
$ ps -A |grep tty3
 3288 tty3     00:00:00 login
 3383 tty3     00:00:00 bash
 3385 tty3     00:00:00 startx
 3402 tty3     00:00:00 xinit
 3403 tty3     00:00:00 X
 3407 tty3     00:00:00 xterm
 3432 tty3     00:00:00 dbus-launch
 3434 tty3     00:00:00 twm <defunct>
 3435 tty3     00:00:00 xclock
 3436 tty3     00:00:00 xterm
 3437 tty3     00:00:00 xterm


But screen remains desperately black.


Last edited by Pums on Sat Jul 18, 2020 4:28 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54098
Location: 56N 3W

PostPosted: Sat Jul 18, 2020 3:55 pm    Post subject: Reply with quote

Pums,

The dbus errors are gone and the Radeon driver is still in use.
The resolution is set to
Code:
[   710.790] (II) RADEON(0): Output eDP using initial mode 1920x1080 +0+0


Only the startup messages are in the log too. That means Xorg found something to do or locked up, so that it could no longer write the log.

but as you say, it looks like its working.

Code:
 3434 tty3     00:00:00 twm <defunct>
twm died and the parent process has not yet collected the return code.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Pums
n00b
n00b


Joined: 03 Jun 2020
Posts: 52

PostPosted: Sat Jul 18, 2020 4:14 pm    Post subject: Reply with quote

NeddySeagoon wrote:


You can do that by reducing
Code:
MAKEOPTS="-j5"
to say -j2 or -j3.[code]


It's now on -j2 (I should have done it a while ago).

NeddySeagoon wrote:

Make a file called /etc/X11/xorg.conf with the content
[code]Section "Device"
Identifier "OnBoard Radeon"
Driver "modesetting"
# BusID "pci:bus:dev:func"
EndSection[/code]

Its possible you mad need to fill in the BusID entry.
With that file in place, Xog will use the modesetting driver or fail.

Run startx (no reboot required) and pastebin the log. I would be happy for you to get a picture with any driver right now.


I really thank you for your consideration, this mac has been challenging me for monthes.

I've added the file and rebooted in order to try having a clearer Xorg.0.log. Black screen as always.

Xorg.0.log right after boot: http://dpaste.com/0C2VEZV

Xorg.0.log after starting "blindly" empty X session: http://dpaste.com/0VPKV6K

Just in case, Xorg.0.log after reboot with nomodeset kernel parameter and failed "startx": http://dpaste.com/3FWM273
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54098
Location: 56N 3W

PostPosted: Sat Jul 18, 2020 4:56 pm    Post subject: Reply with quote

Pums,

The radeon and Xorg modesetting driver both use kernel modesetting mechanism.
In fact, the Xorg modesetting driver uses the console resolution, that your framebuffer console left behind.

Te try a non-modesettnig driver, change the line
Code:
Driver      "modesetting"
to
Code:
 Driver      "vesa"

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6095
Location: Dallas area

PostPosted: Sat Jul 18, 2020 5:11 pm    Post subject: Reply with quote

For the black screen, what does X -retro do (execute from cmd line, not in X already) Ctrl-Alt-Backspace to exit X.
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
Pums
n00b
n00b


Joined: 03 Jun 2020
Posts: 52

PostPosted: Sat Jul 18, 2020 6:09 pm    Post subject: Reply with quote

NeddySeagoon,

If I uncomment the Dbus line in xorg.conf with modesetting driver, X starts and stops immediately, no remaining defunct twm process. Xorg.0.log : http://dpaste.com/1TEFYTJ.

Same thing with Dbus line uncommented and replacing with vesa driver. Log: http://dpaste.com/0Y0E6F0

Apparently same thing with Dbus line commented out and with driver vesa, log : http://dpaste.com/1AR6KCX

Rebooting doesn't change anything, screen remains black in all cases (Dbus line commented out nor not, driver vesa or modesetting).



Anon-E-moose: I think you've misread. Black screen doesn't result from starting X. Black screen arises on boot, X is not started yet since I have no display manager, and I need to start X manually from tty with nothing at all visible on the screen, no prompt.


Last edited by Pums on Sat Jul 18, 2020 6:37 pm; edited 2 times in total
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6095
Location: Dallas area

PostPosted: Sat Jul 18, 2020 6:33 pm    Post subject: Reply with quote

Pums wrote:
Anon-E-moose: I think you've misread. Black screen doesn't result from starting X. Black screen arises on boot, X is not started yet since I have no display manager, and I need to start X manually from tty with nothing at all visible on the screen, no prompt.


Ah, sorry 'bout that :oops:

Edit to add: you don't see boot messages, or a console screen?

How are you starting the system, bios or uefi boot?
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1507
Location: South America

PostPosted: Sat Jul 18, 2020 7:28 pm    Post subject: Re: Reply with quote

Pums wrote:
With opensuse, I can open a proper X session with desktop environment, still with nomodeset or radeon.modeset=0 parameter. It's perfectly suitable despite some display jaggedness. Tumbleweed even handles enjoyable transparency effects on Plasma desktop.

Posting the Xorg.*.log file from openSUSE, to see what it does and compare, might also help.
Back to top
View user's profile Send private message
Pums
n00b
n00b


Joined: 03 Jun 2020
Posts: 52

PostPosted: Sat Jul 18, 2020 7:58 pm    Post subject: Reply with quote

Anon-E-moose wrote:

Edit to add: you don't see boot messages, or a console screen?

How are you starting the system, bios or uefi boot?


It's uefi.

I can see first boot messages, openrc starts, launches some services regularly (EDIT: until "checking local filesystems") and then the screen turns black.

GDH-gentoo wrote:

Posting the Xorg.*.log file from openSUSE, to see what it does and compare, might also help.


I'll do that when the world update finishes.


Last edited by Pums on Sat Jul 18, 2020 9:53 pm; edited 1 time in total
Back to top
View user's profile Send private message
Pums
n00b
n00b


Joined: 03 Jun 2020
Posts: 52

PostPosted: Sat Jul 18, 2020 9:47 pm    Post subject: Reply with quote

Tumbleweed's Xorg.0.log

No xorg.conf file; xorg.conf.d only contains a file for the keyboard.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54098
Location: 56N 3W

PostPosted: Sat Jul 18, 2020 10:25 pm    Post subject: Reply with quote

Pums,

Its not using KMS. Its using framebuffer

Code:
[    35.927] (II) FBDEV(0): Creating default Display subsection in Screen section
    "Default Screen Section" for depth/fbbpp 24/32
[    35.927] (==) FBDEV(0): Depth 24, (==) framebuffer bpp 32
[    35.927] (==) FBDEV(0): RGB weight 888
[    35.927] (==) FBDEV(0): Default visual is TrueColor
[    35.927] (==) FBDEV(0): Using gamma correction (1.0, 1.0, 1.0)
[    35.927] (II) FBDEV(0): hardware: EFI VGA (video memory: 8128kB)
[    35.927] (DB) xf86MergeOutputClassOptions unsupported bus type 0
[    35.927] (II) FBDEV(0): checking modes against framebuffer device...
[    35.927] (II) FBDEV(0): checking modes against monitor...
[    35.927] (II) FBDEV(0): Virtual size is 1920x1080 (pitch 1920)


Code:
[    35.853] (II) [KMS] drm report modesetting isn't supported.
[    35.853] (EE) open /dev/dri/card0: No such file or directory

Thats the nomodeset on the kernel command line.

Is this an Intel Mac or a PPC mac?

The framebuffer driver just uses the RAM on the graphics card. The GPU does noting and the CPU plots every pixel.
That makes it very slow.

It would be useful to compare Gentoos dmesg with OpenSUSE too.
The first step is to get a working console.
Please post your
Code:
lspci -nnk
and the content of /usr/src/linux/.config

I thought your console was working too, an dmesg looks good.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Pums
n00b
n00b


Joined: 03 Jun 2020
Posts: 52

PostPosted: Sat Jul 18, 2020 11:17 pm    Post subject: Reply with quote

It's an Intel Mac.

NeddySeagoon wrote:


The framebuffer driver just uses the RAM on the graphics card. The GPU does noting and the CPU plots every pixel.
That makes it very slow.


I'm not surprised, at first it was very slow indeed with its original 4 G ram, I've upgraded to 16 G and it has become much more fluid though one notices it's not what it should be, eg comparing with macOS.

Back to top
View user's profile Send private message
Pums
n00b
n00b


Joined: 03 Jun 2020
Posts: 52

PostPosted: Sat Jul 18, 2020 11:24 pm    Post subject: Reply with quote

NeddySeagoon wrote:

I thought your console was working too, an dmesg looks good.


It does only if modesetting is disabled at boot. If not, screen is empty and I need to use ssh or typing things I can't see on the screen (that's how I could startx from a tty, although I didn't see anything, controling processes with ssh I saw it was started and twm appeared as defunct).
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54098
Location: 56N 3W

PostPosted: Sun Jul 19, 2020 7:37 pm    Post subject: Reply with quote

Pums,

Please tell us how you configured your kernel.
You have a lot _DEBUG_ options on in your kernel. This is normally a bad thing as _DEBUG_ will generate log spam and in some cases, will prevent normal operation.

I am in two minds ... to start the kernel configuration from the beginning or build on what you have now.

Did you ever change the kernel .config file with a text editor?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Pums
n00b
n00b


Joined: 03 Jun 2020
Posts: 52

PostPosted: Sun Jul 19, 2020 8:29 pm    Post subject: Reply with quote

NeddySeagoon,

About my current config, I've reviewed my shell history to be sure. Unless I've made a mistake I retieved the config from gentoo-kernel 5.4.40 (it was the kernel that I was running at that moment, and the first one with which I could have a proper boot), and applied it (via an oldconfig) to gentoo-sources (5.4.48 ), using menuconfig to add the firmware blobs. I think I've changed nothing else (unless maybe take off some useless device drivers).

I usually don't add debugging options to my kernel. The ones you're pointing out in my config must be default options from gentoo-kernel.

I did not change .config with an editor, I never do that, I always use menuconfig tool.

I can make a new kernel if you think it's better (now it seems overheating problems no longer happen after reducing MAKEOPTS to 2). I could use genkernel default config, just add the firmwares as I already did and remove some device drivers I'm sure I won't need. If you have better ideas or more precise instructions, I'm receptive to it.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54098
Location: 56N 3W

PostPosted: Sun Jul 19, 2020 10:53 pm    Post subject: Reply with quote

Pums,

That's all the right answers.

The kernel needs the firmware to be accessible at the time the module that will use the firmware is initialised.
For modules configured as <*>, that's built into the kernel binary, the firmware must be included in the kernel as everything in the kernel is initialised before root is mounted.

For modules configured as <M>, the module itself will be loaded after root is mounted, so firmware in /lib/firmware works.

For completeness, firmware built into the kernel is discarded when the kernel completes its initialisation before mounting root.

Long story short, you have CONFIG_DRM_RADEON=m in your kernel so do not need the firmware included in the kernel.

Lets try a
Code:
genkernel -menuconfig all
kernel.
When it drops you into menuconfig, follow the kernel part of the Radeon Wiki Page.
The General section applies to you. Follow the Audio section if you want to use nte Video card HDMI audio output.
Where you have a choice between <M> and <*>, use <M>, as its easier to make work.
Ignore AMD "Zen" CPUs and AGP cards. That does not apply to your system.

We don't care about Xorg yet. A working console is the first step.
If genkernel won't make a working console, post the dmesg you get with the new kernel.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Pums
n00b
n00b


Joined: 03 Jun 2020
Posts: 52

PostPosted: Sun Jul 19, 2020 11:48 pm    Post subject: Reply with quote

NeddySeagoon,

Unless I'm mistaken, I would rather run

Code:

genkernel --kernel-config=default --menuconfig all


Since, as the genkernel wiki's page says: "By default, genkernel uses the config from the previous build of the same kernel version or a default kernel config if there isn't a previous config."
That would be in my case retrieving the config with debugging options about which you were skeptical.
"Use the special value default to force usage of genkernel's generic kernel config." would be better, wouldn't it?

I've checked /lib/firmware/radeon already contains all the required firmwares.


Last edited by Pums on Mon Jul 20, 2020 12:30 am; edited 2 times in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54098
Location: 56N 3W

PostPosted: Sun Jul 19, 2020 11:51 pm    Post subject: Reply with quote

Pums,

That's correct. genkernel has changed over the years. It always used to use the default unless it was told not to.

Doing what you suggest will have the result I intended.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Pums
n00b
n00b


Joined: 03 Jun 2020
Posts: 52

PostPosted: Mon Jul 20, 2020 12:30 am    Post subject: Reply with quote

I could not find most of matching options from the wiki page. Searching with "radeon" in menuconfig returns me that:

Code:
 
  │          /radeon
 
  │   
  │ Symbol: FB_RADEON [=n]                                                                           │   
  │ Type  : tristate                                                                                 │   
  │ Prompt: ATI Radeon display support                                                               │   
  │   Location:                                                                                      │   
  │     -> Device Drivers                                                                            │   
  │       -> Graphics support                                                                        │   
  │         -> Frame buffer Devices                                                                  │   
  │ (3)       -> Support for frame buffer devices (FB [=y])                                          │   
  │   Defined at drivers/video/fbdev/Kconfig:1201                                                    │   
  │   Depends on: HAS_IOMEM [=y] && FB [=y] && PCI [=y]                                              │   
  │   Selects: FB_BACKLIGHT [=n] && FB_MODE_HELPERS [=n] && FB_CFB_FILLRECT [=y] && FB_CFB_COPYAREA  │   
  │                                                                                                  │   
  │                                                                                                  │   
  │ Symbol: FB_RADEON_BACKLIGHT [=n]                                                                 │   
  │ Type  : bool                                                                                     │   
  │ Prompt: Support for backlight control                                                            │   
  │   Location:                                                                                      │   
  │     -> Device Drivers                                                                            │   
  │       -> Graphics support                                                                        │   
  │         -> Frame buffer Devices                                                                  │   
  │           -> Support for frame buffer devices (FB [=y])                                          │   
  │ (4)         -> ATI Radeon display support (FB_RADEON [=n])                                       │   
  │   Defined at drivers/video/fbdev/Kconfig:1226


Which seems ok to me.

Eventually I've not changed much, it'll be almost a default genkernel. Usually I like to prune my kernels as much as possible, it will wait.

Genkernel's compiling now, I let you know as soon as I can with relevant infos.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54098
Location: 56N 3W

PostPosted: Mon Jul 20, 2020 9:43 am    Post subject: Reply with quote

Pums,

Gentoo works best when you make it work at all as the first step.
Then make it /lean/mean/shiny or whatever you want later.

Do you have another Gentoo system?
Its quite possible to build for you old Mac on another system.
The kernel is a good package to practice on too.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Pums
n00b
n00b


Joined: 03 Jun 2020
Posts: 52

PostPosted: Mon Jul 20, 2020 10:32 am    Post subject: Reply with quote

NeddySeagoon,

Genkernel process failed twice. First time it failed at time of making modules, but strangely I could not see any error in the log file. I should have kept that log and show it here, I didn't... Second time the mac hung, just like it used to do before, and disconcertingly It did not heat that much (though I could not .

i wonder if there's a particular problem with genkernel, it never worrked on this mac, already hung twice at the beginning. I made the kernel with the firmwares the old way, with make oldconfig menuconfig && make modules_install &&make install. I used genkernel only to make the initramfs.

However I do have Gentoo working on other computers. One is much faster than the other, I'm planning to use is to make binaries for the others, I've already managed some nice things but I'm new on Gentoo and not all is easy.

You're right, the kernel is good to practice that, no dependency... I'll try to do it now.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54098
Location: 56N 3W

PostPosted: Mon Jul 20, 2020 10:58 am    Post subject: Reply with quote

Pums,

Its worth keeping a separate kernel tree on the fast system for building for the Mac.
You don't want to get the two kernels mixed up and you certainly don't want to install the modules on the wrong system.

The simple way in to copy the kernel tree to your normal user and use that kernel tree just for the Mac.
Once its compiled, copy it to the Mac to run the install steps.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Pums
n00b
n00b


Joined: 03 Jun 2020
Posts: 52

PostPosted: Mon Jul 20, 2020 5:03 pm    Post subject: Reply with quote

NeddySeagoon,

It was my idea at first. Nevertheless it's not easy since genkernel is not thought primarly to be used as a single user.

It's been a day struggling and failing with genkernel, sorting out with its numerous options. I did not manage to do it. The following is a (boring) novel, no need to read it... I must be missing a lot of things, it seems all very complicated for nothing at the end...

So... I created the required directories, copied the sources and changed permissions on them. I arrived to such a command:

Code:

genkernel --bootdir=/tmp/macKernel/ --no-symlink --xconfig --kernel-config=default --install --logfile=~/Desktop/kernel/mac-5.4.48/genkernel.log --kernel-append-localversion=-v3genkernelMac --save-config --tmpdir=~/Desktop/kernel/mac-5.4.48/tmp/ --kerneldir=~/Desktop/kernel/mac-5.4.48/sources/linux-5.4.48-gentoo/ --module-prefix=~/Desktop/kernel/mac-5.4.48/modules  all


Genkernel still failed after making modules for a while. Log file says :

Code:
depmod: ERROR: could not open directory ~/Desktop/kernel/mac-5.4.48/modules/lib/modules/5.4.48-gentoo-x86_64-v3genkernelMac: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
make: *** [Makefile:1341: _modinst_post] Error 1

* ERROR: compile_modules(): compile_generic() failed to compile the "modules_install" target!


But that directory does exist...

Code:
$ ls ~/Desktop/kernel/mac-5.4.48/modules/lib/modules/5.4.48-gentoo-x86_64-v3genkernelMac
build  kernel  modules.builtin  modules.builtin.modinfo  modules.order  source


And it seems it contains modules... I should have given it up at that step, bad idea to continue on an error, but I tried anyway.


I transfered the files (kernel, systemmap and modules) to the mac, ran grubconfig. New kernel ends up with kernel panic. I thought it was because initramfs was missing, tried to make some cleaning in my /boot and /lib/modules, since it's a mess, with a lot of rests of failed kernel... Genkernel refused to make initramfs because kernel's local version was set to an old dysfunctional kernel. I tried to replace .config in /usr/src with the proper one (I thought kernelversion was taken from .config), it did not work. I unmerged gentoo-sources, removes old sources, reemerged gentoo-sources, and now: "Current kernel's LOCALVERSION is set to ''; Will ignore set --kernel-localversion value '-x86_64' because kernel was not build ..." and "ERROR: '/lib/modules/5.4.48-gentoo' does not exist! Did you forget to compile kernel before building initramfs? If you know what you are doing please set '--no-ramdisk-modules'."

Dracut refused for similar reasons :

Code:
# dracut
dracut: Executing: /usr/bin/dracut
dracut: Will not override existing initramfs (/boot/initramfs-5.4.48-gentoo-v2-firmwareBlob.img) without --force


"dracut --force" only rebuilt the initramfs for my current kernel, and not for the new one.

I tried to deceive genkernel, replacing /etc/kernels/kernel-config-5.4.48-gentoo-x86_64 with the config file of my new kernel, and renaming Systemmap, kernel and /lib/modules folder for it to match with its expectations, and it accepted to make "/boot/initramfs-5.4.48-gentoo.img" for the new kernel. I ran again grub-mkconfig, rebooted, and it still ends up on kernel panic...

I wish I could find a better way... On IRC I've been suggested to enter a chroot to make kernels as root easier.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54098
Location: 56N 3W

PostPosted: Mon Jul 20, 2020 6:22 pm    Post subject: Reply with quote

Pums,

That's the hard way. I'm sure it can be made to work.

Now the easier way, you will end up doing this to build for the Mac on the fast machine anyway.
On the fast machine, make a chroot directory.

Fetch a stage3 tarball that will suit the Mac and untar it there. In effect, do an install to suit the Mac.
After the stage3 is in place, copy over the Macs /etc/portage, so you have all the Macs settings.

Copy over the Macs /var/lib/portage/world which is the list of packages that have been explicitly installed on the Mac.

You must not use -march=native in this chroot. You want to build for the Mac, not the fast system.
On the Mac, run
Code:
gcc -### -E - -march=native 2>&1 | sed -r '/cc1/!d;s/(")|(^.* - )|( -mno-[^\ ]+)//g'

It tells what march=native really means to gcc.
Put whatever it spits out into the chroots make.conf in place of -mach=native.
Leave -pipe -O2 or whatever else you have.

The Macs own CPU_FLAGS_X86= should be in its make.conf already.
If not, cpuid2cpuflags run on the Mac will tell you what to set.

You want to build binary packages of everything built in the chroot, so you can install them on the Mac.
There is a FEATURE for that, set it in the chroots make.conf. You get to read
Code:
man make.conf

Set the MAKEOPTS to suit the build box.
Build in RAM if you have the RAM.

You can borrow the main installs ::gentoo repo and distfiles. There is no point in having two copies.
Do make sure that the Mac, PKGDIR inside the chroot does not point into any of the "borrowed" locations, so set it explictily. Maybe PKGDIR="/macpackagedir" ?

Once you are happy with the setup, do a short test.
Do the chroot steps, as you would for a new install.
Run
Code:
emerge -1av glibc


PKGDIR should contain two files.
Packages, which is the index. It will list a single package and tell how it was built. Does it look correct for the Mac?
The package file will be there too.

Once you are happy with the first package, do the rest.
Code:
emerge -e @world --keep-going --jobs=2

That will build everything in the world file and all the dependencies. Once it completes, you will have a chroot that mirrors the Mac and all the binary packages that match too.

There is one glaring simplifying assumption in the above. That the fast system can execute all the instructions of the older system.
Its often correct but not always.
If you get Illegal Instruction errors on the build box, its come across an instruction that the Mac has but it does not.
There are ways around this too.

The chroot will behave in most respects like the Mac. As its not a partition, you can't easily boot into it.
You probably can't run Xorg. Well you can ...

Lastly you can run genkernel here as you would on the Mac.
Installing the binaries on the Mac is for another post.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Pums
n00b
n00b


Joined: 03 Jun 2020
Posts: 52

PostPosted: Mon Jul 20, 2020 8:31 pm    Post subject: Reply with quote

NeddySeagoon,

Thank you so much for those detailed explanations. That's something I've heard about and I was planning to do but it was not clear at all yet for me. I have gentoo on 5 cumputers among which 4 are old ones, and it's a pain to compîle on them.

I followed your instructions, I've got glibc binary at the right place, Packages file seems ok too!

Currently the world is building right.

About binaries, I know I'll have to read carefully the guide on binary packages from the wiki.

On an old netbook, I did trials and managed to install an isolated binary of Firefox from my powerful computer, but it's something too hard to handle on a large scale and in an elegant way (all the dependencies need to be previously installed on the slow computer). Chrooting is definitively a better way!

I'll let know of my advancements and further problems, I think I may have.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page Previous  1, 2, 3, 4  Next
Page 2 of 4

 
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