UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor
Contributor
1,354 Views
Registered: ‎01-02-2015

You are not inside a Petalinux project

Jump to solution

I cannot run petalinux-config (or any other petalinux command) in my petalinux project directory. When I run petalinux-config, I get:

ERROR: You are not inside a PetaLinux project. Please specify a PetaLinux project!

 

This is an established project that I have successfully built images for in the past. I'm just trying to change one thing in the configuration and now it seems to not be recognized as a project. 

 

What does petalinux use to determine whether I am in a project directory? I have confirmed that the .petalinux directory is present and it contains usage_statistics and usage_statistics_token.

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Explorer
Explorer
1,562 Views
Registered: ‎03-22-2016

Re: You are not inside a Petalinux project

Jump to solution

How about config.project?

0 Kudos
8 Replies
Moderator
Moderator
1,326 Views
Registered: ‎04-24-2017

Re: You are not inside a Petalinux project

Jump to solution

Hi @wdecook,

 

Which version of petalinux are you using? What did you change in the project?

 

Looks like you are executing this command outside the project directory.

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Contributor
Contributor
1,297 Views
Registered: ‎01-02-2015

Re: You are not inside a Petalinux project

Jump to solution

Hi @sandeepg,

 

I'm running petalinux 2018.1 on Ubuntu 16.04 on Oracle VM VirtualBox

 

To my knowledge, nothing has changed since the last successful build.

 

I am quite sure that I'm running the command from the correct directory (top folder of the project). See console output below. This project is called base-plnx:

 

wdecook@wdecook-VirtualBox:~/proj/mti/base-plnx$ pwd
/home/wdecook/proj/mti/base-plnx
wdecook@wdecook-VirtualBox:~/proj/mti/base-plnx$ ls -al
total 32
drwxr-xr-x  8 wdecook wdecook 4096 Jun  4 19:05 .
drwxrwxr-x  7 wdecook wdecook 4096 Jun  1 10:14 ..
drwxrwxr-x  8 wdecook wdecook 4096 Jun  4 18:40 build
drwxrwxr-x  3 wdecook wdecook 4096 Jun  1 09:55 components
drwxrwxr-x  3 wdecook wdecook 4096 Jun  1 11:50 images
drwxrwxr-x  2 wdecook wdecook 4096 Jun  4 19:05 .petalinux
drwxr-xr-x  4 wdecook wdecook 4096 Jun  4 19:05 project-spec
drwxrwxr-x 31 wdecook wdecook 4096 Jun  4 18:28 .Xil
wdecook@wdecook-VirtualBox:~/proj/mti/base-plnx$ petalinux-config
ERROR: You are not inside a PetaLinux project. Please specify a PetaLinux project!
Configures the project or the specified component with menuconfig.

Usage:
  petalinux-config [options] {--component <COMPONENT> |--get-hw-description[=SRC]}

Options:
  -h, --help                      show function usage
  -p, --project <PROJECT>         path to PetaLinux SDK project.
                                  default is the working project
  --oldconfig                     takes the working configuration
  -c, --component <COMPONENT>     Specify the component
                                  If no component is specified, it will do
                                  top level project configuration .
                                  If you specify a component,it will
                                  configure it with menuconfig and saves
                                  user's config fragments in meta-user.
                                  E.g. -c rootfs, -c busybox
  --get-hw-description [SRC]      get hardware description.
                                  if [SRC] is specified, look in that
                                  location for an Vivado export to SDK directory.
                                  Otherwise, this MUST be run from
                                  WITHIN the vivado export to SDK directory.
  --defconfig [DEFCONFIG_TARGET]  defconfig the specified component.
                                  It only applies to kernel for now.
  -v, --verbose                   verbose mode

Note: There is no validation for configurable components. User can provide
      any component, bitbake will throw error for invalid components.

wdecook@wdecook-VirtualBox:~/proj/mti/base-plnx$ 

I know that the simple answer to give here is to just remake the project, but that's a big pain in the butt. It would be nice to know the cause/solution so it can be prevented in the future.

 

Thanks  

