gl-inet / sdk

OpenWRT SDK for GL.iNet devices
105 stars 33 forks source link

building the package #4

Closed srihara closed 2 years ago

srihara commented 2 years ago

We are trying to do the build setup for AP1300

After buildsetup Followed the below steps for building the package, here used simple program as helloworld. 1.Followed the steps provided for setting up the WSL environment with 18.04 LTS environment 2.Executed the below commands sudo apt update && sudo apt upgrade -y sudo apt install asciidoc bash bc binutils bzip2 fastjar flex gawk gcc genisoimage gettext git intltool jikespg libgtk2.0-dev libncurses5-dev libssl1.0-dev make mercurial patch perl-modules python2.7-dev rsync ruby sdcc subversion unzip util-linux wget xsltproc zlib1g-dev zlib1g-dev -y 3.Downloaded the sdk from windows CMD as it failed from the WSL terminal 4.Ran the below caommand in windows CMD .\download.sh ipq_ipq40xx-qsdk11

  1. created the folder in package folder with helloworld name, then createed the c file with below code

    include

    int main(void) { printf("Helloworld\n\n"); return 0; } 6.Makefile created to build this file. 7.Later tried to build the package with below command ./builder.sh -d ../../../openwrtexamples/helloworld/ -t ipq_ipq40xx-qsdk11 but getting the below errors : invalid optionne 2: set: - set: usage: set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...] ./builder.sh: line 6: $'\r': command not found ./builder.sh: line 8: syntax error near unexpected token $'{\r'' '/builder.sh: line 8:usage() { 8.Also tried building directly from package folder with below command make package/heloworld/{clean,compile} V=s getting the below error when I run from this path. **Makefile:10: /feeds.mk: No such file or directory make: * No rule to make target '/feeds.mk'. Stop.

The code also in the below location: https://github.com/srihara/openwrttestpackage

Can you please help me reolving the issue

srihara commented 2 years ago

Able to setup the environmnet and the things are fine now. THe reason of issue was not compling the code to /home/user, instaead was trying from the windows folders(/mnt/c/....) Closing the issue.