bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Asking help for a little project


From: Samuel Thibault
Subject: Re: Asking help for a little project
Date: Mon, 24 Jan 2022 22:49:50 +0100
User-agent: NeoMutt/20170609 (1.8.3)

Hello,

Alessandro Sangiuliano, le lun. 24 janv. 2022 11:51:04 +0000, a ecrit:
> Looking at the Hurd, startup.c (frob_kernel_process) line: 1092, it sets, as
> the comment says too, it installs the proc port to the kernel task as a
> bootstrap port making it visible to other Hurds.
> Before doing that the code checks if the kernel_task is a valid port otherwise
> it will search it in the process list with HURD_PID_KERNEL ( defined as 3).
> 
> I'm having difficulties getting the kernel_task to do something similar but
> with my nameserver.

Don't follow the startup examples, since they assume that the rest of
the startup did happen, notably the availability of the proc server to
perform the pid2task translation.

> I also saw there is an option to the command line at boot time 
> --kernel-task='$
> {kernel-task}', that gives me a number that depend of the position of the
> argument in the argument list, so probably
> i'm using ot in the wrong way.

No, that should be it. Please post the output of the kernel starting.
Note that the actual number can indeed change according to parameter
ordering, just because the kernel boot script launcher will create ports
in the order you put them in the parameters, so for instance in:

ext2fs --readonly --multiboot-command-line=root=device:hd1 console=com0 
--host-priv-port=1 --device-master-port=2 --exec-server-task=3 -T typed 
device:hd1

It'll always be in the 1 2 3 order, whatever the options order. That's
expected since the script launcher will first create the first requested
port (here the host priv port), then the second (the device master
port), etc. So yes it happens to be in the parameter order, but that
doesn't mean it is the parameter order, the value will really be the
correct one to be used (a port name, i.e. the mach_port_t number)

> I want to set the nameserver port as bootstrap port to the kernel_task.

Then task_set_bootstrap_port should be working.

Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]