From e8272cbd59afdc1617e8c0288ebd663fd743d4b5 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Sat, 14 Jan 2023 15:49:35 -0500 Subject: x86: Fix saying arch_cpu_init_dm in debug/docs The function arch_cpu_init_dm was renamed to fsp_setup_pinctrl in these cases, so rename debug / docs to match. Cc: Simon Glass Fixes: 7fe32b3442f0 ("event: Convert arch_cpu_init_dm() to use events") Signed-off-by: Tom Rini Reviewed-by: Simon Glass --- doc/board/google/chromebook_coral.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/board/google/chromebook_coral.rst b/doc/board/google/chromebook_coral.rst index 8edbf0429cd..23e2db45564 100644 --- a/doc/board/google/chromebook_coral.rst +++ b/doc/board/google/chromebook_coral.rst @@ -259,7 +259,7 @@ Boot flow - U-Boot pre-relocation U-Boot (running from start_from_spl.S) starts running in RAM and uses the same stack as SPL. It does various init activities before relocation. Notably -arch_cpu_init_dm() sets up the pin muxing for the chip using a very large table +fsp_setup_pinctrl() sets up the pin muxing for the chip using a very large table in the device tree. PCI auto-config is not used before relocation, but CONFIG_PCI of course is -- cgit v1.3.1 From ff6ef4b9093ff70b7f776dd92377f29d0f999984 Mon Sep 17 00:00:00 2001 From: Enric Balletbo i Serra Date: Tue, 10 Jan 2023 17:19:32 +0100 Subject: doc: man-page for the part command Provide a man-page for the part command. Signed-off-by: Enric Balletbo i Serra --- doc/usage/cmd/part.rst | 136 +++++++++++++++++++++++++++++++++++++++++++++++++ doc/usage/index.rst | 1 + 2 files changed, 137 insertions(+) create mode 100644 doc/usage/cmd/part.rst (limited to 'doc') diff --git a/doc/usage/cmd/part.rst b/doc/usage/cmd/part.rst new file mode 100644 index 00000000000..ed464b180bb --- /dev/null +++ b/doc/usage/cmd/part.rst @@ -0,0 +1,136 @@ +.. SPDX-License-Identifier: GPL-2.0+: + +part command +=============== + +Synopis +------- + +:: + + part uuid : [varname] + part list [flags] [varname] + part start + part size + part number + part types + +Description +----------- + +The `part` command is used to manage disk partition related commands. + +The 'part uuid' command prints or sets an environment variable to partition UUID + + interface + interface for accessing the block device (mmc, sata, scsi, usb, ....) + dev + device number + part + partition number + varname + an optional environment variable to store the current partition UUID value into. + +The 'part list' command prints or sets an environment variable to the list of partitions + + interface + interface for accessing the block device (mmc, sata, scsi, usb, ....) + dev + device number + part + partition number + flags + -bootable + lists only bootable partitions + varname + an optional environment variable to store the list of partitions value into. + +The 'part start' commnad sets an environment variable to the start of the partition (in blocks), +part can be either partition number or partition name. + + interface + interface for accessing the block device (mmc, sata, scsi, usb, ....) + dev + device number + part + partition number + varname + a variable to store the current start of the partition value into. + +The 'part size' command sets an environment variable to the size of the partition (in blocks), +part can be either partition number or partition name. + + interface + interface for accessing the block device (mmc, sata, scsi, usb, ....) + dev + device number + part + partition number + varname + a variable to store the current size of the partition value into. + +The 'part number' command sets an environment variable to the partition number using the partition name, +part must be specified as partition name. + + interface + interface for accessing the block device (mmc, sata, scsi, usb, ....) + dev + device number + part + partition number + varname + a variable to store the current partition number value into + +The 'part types' command list supported partition table types. + +Examples +-------- + +:: + + => host bind 0 ./test_gpt_disk_image.bin + => part uuid host 0:1 + 24156b69-3378-497f-bb3e-b982223de528 + => part uuid host 0:1 varname + => env print varname + varname=24156b69-3378-497f-bb3e-b982223de528 + => + => part list host 0 + + Partition Map for HOST device 0 -- Partition Type: EFI + + Part Start LBA End LBA Name + Attributes + Type GUID + Partition GUID + 1 0x00000800 0x00000fff "second" + attrs: 0x0000000000000000 + type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 + (data) + guid: 24156b69-3378-497f-bb3e-b982223de528 + 2 0x00001000 0x00001bff "first" + attrs: 0x0000000000000000 + type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 + (data) + guid: 5272ee44-29ab-4d46-af6c-4b45ac67d3b7 + => + => part start host 0 2 varname + => env print varname + varname=1000 + => + => part size host 0 2 varname + => env print varname + varname=c00 + => + => part number host 0 2 varname + => env print varname + varname=0x2 + => + => part types + Supported partition tables: EFI, AMIGA, DOS, ISO, MAC + +Return value +------------ + +The return value $? is set to 0 (true) if the command succededd. If an +error occurs, the return value $? is set to 1 (false). diff --git a/doc/usage/index.rst b/doc/usage/index.rst index bbd40a6e189..cf3666a77d8 100644 --- a/doc/usage/index.rst +++ b/doc/usage/index.rst @@ -61,6 +61,7 @@ Shell commands cmd/mbr cmd/md cmd/mmc + cmd/part cmd/pause cmd/pinmux cmd/printenv -- cgit v1.3.1 From a685e9c99fb22b37aa5a9c8df235e35384321515 Mon Sep 17 00:00:00 2001 From: Enric Balletbo i Serra Date: Tue, 10 Jan 2023 17:19:33 +0100 Subject: doc/README.gpt: Fix typo 'a optionnal' Change the string 'a optionnal' to 'an optional'. Signed-off-by: Enric Balletbo i Serra Reviewed-by: Simon Glass --- doc/README.gpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/README.gpt b/doc/README.gpt index 91e397d06f8..cc2a1b7ac78 100644 --- a/doc/README.gpt +++ b/doc/README.gpt @@ -260,7 +260,7 @@ Partition type GUID: For created partition, the used partition type GUID is PARTITION_BASIC_DATA_GUID (EBD0A0A2-B9E5-4433-87C0-68B6B72699C7). -If you define 'CONFIG_PARTITION_TYPE_GUID', a optionnal parameter 'type' +If you define 'CONFIG_PARTITION_TYPE_GUID', an optional parameter 'type' can specify a other partition type guid: "uuid_disk=...;name=u-boot,size=60MiB,uuid=...; -- cgit v1.3.1 From 22e7f1d108410cc81a0ec5a6481338e4d6e9586e Mon Sep 17 00:00:00 2001 From: Enric Balletbo i Serra Date: Tue, 10 Jan 2023 17:19:34 +0100 Subject: cmd: part: Add partition-related type command This implements the following command: part type mmc 0:1 -> print partition type UUID part type mmc 0:1 uuid -> set environment variable to partition type UUID "part type" can be useful when writing a bootcmd which searches for a specific partition type to enable automatic discovery of partitions and their intended usage or mount point. Signed-off-by: Enric Balletbo i Serra Reviewed-by: Simon Glass [trini: Fix when CONFIG_PARTITION_TYPE_GUID is disabled and have the command check for "types" before "type"] Signed-off-by: Tom Rini --- cmd/part.c | 35 +++++++++++++++++++++++++++++++++++ doc/usage/cmd/part.rst | 18 ++++++++++++++++++ 2 files changed, 53 insertions(+) (limited to 'doc') diff --git a/cmd/part.c b/cmd/part.c index 9d419c967cb..28f2b7ff9bb 100644 --- a/cmd/part.c +++ b/cmd/part.c @@ -182,6 +182,31 @@ static int do_part_number(int argc, char *const argv[]) return do_part_info(argc, argv, CMD_PART_INFO_NUMBER); } +#ifdef CONFIG_PARTITION_TYPE_GUID +static int do_part_type(int argc, char *const argv[]) +{ + int part; + struct blk_desc *dev_desc; + struct disk_partition info; + + if (argc < 2) + return CMD_RET_USAGE; + if (argc > 3) + return CMD_RET_USAGE; + + part = blk_get_device_part_str(argv[0], argv[1], &dev_desc, &info, 0); + if (part < 0) + return 1; + + if (argc > 2) + env_set(argv[2], info.type_guid); + else + printf("%s\n", info.type_guid); + + return 0; +} +#endif + static int do_part_types(int argc, char * const argv[]) { struct part_driver *drv = ll_entry_start(struct part_driver, @@ -220,6 +245,10 @@ static int do_part(struct cmd_tbl *cmdtp, int flag, int argc, return do_part_number(argc - 2, argv + 2); else if (!strcmp(argv[1], "types")) return do_part_types(argc - 2, argv + 2); +#ifdef CONFIG_PARTITION_TYPE_GUID + else if (!strcmp(argv[1], "type")) + return do_part_type(argc - 2, argv + 2); +#endif return CMD_RET_USAGE; } @@ -244,6 +273,12 @@ U_BOOT_CMD( "part number \n" " - set environment variable to the partition number using the partition name\n" " part must be specified as partition name\n" +#ifdef CONFIG_PARTITION_TYPE_GUID + "part type :\n" + " - print partition type\n" +#endif + "part type : \n" + " - set environment variable to partition type\n" "part types\n" " - list supported partition table types" ); diff --git a/doc/usage/cmd/part.rst b/doc/usage/cmd/part.rst index ed464b180bb..8d2a2803912 100644 --- a/doc/usage/cmd/part.rst +++ b/doc/usage/cmd/part.rst @@ -13,6 +13,7 @@ Synopis part start part size part number + part type : [varname] part types Description @@ -81,6 +82,17 @@ part must be specified as partition name. varname a variable to store the current partition number value into +The 'part type' command prints or sets an environment variable to the partition type UUID. + + interface + interface for accessing the block device (mmc, sata, scsi, usb, ....) + dev + device number + part + partition number + varname + a variable to store the current partition type UUID value into + The 'part types' command list supported partition table types. Examples @@ -126,6 +138,12 @@ Examples => env print varname varname=0x2 => + => part type host 0:1 + ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 + => part type host 0:1 varname + => env print varname + varname=ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 + => => part types Supported partition tables: EFI, AMIGA, DOS, ISO, MAC -- cgit v1.3.1