| 802 | } |
| 803 | |
| 804 | static void check_configdir(void) |
| 805 | { |
| 806 | if (g_configpath && verify_optiondir(g_configpath)) |
| 807 | { |
| 808 | /* Get the path to the custom board scripts directory */ |
| 809 | |
| 810 | snprintf(g_buffer, BUFFER_SIZE, "%s%c..%c..%cscripts", |
| 811 | g_configpath, g_delim, g_delim, g_delim); |
| 812 | if (verify_optiondir(g_buffer)) |
| 813 | { |
| 814 | g_scriptspath = strdup(g_buffer); |
| 815 | } |
| 816 | } |
| 817 | else |
| 818 | { |
| 819 | /* Get the path to the top level configuration directory: boards/ */ |
| 820 | |
| 821 | snprintf(g_buffer, BUFFER_SIZE, "%s%cboards", g_topdir, g_delim); |
| 822 | debug("check_configdir: Checking configtop=%s\n", g_buffer); |
| 823 | |
| 824 | verify_directory(g_buffer); |
| 825 | g_configtop = strdup(g_buffer); |
| 826 | |
| 827 | /* Get and verify the path to the selected configuration: |
| 828 | * boards/<archdir>/<chipdir>/<boarddir>/configs/<configdir> |
| 829 | */ |
| 830 | |
| 831 | find_archname(); |
| 832 | |
| 833 | snprintf(g_buffer, BUFFER_SIZE, "%s%cboards%c%s%c%s%c%s%cconfigs%c%s", |
| 834 | g_topdir, g_delim, g_delim, g_archdir, g_delim, g_chipdir, |
| 835 | g_delim, g_boarddir, g_delim, g_delim, g_configdir); |
| 836 | debug("check_configdir: Checking configpath=%s\n", g_buffer); |
| 837 | |
| 838 | if (!verify_optiondir(g_buffer)) |
| 839 | { |
| 840 | fprintf(stderr, "ERROR: No configuration at %s\n", g_buffer); |
| 841 | fprintf(stderr, "Run tools/configure -L" |
| 842 | " to list available configurations.\n"); |
| 843 | exit(EXIT_FAILURE); |
| 844 | } |
| 845 | |
| 846 | g_configpath = strdup(g_buffer); |
| 847 | |
| 848 | /* Get and verify the path to the scripts directory: |
| 849 | * boards/<archdir>/<chipdir>/<boarddir>/scripts |
| 850 | */ |
| 851 | |
| 852 | snprintf(g_buffer, BUFFER_SIZE, "%s%cboards%c%s%c%s%c%s%cscripts", |
| 853 | g_topdir, g_delim, g_delim, g_archdir, g_delim, |
| 854 | g_chipdir, g_delim, g_boarddir, g_delim); |
| 855 | debug("check_configdir: Checking scripts path=%s\n", g_buffer); |
| 856 | |
| 857 | g_scriptspath = NULL; |
| 858 | if (verify_optiondir(g_buffer)) |
| 859 | { |
| 860 | g_scriptspath = strdup(g_buffer); |
| 861 | } |
no test coverage detected