OpenWRT Build System for CentOS 7: Difference between revisions

Line 48: Line 48:
===Obtain Source Files from OpenWRT===
===Obtain Source Files from OpenWRT===


*To clone into the current directory: git clone -b 19.07.3 <nowiki>https://github.com/openwrt/openwrt.git</nowiki> (downloads the 19.07 branch of OpenWRT, which also includes the latest version, 19.07.3)
*To clone into the current directory: git clone -b openwrt-19.07 <nowiki>https://github.com/openwrt/openwrt.git</nowiki> (downloads the 19.07 branch of OpenWRT, which also includes the latest version, 19.07.3)


*To clone into a specific directory: git clone -b 19.07.3 <nowiki>https://github.com/openwrt/openwrt.git</nowiki>  WhatEverDirectoryName (downloads the 19.07 branch of OpenWRT, which also includes the latest version, 19.07.3)
*To clone into a specific directory: git clone -b openwrt-19.07 <nowiki>https://github.com/openwrt/openwrt.git</nowiki>  WhatEverDirectoryName (downloads the 19.07 branch of OpenWRT, which also includes the latest version, 19.07.3)
**To see repository, in web browser: https://git.openwrt.org/openwrt/
**To see repository, in web browser: https://git.openwrt.org/openwrt/
**git tag (essentially shows available versions to build)
**git tag (essentially shows available versions to build)
Line 74: Line 74:
**tar xf WhatEverFileName (be sure one is in the ~ directory)
**tar xf WhatEverFileName (be sure one is in the ~ directory)
**OR... Do it manually (based on instructions from: https://openwrt.org/docs/guide-developer/helloworld/chapter1);
**OR... Do it manually (based on instructions from: https://openwrt.org/docs/guide-developer/helloworld/chapter1);
***git clone -b v19.07.3 <nowiki>https://github.com/openwrt/openwrt.git</nowiki> ~/openwrtSDK (NOTE: The instructions at the above address do not provide the correct URL when cloning)
***Remember, if the SDK has already been downloaded an error similar to: destination path X already exists and is not an empty directory.
***git checkout v19.07.3 (If a specific version is specified there is no need to "checkout" a version as specified in the same instructions, plus it appears since the instructions have been written there are other naming conventions too, like openwrt-19.07, but choosing a specific version is better.)
***...so skip to the ./scripts/feeds update -a
***make distclean wipes out all configuration, starts from a clean slate
****git clone -b openwrt-19.07.3 <nowiki>https://github.com/openwrt/openwrt.git</nowiki> ~/openwrtSDK (NOTE: The instructions at the above address do not provide the correct URL when cloning)
***./scripts/feeds update -a: Downloads pa
****git checkout v19.07.3 (If a specific version is specified there is no need to "checkout" a version as specified in the same instructions, plus it appears since the instructions have been written there are other naming conventions too, like openwrt-19.07, but choosing a specific version is better.)
****make distclean wipes out all configuration, starts from a clean slate
****./scripts/feeds update -a: Downloads pa
**
**
**./scripts/feeds update -a
**./scripts/feeds update -a
Line 125: Line 127:
**Feeds Symbolic Links in this Directory (for convenience?): ~/openwrt/package/feeds/packages/ (created when the ''./scripts/feeds update -a'' command is used)
**Feeds Symbolic Links in this Directory (for convenience?): ~/openwrt/package/feeds/packages/ (created when the ''./scripts/feeds update -a'' command is used)


== Notes on 9.7.2020 ==
==Notes on 9.7.2020==
On Monday 9.7.2020 during the late afternoon (UTC-8) it was observed that OpenWRT 19.07.4 was released on Tuesday 9.8.2020.  This would seem to indicate the server for OpenWRT downloads is somewhere in Europe.
On Monday 9.7.2020 during the late afternoon (UTC-8) it was observed that OpenWRT 19.07.4 was released on Tuesday 9.8.2020.  This would seem to indicate the server for OpenWRT downloads is somewhere in Europe.


Line 189: Line 191:
**src-git telephony <nowiki>https://git.openwrt.org/feed/telephony.git;openwrt-19.07</nowiki>
**src-git telephony <nowiki>https://git.openwrt.org/feed/telephony.git;openwrt-19.07</nowiki>


<br />


== Notes from 9.10.2020 ==
When using the ./scripts/feeds update -a command, the First Top Tip is: The Directory defined in feeds.conf or feeds.conf.default with the src-link command / directive that contains the path to a feed must have a directory, subdirectory structure, Makefile.
If the Makefile file for a project named helloworld is located in /WhatEverPath/examples/helloworld/Makefile, the the following applies in the feeds.conf or feeds.conf.default file;
* Nope, won't work: src-link examples /WhatEverPath/examples/helloworld
* This will work: examples /WhatEverPath/examples
* Oh, and no trailing / (forward slash)
* If it isn't done correctly, this unhelpful error message will occur: ... *** target pattern contains no `%'.  Stop.
** For the above error, some sites note an issue with leading or trailing spaces on any line (does not include spaces after a command / directive) and recommending TABs instead.  But after testing with leading and trailing spaces in an attempt to produce the error, it appears that the OpenWRT developers corrected this issue within their script (IE, most errors due to spaces seem to have occurred in an era where only MAKE commands were used prior to the existence of the ./scripts/feeds script.
----<br />
* ~openwrtSDK/feeds/WhatEverDirectory/MakeFile: Modifications here will be reflected in "make Menuconfig"
* The symbolic links originally used in earlier examples are incomplete.  There is NOT a directory to directory equivalent file / directory for symbolic links in ~/openwrtSDK/package/feeds.  IE, the subfolders of all of the symbolic links in ~/openwrtSDK/package/feeds seem to be in a flat structure, where as the directories / files they point to are in a hierarchical structure.
* The README files in the various ~/openWRT/feeds directories make reference to the feeds.conf file which seems to now be titled feeds.conf.default.  Documentation seems to indicate either one of these file names will work, although the one ending in .default seems to trump feeds.conf if both are present.
* In order for a new item to show up in make Menuconfig: Add it to /
** NO ./scripts/feeds/update needs to be run, if: something is manually added as a symbolic link.
** OR
** run the ./scripts/feeds install -a command (obviously this is a better choice)
* Error Logs are located: ~/openwrtSDK/logs/package/feeds/
* If duplicating a directory, start by changing the define Package/WhatEverName that contains: SECTION, TITLE, etc. and every other reference to the same WhatEverName
** It was noticed at minimum, the last line: $(eval $(call BuildPackage,WhatEverName)) had to be changed too.