Gentoo Archives: gentoo-catalyst

From: Daniel Cordero <gentoo.catalyst@××××.ws>
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 04:19:33
Message-Id: 20200522041923.GB3784957@dysnomia.localdomain
In Reply to: Re: [gentoo-catalyst] [PATCH 1/5] embedded: remove actions that are broken by default by Matt Turner
1 On Thu, May 21, 2020 at 01:41:18PM -0700, Matt Turner wrote:
2 > So, you must use the embedded target. Could you tell me how you use
3 > it, for what device, etc?
4
5 I produce mini-systemd tarballs to run under systemd-nspawn (or other
6 container systems). Sometimes, those tarballs can be used as
7 installation tarballs on bare metal systems, but in those cases
8 I need to bring my own kernel and bootloader.
9
10 systemd does require dynamic library dependencies so I modified (patches
11 probably will not sent upstream for inclusion) the embedded target to
12 pull in dependencies. The embedded target usually leaves dependency
13 resolution to the user (with embedded/packages).
14
15
16 > It's not obvious to me what specific tools this requires to be
17 > installed in the seed stage. Presumably you're referring to this?
18 >
19 > cmd([self.settings['controller_file'], 'bootloader',
20 > self.settings['target_path'].rstrip('/')]
21 >
22 > which eventually runs bootloader-setup.sh.
23
24 So the "controller.sh bootloader" is executed, but it kills the build in
25 the create_bootloader() function:
26
27 22 May 2020 03:58:27 UTC: NOTICE : --- Running action sequence: bootloader
28 NOTICE:catalyst:--- Running action sequence: bootloader
29 touch: cannot touch '/substrate/next/builds/amd64/minimal/20200521/embedded-amd64-minimal-20200521/livecd': No such file or directory
30 Unable to find grub-mkstandalone
31 22 May 2020 03:58:27 UTC: ERROR : CatalystError: cmd(['/substrate/next/catalyst/targets/embedded/controller.sh', 'bootloader', '/substrate/next/builds/amd64/minimal/20200521/embedded-amd64-minimal-20200521']) exited 1
32 ERROR:catalyst:CatalystError: cmd(['/substrate/next/catalyst/targets/embedded/controller.sh', 'bootloader', '/substrate/next/builds/amd64/minimal/20200521/embedded-amd64-minimal-20200521']) exited 1
33
34 I don't have grub in the seed stage (it _is_ optional), and don't make livecd images (I
35 don't know why it's trying to touch the builds/ path; maybe it wants tmp/...)
36
37
38 > I'd assume it's generally sensible to install a bootloader in the
39 > embedded target, and I don't think we have mechanism for customizing
40 > the action_sequence, so if we remove bootloader from the list then I
41 > think the python bootloader() function is just dead code, isn't it? I
42 > doubt that's the end result we want.
43
44 Personally, I just need the tarball of the mergeroot, so I don't need the
45 bootloader action. In lieu of this particular change, maybe some if
46 statements to see if bootloader-setup.sh can run successfully may be
47 needed.