Re: [PATCH] doc: board: starfive: Fix paths in the bash block
On 3/5/24 19:52, Heinrich Schuchardt wrote: On 3/4/24 23:15, Ivan Orlov wrote: From the current documentation it is not entirely obvious where to take some of the u-boot build artifacts in order to flash them to the sd card. Extend the "Program the SD card" block by providing relative paths to the jh7110-starfive-visionfive-2.dtb and u-boot-spl.bin.normal.out files. Add "$(linux_image_dir)/" prefix to the Image.gz and initramfs.cpio.gz files in order to provide some information about where they could be taken from. Signed-off-by: Ivan Orlov --- doc/board/starfive/visionfive2.rst | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/board/starfive/visionfive2.rst b/doc/board/starfive/visionfive2.rst index abda8ac21b..031d66fbfb 100644 --- a/doc/board/starfive/visionfive2.rst +++ b/doc/board/starfive/visionfive2.rst @@ -103,15 +103,15 @@ Program the SD card .. code-block:: bash - sudo dd if=u-boot-spl.bin.normal.out of=/dev/sdb1 + sudo dd if=spl/u-boot-spl.bin.normal.out of=/dev/sdb1 sudo dd if=u-boot.itb of=/dev/sdb2 sudo mount /dev/sdb3 /mnt/ Following the instructions the partition in not formatted. You won't be able to mount it anywhere. Looking at the boot log the author FAT formatted the drive which is not recommendable. - sudo cp u-boot-spl.bin.normal.out /mnt/ + sudo cp spl/u-boot-spl.bin.normal.out /mnt/ sudo cp u-boot.itb /mnt/ - sudo cp Image.gz /mnt/ - sudo cp initramfs.cpio.gz /mnt/ - sudo cp jh7110-starfive-visionfive-2.dtb /mnt/ + sudo cp $(linux_image_dir)/Image.gz /mnt/ + sudo cp $(linux_image_dir)/initramfs.cpio.gz /mnt/ I have no clue why all users should copy the kernel to the root partition on the SD card. If you have a Linux installation on the SD-card, you want the kernel in boot/. But this board boots fine without any SD-card from NVMe, USB, or eMMC. + sudo cp arch/riscv/dts/jh7110-starfive-visionfive-2.dtb /mnt/ Copying the U-Boot device-tree makes no sense it is already available at $fdtcontroladdr. If you ever wanted to copy a device-tree, it should be the one provided with the kernel. This whole section is rather misleading for inexperienced users who just want to boot a Linux distro on the board. Hi Heinrich, Thank you very much for the review. I agree that this documentation is far from being perfect, so I will try to improve it and fix all the flaws in the V2 of this patch :) -- Kind regards, Ivan Orlov
[PATCH] doc: board: starfive: Fix paths in the bash block
>From the current documentation it is not entirely obvious where to take some of the u-boot build artifacts in order to flash them to the sd card. Extend the "Program the SD card" block by providing relative paths to the jh7110-starfive-visionfive-2.dtb and u-boot-spl.bin.normal.out files. Add "$(linux_image_dir)/" prefix to the Image.gz and initramfs.cpio.gz files in order to provide some information about where they could be taken from. Signed-off-by: Ivan Orlov --- doc/board/starfive/visionfive2.rst | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/board/starfive/visionfive2.rst b/doc/board/starfive/visionfive2.rst index abda8ac21b..031d66fbfb 100644 --- a/doc/board/starfive/visionfive2.rst +++ b/doc/board/starfive/visionfive2.rst @@ -103,15 +103,15 @@ Program the SD card .. code-block:: bash - sudo dd if=u-boot-spl.bin.normal.out of=/dev/sdb1 + sudo dd if=spl/u-boot-spl.bin.normal.out of=/dev/sdb1 sudo dd if=u-boot.itb of=/dev/sdb2 sudo mount /dev/sdb3 /mnt/ - sudo cp u-boot-spl.bin.normal.out /mnt/ + sudo cp spl/u-boot-spl.bin.normal.out /mnt/ sudo cp u-boot.itb /mnt/ - sudo cp Image.gz /mnt/ - sudo cp initramfs.cpio.gz /mnt/ - sudo cp jh7110-starfive-visionfive-2.dtb /mnt/ + sudo cp $(linux_image_dir)/Image.gz /mnt/ + sudo cp $(linux_image_dir)/initramfs.cpio.gz /mnt/ + sudo cp arch/riscv/dts/jh7110-starfive-visionfive-2.dtb /mnt/ sudo umount /mnt Booting -- 2.34.1
[PATCH v2] cmd: eeprom: Fix config dependency
We should have CONFIG_DM_I2C or CONFIG_SYS_I2C_LEGACY enabled in order for `cmd/eeprom.c` to compile as it depends on the i2c functions which are not compiled otherwise. Update the Kconfig entry for the 'eeprom' command correspondingly. Signed-off-by: Ivan Orlov --- V1 -> V2: - Remove redundant SYS_SPL_I2C_LEGACY dependency as we can't realy enable commands in the SPL mode cmd/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/Kconfig b/cmd/Kconfig index a86b570517..5d68a461cf 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -740,6 +740,7 @@ config CRC32_VERIFY config CMD_EEPROM bool "eeprom - EEPROM subsystem" + depends on DM_I2C || SYS_I2C_LEGACY help (deprecated, needs conversion to driver model) Provides commands to read and write EEPROM (Electrically Erasable -- 2.34.1
Re: [PATCH] cmd: eeprom: Fix config dependency
On 22/02/2024 17:46, Tom Rini wrote: On Mon, Feb 19, 2024 at 06:18:38PM +, Ivan Orlov wrote: We should have CONFIG_DM_I2C or CONFIG_(SPL_)SYS_I2C_LEGACY enabled in order for `cmd/eeprom.c` to compile as it depends on the i2c functions which are not compiled otherwise. Update the Kconfig entry for the 'eeprom' command correspondingly. Signed-off-by: Ivan Orlov --- cmd/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/Kconfig b/cmd/Kconfig index a86b570517..6a1a64566c 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -740,6 +740,7 @@ config CRC32_VERIFY config CMD_EEPROM bool "eeprom - EEPROM subsystem" + depends on DM_I2C || SYS_I2C_LEGACY || SPL_SYS_I2C_LEGACY You cannot enable commands in SPL, so SPL_SYS_I2C_LEGACY doesn't make sense here. Ah, alright, I'll fix it and send the V2. Thank you for the review! -- Kind regards, Ivan Orlov
[PATCH] cmd: eeprom: Fix config dependency
We should have CONFIG_DM_I2C or CONFIG_(SPL_)SYS_I2C_LEGACY enabled in order for `cmd/eeprom.c` to compile as it depends on the i2c functions which are not compiled otherwise. Update the Kconfig entry for the 'eeprom' command correspondingly. Signed-off-by: Ivan Orlov --- cmd/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/Kconfig b/cmd/Kconfig index a86b570517..6a1a64566c 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -740,6 +740,7 @@ config CRC32_VERIFY config CMD_EEPROM bool "eeprom - EEPROM subsystem" + depends on DM_I2C || SYS_I2C_LEGACY || SPL_SYS_I2C_LEGACY help (deprecated, needs conversion to driver model) Provides commands to read and write EEPROM (Electrically Erasable -- 2.34.1
[PATCH] cmd: license: Add CONFIG_GZIP dependency
'License' command processing code could be successfully compiled only when CONFIG_GZIP option is enabled, otherwise it can't find the 'gunzip' function definition (it is defined in lib/gunzip.c). Add CONFIG_GZIP dependency to 'license' command config option in the corresponding Kconfig. Signed-off-by: Ivan Orlov --- cmd/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/Kconfig b/cmd/Kconfig index 26ad03..0d63cbfda1 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -188,6 +188,7 @@ config CMD_HISTORY config CMD_LICENSE bool "license" select BUILD_BIN2C + depends on GZIP help Print GPL license text -- 2.34.1
[PATCH] cmd: nvedit: Fix typo in 'illegal character' error
Fix a typo: add a space after the single quote in 'illegal character' error message in 'env set' command Signed-off-by: Ivan Orlov --- cmd/nvedit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/nvedit.c b/cmd/nvedit.c index daf1ad37f9..7db78848bb 100644 --- a/cmd/nvedit.c +++ b/cmd/nvedit.c @@ -233,7 +233,7 @@ static int _do_env_set(int flag, int argc, char *const argv[], int env_flag) name = argv[1]; if (strchr(name, '=')) { - printf("## Error: illegal character '='" + printf("## Error: illegal character '=' " "in variable name \"%s\"\n", name); return 1; } -- 2.34.1