aboutsummaryrefslogtreecommitdiff
path: root/scripts/uboot-script-gen
Commit message (Collapse)AuthorAgeFilesLines
* If the "BOOT_CMD" variable is set to "none" inside the configAndrei Cherechesu2022-07-271-2/+9
| | | | | | | | | | | | | | | | | | | | | file, the boot command (i.e. "booti") will not by added to the generated script, to allow the user to customize the u-boot env or the device-tree after executing the script commands and before actually booting. Added commands to store the addresses where the Xen image and device-tree file are loaded, in 'host_kernel_addr' and 'host_fdt_addr' variables, if BOOTCMD = "none". The `booti` command can then be executed as part of the 'bootcmd' variable in u-boot, which should contain: 1. fetching the generated u-boot script 2. executing the script 3. running `booti ${host_kernel_addr} - ${host_fdt_addr}` command Signed-off-by: Andrei Cherechesu <andrei.cherechesu@nxp.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
* Added the parsing for APPEND_EXTRA_CMDS variable, which enables theAndrei Cherechesu2022-07-271-0/+11
| | | | | | | | | | | | | user to specify the path to a text file that contains, on each line, u-boot commands that will be added to the generated script as "fixups", before the boot command. The file specified by the APPEND_EXTRA_CMDS variable parameter will be copied as-is in the generated script. Signed-off-by: Andrei Cherechesu <andrei.cherechesu@nxp.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
* Remove extraneous comma in generated its file when no DOM0_KERNEL is specified.Jackson Smith2022-07-271-1/+6
| | | | | | | Signed-off-by: Jackson Smith <rsmith@RiversideResearch.org> Signed-off-by: Jason Shuhua Lei <lei56@purdue.edu> Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
* scripts: Add support for prepending path to file namesAndrei Cherechesu2022-07-061-4/+8
| | | | | | | | | | | | | | | | | | | | Added support for prepending path to file names in the final generated u-boot script, for the use-case where we have the files in a separate folder that can be accessed with a given $LOAD_CMD. For example, we can have "fatload mmc 0:2" as LOAD_CMD but the files would need to be loaded from the /boot folder within the 2nd partition, not from the root ("/"). By specifying the "-p <path>" parameter when running the script, paths like "/boot" can be automatically prepended to the generated u-boot commands used to load the files in board's memory. Also added the support to disk_image script, to enable generating a FAT partition with the binaries deployed in a custom folder within it, if the "-p" parameter is specified. Signed-off-by: Andrei Cherechesu <andrei.cherechesu@nxp.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
* uboot-script-gen: prevent user mistakes due to DOM0_KERNEL becoming optionalXenia Ragiadakou2022-06-281-7/+14
| | | | | | | | | | | | | | | | | | | | Before enabling true dom0less configuration, the script was failing instantly if DOM0_KERNEL parameter was not specified. This behaviour has changed and this needs to be communicated to the user. Mention in README.md that for dom0less configurations, the parameter DOM0_KERNEL is optional. If DOM0_KERNEL is not set, check that no other dom0 specific parameters are specified by the user. Fail the script early with an appropriate error message, if it was invoked with erroneous configuration settings. Change message "Dom0 kernel is not specified, continue with dom0less setup." to "Dom0 kernel is not specified, continue with true dom0less setup." to refer more accurately to a dom0less setup without dom0. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
* uboot-script-gen: Enable direct mapping of statically allocated memoryXenia Ragiadakou2022-06-211-0/+18
| | | | | | | | | | | | | | | | Direct mapping for dom0less VMs is disabled by default in XEN and can be enabled through the 'direct-map' property. Add a new config parameter DOMU_DIRECT_MAP to be able to enable or disable direct mapping, i.e set to 1 for enabling and to 0 for disabling. This parameter is optional. Direct mapping is enabled by default for all dom0less VMs with static allocation. The property 'direct-map' is a boolean property. Boolean properties are true if present and false if missing. Add a new data_type 'bool' in function dt_set() to setup a boolean property. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
* uboot-script-gen: Skip dom0 instead of exiting if DOM0_KERNEL is not setXenia Ragiadakou2022-06-211-17/+43
| | | | | | | | | When the parameter DOM0_KERNEL is not specified and NUM_DOMUS is not 0, instead of failing the script, just skip any dom0 specific setup. This way the script can be used to boot XEN in dom0less mode. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
* Add xen,enhanced by default to all guestsStefano Stabellini2022-06-171-0/+1
| | | | | | | | | | | | It enables the usage of PV drivers with dom0less guests. Adding xen,enhanced has the potential side-effect of causing older unpatched versions of Linux to break at boot. If your Linux kernel is affected, consider upgrading kernel, or removing "xen,enhanced" by hand from the generated boot.source. Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com> Reviewed-by: Ayan Kumar Halder <ayankuma@amd.com>
* Add support for cache coloringStefano Stabellini2022-06-171-1/+25
| | | | | | | | | | | Generate the coloring information for Xen, dom0 and domUs based on information on the config file. Cache coloring is not upstreaming but it was published to xen-devel already. It is very useful to be able to provide a cache coloring configuration via config file instead of manually editing boot.source. Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
* uboot-script-gen: Add DOMU_STATIC_MEMXenia Ragiadakou2022-06-161-2/+61
| | | | | | | | | | | | | | | | | | | | | Add a new config parameter to configure a dom0less VM with static allocation. DOMU_STATIC_MEM[number]="baseaddr1 size1 ... baseaddrN sizeN" The parameter specifies the host physical address regions to be statically allocated to the VM. Each region is defined by its start address and size. For instance, DOMU_STATIC_MEM[0]="0x30000000 0x10000000 0x50000000 0x20000000" indicates that the host memory regions [0x30000000, 0x40000000) and [0x50000000, 0x70000000) are statically allocated to the first dom0less VM. Since currently it is not possible for a VM to have a mix of both statically and non-statically allocated memory regions, when DOMU_STATIC_MEM is specified, adjust VM's memory size to equal the amount of statically allocated memory. [stefano: add check for DOMU_MEM != DOMU_STATIC_MEM] Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
* handle correctly symlinks in parent directoriesStefano Stabellini2022-04-191-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Commit b9e2809fce57 introduced support for symlinks when specified in the config file for one of the binaries, but it breaks if there is a symlink in one of the parent directories. This patch fixes the behavior by doing the following: - get the absolute "real" path of the target file using realpath, not resolving symlinks for the parameter path (parents still get resolved) - get the absolute "real" path of the current directory using realpath This is necessary so that the two paths match in terms of symlinks resolution. - strip the base directory from the absolute path. The result is the target file with a path relative to the current directory without symlink resolution, but correctly handling the case where symlinks are presents in the parent directories. Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com> Tested-by: Andrei Cherechesu <andrei.cherechesu@oss.nxp.com>
* uboot-script-gen: Skip symbolic links resolvingAndrei Cherechesu2022-04-111-1/+1
| | | | | | | | | | | Skipped symbolic links resolving, since the file names that we pass via configs are symlinks, but we want the tool to generate a script with the exact same names that we pass to it. Signed-off-by: Andrei Cherechesu <andrei.cherechesu@nxp.com> Reviewed-by: Ayan Kumar Halder <ayankuma@xilinx.com> Acked-by: Stefano Stabellini <sstabellini@kernel.org>
* If bootm, generate a u-boot Legacy uImage to bootStefano Stabellini2022-03-241-1/+22
| | | | | | | | | | | | | | | | If BOOT_CMD is specified as "bootm" it requires a uImage to boot. Automatically generate a $XEN.ub binary using mkimage and specifying the right loading address. Also remove "u-boot legacy uImage" from the allowed Xen binary types because we cannot easily check that the uImage was built with the right address. Note that "ARM OpenFirmware" is the type returned by certain versions of "file" utility for a Xen arm32 binary. Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com> Reviewed-by: Ayan Kumar Halder <ayankuma@xilinx.com>
* Add support for BOOT_CMDAyan Kumar Halder2022-03-181-12/+18
| | | | | | | | | | With BOOT_CMD, one can specify the boot command used by the imagebuilder. The valid values are 'booti', 'bootm' and 'bootefi'. Also, removed EFI option. This is now covered by BOOT_CMD. Signed-off-by: Ayan Kumar Halder <ayankuma@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
* Add support for uboot legacy imagesAyan Kumar Halder2022-03-181-1/+1
| | | | | | | | | | | | For armv7 based platforms, xen binary needs to be converted to uboot legacy image format. For example mkimage -A arm -T kernel -C none -a 0x40e00000 -e 0x40e00000 -d xen-4.17-unstable xen.ub Our uboot-script should be able to recognize these images. Signed-off-by: Ayan Kumar Halder <ayankuma@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
* Add support to load images via usbAyan Kumar Halder2022-03-141-0/+4
| | | | | | | | | | | With certain boards the only way possible to load the boot images, is from the usb partition which has been formatted with FAT filesystem. Thus, added support to load images from the usb device with a FAT partition. Signed-off-by: Ayan Kumar Halder <ayankuma@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
* Specify the memory and virtual cpu count for DOM0Ayan Kumar Halder2022-01-201-1/+17
| | | | | | | | | | | | | Introduced the new config options :- DOM0_MEM - To specify the amount of memory (in MB) that is assigned to Dom0. DOM0_VCPUS - To specify the count of virtual CPUs for Dom0. These options are used to set XEN_CMD. Signed-off-by: Ayan Kumar Halder <ayankuma@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
* Avoid exiting the script from the commonAyan Kumar Halder2021-12-211-2/+14
| | | | | | | | | | | | | | | | | | | | | | | If there is any error in compile_merge_partial_dts() and sanity_check_partial_dts(), it should return 1 to the caller. The caller will then check the return and call cleanup_and_return_err() (which terminates the script). This is to prevent compile_merge_partial_dts() and sanity_check_partial_dts() terminating the script. The reason being these functions can get invoked from disk_image (in the future) which may require some additional cleanup. Also, moved cleanup_and_return_err() to uboot-script-gen as the cleanup is specific to the script. Ensure that we preseve the directory containing the partial dtbs only when the dtbs were generated successfully. Else, we delete it. Signed-off-by: Ayan Kumar Halder <ayankuma@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
* Refactor uboot-script-genAyan Kumar Halder2021-12-171-154/+3
| | | | | | | | | | | | Extract some of the functions from uboot-script-gen into common. This will be sourced by disk_image(in subsequent patch) which will invoke the functions for generating dtb. common will have access to all the environment variables defined in the Imagebuilder config file as described in README.md Signed-off-by: Ayan Kumar Halder <ayankuma@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
* Return an error if DOMU_KERNEL[] is not definedAyan Kumar Halder2021-12-151-0/+7
| | | | | | | | | | DOMU_KERNEL[] needs to be defined in the config file. If this is not defined, then the user has specified an incorrect number for NUM_DOMUS. Signed-off-by: Ayan Kumar Halder <ayankuma@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
* Add support for compiling and merging partial device treesAyan Kumar Halder2021-12-151-7/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | One can specify the repository and the directory holding the partial device trees via the config option PASSTHROUGH_DTS_REPO. This can be either a git url or a local directory containing the partial device trees. Also, the passthrough devices for each DOMU are specified via DOMU_PASSTHROUGH_PATHS config option. Imagebuilder will compile the partial device trees. The underlying assumption is that the name of the partial device tree should match to the name of the device specified in DOMU_PASSTHROUGH_PATHS. For example (in case of git repo) :- PASSTHROUGH_DTS_REPO="git@github.com:Xilinx/xen-passthrough-device-trees.git device-trees-2021.2" DOMU_PASSTHROUGH_PATHS[0]="/axi/serial@ff010000 /axi/mmc@ff170000" (This tells imagebuilder to clone the repo and use serial@ff010000.dts and mmc@ff170000.dts from device-trees-2021.2 folder, to compile and generate a partial dtb for DOMU[0]. If the files are absent, it will give an error. Also, if the files mismatching values for #address-cells and #size-cells, it will give an error. Signed-off-by: Ayan Kumar Halder <ayankuma@xilinx.com> Reviewed-by: Stefano Stabellini <stefano.stabellini@xilinx.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
* Enable setting xen,passthroughAyan Kumar Halder2021-11-101-0/+5
| | | | | | | | | | Add an option 'XEN_PASSTHROUGH_PATHS' to the imagebuilder config file. It takes a list of device paths (separated by spaces) which needs to be marked with xen,passthrough. Signed-off-by: Ayan Kumar Halder <ayankuma@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
* Moved the default assignment of domU bootargsAyan Kumar Halder2021-11-091-4/+4
| | | | | | | | | | | The default assignment of domU bootargs has been moved from add_device_tree_kernel() to xen_config(). This is done to mantain consistency with other DomU defaults. Reported-by: Brian Woods <brian.woods@xilinx.com> Signed-off-by: Ayan Kumar Halder <ayankuma@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
* Enable the user to override the bootargs for domUAyan Kumar Halder2021-11-051-2/+7
| | | | | | | | | | | | | | | | | | | | | The user can specify the bootargs for domU in the config file as follows:- DOMU_CMD[x]="<cmd line params>" As an example, DOMU_CMD[0]="console=ttyPS0 earlycon console=ttyPS0,115200 console=ttyAMA0 clk_ignore_unused rdinit=/sbin/init root=/dev/ram0 init=/bin/sh" If the user does not specify this, then the default command line param is:- "console=ttyAMA0" Also, updated the README.md. Signed-off-by: Ayan Kumar Halder <ayankuma@xilinx.com> [stefano: improve README] Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
* Change Xen load order to enable Secure BootBrian Woods2021-09-221-5/+7
| | | | | | | | | | Secure boot on uboot expects the last PE image loaded be the signed image used. Simply move Xen to the bottom of the load order (other than device trees and bitstreams) and it enables Xen to boot. Signed-off-by: Brian Woods <brian.woods@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
* Clean up CLI argument override sectionBrian Woods2021-09-101-28/+14
| | | | | | Signed-off-by: Brian Woods <brian.woods@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
* Add support for loading bitstreamsBrian Woods2021-09-101-0/+35
| | | | | | Signed-off-by: Brian Woods <brian.woods@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
* Add baremetal Linux supportBrian Woods2021-09-101-108/+234
| | | | | | | | | | Make it possible to use imagebuilder with baremetal Linux. This allows baremetal Linux to be booted in the various ways Xen is now (individual files with a script, fit with a script and fit via a config). Signed-off-by: Brian Woods <brian.woods@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
* Restructure uboot-script-gen for Linux supportBrian Woods2021-09-031-273/+285
| | | | | | | | | For later add Linux support, restructure the code so it's easier to add various other OSs configurartions. Signed-off-by: Brian Woods <brian.woods@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
* Add FIT signing options to configBrian Woods2021-09-031-3/+11
| | | | | | | | Also add [-f] to the help message as it was missing. Signed-off-by: Brian Woods <brian.woods@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
* Add support for setting LOAD_CMD in the configBrian Woods2021-09-031-8/+18
| | | | | | | | | | Reducing what's needed in the CLI arguments to a minimum to streamline usage. The current behavior does not change and setting it on the CLI arguments will overwrite what's in the config file. Signed-off-by: Brian Woods <brian.woods@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
* Add support for EFI in configBrian Woods2021-09-031-2/+7
| | | | | | | | | Make it so that EFI enablement can be configured in the config file for uboot-script gen. Signed-off-by: Brian Woods <brian.woods@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
* Change fit behavior for uboot-script-genBrian Woods2021-09-031-47/+53
| | | | | | | | | Add support for adding a field in the config file and add support in uboot-script-gen for it. Signed-off-by: Brian Woods <brian.woods@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
* Fix error in uboot-script-gen help messageBrian Woods2021-09-031-2/+2
| | | | | | Signed-off-by: Brian Woods <brian.woods@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
* Fix delimiters for dt_setBrian Woods2021-09-031-15/+28
| | | | | | | | | There was a problem with delimiters and how it worked for both the uboot scripts and the edited device trees. Signed-off-by: Brian Woods <brian.woods@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
* Add support for EFI in U-boot via bootefiBrian Woods2021-07-191-5/+14
| | | | | | | | | Also add "multiboot,module" compatible string for dom0 kernel and ramdisk, so that Xen can detect it and skip loading the xen.cfg file. Signed-off-by: Brian Woods <brian.woods@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
* Add support for device tree overlaysBrian Woods2021-07-191-1/+50
| | | | | | | | | | | | Device tree overlaps support in u-boot means that adding overlay support at boot time is easy. Simply loading the files via tftp/scsi/fit etc and then applying the overlays before the normal imagebuilder fdt edits at boot time allows for applying overlays without changing the device tree files. Signed-off-by: Brian Woods <brian.woods@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
* Add FIT signature supportBrian Woods2021-07-191-32/+42
| | | | | | | | Add support for signing FIT images. Signed-off-by: Brian Woods <brian.woods@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
* Add FIT support with scriptBrian Woods2021-07-191-13/+60
| | | | | | | | | | | | Add a "fit" option that uses a script rather than a standard FIT format. This allows traditional imagerbuilder script support to be used with FIT images. Dom0less and everything else works and is free of the limitations that the standard FIT format of using configs has. Signed-off-by: Brian Woods <brian.woods@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Tested-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
* Add support for creating a standard fit imageBrian Woods2021-07-191-4/+181
| | | | | | | | | | This allows the creation of a standard fit image without the use of a script. This also means that supporting dom0less configs is rather tricky since it uses bootm and not booti. Signed-off-by: Brian Woods <brian.woods@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
* Add support for modding device treeBrian Woods2021-07-191-36/+89
| | | | | | | | | | Rather than using an uboot script to modify the device tree, allow an config option to be specified so that a device tree is generated as well. Making it to see what exactly is given to Xen. Signed-off-by: Brian Woods <brian.woods@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
* uboot-script-gen: skip DomUs with rootfs instead of exitingStefano Stabellini2021-05-171-6/+14
| | | | | | | | Also introduce a new DOMU_NOBOOT option to force a domU not to be started automatically at boot as dom0less guest. Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com> Reviewed-by: Brian Woods <brian.woods@xilinx.com>
* Introduce multiple partitions support to disk_imageStefano Stabellini2021-05-171-3/+9
| | | | | | | | | | | | | | | | | | Rootfses that should be written to disk as their own partition are called *_ROOTFS instead of *_RAMDISK. This change makes the config file clearer and more consistent. However it changes the current behavior as the Dom0 RAMDISK (not ROOTFS) was written to disk as its own partition before, and now it is not. In the case of uboot-script-gen, dom0less guests cannot access disk partitions yet (missing PV drivers support). Hence, if one or more domU ROOTFSes are specified, print an error and exit. For dom0, base the root= parameter generation on the presence of DOM0_ROOTFS. Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com> Signed-off-by: Brian Woods <brian.woods@xilinx.com> Reviewed-by: Brian Woods <brian.woods@xilinx.com>
* Add/fix support for SCSI/SD aliases for load cmdsBrian Woods2021-02-011-3/+35
| | | | | | | | | | | | With the -t option, the "sd" was an alias for the "load scsi 0:1" load command. Change that to a "load mmc 0:1" alias and then add a "scsi" alias which is "load scsi 0:1". To make sure these aliases and manually setting the load command works, a parsing the command and setting the correct partition and devs was also added. Signed-off-by: Brian Woods <brian.woods@xilinx.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
* Add DOMU_MEM and DOMU_VCPUSStefano Stabellini2020-11-041-2/+16
| | | | | | | | Add two new config file parameters to configure the amount of memory and the number of vcpus of dom0less VMs. Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com> Reviewed-by: Brian Woods <brian.woods@xilinx.com>
* Add options for Xen and Dom0 CMD argumentsBrian Woods2020-10-271-3/+22
| | | | | | | | | | | Both XEN_CMD and DOM0_CMD are optional settings in the config file that set Xen's and Dom0's command line arguments. If not set, a default value will be used. Also, for Dom0's command line arguments, if root isn't set in it, it will determine the best option based on the load argument. Signed-off-by: Brian Woods <brian.woods@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
* Don't display full path when printing helpBrian Woods2020-08-051-3/+4
| | | | | | Signed-off-by: Brian Woods <brian.woods@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
* Update doc for uboot-script-gen -dBrian Woods2020-05-131-1/+1
| | | | | | | | | | | The -d option for uboot-script-gen was poorly worded. The -d option isn't a working directory but rather the "root" directory for where the tftp or other root directory would be in relation to the files. Any files generated in the created of the boot.src/source files are in /tmp and are deleted afterwards. Signed-off-by: Brian Woods <brian.woods@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
* Add support for absolute paths in configSwagath Gadde2020-05-131-1/+3
| | | | | | | | | Some build systems like yocto use absolute paths. Add support for them so they can be used in the config file. Signed-off-by: Swagath Gadde <swagath.gadde@xilinx.com> Signed-off-by: Brian Woods <brian.woods@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
* Increase file compatibility for DTBsBrian Woods2020-05-131-0/+5
| | | | | | | | | | In some distros (like RHEL 6 and 7), file identifies the device tree blobs (DTBs) as "data". To make imagebuilder work on these older distros, change it where DTBs are correctly identified as "Device Tree Blob" or "data". Signed-off-by: Brian Woods <brian.woods@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>