Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] remove SD-card support, absent from Zephyr #1747

Closed
wants to merge 1 commit into from

Conversation

josuah
Copy link
Contributor

@josuah josuah commented Aug 17, 2023

This is an illustration around which discuss for a fix:

Zephyr on LiteX VecRiscv did not work out of the box for me.

This patch is a fix for this error:

$ xargs <overlay.config west build -p -b litex_vexriscv zephyr/samples/subsys/shell/shell_module -- -DDTC_OVERLAY_FILE="$PWD/overlay.dts"
[...]
-- Found devicetree overlay: /home/zephyr/overlay.dts
devicetree error: /home/zephyr/overlay.dts:49 (column 1): parse error: undefined node label 'sdcard_block2mem'
-- In: /home/zephyr/build/zephyr, command: /home/zephyr/.venv/bin/python3.11;/home/zephyr/zephyr/scripts/dts/gen_defines.py;--dts;/home/zephyr/build/zephyr/zephyr.dts.pre;--dtc-flags;'';--bindings-dirs;/home/zephyr/zephyr/dts/bindings;--header-out;/home/zephyr/build/zephyr/include/generated/devicetree_generated.h.new;--dts-out;/home/zephyr/build/zephyr/zephyr.dts.new;--edt-pickle-out;/home/zephyr/build/zephyr/edt.pickle;--vendor-prefixes;/home/zephyr/zephyr/dts/bindings/vendor-prefixes.txt
CMake Error at /home/zephyr/zephyr/cmake/modules/dts.cmake:276 (message):
  gen_defines.py failed with return code: 1
Call Stack (most recent call first):
  /home/zephyr/zephyr/cmake/modules/zephyr_default.cmake:115 (include)
  /home/zephyr/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  /home/zephyr/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  CMakeLists.txt:4 (find_package)
-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: /usr/bin/cmake -DWEST_PYTHON=/home/zephyr/.venv/bin/python3.11 -B/home/zephyr/build -GNinja -DBOARD=litex_vexriscv -DDTC_OVERLAY_FILE=/home/zephyr/overlay.dts -DCONFIG_UART_LITEUART=y -DCONFIG_LITEX_TIMER=y -DCONFIG_ETH_LITEETH=n -DCONFIG_SPI_LITESPI=n -DCONFIG_SD_LITESD=n -DCONFIG_SD_LITESD=n -DCONFIG_SD_LITESD=n -DCONFIG_SD_LITESD=n -DCONFIG_SD_LITESD=n -DCONFIG_I2C_LITEX=n -DCONFIG_I2S_LITEX=n -DCONFIG_I2S_LITEX=n -DCONFIG_CLOCK_CONTROL_LITEX=n -DCONFIG_LITEX_CSR_DATA_WIDTH=32 -S/home/zephyr/zephyr/samples/subsys/shell/shell_module
$

What I cannot understand is why would there be SD-Card support in zephyr-on-litex-vexriscv if there is no support on upstream zephyr?

https://github.com/search?q=repo%3Azephyrproject-rtos%2Fzephyr+litesd&type=code

Did I miss something?

@enjoy-digital
Copy link
Owner

@AndrewD, @rtucker85: I think adding this was part of one of you patches, do you have more info to provide to @josuah on this?

@rtucker85
Copy link
Contributor

@enjoy-digital Its been a while, and we never continued our development with Zephyr but ill be sure to take a look to refresh myself and provide more information shortly.

@enjoy-digital
Copy link
Owner

@rtucker85: Great, thanks!

@josuah josuah force-pushed the remove_sdcard branch 4 times, most recently from cb79ce2 to b2fce1b Compare September 3, 2023 23:18
@josuah josuah changed the title RFC: remove SD-card support, absent from Zephyr [RFC] remove SD-card support, absent from Zephyr Sep 5, 2023
@josuah josuah force-pushed the remove_sdcard branch 2 times, most recently from 8247275 to bdf92c0 Compare September 14, 2023 21:23
This is a fix for this error:

    $ xargs <overlay.config west build -p -b litex_vexriscv zephyr/samples/subsys/shell/shell_module -- -DDTC_OVERLAY_FILE="$PWD/overlay.dts"
    [...]
    -- Found devicetree overlay: /home/zephyr/overlay.dts
    devicetree error: /home/zephyr/overlay.dts:49 (column 1): parse error: undefined node label 'sdcard_block2mem'
    -- In: /home/zephyr/build/zephyr, command: /home/zephyr/.venv/bin/python3.11;/home/zephyr/zephyr/scripts/dts/gen_defines.py;--dts;/home/zephyr/build/zephyr/zephyr.dts.pre;--dtc-flags;'';--bindings-dirs;/home/zephyr/zephyr/dts/bindings;--header-out;/home/zephyr/build/zephyr/include/generated/devicetree_generated.h.new;--dts-out;/home/zephyr/build/zephyr/zephyr.dts.new;--edt-pickle-out;/home/zephyr/build/zephyr/edt.pickle;--vendor-prefixes;/home/zephyr/zephyr/dts/bindings/vendor-prefixes.txt
    CMake Error at /home/zephyr/zephyr/cmake/modules/dts.cmake:276 (message):
      gen_defines.py failed with return code: 1
    Call Stack (most recent call first):
      /home/zephyr/zephyr/cmake/modules/zephyr_default.cmake:115 (include)
      /home/zephyr/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
      /home/zephyr/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      CMakeLists.txt:4 (find_package)
    -- Configuring incomplete, errors occurred!
    FATAL ERROR: command exited with status 1: /usr/bin/cmake -DWEST_PYTHON=/home/zephyr/.venv/bin/python3.11 -B/home/zephyr/build -GNinja -DBOARD=litex_vexriscv -DDTC_OVERLAY_FILE=/home/zephyr/overlay.dts -DCONFIG_UART_LITEUART=y -DCONFIG_LITEX_TIMER=y -DCONFIG_ETH_LITEETH=n -DCONFIG_SPI_LITESPI=n -DCONFIG_SD_LITESD=n -DCONFIG_SD_LITESD=n -DCONFIG_SD_LITESD=n -DCONFIG_SD_LITESD=n -DCONFIG_SD_LITESD=n -DCONFIG_I2C_LITEX=n -DCONFIG_I2S_LITEX=n -DCONFIG_I2S_LITEX=n -DCONFIG_CLOCK_CONTROL_LITEX=n -DCONFIG_LITEX_CSR_DATA_WIDTH=32 -S/home/zephyr/zephyr/samples/subsys/shell/shell_module
    $
@josuah
Copy link
Contributor Author

josuah commented Sep 14, 2023

A fix would be to allow partially working devices to not generate any configuration, rather than generate a =n.

This would allow things to be merged on LiteX side first, still have everything working for everyone, and then only merge things upstream on Zephyr side.

I am therefore closing this, but feel free to reopen if you consider that the WIP SD card support should be removed from both Zephyr and Zephry-on-LiteX-VexRiscv.

@josuah josuah closed this Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants