Gentoo Archives: gentoo-catalyst

From: Matt Turner <mattst88@g.o>
To: gentoo-catalyst@l.g.o
Subject: Re: [gentoo-catalyst] [PATCH 1/5] embedded: remove actions that are broken by default
Date: Fri, 22 May 2020 00:23:01
Message-Id: CAEdQ38FT2GzHcS4BCsVcLUfF30EN7Ruv1wZnx+RbHzs870AyQA@mail.gmail.com
In Reply to: Re: [gentoo-catalyst] [PATCH 1/5] embedded: remove actions that are broken by default by Brian Dolbec
1 On Thu, May 21, 2020 at 3:08 PM Brian Dolbec <dolsen@g.o> wrote:
2 >
3 > On Thu, 21 May 2020 13:41:18 -0700
4 > Matt Turner <mattst88@g.o> wrote:
5 >
6 > > On Thu, May 21, 2020 at 10:34 AM Daniel Cordero
7 > > <gentoo.catalyst@××××.ws> wrote:
8 > > >
9 > > > From: Daniel Cordero <catalyst@××××.io>
10 > > >
11 > > > dir_setup() doesn't exist, bootloader() exists but requires specific
12 > > > tools to be installed in the seed stage and doesn't check that they
13 > > > are, causing the build to fail.
14 > > > ---
15 > > > If I have misconstrued the purpose of bootloader, then documentation
16 > > > needs to be written.
17 > >
18 > > I don't actually see any documentation about
19 > > > catalyst/targets/embedded.py | 2 --
20 > > > 1 file changed, 2 deletions(-)
21 > > >
22 > > > diff --git a/catalyst/targets/embedded.py
23 > > > b/catalyst/targets/embedded.py index aa23f5b3..1b4ad9d6 100644
24 > > > --- a/catalyst/targets/embedded.py
25 > > > +++ b/catalyst/targets/embedded.py
26 > > > @@ -41,7 +41,6 @@ class embedded(StageBase):
27 > > >
28 > > > def set_action_sequence(self):
29 > > > self.settings['action_sequence'] = [
30 > > > - "dir_setup",
31 > >
32 > > Nice. This function was removed in 2005, so the embedded target has
33 > > been broken ever since. That certainly answers my question as to
34 > > whether anyone uses it.
35 > >
36 > > Fixes: 1dafb5fa06d2 (Add locking support. ...)
37 > >
38 > > So, you must use the embedded target. Could you tell me how you use
39 > > it, for what device, etc?
40 > >
41 > > > "unpack",
42 > > > "config_profile_link",
43 > > > "setup_confdir",
44 > > > @@ -51,7 +50,6 @@ class embedded(StageBase):
45 > > > "setup_environment",
46 > > > "build_kernel",
47 > > > "build_packages",
48 > > > - "bootloader",
49 > >
50 > > It's not obvious to me what specific tools this requires to be
51 > > installed in the seed stage. Presumably you're referring to this?
52 > >
53 > > cmd([self.settings['controller_file'], 'bootloader',
54 > > self.settings['target_path'].rstrip('/')]
55 > >
56 > > which eventually runs bootloader-setup.sh.
57 > >
58 > > I'd assume it's generally sensible to install a bootloader in the
59 > > embedded target, and I don't think we have mechanism for customizing
60 > > the action_sequence, so if we remove bootloader from the list then I
61 > > think the python bootloader() function is just dead code, isn't it? I
62 > > doubt that's the end result we want.
63 > >
64 >
65 >
66 > No, if you notice, this is removing the bootloader action sequence only
67 > for the embedded target. Each target subclasses stagebase, so can
68 > override what is defined in stagebase as needed. Customizing the
69 > action_sequence is something that pretty much all the targets do.
70
71 Sorry I misspoke. Yes, bootloader() is called for livecd_stage2 and
72 stage4 as well, so removing it from embedded's action sequence would
73 not make the function dead.
74
75 I have doubts that we actually want to not run bootloader() for the
76 embedded target though.