svn commit: trunk/buildroot/target/linux
Author: ulf
Date: 2008-04-15 14:46:47 -0700 (Tue, 15 Apr 2008) New Revision: 21740
Log:
Allow build to complete, even if tftpboot is not writeable by user
Modified:
trunk/buildroot/target/linux/Makefile.in.advanced
Changeset:
Modified: trunk/buildroot/target/linux/Makefile.in.advanced
===================================================================
buildroot/target/linux/Makefile.in.advanced +2 -2
@@ -438,8 +438,8 @@ cp -dpf .config $(TARGET_DIR)/boot/busybox.config /tftpboot/$(LINUX26_KERNEL_NAME): $(LINUX26_KERNEL) - mkdir -p /tftpboot - cp -dpf $(LINUX26_KERNEL) /tftpboot/$(LINUX26_KERNEL_NAME) + -mkdir -p /tftpboot + -cp -dpf $(LINUX26_KERNEL) /tftpboot/$(LINUX26_KERNEL_NAME) $(LINUX_COPYTO)/$(LINUX26_KERNEL_NAME): $(LINUX26_KERNEL) mkdir -p $(LINUX_COPYTO)
Quoted 17 lines · ulf at uclibc.org
Author: ulf
Date: 2008-04-15 14:46:47 -0700 (Tue, 15 Apr 2008) New Revision: 21740Log:
Allow build to complete, even if tftpboot is not writeable by userModified:
trunk/buildroot/target/linux/Makefile.in.advancedChangeset:
Modified: trunk/buildroot/target/linux/Makefile.in.advanced
===================================================================
buildroot/target/linux/Makefile.in.advanced line 442
Quoted 7 lines
buildroot/target/linux/Makefile.in.advanced +2
-2@@ -438,8 +438,8 @@ cp -dpf .config $(TARGET_DIR)/boot/busybox.config /tftpboot/$(LINUX26_KERNEL_NAME): $(LINUX26_KERNEL) - mkdir -p /tftpboot - cp -dpf $(LINUX26_KERNEL) /tftpboot/$(LINUX26_KERNEL_NAME) + -mkdir -p /tftpboot + -cp -dpf $(LINUX26_KERNEL) /tftpboot/$(LINUX26_KERNEL_NAME)
I think that's a bad idea. Now you will build the system, the copy silently fails to run, you will boot your embedded target and wonder why it behaves the same as before?
Hamish
Signature · 1 line
Hamish Moffatt VK3SB <[email protected]> <[email protected]>
----- Original Message -----
From: "Hamish Moffatt" <[email protected]>
To: <[email protected]>
Sent: Wednesday, April 16, 2008 12:31 AM
Subject: Re: [Buildroot] svn commit: trunk/buildroot/target/linux
Quoted 20 lines · ulf at uclibc.org
Quoted 19 lines
Author: ulf
Date: 2008-04-15 14:46:47 -0700 (Tue, 15 Apr 2008) New Revision: 21740Log:
Allow build to complete, even if tftpboot is not writeable by userModified:
trunk/buildroot/target/linux/Makefile.in.advancedChangeset:
Modified: trunk/buildroot/target/linux/Makefile.in.advanced
===================================================================buildroot/target/linux/Makefile.in.advanced 2008-04-15 21:46:47 UTC (rev 21740) renamed from buildroot/target/linux/Makefile.in.advanced 2008-04-15 17:10:24 UTC (rev 21739) +0
-0@@ -438,8 +438,8 @@ cp -dpf .config $(TARGET_DIR)/boot/busybox.config
Quoted 11 lines
buildroot/target/linux/Makefile.in.advanced 2008-04-15 21:46:47 UTC (rev 21740) line 442
Quoted 5 lines
buildroot/target/linux/Makefile.in.advanced 2008-04-15 21:46:47 UTC (rev 21740) renamed from buildroot/target/linux/Makefile.in.advanced 2008-04-15 17:10:24 UTC (rev 21739) +2
-2/tftpboot/$(LINUX26_KERNEL_NAME): $(LINUX26_KERNEL) - mkdir -p /tftpboot - cp -dpf $(LINUX26_KERNEL) /tftpboot/$(LINUX26_KERNEL_NAME) + -mkdir -p /tftpboot + -cp -dpf $(LINUX26_KERNEL) /tftpboot/$(LINUX26_KERNEL_NAME)I think that's a bad idea. Now you will build the system, the copy silently fails to run, you will boot your embedded target and wonder why it behaves the same as before?
OK, I see your point.
AFAIK, the copy will only fail if you do not have any write access or if the disk is full. Since the filename contains a date, you have to be very unlucky if someone else has created a u-boot for the same project, the same day.
Even if there is such a file, your problem will disappear the next day,
I think the u-boot configuration is written to the file system and the file system will thus always be created after u-boot. If the disk is full, then the build will probably fail at this point.
The advantage of this, is that the build can continue and u-boot generated in binaries even if there is no /tftpboot access.
Best Regards
Ulf Samuelsson
Quoted 52 lines
----- Original Message -----
From: "Hamish Moffatt" <[email protected]>
To: <[email protected]>
Sent: Wednesday, April 16, 2008 12:31 AM
Subject: Re: [Buildroot] svn commit: trunk/buildroot/target/linuxQuoted 20 lines · ulf at uclibc.org
Quoted 19 lines
Author: ulf
Date: 2008-04-15 14:46:47 -0700 (Tue, 15 Apr 2008) New Revision: 21740Log:
Allow build to complete, even if tftpboot is not writeable by userModified:
trunk/buildroot/target/linux/Makefile.in.advancedChangeset:
Modified: trunk/buildroot/target/linux/Makefile.in.advanced
===================================================================buildroot/target/linux/Makefile.in.advanced 2008-04-15 21:46:47 UTC (rev 21740) renamed from buildroot/target/linux/Makefile.in.advanced 2008-04-15 17:10:24 UTC (rev 21739) +0
-0@@ -438,8 +438,8 @@ cp -dpf .config $(TARGET_DIR)/boot/busybox.configQuoted 11 lines
buildroot/target/linux/Makefile.in.advanced 2008-04-15 21:46:47 UTC (rev 21740) line 442
Quoted 5 lines
buildroot/target/linux/Makefile.in.advanced 2008-04-15 21:46:47 UTC (rev 21740) renamed from buildroot/target/linux/Makefile.in.advanced 2008-04-15 17:10:24 UTC (rev 21739) +2
-2/tftpboot/$(LINUX26_KERNEL_NAME): $(LINUX26_KERNEL) - mkdir -p /tftpboot - cp -dpf $(LINUX26_KERNEL) /tftpboot/$(LINUX26_KERNEL_NAME) + -mkdir -p /tftpboot + -cp -dpf $(LINUX26_KERNEL) /tftpboot/$(LINUX26_KERNEL_NAME)I think that's a bad idea. Now you will build the system, the copy silently fails to run, you will boot your embedded target and wonder why it behaves the same as before?
OK, I see your point.
AFAIK, the copy will only fail if you do not have any write access or if the disk is full. Since the filename contains a date, you have to be very unlucky if someone else has created a u-boot for the same project, the same day.
Even if there is such a file, your problem will disappear the next day,I think the u-boot configuration is written to the file system and the file system will thus always be created after u-boot. If the disk is full, then the build will probably fail at this point.
Quoted 5 lines
The advantage of this, is that the build can continue and u-boot generated in binaries even if there is no /tftpboot access.
Best Regards
Ulf Samuelsson
It would be interesting to hear other people opinions.
Best Regards
Ulf Samuelsson
Ulf Samuelsson a ?crit :
Quoted 49 lines
Quoted 49 lines
----- Original Message -----
From: "Hamish Moffatt" <[email protected]>
To: <[email protected]>
Sent: Wednesday, April 16, 2008 12:31 AM
Subject: Re: [Buildroot] svn commit: trunk/buildroot/target/linuxQuoted 20 lines · ulf at uclibc.org
Quoted 19 lines
Author: ulf
Date: 2008-04-15 14:46:47 -0700 (Tue, 15 Apr 2008) New Revision: 21740Log:
Allow build to complete, even if tftpboot is not writeable by userModified:
trunk/buildroot/target/linux/Makefile.in.advancedChangeset:
Modified: trunk/buildroot/target/linux/Makefile.in.advanced
===================================================================buildroot/target/linux/Makefile.in.advanced 2008-04-15 21:46:47 UTC (rev 21740) renamed from buildroot/target/linux/Makefile.in.advanced 2008-04-15 17:10:24 UTC (rev 21739) +0
-0@@ -438,8 +438,8 @@ cp -dpf .config $(TARGET_DIR)/boot/busybox.configQuoted 10 lines
buildroot/target/linux/Makefile.in.advanced 2008-04-15 21:46:47 UTC (rev 21740) line 442
Quoted 5 lines
buildroot/target/linux/Makefile.in.advanced 2008-04-15 21:46:47 UTC (rev 21740) renamed from buildroot/target/linux/Makefile.in.advanced 2008-04-15 17:10:24 UTC (rev 21739) +2
-2/tftpboot/$(LINUX26_KERNEL_NAME): $(LINUX26_KERNEL) - mkdir -p /tftpboot - cp -dpf $(LINUX26_KERNEL) /tftpboot/$(LINUX26_KERNEL_NAME) + -mkdir -p /tftpboot + -cp -dpf $(LINUX26_KERNEL) /tftpboot/$(LINUX26_KERNEL_NAME)I think that's a bad idea. Now you will build the system, the copy silently fails to run, you will boot your embedded target and wonder why it behaves the same as before?
OK, I see your point.
AFAIK, the copy will only fail if you do not have any write access or if the disk is full. Since the filename contains a date, you have to be very unlucky if someone else has created a u-boot for the same project, the same day.
Even if there is such a file, your problem will disappear the next day,I think the u-boot configuration is written to the file system and the file system will thus always be created after u-boot. If the disk is full, then the build will probably fail at this point.
Quoted 8 lines
Quoted 5 lines
The advantage of this, is that the build can continue and u-boot generated in binaries even if there is no /tftpboot access.
Best Regards
Ulf SamuelssonIt would be interesting to hear other people opinions.
I think that we mess with two different goals:
1) Allow the build to complete by not using "/tftpboot". This is really important. As pointed many times:
- System don't have alway a /tftpboot.
- It is not alway writable by the users.
- Superuser are not alway ok to do a /tftpboot just for an application.
- It will not work as expected in case multiple users run buildroot.
- It is the wrong path for a TFTP server in many new distributions.
So I think there is really no point to keep it (other than the effort to change little code in target/linux/Makefile.in.advanced). All the Makefile targets and results of the build at this stage must be only into the buildroot user tree.
2) Option to copy the result of the build into the TFTP server directory. This stage simply take the result of the previous stage and allow to have ready to go files available with the TFTP protocol at the end of the build. Technically the best way would be to know if there is a TFTP server installed and use the directory he serve as a default, or to not make a copy if none is installed. As this idea seem difficult to make, I agree that we can live with "/tftpboot" by default, even if I suspect that "/var/lib/tftpboot" will be more and more appropriate.
This will not solve the possibility that multiple users clash there files into the TFTP directory, but at least this remove any possibility that there build are broken because of a common target in there Makefiles. Users that wants to share a common TFTP server should take each others to agree to a directory structure into the TFTP server that let each of them have a private space for theres files.
--
Jean-Christian de Rivaz
Quoted 7 lines
I think that we mess with two different goals:
1) Allow the build to complete by not using "/tftpboot". This is really important. As pointed many times:
- System don't have alway a /tftpboot.
- It is not alway writable by the users.
- Superuser are not alway ok to do a /tftpboot just for an application.
Linux is not built by default.
If you enable Linux, then the normal build is the default. The problem only occurs when you do the advanced build and have the COPYTO_TFTPBOOT set.
There is an easy workaround, and that is to disable copying to /tftpboot if there is a problem. You can always copy manually from your BINARIES to wherever,
or use the programmable COPYTO.
Question is how much we need to protect the user from impossible combinations.
Quoted 6 lines
- It will not work as expected in case multiple users run buildroot.
- It is the wrong path for a TFTP server in many new distributions.
So I think there is really no point to keep it (other than the effort to change little code in target/linux/Makefile.in.advanced). All theMakefiletargets and results of the build at this stage must be only into the buildroot user tree.
The point is that it simplifies the complete build to doing "make".
Quoted 10 lines
2) Option to copy the result of the build into the TFTP server directory. This stage simply take the result of the previous stage and allow to have ready to go files available with the TFTP protocol at the end of the build. Technically the best way would be to know if there is a TFTP server installed and use the directory he serve as a default, or to not make a copy if none is installed. As this idea seem difficult to make, I agree that we can live with "/tftpboot" by default, even if I suspect that "
/var/lib/tftpboot" will be more and more appropriate.
Quoted 7 lines
This will not solve the possibility that multiple users clash there files into the TFTP directory, but at least this remove any possibility that there build are broken because of a common target in there Makefiles. Users that wants to share a common TFTP server should take each others to agree to a directory structure into the TFTP server that let each of them have a private space for theres files.
As long as they do not use the same project name, there is no conflict. That is the purpose of the long file names.
Quoted 3 lines
--
Jean-Christian de Rivaz
Best Regards
Ulf Samuelsson ulf at atmel.com
Atmel Nordic AB
Mail: Box 2033, 174 02 Sundbyberg, Sweden Visit: Kavalleriv?gen 24, 174 58 Sundbyberg, Sweden
Phone +46 (8) 441 54 22 Fax +46 (8) 441 54 29
GSM +46 (706) 22 44 57
Ulf Samuelsson a ?crit :
Quoted 9 lines
Quoted 7 lines
I think that we mess with two different goals:
1) Allow the build to complete by not using "/tftpboot". This is really important. As pointed many times:
- System don't have alway a /tftpboot.
- It is not alway writable by the users.
- Superuser are not alway ok to do a /tftpboot just for an application.Linux is not built by default.
Are you talking about the Linux kernel ? If yes, this is not true at least for the at91sam9261 target.
Quoted 1 line
If you enable Linux, then the normal build is the default.
Sorry, I don't understand your sentence. I make the test by using the default configuration of the at91sam9261 target. What do you means by "enable Linux" ?
Quoted 2 lines
The problem only occurs when you do the advanced build and have the
COPYTO_TFTPBOOTset.
Again what an "advanced build". If I wants to change the tftpboot path I simply edit the .config file. This method, default config or changes made by menuconfig make no difference for the Makefile.
Quoted 3 lines
There is an easy workaround, and that is to disable copying to /tftpboot if there is a problem. You can always copy manually from your BINARIES to wherever,
or use the programmable COPYTO.
Yes, but this is not obvious from the user perspective.
Quoted 1 line
Question is how much we need to protect the user from impossible combinations.
As mush as possible by replacing difficult and fragile things by simple and reliable ones.
Quoted 8 lines
Quoted 6 lines
- It will not work as expected in case multiple users run buildroot.
- It is the wrong path for a TFTP server in many new distributions.
So I think there is really no point to keep it (other than the effort to change little code in target/linux/Makefile.in.advanced). All theMakefiletargets and results of the build at this stage must be only into the buildroot user tree.The point is that it simplifies the complete build to doing "make".
Exactly. Currently this goal in not reach because of the hardcoded /tftpboot in the Makefile.
Quoted 16 lines
Quoted 9 lines
2) Option to copy the result of the build into the TFTP server directory. This stage simply take the result of the previous stage and allow to have ready to go files available with the TFTP protocol at the end of the build. Technically the best way would be to know if there is a TFTP server installed and use the directory he serve as a default, or to not make a copy if none is installed. As this idea seem difficult to make, I agree that we can live with "/tftpboot" by default, even if I suspect that "
/var/lib/tftpboot" will be more and more appropriate.Quoted 6 lines
This will not solve the possibility that multiple users clash there files into the TFTP directory, but at least this remove any possibility that there build are broken because of a common target in there Makefiles. Users that wants to share a common TFTP server should take each others to agree to a directory structure into the TFTP server that let each of them have a private space for theres files.
Quoted 2 lines
As long as they do not use the same project name, there is no conflict. That is the purpose of the long file names.
Multiples users can work on the same targets.
--
Jean-Christian de Rivaz
Quoted 13 lines
Ulf Samuelsson a ?crit :
Quoted 9 lines
Quoted 7 lines
I think that we mess with two different goals:
1) Allow the build to complete by not using "/tftpboot". This is really important. As pointed many times:
- System don't have alway a /tftpboot.
- It is not alway writable by the users.
- Superuser are not alway ok to do a /tftpboot just for an application.Linux is not built by default.
Quoted 9 lines
Are you talking about the Linux kernel ? If yes, this is not true at least for the at91sam9261 target.
Quoted 1 line
If you enable Linux, then the normal build is the default.
Sorry, I don't understand your sentence. I make the test by using the default configuration of the at91sam9261 target. What do you means by "enable Linux" ?
The default is not when you use the make <XXX>_defconfig. They you are using a predefined board, and that may have configuration items which are different from default settings.
Default is when you do the make menuconfig from scratch.
Quoted 7 lines
Quoted 2 lines
The problem only occurs when you do the advanced build and have the
COPYTO_TFTPBOOTset.Again what an "advanced build". If I wants to change the tftpboot path I simply edit the .config file. This method, default config or changes made by menuconfig make no difference for the
Makefile.
"Advanced build" is a selection done in the target/linux/Config.in's.
Quoted 6 lines
Quoted 3 lines
There is an easy workaround, and that is to disable copying to /tftpboot if there is a problem. You can always copy manually from your BINARIES to wherever,
or use the programmable COPYTO.Yes, but this is not obvious from the user perspective.
You only need to learn once.
Quoted 13 lines
Quoted 1 line
Question is how much we need to protect the user from impossible combinations.
As mush as possible by replacing difficult and fragile things by simple and reliable ones.
Quoted 7 lines
Quoted 6 lines
- It will not work as expected in case multiple users run buildroot.
- It is the wrong path for a TFTP server in many new distributions.
So I think there is really no point to keep it (other than the effort to change little code in target/linux/Makefile.in.advanced). All theMakefiletargets and results of the build at this stage must be only into the buildroot user tree.
Quoted 4 lines
Quoted 1 line
The point is that it simplifies the complete build to doing "make".
Exactly. Currently this goal in not reach because of the hardcoded /tftpboot in the
Makefile.
No, the Makefile is not the problem, the ".config" is the problem, and that is an easy fix by the user.
Now, the build will continue if the copy fails.
Quoted 16 lines
Quoted 15 lines
Quoted 15 lines
2) Option to copy the result of the build into the TFTP server directory. This stage simply take the result of the previous stage and allow to have ready to go files available with the TFTP protocol at the end of the build. Technically the best way would be to know if there is a TFTP server installed and use the directory he serve as a default, or to not make a copy if none is installed. As this idea seem difficult to make, I agree that we can live with "/tftpboot" by default, even if I suspect that "
/var/lib/tftpboot" will be more and more appropriate.This will not solve the possibility that multiple users clash there files into the TFTP directory, but at least this remove any possibility that there build are broken because of a common target in there Makefiles. Users that wants to share a common TFTP server should take each others to agree to a directory structure into the TFTP server that let each of them have a private space for theres files.
Quoted 4 lines
Quoted 2 lines
As long as they do not use the same project name, there is no conflict. That is the purpose of the long file names.
Multiples users can work on the same targets.
And they will have to understand the conflict and
can use "make menuconfig" to resolve the problem.
An easy way to do this, is to call the project:
"Jean-Christian-at91sam9261"
Then the binaries in will contain files like:
"Jean-Christian-at91sam9261-linux-2.6.24.bin"
Quoted 4 lines
--
Jean-Christian de Rivaz
Best Regards
Ulf Samuelsson
Ulf Samuelsson a ?crit :
Quoted 19 lines
Quoted 9 lines
Ulf Samuelsson a ?crit :
Quoted 7 lines
Quoted 7 lines
I think that we mess with two different goals:
1) Allow the build to complete by not using "/tftpboot". This is really important. As pointed many times:
- System don't have alway a /tftpboot.
- It is not alway writable by the users.
- Superuser are not alway ok to do a /tftpboot just for an application.Quoted 9 lines
Quoted 1 line
Linux is not built by default.
Are you talking about the Linux kernel ? If yes, this is not true at least for the at91sam9261 target.
Quoted 1 line
If you enable Linux, then the normal build is the default.
Sorry, I don't understand your sentence. I make the test by using the default configuration of the at91sam9261 target. What do you means by "enable Linux" ?
Quoted 5 lines
The default is not when you use the make <XXX>_defconfig. They you are using a predefined board, and that may have configuration items which are different from default settings.
Default is when you do the make menuconfig from scratch.
I am very surprised by this response. Users take buildroot because it have a target (that means an XXX_defconfig) that match there board (if it's a development kit) or that is a starting point to match there custom board. Maintainers taking buildroot for a new target will probably start by duplicate and modifying an existing XXX_defconfig that there will publish for the users. Configuring from scratch can be a painful and time consuming exercise that request knowledge in many area.
I take buildroot after some search on the internet about works related to the AT91SAM9261 processor. The first thing I tryed have been to do a make at91sam9261ek_deconfig and a make, just to evaluate the project maturity. I started the make menuconfig, but frankly I was boring to search what I should change in so many settings to get something working while a ready to go XXX_defconfig already exists. Just an an example:
the make menuconfig have u-boot deselected by default, but without it the at91sam9261 target failed to compile. There is many traps like this one. It take many try an error cycle to find a good setting. I suspect that many users are likely to prefer to start from a "make XXX_defconfig" that just work. Anyway when a user have found a configuration that match there needs, it will save it configuration file and will use the menuconfig only to adjust a setting.
My point is that it's a bad idea trying to see two differents process between the make menuconfig and the make XXX_defconfig. The two methods should work out of the box.
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
The problem only occurs when you do the advanced build and have the
COPYTO_TFTPBOOTset.Again what an "advanced build". If I wants to change the tftpboot path I simply edit the .config file. This method, default config or changes made by menuconfig make no difference for the
Makefile."Advanced build" is a selection done in the target/linux/Config.in's.
I my test I never changed the Linux kernel configuration, only the top level ".config". In fact I used exactly this command:
git clean -dfx && git reset --hard && git svn rebase && ( yes "" | make at91sam9261ek_defconfig ) && mv .config .config.def && sed 's#/tftpboot#/var/lib/tftpboot#' < .config.def > .config && ( yes "" | make )
Because on my system there is no such /tftpboot thing.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
There is an easy workaround, and that is to disable copying to /tftpboot if there is a problem. You can always copy manually from your BINARIES to wherever,
or use the programmable COPYTO.Yes, but this is not obvious from the user perspective.
You only need to learn once.
I have changed the sed command of the above command to this:
sed 's#/tftpboot#/var/lib/tftpboot#;s#BR2_LINUX_COPYTO_TFTPBOOT=y#BR2_LINUX_COPYTO_TFTPBOOT=n#' < .config.def > .config
Now the build can be completed, after this 3 commands:
yes "" | make
cp -pf project_build_arm/at91sam9261ek/linux-2.6.24.3/arch/arm/boot/uImage project_build_arm/at91sam9261ek/linux-2.6.24.3/uImage yes "" | make
Quoted 11 lines
Quoted 11 lines
Quoted 1 line
Question is how much we need to protect the user from impossible combinations.
As mush as possible by replacing difficult and fragile things by simple and reliable ones.
Quoted 6 lines
Quoted 6 lines
- It will not work as expected in case multiple users run buildroot.
- It is the wrong path for a TFTP server in many new distributions.
So I think there is really no point to keep it (other than the effort to change little code in target/linux/Makefile.in.advanced). All theMakefiletargets and results of the build at this stage must be only into the buildroot user tree.
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
The point is that it simplifies the complete build to doing "make".
Exactly. Currently this goal in not reach because of the hardcoded /tftpboot in the
Makefile.No, the
Makefileis not the problem, the ".config" is the problem, and that is an easy fix by the user.
Now, the build will continue if the copy fails.
Sorry but I found this way of doing thing not a clean fix, but a hack. The problem is booth the Makefile and the ".config". The BR2_LINUX_COPYTO_TFTPBOOT must be removed completely in a way that the build in granted to complete whatever is set into BR2_LINUX_COPYTO. This last one could be by default "/tftpboot" if you like and must be the absolutely last operation of the full build process, like if the user manually copy the result files into the TFTP server directory. Really, BR2_LINUX_COPYTO_TFTPBOOT is a terrible bad thing that bring absolutely no feature that can't be done by BR2_LINUX_COPYTO alone. It only make thing confusing and error prone.
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 9 lines
2) Option to copy the result of the build into the TFTP server directory. This stage simply take the result of the previous stage and allow to have ready to go files available with the TFTP protocol at the end of the build. Technically the best way would be to know if there is a TFTP server installed and use the directory he serve as a default, or to not make a copy if none is installed. As this idea seem difficult to make, I agree that we can live with "/tftpboot" by default, even if I suspect that "
/var/lib/tftpboot" will be more and more appropriate.Quoted 6 lines
This will not solve the possibility that multiple users clash there files into the TFTP directory, but at least this remove any possibility that there build are broken because of a common target in there Makefiles. Users that wants to share a common TFTP server should take each others to agree to a directory structure into the TFTP server that let each of them have a private space for theres files.
As long as they do not use the same project name, there is no conflict. That is the purpose of the long file names.
Quoted 8 lines
Quoted 1 line
Multiples users can work on the same targets.
And they will have to understand the conflict and
can use "make menuconfig" to resolve the problem.
An easy way to do this, is to call the project:
"Jean-Christian-at91sam9261"
Then the binaries in will contain files like:
"Jean-Christian-at91sam9261-linux-2.6.24.bin"
I have not tryed this, but after the build I have thoses file into the /var/lib/tftpboot:
-rw-r--r-- 1 jcdr jcdr 553 2008-04-16 20:12 autoscript.at91sam9261ek
-rwxr-xr-x 1 jcdr jcdr 200708 2008-04-16 20:12
at91sam9261ek-u-boot-1.2.0-atmel-20080416.bin
drwxrwxrwx 2 root root 4096 2008-04-16 20:12 . -rwxr-xr-x 1 jcdr jcdr 4100 2008-04-16 20:12
at91sam9261ek-dataflashboot-2.3.4.bin -rw-r--r-- 1 jcdr jcdr 1611128 2008-04-16 20:17 uImage
I wonder why the "uImage" is not prefixed with a "at91sam9261ek".
Signature · 1 line
Jean-Christian de Rivaz
Quoted 14 lines
Quoted 7 lines
And they will have to understand the conflict and
can use "make menuconfig" to resolve the problem.
An easy way to do this, is to call the project:
"Jean-Christian-at91sam9261"
Then the binaries in will contain files like:
"Jean-Christian-at91sam9261-linux-2.6.24.bin"I have not tryed this, but after the build I have thoses file into the
/var/lib/tftpboot:(quoted diff) +0
-2-rw-r--r-- 1 jcdr jcdr 553 2008-04-16 20:12 autoscript.at91sam9261ek -rwxr-xr-x 1 jcdr jcdr 200708 2008-04-16 20:12at91sam9261ek-u-boot-1.2.0-atmel-20080416.bin
Quoted 6 lines
drwxrwxrwx 2 root root 4096 2008-04-16 20:12 . -rwxr-xr-x 1 jcdr jcdr 4100 2008-04-16 20:12at91sam9261ek-dataflashboot-2.3.4.bin -rw-r--r-- 1 jcdr jcdr 1611128 2008-04-16 20:17 uImage
I wonder why the "uImage" is not prefixed with a "at91sam9261ek".
That is a bug.
Have not seen this before.
Quoted 4 lines
Signature · 2 lines
-- Jean-Christian de Rivaz
Best Regards
Ulf Samuelsson ulf at atmel.com
Atmel Nordic AB
Mail: Box 2033, 174 02 Sundbyberg, Sweden Visit: Kavalleriv?gen 24, 174 58 Sundbyberg, Sweden
Phone +46 (8) 441 54 22 Fax +46 (8) 441 54 29
GSM +46 (706) 22 44 57
Quoted 10 lines
Quoted 1 line
"Advanced build" is a selection done in the target/linux/Config.in's.
I my test I never changed the Linux kernel configuration, only the top level ".config". In fact I used exactly this command:
git clean -dfx && git reset --hard && git svn rebase && ( yes "" | make
at91sam9261ek_defconfig) && mv .config .config.def && sed 's#/tftpboot#/var/lib/tftpboot#' < .config.def > .config && ( yes "" | make )
And you can also create your own custom board
Do the following (Once!):
1) cd ~
2) mkdir -p buildroot
3) mkdir -p buildroot/local
4) Edit "~/.bashrc"
export BUILDROOT_LOCAL=~/buildroot/local
<save>5) make at91sam9261ek_defconfig
6) make menuconfig
Change BR2_LINUX_COPYTO_TFTPBOOT to "n"
<save>
7) make saveconfig
================
Now, if you downloaded a new svn, you only have to do (IIRC)
make BOARD=at91sam9261ek getconfig
make
Best Regards
Ulf Samuelsson ulf at atmel.com
Atmel Nordic AB
Mail: Box 2033, 174 02 Sundbyberg, Sweden Visit: Kavalleriv?gen 24, 174 58 Sundbyberg, Sweden
Phone +46 (8) 441 54 22 Fax +46 (8) 441 54 29
GSM +46 (706) 22 44 57
Ulf Samuelsson a ?crit :
Quoted 18 lines
Quoted 9 lines
Quoted 1 line
"Advanced build" is a selection done in the target/linux/Config.in's.
I my test I never changed the Linux kernel configuration, only the top level ".config". In fact I used exactly this command:
git clean -dfx && git reset --hard && git svn rebase && ( yes "" | make
at91sam9261ek_defconfig) && mv .config .config.def && sed 's#/tftpboot#/var/lib/tftpboot#' < .config.def > .config && ( yes "" | make )And you can also create your own custom board
Do the following (Once!):1) cd ~
2) mkdir -p buildroot
3) mkdir -p buildroot/local
4) Edit "~/.bashrc"
Quoted 7 lines
export BUILDROOT_LOCAL=~/buildroot/local <save>5) make
at91sam9261ek_defconfig
6) make menuconfig
ChangeBR2_LINUX_COPYTO_TFTPBOOTto "n"
<save>
7) make saveconfig
Sorry, I can't get the rational of why you insists to mess with the TFTP serveur setting while configuring a new board. This is absolutely no related at all. What you describes here is only one of the possible methods to configure a new board. Let the user chose the method that best fit there needs. Anyway, for any method, there should be nothing to do about the TFTP server setting. This is just so odd.
The user will have to adjust the TFTP server setting only to match the real path of the directory served by the TFTP server. For example if his TFTP server use /var/lib/tftpboot instead of /tftpboot, it should simply change the "/tftpboot" in the configuration file by "/var/lib/tftpboot". Is that so hard to understand ? There is nothing related to the definition of a new board, nothing related to the build, just a very trivial change. Actually this don't work like this because of the odd BR2_LINUX_COPYTO_TFTPBOOT symbol. This is why I am unhappy and try to search a better solution.
BR2_LINUX_COPYTO_TFTPBOOT=y or BR2_LINUX_COPYTO="/tftpboot" are exactly the same thing, this why it make the same Makefile target problem. One of the two must be removed to fix the problem and make thing simple for the users. Now, BR2_LINUX_COPYTO have the possibility to be adapted to a different TFTP server path, but BR2_LINUX_COPYTO_TFTPBOOT cannot. So it seem obvious that this is BR2_LINUX_COPYTO_TFTPBOOT that must be removed. For backward compatibility, we can introduce something like this (pseudo code):
if ( (BR2_LINUX_COPYTO_TFTPBOOT==y) and (BR2_LINUX_COPYTO="") ) {
BR2_LINUX_COPYTO="/tftpboot"
}
Regards,
Signature · 1 line
Jean-Christian de Rivaz
Ulf Samuelsson a ?crit :
Quoted 17 lines
Quoted 17 lines
Quoted 6 lines
And they will have to understand the conflict and
can use "make menuconfig" to resolve the problem.
An easy way to do this, is to call the project:
"Jean-Christian-at91sam9261"
Then the binaries in will contain files like:
"Jean-Christian-at91sam9261-linux-2.6.24.bin"I have not tryed this, but after the build I have thoses file into the
/var/lib/tftpboot:(quoted diff) +0
-2-rw-r--r-- 1 jcdr jcdr 553 2008-04-16 20:12 autoscript.at91sam9261ek -rwxr-xr-x 1 jcdr jcdr 200708 2008-04-16 20:12at91sam9261ek-u-boot-1.2.0-atmel-20080416.bin
drwxrwxrwx 2 root root 4096 2008-04-16 20:12 . -rwxr-xr-x 1 jcdr jcdr 4100 2008-04-16 20:12at91sam9261ek-dataflashboot-2.3.4.bin -rw-r--r-- 1 jcdr jcdr 1611128 2008-04-16 20:17 uImage
Quoted 4 lines
Quoted 1 line
I wonder why the "uImage" is not prefixed with a "at91sam9261ek".
That is a bug.
Have not seen this before.
I have redo a test today as you have made commit to fix this.
From the configuration point of view, the situation is even worse now.
The command to change from "/tftpboot" to "/var/lib/tftpboot" must now be this one:
mv .config .config.def && sed 's#BR2_TARGET_ATMEL_COPYTO=.*#BR2_TARGET_ATMEL_COPYTO="/var/lib/tftpboot"#;s#BR2_LINUX_COPYTO_TFTPBOOT=y#BR2_LINUX_COPYTO_TFTPBOOT=n#;s#BR2_LINUX_COPYTO=.*#BR2_LINUX_COPYTO="/var/lib/tftpboot"#;' < .config.def > .config
Really not a trivial one as it should be. :-(
From the build point of view, the situation is better now. The build
complete without having to manually copy the uImage. At the end the /var/lib/tftpboot contain:
-rwxr-xr-x 1 jcdr jcdr 197K 2008-04-19 15:24 at91sam9261ek-u-boot-1.2.0-atmel-20080419.bin
-rw-r--r-- 1 jcdr jcdr 553 2008-04-19 15:24 autoscript.at91sam9261ek -rwxr-xr-x 1 jcdr jcdr 4.1K 2008-04-19 15:24 at91sam9261ek-dataflashboot-2.3.4.bin
-rw-r--r-- 1 jcdr jcdr 1.6M 2008-04-19 15:27 at91sam9261ek-linux-2.6.24.3-20080419.gz
But where is the rootfs.arm-20080419.ext2 root filesystem ?
Regards,
Signature · 1 line
Jean-Christian de Rivaz