[elbe-users] [elbe-devel] How to retrieve files with mutable names from initvm?

Manuel Traut manuel.traut at linutronix.de
Thu Apr 5 16:01:12 CEST 2018


Hi Lukasz,

> I build my RFS using initvm. Elbe generates a SquashFS image as requested in my XML input. Before such an image can be mounted as root filesystem on my target device, it needs a kernel to boot, and an initramfs to mount the partition where the image is stored. I use my own kernel (with third party drivers) that is stored in a local mirror. The initramfs must be generated for this very kernel, so I install it with my <pkg-list> and run mkinitramfs in <finetuning>. Then, apart from the RFS image itself, I need to retrieve the two artifacts: the kernel and the initramfs, and pass them to my bootloader (syslinux) in order for him to boot my target. This is easily done using "elbe control get_file" as soon as you know the filenames. Unfortunately, the filenames I am interested in contain the version number of the kernel:
> 
> vmlinuz-<version>-<arch>
> initrd.img-<version>-<arch>
> 
> Needless to say, the <version> changes over time. Now, how can I retrieve those files programmatically without making any assumptions on the <version>?
> 
> I dimly remember there was some development towards wildcard support in elbe file operations but it's not documented (man elbe-control, https://elbe-rfs.org/docs/sphinx/elbe-control.html). If possible, I would also like to stay compatible with elbe 1.2, which might still be used by some of my vendors.
> 
> How do you guys handle such a use case in general? Maybe there is a better/simpler way?

..from the elbe-control man-page:

--8<--
       get_files <build-dir>
           Get list of files in the <build-dir>.

           If the --output option is specified, the files are downloaded to the directory specified in the option. If the --matches option is specified
           only files matching the wildcard expression are shown/downloaded. Note that you have to put the wildcard expression in quotation marks.
--8<--

--matches is only supported in 2.9.1 or newer.

Regards,

  Manuel

> Best regards,
> Lukasz
> 
> PS This question is probably best suited for elbe-users, but there are not that many subscribers yet, so CCing to elbe-devel.
> 
> 
> ----------------------------------------
> 
> [http://www.s-can.at/disclaimer/scan_industrial.jpg]
> 
> ----------------------------------------
> 
> scan Messtechnik GmbH
> Brigittagasse 22-24
> A-1200 Wien/Vienna
> tel. +43 1 219 73 93 - 0
> fax +43 1 219 73 93 - 12
> http://www.s-can.at
> office at s-can.at
> 
> Geschaeftsfuehrer/President: DI Andreas Weingartner
> Firmenbuchnummer/Incorporation No: FN178880i
> Gerichtsstand/Court of Jurisdiction: Wien/Vienna
> 
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel



More information about the elbe-users mailing list