0 Kudos
Moderator
Moderator
1,284 Views
Registered: ‎04-24-2017

Re: You are not inside a Petalinux project

Jump to solution

Can you run below commands and post the terminal log.

$ petalinux-build -x mrproper
$ petalinux-config
Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Contributor
Contributor
1,283 Views
Registered: ‎01-02-2015

Re: You are not inside a Petalinux project

Jump to solution

Same

 

wdecook@wdecook-VirtualBox:~/proj/mti/base-plnx$ petalinux-build -x mrproper
ERROR: You are not inside a PetaLinux project. Please specify a PetaLinux project!
Builds the project or the specified components.

Usage:
  petalinux-build [options]

Required:

Options:
  -h, --help                         show function usage
  -p, --project <PROJECT>            path to PetaLinux SDK project.
                                     Default is working project.
  -c, --component <COMPONENT>        Specify the component
                                     it will build the specified component and its dependencies
                                     E.g. -c rootfs
                                     E.g. -c myapp
  -x, --execute <tasks of bitbake>   Specify a bitbake task of the component
				     To know the list tasks for a component:
				     E.g. -x do_listtasks
  -f, --force			     Force run a specific task ignoring the stamps
				     Force run has to be for a component or its tasks
				     E.g. -c myapp -f
				     E.g. -c myapp -x compile -f
  -v, --verbose                      Show compile messages verbose mode
  -s, --sdk                          Build SDK ==> do_populate_sdk
  -b, --buildfile  <.bb recipe>      Execute tasks from a specific .bb recipe directly.
				     WARNING: Does not handle any dependencies from other recipes.

wdecook@wdecook-VirtualBox:~/proj/mti/base-plnx$ petalinux-config
ERROR: You are not inside a PetaLinux project. Please specify a PetaLinux project!
Configures the project or the specified component with menuconfig.

Usage:
  petalinux-config [options] {--component <COMPONENT> |--get-hw-description[=SRC]}

Options:
  -h, --help                      show function usage
  -p, --project <PROJECT>         path to PetaLinux SDK project.
                                  default is the working project
  --oldconfig                     takes the working configuration
  -c, --component <COMPONENT>     Specify the component
                                  If no component is specified, it will do
                                  top level project configuration .
                                  If you specify a component,it will
                                  configure it with menuconfig and saves
                                  user's config fragments in meta-user.
                                  E.g. -c rootfs, -c busybox
  --get-hw-description [SRC]      get hardware description.
                                  if [SRC] is specified, look in that
                                  location for an Vivado export to SDK directory.
                                  Otherwise, this MUST be run from
                                  WITHIN the vivado export to SDK directory.
  --defconfig [DEFCONFIG_TARGET]  defconfig the specified component.
                                  It only applies to kernel for now.
  -v, --verbose                   verbose mode

Note: There is no validation for configurable components. User can provide
      any component, bitbake will throw error for invalid components.

wdecook@wdecook-VirtualBox:~/proj/mti/base-plnx$ 

 

 

0 Kudos
Moderator
Moderator
1,234 Views
Registered: ‎04-24-2017

Re: You are not inside a Petalinux project

Jump to solution

Hi @wdecook,

 

Looks like your project files are not correct. Can you create a new project and test it to make sure you don't have any problem with installation.

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Contributor
Contributor
1,232 Views
Registered: ‎01-02-2015

Re: You are not inside a Petalinux project

Jump to solution

I am able to configure and build other petalinux projects on the same machine with no problem. Just made a new test project and all went as expected.

 

What is used to determine whether the command is run from a petalinux project top directory or not? I read here that the tools look for the .petalinux directory. That directory is present.

0 Kudos
Highlighted
Explorer
Explorer
1,563 Views
Registered: ‎03-22-2016

Re: You are not inside a Petalinux project

Jump to solution

How about config.project?

0 Kudos
Contributor
Contributor
1,210 Views
Registered: ‎01-02-2015

Re: You are not inside a Petalinux project

Jump to solution

@jeffsimpson 

 

config.project was indeed missing. I copied that over from another project and we are cooking now.

 

Thank you.

0 Kudos