2010-09-29 21:54:53     New vendor/board is causing config problems

Document created by Aaronwu Employee on Aug 23, 2013
Version 1Show Document
  • View in full screen mode

2010-09-29 21:54:53     New vendor/board is causing config problems

Wojtek Skulski (UNITED STATES)

Message: 93985   

 

More problems. I started an application development as advised on the following page:

 

  docs.blackfin.uclinux.org/doku.php?id=application_development

 

First the minor problem. The instructions are incomplete for step 1. In addition to the board directory, there is also a "common" directory under /home/uclinux/uClinux-dist/vendors/AnalogDevices. It contains some romfs files which may need to be modified, so I think this directory has to be copied to the NewVendor and there modified, as needed. This is not mentioned in the Wiki. Concerning the two files which are also there (trim-libs.sh and vendor.mak) I would guess these need not be copied, but it is just my guess. Would be good to know for sure.

 

Now the big problem. Following the Wiki instruction, I copied the EZ-KIT files to my new directory as follows. I also copied the "common" directory (which is not mentioned in Wiki, but probably harmless). I did not copy the .sh or .mak files.

 

  $ pwd

  /home/uclinux/uClinux-dist/vendors

  $ mkdir SkuTek

  $ mkdir SkuTek/BlackVME

  $ cp -a -a  AnalogDevices/BF561-EZKIT/* SkuTek/BlackVME

  $ mkdir SkuTek/common

  $ cp AnalogDevices/common/* SkuTek/common

 

 

Then I ran menuconfig as advised. I selected the new vendor SkuTek, and the new (and the only) product BlackVME, as advised in Wiki. And the can of worms opened.

 

First of all, I noticed that menuconfig performed make clean, which is probably not a bad thing. And soon after the following popped up:

 

*********************** NOTICE ****************************

There is no preset config for linux-2.6.x on platform SkuTek/BlackVME.

If you choose to continue you will have to setup a linux

config from scratch which is a very complex task.

You will find it easier if you can copy a config.linux-2.6.x

from another platform that is similar.

 

If you know what you are doing press <ENTER> otherwise

Type ^C to abort.

 

I interrupted and started to examine the situation. The file config.linux-2.6.x mentioned in the warning does not exist in the BF561-EZKIT directory, so I cannot copy it as advised in the warning. There is another file named config.vendor-2.6.x, which is present in both directories BF561-EZKIT and BlackVME (obviously, because the latter was created by copying from the former). There is no point in copying it again. So I reran menuconfig, because there was nothing I could do. It started like this:

 

$ make menuconfig

/home/uclinux/uClinux-dist/vendors/config/bfin/config.arch:113:

/home/uclinux/uClinux-dist/vendors/config/bfin/config.arch:114: The Blackfin Silicon Revision you are targetting is not known.

/home/uclinux/uClinux-dist/vendors/config/bfin/config.arch:115: Please file a bug report about this.

/home/uclinux/uClinux-dist/vendors/config/bfin/config.arch:116:

/home/uclinux/uClinux-dist/vendors/config/bfin/config.arch:121:

/home/uclinux/uClinux-dist/vendors/config/bfin/config.arch:122: The Blackfin CPU you are targetting is not known.

/home/uclinux/uClinux-dist/vendors/config/bfin/config.arch:123: Please file a bug report about this.

/home/uclinux/uClinux-dist/vendors/config/bfin/config.arch:124:

 

 

At this point the kernel configuration is screwed up. The menuconfig is not even running full screen, but rather in the line mode. It is asking all the questions from scratch. It completely lost everything (despite its own warning "Type ^C to abort.")

 

I will recover by deleting the entire coLinux image and restoring from backup (yes, I made one). But I am likely to run into the same situation, because I am following the Wiki instructions to the letter.

 

So what am I doing wrong?

QuoteReplyEditDelete

 

 

2010-09-29 22:01:48     Re: New vendor/board is causing config problems

Mike Frysinger (UNITED STATES)

Message: 93986   

 

the kernel config is first looked up in linux-2.6.x/arch/blackfin/configs/.  if you havent merged your kernel port, you'll need to provie a config.linux-2.6.x yourself in your vendor/boards/ dir.

QuoteReplyEditDelete

 

 

2010-09-29 22:33:24     Re: New vendor/board is causing config problems

Wojtek Skulski (UNITED STATES)

Message: 93987   

 

Mike: I did not merge the kernel port. I do not even know what it means to "merge". Till now I was telling the menuconfig that my board was BF561 EZ-KIT. It worked OK. Today I decided to follow the Wiki and start creating my own directories, because I am moving towards app development. Step 1 of this is "create vendor/product", so I did this.

 

At this point I cannot find any config.linux-2.6.x in the Analog Devices directory. (Perhaps punted by make clean, which menuconfig volunteered to perform?). There are a bunch of "_defconfig" files in the place you indicated. Are these the prototypes of the required config.linux-2.6.x?

 

I blindly copied the BF561-EZKIT_defconfig to BlackVME_defconfig, but this did not help a bit. The screwup continues.

 

Where do I find a prototype config.linux-2.6.x to borrow?

QuoteReplyEditDelete

 

 

2010-09-29 22:45:31     Re: New vendor/board is causing config problems

Mike Frysinger (UNITED STATES)

Message: 93988   

 

since the kernel configs are found in arch/blackfin/configs/, it makes no sense to duplicate them in the uclinux-dist vendors dir

 

they arent prototypes, they are the same thing

 

you can create your own config from scratch with `make linux_menuconfig`, or you can simply copy an existing one

QuoteReplyEditDelete

 

 

2010-09-29 22:46:16     Re: New vendor/board is causing config problems

Wojtek Skulski (UNITED STATES)

Message: 93989   

 

I went back to Vendor=Analog Devices and board = BF561 EZ-KIT. The menuconfig is now running full screen. It forgot all the previous settings (like SAMBA, which we discussed yesterday). But at last it is not not spitting the "unknown silicon revision" nonsense. I am guessing it took the default config from somehere and it is back to plain vanilla BF561-EZ-KIT defaults. But at least it is not back to complete scratch.

 

So the Wiki instructions are grossly incomplete. I did as instructed and I fell off the cliff. So now where is this magic file to put into my new vendor directory? Or perhaps, why is the _defconfig not working for my board? I just copied it over from the BF561 EZ-KIT.

 

Is there something more to be done?

QuoteReplyEditDelete

 

 

2010-09-29 22:51:26     Re: New vendor/board is causing config problems

Mike Frysinger (UNITED STATES)

Message: 93990   

 

"grossly" is probably an overstatement

 

read this page instead:

  docs.blackfin.uclinux.org/doku.php?id=managing_kernel_upgrades

QuoteReplyEditDelete

 

 

2010-09-29 22:55:12     Re: New vendor/board is causing config problems

Wojtek Skulski (UNITED STATES)

Message: 93991   

 

> you can simply copy an existing one

 

OK, I now can see it after I ran the menuconfig for the Analog Devices BF561 EZ-KIT. It now appeared in the AnalogDevices directory. So I can see where the screwup came from. This file, which is needed, was punted from my new board directory by the "make clean" which menuconfig volunteered to perform. It also disappeared from BF561 EZ-KIT, so I could not copy it from there. On the other hand, the _defconfig for my board did not exist, because Wiki did not explain to create one.

 

The _defconfig which I created did not seem to work, but maybe menuconfig entered such a state of confusion that nothing was working. OK, I will now try changing the vendor from AnalogDevices --> SkuTek and see, whether the newley created _defconfig is doing its job.

QuoteReplyEditDelete

 

 

2010-09-29 23:12:22     Re: New vendor/board is causing config problems

Wojtek Skulski (UNITED STATES)

Message: 93992   

 

It looks as if I am back in business. After changing the vendor from AnalogDevices to SkuTek, the menuconfig is working as usual. It forgot all my previous customizations, but I will recover these from the backup.

 

So the crucial info is that one has to create the _defconfig file. Copying from the existing config will not work, because the copy will get punted by make clean. This copy did exist in my new board directory. But it was destroyed by make clean, what led to Catch-22 due to non-existing _defconfig.

 

After I am done with the kernel buld I will add this to Wiki, if you kindly agree.

QuoteReplyEditDelete

 

 

2010-09-29 23:28:47     Re: New vendor/board is causing config problems

Mike Frysinger (UNITED STATES)

Message: 93993   

 

no, people should not be touching the defconfigs dir unless they actually get their kernel port merged.  use the config.linux-2.6.x convention as i said and as documented.

QuoteReplyEditDelete

 

 

2010-09-29 23:42:25     Re: New vendor/board is causing config problems

Wojtek Skulski (UNITED STATES)

Message: 93994   

 

OK, if you are saying so.

 

But let me point out that the two Wiki pages present duplicate info. It would make sense to simply refer page 2 from page 1, because page 2 seems more up to date and more complete to me. Page 1 is the one which led me to trouble:

 

1.   docs.blackfin.uclinux.org/doku.php?id=application_development

 

2.   docs.blackfin.uclinux.org/doku.php?id=managing_kernel_upgrades

QuoteReplyEditDelete

 

 

2010-09-30 00:05:35     Re: New vendor/board is causing config problems

Mike Frysinger (UNITED STATES)

Message: 93995   

 

you havent found all the pages which have duplicate/conflicting content

QuoteReplyEditDelete

 

 

2010-09-30 00:58:46     Re: New vendor/board is causing config problems

Wojtek Skulski (UNITED STATES)

Message: 93996   

 

do not scare me

QuoteReplyEditDelete

 

 

2010-09-30 01:14:13     Re: New vendor/board is causing config problems

Mike Frysinger (UNITED STATES)

Message: 93998   

 

*shrug* it's the truth

 

ive punted a bunch of pages, merged/moved a bunch of others, and hopefully all the points of duplication in this particular topic should be fixed & updated

QuoteReplyEditDelete

 

 

2010-09-30 11:37:40     Re: New vendor/board is causing config problems

Wojtek Skulski (UNITED STATES)

Message: 94075   

 

Mike:

 

thank you for the update. I am now a bit lost. The page about "managing kernel upgrades" says "this topic does not exist yet", but the content list shows up (on the right). Probably a leftover. In this leftover menu there is an important topic "Adding your board to uCLinux distribution". I want to say, that previous description on the "appliactions" page, incomplete as it was, was simpler to follow. Just copy the directory and this is it. I did that. And indeed, the menuconconfig recognized my new vendor/board. It was great. This method is worth mentioning, because it is simple and it worked.

 

Another topic which I am now looking for is the romfs. I was naively thinking that the romfs directory is a "prototype" directory which is included in uImage. But not quite. The romfs got punted when I specified the new vendor/board. Then I realised that romfs is dynamically built by the scripts. It is being put together piece-by-piece from the "common" files (which were not mentioned) and from other pieces. It would be good to explain how the romfs is pieced together and which scripts are doing this. The romfs is a crucial part of the topic "customizing_for_your_board". This part is not covered on the page. I think it deserves its own page. Or at least mention, which scripts are putting together romfs.

 

I am afraid I have to disentangle the romfs topic now. Please direct me to the proper page, if it exists.

QuoteReplyEditDelete

 

 

2010-09-30 11:46:07     Re: New vendor/board is causing config problems

Mike Frysinger (UNITED STATES)

Message: 94076   

 

how did you find the page before ?  you must have used the "search" function.  so simply search again for "vendors" or whatever.

 

the documentation already explains how romfs/ is put together and that its contents are transient at best.

QuoteReplyEditDelete

 

 

2010-09-30 12:18:46     Re: New vendor/board is causing config problems

Wojtek Skulski (UNITED STATES)

Message: 94078   

 

> how did you find the page before?

 

I found the Application page from the menu at left. The "managing kernel upgrades" came from you. I keep my own internal documentation of all my steps. The Wiki page pointers are always saved in my own docu. I go back when I need to check something, and the pages are not always there. It adds to the excitement.

 

OK, I found that the new page is now   docs.blackfin.uclinux.org/doku.php?id=uclinux-dist:build-system:vendors

 

I can see this page explains the romfs. I added this page to my track record. Thanks!

QuoteReplyEditDelete

 

 

2010-09-30 17:39:47     Re: New vendor/board is causing config problems

Wojtek Skulski (UNITED STATES)

Message: 94085   

 

Mike:

 

concerning the last part of your page   docs.blackfin.uclinux.org/doku.php?id=linux-kernel:customizing_for_your_board where you are describing the _defconfig, the cp will pick up wrong .config. The "make menuconfig" is usually done in top-level distro directory. There is a .config there, but it is a wrong one to serve as a template for _defconfig.

 

The cp command should be executed in /home/uclinux/uClinux-dist/linux-2.6.x. This is the place where the right .config is generated. Too bad that all these files are named .config, but that's the way it is.

QuoteReplyEditDelete

 

 

2010-09-30 18:38:00     Re: New vendor/board is causing config problems

Mike Frysinger (UNITED STATES)

Message: 94086   

 

the linux-kernel: pages are all relative to a kernel dir, not the uclinux-dist.  none of the paths in there talk about linux-2.6.x.

QuoteReplyEditDelete

 

 

2010-09-30 19:36:13     Re: New vendor/board is causing config problems

Wojtek Skulski (UNITED STATES)

Message: 94087   

 

Mike:

 

would not hurt to add a statement before the "cp" command. This will decrease the potential of falling into a trap.

Attachments

    Outcomes