On Thu, May 21, 2020 at 01:41:18PM -0700, Matt Turner wrote:
> So, you must use the embedded target. Could you tell me how you use
> it, for what device, etc?
I produce mini-systemd tarballs to run under systemd-nspawn (or other
container systems). Sometimes, those tarballs can be used as
installation tarballs on bare metal systems, but in those cases
I need to bring my own kernel and bootloader.
systemd does require dynamic library dependencies so I modified (patches
probably will not sent upstream for inclusion) the embedded target to
pull in dependencies. The embedded target usually leaves dependency
resolution to the user (with embedded/packages).
> It's not obvious to me what specific tools this requires to be
> installed in the seed stage. Presumably you're referring to this?
>
> cmd([self.settings['controller_file'], 'bootloader',
> self.settings['target_path'].rstrip('/')]
>
> which eventually runs bootloader-setup.sh.
So the "controller.sh bootloader" is executed, but it kills the build in
the create_bootloader() function:
22 May 2020 03:58:27 UTC: NOTICE : --- Running action sequence: bootloader
NOTICE:catalyst:--- Running action sequence: bootloader
touch: cannot touch
'/substrate/next/builds/amd64/minimal/20200521/embedded-amd64-minimal-20200521/livecd':
No such file or directory
Unable to find grub-mkstandalone
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
ERROR:catalyst:CatalystError:
cmd(['/substrate/next/catalyst/targets/embedded/controller.sh', 'bootloader',
'/substrate/next/builds/amd64/minimal/20200521/embedded-amd64-minimal-20200521'])
exited 1
I don't have grub in the seed stage (it _is_ optional), and don't make livecd
images (I
don't know why it's trying to touch the builds/ path; maybe it wants tmp/...)
> I'd assume it's generally sensible to install a bootloader in the
> embedded target, and I don't think we have mechanism for customizing
> the action_sequence, so if we remove bootloader from the list then I
> think the python bootloader() function is just dead code, isn't it? I
> doubt that's the end result we want.
Personally, I just need the tarball of the mergeroot, so I don't need the
bootloader action. In lieu of this particular change, maybe some if
statements to see if bootloader-setup.sh can run successfully may be
needed.