Re: [U-Boot] [PATCH 5/9] apf9328: add default board configuration file
Dear Eric Jarrige, In message 20110810203325.21204.6037.st...@shuttle2.etheralp.ch you wrote: Signed-off-by: Eric Jarrige eric.jarr...@armadeus.org --- include/configs/apf9328.h | 1034 + 1 files changed, 1034 insertions(+), 0 deletions(-) create mode 100644 include/configs/apf9328.h Checkpatch says: total: 0 errors, 142 warnings, 1034 lines checked Please clean up and resubmit. Thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Never worry about theory as long as the machinery does what it's supposed to do. - R. A. Heinlein ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 5/9] apf9328: add default board configuration file
Dear Wolfgang, Dear Stefano, On 23 août 2011, at 13:26, Wolfgang Denk wrote: Dear Eric Jarrige, can you please mind your line length? It is strongly recommended that text lines should not exceed 70 characters or so. Thanks. I will take care of that. I do apologize for the inconvenient. In message 1fad4112-2a57-415d-9cdf-8fc7a9edb...@armadeus.org you wrote: +#define CONFIG_EXTRA_ENV_SETTINGS \ + env_version= CONFIG_ENV_VERSION \0\ + fileaddr= MK_STR(CONFIG_SYS_LOAD_ADDR)\0\ + filesize= MK_STR(CONFIG_SYS_MONITOR_LEN) \0\ filesize is dynamically computed, you should not add it We need this variable already initialized at boot time to support the specific imx boot mode from serial port when the user lost the full content of the flash. Stefano is right. filesize and fileaddr are dynamic variables, thet get created and updated on the fly. It makes no sense to pre-define them to any specific value. [Actually I have some changes in mind that avoid to save such variables with the environment at all.] I understand - It make sense for me to wait for the new interface. In such case (that is a stressing situation for the user) he can push U-Boot through the serial port and use directly the script flash_uboot to recover the original content of the flash. In such a use case this variable is not dynamically computed. What do you mean by push U-Boot through the serial port? Any of the respective commands in U-Boot (loads, loadb, loady) will automatically update the respective variables. I meant to boot using the iMX internal bootstrap loader as U-Boot is not yet running. Alternatively I can download U-Boot a second time to have the environment variables initialized. It is just a longer process than the original one. +#define CONFIG_NETMASK255.255.255.0 +#define CONFIG_IPADDR 192.168.000.10 Please drop fix ip address. They should not be part of mainline, Here, I have a problem as our documentation on the wiki armadeus.org is based on this default IP addresses. Then fix the documentation? That is something we will do in any case. It is a somewhat bad idea to publish documentation to end users before the code has passed even the inital code review... Thanks for the recommendation. We really need a set of default IP addresses for private network to simplify as much as possible the life of the armadeus project developers. And what makes you think that 192.168.0.10 might be a free IP address in my network? Or assume that 255.255.255.0 is the right netmask in this network? http://tools.ietf.org/html/rfc1918#page-4 These addresses may work for you, but they will not work for others, and thus it makes no sense to use them as defaults. The armadeus BSP provide a user interface to customize the network parameters according to end user network environment. If you need a reasonable default, then configure the board to use DHCP. I never seen such a restriction in U-Boot doc and moreover there is a set CONFIG_XXIP documented in U-BOOT that confusing me, There are situations where this cannot be avoided - like when U-Boot is installed in a ROM, where the environment cannot be changed at all, and where for some reason DHCP or similar is not possible. But that does not mean that this makes sense for the generic case. Is there another solution for a complete usable default configuration? Use DHCP? Sure, DHCP is the best *technical* solution. I meant for static IP address? Why do we need such a stuff when your configuration is fixed at compile time with CONFIG_SYS_SDRAM_MBYTE_SYZE 16 ? 16MiB is the regular configuration but there are many configurations of boards with different size of memory. This set of parameters enables to support every boards at compilation by just changing the value of CONFIG_SYS_SDRAM_MBYTE_SYZE. So that the binary generated is fully optimized for each board. That's a maintenance nightmage for everybody and not needed at all. Please use get_ram_size() to have U-Boot auto-adjust to the actual RAM size of your board and forget about all such static optimizations. Thanks for the update. +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE \ + + CONFIG_SYS_SDRAM_1_SIZE - 0x010) You do not use U_Boot macro here (GENERATED_GBL_DATA_SIZE), as it is usual. Stack pointer is already in RAM before relocation. Is it correct ? Correct. I do have to optimize the location of the initial Stack pointer for my board so I put the init SP at any safe place in RAM. I find your answers not really helpful and constructive. You write you have to optimize the location, but you fail to explain why you think so. I consider it likely that you are wrong about the optimize part. And you are definitely wrong about the rest, as you obviously did not understand Stefano's
Re: [U-Boot] [PATCH 5/9] apf9328: add default board configuration file
On 08/24/2011 06:56 AM, Eric Jarrige wrote: Dear Wolfgang, Dear Stefano, Hi Eric, We really need a set of default IP addresses for private network to simplify as much as possible the life of the armadeus project developers. And what makes you think that 192.168.0.10 might be a free IP address in my network? Or assume that 255.255.255.0 is the right netmask in this network? http://tools.ietf.org/html/rfc1918#page-4 Really RFC1918 reservs only IP addresses for private use, but there is nothing regarding a default IP address. And nothing different as usual how to assign the addresses to the hosts. To set a static IP address when DHCP is not available (a sort of autoconfiguration without DHCP server), the link-local address range should be used (169.254.0.0/16), described in http://tools.ietf.org/html/rfc3927. It sets a random IP in the range and checks with ARP that the address is not already used in the network. However, it is outside the goals of a bootloader ;-) Best regards, Stefano babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 5/9] apf9328: add default board configuration file
Dear Eric, In message 20110824054915.0860711f9...@gemini.denx.de I wrote: Sure, DHCP is the best *technical* solution. I meant for static IP address? Why does anybody need static IP addresses for the default case, i. e. for system bring up? And if you need one, what is the issue with using setenv ipaddr at the serial console? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Don't put off for tomorrow what you can do today, because if you enjoy it today you can do it again tomorrow. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 5/9] apf9328: add default board configuration file
Dear Wolfgang, On 24 août 2011, at 07:49, Wolfgang Denk wrote: Dear Eric Jarrige, In message d25738a8-8a7a-475a-95f5-8408c6463...@armadeus.org you wrote: Stefano is right. filesize and fileaddr are dynamic variables, thet get created and updated on the fly. It makes no sense to pre-define them to any specific value. [Actually I have some changes in mind that avoid to save such variables with the environment at all.] I understand - It make sense for me to wait for the new interface. Which new interface do you mean? And why would waiting for it help you? By interface I mean the changes you mentioned to avoid to have filesize and fileaddr with the environment variables. What do you mean by push U-Boot through the serial port? Any of the respective commands in U-Boot (loads, loadb, loady) will automatically update the respective variables. I meant to boot using the iMX internal bootstrap loader as U-Boot is not yet running. Alternatively I can download U-Boot a second time to have the environment variables initialized. It is just a longer process than the original one. Are you aware of things like env import etc.? That could be the solution. I have to check it. Thanks for the update. And what makes you think that 192.168.0.10 might be a free IP address in my network? Or assume that 255.255.255.0 is the right netmask in this network? http://tools.ietf.org/html/rfc1918#page-4 This page lists 192.168/16 prefix, i. e. a 255.255.0.0 netmask. I know many development environments, and 192.168.x.x is used very, very often there. often with a /24 netmask, sometimes differently (at DENX we're using it with a /16 netmast, for example). 192.168/16 prefix is only the prefix of the class C private networks. IMHO that means there are 256 class C networks (255.255.255.0) reserved for private networks as mentioned on the same RFC page by ..and third block is a set of 256 contiguous class C network numbers In the same way, there is another address range 172.16 - 172.31 dedicated class B private networks for the organization who need /16 netmask. And there is absolutely NO guarantee that 192.168.0.10 is free, or that multiple users of your boards will boot simultaneously, or ... The _concept_ of such a default address is broken. These addresses may work for you, but they will not work for others, and thus it makes no sense to use them as defaults. The armadeus BSP provide a user interface to customize the network parameters according to end user network environment. Do you know the amount of efforts needed in any bigger organization to set up additional or to change existing network configurations? I meant our BSP enable to change U-Boot default configuration of the board to fit the existing networks of the end users/developpers - not to change the network configuration of any organization. Use DHCP? Sure, DHCP is the best *technical* solution. I meant for static IP address? Why does anybody need static IP addresses for the default case, i. e. for system bring up? Well, may be things can be easier to explain with static IP than explaining how to setup a DHCP server, DNS server Anyway we will work more on the DHCP solution if this solution is acceptable. Best regards, Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 5/9] apf9328: add default board configuration file
Dear Eric Jarrige, In message 8f000deb-1afc-403b-9b00-fa2bff2e1...@armadeus.org you wrote: Which new interface do you mean? And why would waiting for it help you? By interface I mean the changes you mentioned to avoid to have filesize and fileaddr with the environment variables. Don't expect this any time soon. Also, I don't see how this would have any influence on your situation. All I want to tell you is that it's not a good idea to rely on pre-initialization of such dynamically set variables. 192.168/16 prefix is only the prefix of the class C private networks. IMHO that means there are 256 class C networks (255.255.255.0) reserved for private networks as mentioned on the same RFC page by ..and third block is a set of 256 contiguous class C network numbers I can split the 192.168/16 range in any way I like. We use it as a single 255.255.0.0 masked network. I could as well define it as for 192.168/18 nets, or whatever comes to my mind. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Mirrors should reflect a little before throwing back images. - Jean Cocteau ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 5/9] apf9328: add default board configuration file
Dear Wolfgang, On 24 août 2011, at 08:34, Wolfgang Denk wrote: Dear Eric, In message 20110824054915.0860711f9...@gemini.denx.de I wrote: Sure, DHCP is the best *technical* solution. I meant for static IP address? Why does anybody need static IP addresses for the default case, i. e. for system bring up? And if you need one, what is the issue with using setenv ipaddr at the serial console? The hobbyists working on U-Boot will ask to have this command in a their default configuration to simplify their development process. I will be the first of them to request a user friendly solution. I will check the 2 solutions: DHCP and env import when DHCP is not applicable. Thanks for your suggestion. Best regards, Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 5/9] apf9328: add default board configuration file
Hi Stefano, On 24 août 2011, at 08:22, Stefano Babic wrote: On 08/24/2011 06:56 AM, Eric Jarrige wrote: Dear Wolfgang, Dear Stefano, Hi Eric, We really need a set of default IP addresses for private network to simplify as much as possible the life of the armadeus project developers. And what makes you think that 192.168.0.10 might be a free IP address in my network? Or assume that 255.255.255.0 is the right netmask in this network? http://tools.ietf.org/html/rfc1918#page-4 Really RFC1918 reservs only IP addresses for private use, but there is nothing regarding a default IP address. And nothing different as usual how to assign the addresses to the hosts. To set a static IP address when DHCP is not available (a sort of autoconfiguration without DHCP server), the link-local address range should be used (169.254.0.0/16), described in http://tools.ietf.org/html/rfc3927. It sets a random IP in the range and checks with ARP that the address is not already used in the network. However, it is outside the goals of a bootloader ;-) Correct, U-Boot does not support this protocol that is moreover limited to devices directly connected to the same physical/logical link. Best regards, Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 5/9] apf9328: add default board configuration file
On 08/15/2011 10:25 PM, Eric Jarrige wrote: Hi Stefano, Hi Eric, sorry for my late answer. I have missed a point. +#define CONFIG_EXTRA_ENV_SETTINGS \ + env_version= CONFIG_ENV_VERSION \0\ + fileaddr= MK_STR(CONFIG_SYS_LOAD_ADDR)\0\ + filesize= MK_STR(CONFIG_SYS_MONITOR_LEN) \0\ filesize is dynamically computed, you should not add it We need this variable already initialized at boot time to support the specific imx boot mode from serial port when the user lost the full content of the flash. In such case (that is a stressing situation for the user) he can push U-Boot through the serial port and use directly the script flash_uboot to recover the original content of the flash. In such a use case this variable is not dynamically computed. By the way, you reach the same behavior adding a new variable (such as monitor_size) with the default value you want and use it in your scripts. filesize is a special variable in u-boot and it sounds odd to fix it. Please drop fix ip address. They should not be part of mainline, Here, I have a problem as our documentation on the wiki armadeus.org is based on this default IP addresses. We really need a set of default IP addresses for private network to simplify as much as possible the life of the armadeus project developers. I never seen such a restriction in U-Boot doc and moreover there is a set CONFIG_XXIP documented in U-BOOT that confusing me, Is there another solution for a complete usable default configuration? Well, you will find a lot of NAK for patches that set fix IP addresses in the ML. Even if this default address is described in your documentation, what happens if two users of yours, as you say they are newbies, attach their board to the same LAN using the same default address ? Is it not better to explain them they need a *correct* ip address ? A default IP address simply does not exist and requires to have a default network (192.168.0.x), with default netmask... If you want to simplify the setup for your users, add dhcp. 16MiB is the regular configuration but there are many configurations of boards with different size of memory. This set of parameters enables to support every boards at compilation by just changing the value of CONFIG_SYS_SDRAM_MBYTE_SYZE. So that the binary generated is fully optimized for each board. Understood, thanks. Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 5/9] apf9328: add default board configuration file
Dear Eric Jarrige, can you please mind your line length? It is strongly recommended that text lines should not exceed 70 characters or so. Thanks. In message 1fad4112-2a57-415d-9cdf-8fc7a9edb...@armadeus.org you wrote: +#define CONFIG_EXTRA_ENV_SETTINGS \ + env_version= CONFIG_ENV_VERSION \0\ + fileaddr= MK_STR(CONFIG_SYS_LOAD_ADDR)\0\ + filesize= MK_STR(CONFIG_SYS_MONITOR_LEN) \0\ filesize is dynamically computed, you should not add it We need this variable already initialized at boot time to support the specific imx boot mode from serial port when the user lost the full content of the flash. Stefano is right. filesize and fileaddr are dynamic variables, thet get created and updated on the fly. It makes no sense to pre-define them to any specific value. [Actually I have some changes in mind that avoid to save such variables with the environment at all.] In such case (that is a stressing situation for the user) he can push U-Boot through the serial port and use directly the script flash_uboot to recover the original content of the flash. In such a use case this variable is not dynamically computed. What do you mean by push U-Boot through the serial port? Any of the respective commands in U-Boot (loads, loadb, loady) will automatically update the respective variables. +#define CONFIG_NETMASK255.255.255.0 +#define CONFIG_IPADDR 192.168.000.10 Please drop fix ip address. They should not be part of mainline, Here, I have a problem as our documentation on the wiki armadeus.org is based on this default IP addresses. Then fix the documentation? It is a somewhat bad idea to publish documentation to end users before the code has passed even the inital code review... We really need a set of default IP addresses for private network to simplify as much as possible the life of the armadeus project developers. And what makes you think that 192.168.0.10 might be a free IP address in my network? Or assume that 255.255.255.0 is the right netmask in this network? These addresses may work for you, but they will not work for others, and thus it makes no sense to use them as defaults. If you need a reasonable default, then configure the board to use DHCP. I never seen such a restriction in U-Boot doc and moreover there is a set CONFIG_XXIP documented in U-BOOT that confusing me, There are situations where this cannot be avoided - like when U-Boot is installed in a ROM, where the environment cannot be changed at all, and where for some reason DHCP or similar is not possible. But that does not mean that this makes sense for the generic case. Is there another solution for a complete usable default configuration? Use DHCP? Why do we need such a stuff when your configuration is fixed at compile time with CONFIG_SYS_SDRAM_MBYTE_SYZE 16 ? 16MiB is the regular configuration but there are many configurations of boards with different size of memory. This set of parameters enables to support every boards at compilation by just changing the value of CONFIG_SYS_SDRAM_MBYTE_SYZE. So that the binary generated is fully optimized for each board. That's a maintenance nightmage for everybody and not needed at all. Please use get_ram_size() to have U-Boot auto-adjust to the actual RAM size of your board and forget about all such static optimizations. +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE \ + + CONFIG_SYS_SDRAM_1_SIZE - 0x010) You do not use U_Boot macro here (GENERATED_GBL_DATA_SIZE), as it is usual. Stack pointer is already in RAM before relocation. Is it correct ? Correct. I do have to optimize the location of the initial Stack pointer for my board so I put the init SP at any safe place in RAM. I find your answers not really helpful and constructive. You write you have to optimize the location, but you fail to explain why you think so. I consider it likely that you are wrong about the optimize part. And you are definitely wrong about the rest, as you obviously did not understand Stefano's comment at all - he was referring to the magic constant 0x010 in above macro. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de : 1. What is the possibility of this being added in the future? In the near future, the probability is close to zero. In the distant future, I'll be dead, and posterity can do whatever they like... :-) - lwall ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 5/9] apf9328: add default board configuration file
Hi Stefano, On 23 août 2011, at 11:46, Stefano Babic wrote: sorry for my late answer. I have missed a point. No problem on my side - my answers are sometime even longer. Please drop fix ip address. They should not be part of mainline, Here, I have a problem as our documentation on the wiki armadeus.org is based on this default IP addresses. We really need a set of default IP addresses for private network to simplify as much as possible the life of the armadeus project developers. I never seen such a restriction in U-Boot doc and moreover there is a set CONFIG_XXIP documented in U-BOOT that confusing me, Is there another solution for a complete usable default configuration? Well, you will find a lot of NAK for patches that set fix IP addresses in the ML. Even if this default address is described in your documentation, what happens if two users of yours, as you say they are newbies, attach their board to the same LAN using the same default address ? Ok, I missed these threads regarding IP address. My recommendation for two or more developer is (was) to use each one its own private network for the development using a dedicated ethernet interface. Is it not better to explain them they need a *correct* ip address ? Sure - That's the reason DHCP is also enable Cheers, Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 5/9] apf9328: add default board configuration file
Dear Eric Jarrige, In message d25738a8-8a7a-475a-95f5-8408c6463...@armadeus.org you wrote: Stefano is right. filesize and fileaddr are dynamic variables, thet get created and updated on the fly. It makes no sense to pre-define them to any specific value. [Actually I have some changes in mind that avoid to save such variables with the environment at all.] I understand - It make sense for me to wait for the new interface. Which new interface do you mean? And why would waiting for it help you? What do you mean by push U-Boot through the serial port? Any of the respective commands in U-Boot (loads, loadb, loady) will automatically update the respective variables. I meant to boot using the iMX internal bootstrap loader as U-Boot is not yet running. Alternatively I can download U-Boot a second time to have the environment variables initialized. It is just a longer process than the original one. Are you aware of things like env import etc.? And what makes you think that 192.168.0.10 might be a free IP address in my network? Or assume that 255.255.255.0 is the right netmask in this network? http://tools.ietf.org/html/rfc1918#page-4 This page lists 192.168/16 prefix, i. e. a 255.255.0.0 netmask. I know many development environments, and 192.168.x.x is used very, very often there. often with a /24 netmask, sometimes differently (at DENX we're using it with a /16 netmast, for example). And there is absolutely NO guarantee that 192.168.0.10 is free, or that multiple users of your boards will boot simultaneously, or ... The _concept_ of such a default address is broken. These addresses may work for you, but they will not work for others, and thus it makes no sense to use them as defaults. The armadeus BSP provide a user interface to customize the network parameters according to end user network environment. Do you know the amount of efforts needed in any bigger organization to set up additional or to change existing network configurations? Use DHCP? Sure, DHCP is the best *technical* solution. I meant for static IP address? Why does anybody need static IP addresses for the default case, i. e. for system bring up? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Prof:So the American government went to IBM to come up with a data encryption standard and they came up with ... Student: EBCDIC! ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 5/9] apf9328: add default board configuration file
Hi Stefano, On 11 août 2011, at 11:21, Stefano Babic wrote: On 08/10/2011 10:33 PM, Eric Jarrige wrote: Signed-off-by: Eric Jarrige eric.jarr...@armadeus.org --- include/configs/apf9328.h | 1034 + 1 files changed, 1034 insertions(+), 0 deletions(-) create mode 100644 include/configs/apf9328.h Hi Eric, + +#ifndef __CONFIG_H +#define __CONFIG_H + +#define CONFIG_VERSION_VARIABLE +#define CONFIG_ENV_VERSION 4.0 +#define CONFIG_IDENT_STRING apf9328 patch 4.0 You add CONFIG_ without documenting them. If they are specific for your board, you should use another name, or please add documentation to make them available for other boards, too. Good point. I propose to use a prefix like APF_ for macros specifics to this board and I will update the documentation to make the generic config available for the other boards. + +#define CONFIG_ARM920T 1 /* this is an ARM920T CPU */ It is enough to #define a switch, without setting the value. This should be only: #define CONFIG_ARM920T/* this is an ARM920T CPU */ This must be fixed globally. +#define CONFIG_IMX 1 /* in a Motorola MC9328MXL Chip */ Ditto, and so on.. +/* + * Definition of u-boot build in commands. Check out CONFIG_CMD_DFL if + * neccessary in include/cmd_confdefs.h file. (Un)comment for getting + * functionality or size of u-boot code. + */ + +#include config_cmd_default.h + +#define CONFIG_CMD_ASKENV /* ask for env variable */ +#define CONFIG_CMD_BSP /* Board Specific functions */ +#define CONFIG_CMD_CACHE/* icache, dcache */ +#define CONFIG_CMD_DATE /* support for RTC, date/time.. */ +#define CONFIG_CMD_DHCP /* DHCP Support */ +#define CONFIG_CMD_DIAG /* Diagnostics */ +#define CONFIG_CMD_EEPROM /* EEPROM read/write support*/ +#define CONFIG_CMD_FLASH/* flinfo, erase, protect */ +#define CONFIG_CMD_I2C /* I2C serial bus support */ +#define CONFIG_CMD_IMLS /* List all found images*/ IMLS is already part of default commands +#define CONFIG_CMD_IMMAP/* IMMR dump support*/ Is this not specific for PowerQuick processor ? Thx, I ll remove it. +#define CONFIG_EXTRA_ENV_SETTINGS \ +env_version= CONFIG_ENV_VERSION \0\ +fileaddr= MK_STR(CONFIG_SYS_LOAD_ADDR)\0\ +filesize= MK_STR(CONFIG_SYS_MONITOR_LEN) \0\ filesize is dynamically computed, you should not add it We need this variable already initialized at boot time to support the specific imx boot mode from serial port when the user lost the full content of the flash. In such case (that is a stressing situation for the user) he can push U-Boot through the serial port and use directly the script flash_uboot to recover the original content of the flash. In such a use case this variable is not dynamically computed. +ntpserverip=217.147.208.1\0 \ No fixed IP address, please, even if they are related to known NTP servers. +#define CONFIG_MACH_TYPE MACH_TYPE_APF9328 Why do you need it ? Is it not enough to use directly MACH_TYPE_APF9328 ? The idea is to have most of the configuration parameters in the config.h files. So that it become possible to factorize the initialization of the mach_type in a common place. For the time being it is not needed it and I will remove it. +#define CONFIG_ETHADDR Not required, right ? Right. +#define CONFIG_NETMASK 255.255.255.0 +#define CONFIG_IPADDR 192.168.000.10 Please drop fix ip address. They should not be part of mainline, Here, I have a problem as our documentation on the wiki armadeus.org is based on this default IP addresses. We really need a set of default IP addresses for private network to simplify as much as possible the life of the armadeus project developers. I never seen such a restriction in U-Boot doc and moreover there is a set CONFIG_XXIP documented in U-BOOT that confusing me, Is there another solution for a complete usable default configuration? +#define CONFIG_BOARD_NAME apf9328 +#define CONFIG_HOSTNAME apf9328 +#define CONFIG_GATEWAYIP192.168.000.1 +#define CONFIG_SERVERIP 192.168.000.2 Ditto +/* + * Malloc pool need to host env + 128 Kb reserve for other allocations. + */ +#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (12810)) I Think checkpatch will complain about missing spaces before and after checkpatch did not complain. and do not require extra spaces. +#define CONFIG_STACKSIZE(12010) /* stack size */ + +#ifdef CONFIG_USE_IRQ +#define CONFIG_STACKSIZE_IRQ(410) /* IRQ stack*/ +#define CONFIG_STACKSIZE_FIQ(410) /* FIQ
Re: [U-Boot] [PATCH 5/9] apf9328: add default board configuration file
On 08/10/2011 10:33 PM, Eric Jarrige wrote: Signed-off-by: Eric Jarrige eric.jarr...@armadeus.org --- include/configs/apf9328.h | 1034 + 1 files changed, 1034 insertions(+), 0 deletions(-) create mode 100644 include/configs/apf9328.h Hi Eric, + +#ifndef __CONFIG_H +#define __CONFIG_H + +#define CONFIG_VERSION_VARIABLE +#define CONFIG_ENV_VERSION 4.0 +#define CONFIG_IDENT_STRING apf9328 patch 4.0 You add CONFIG_ without documenting them. If they are specific for your board, you should use another name, or please add documentation to make them available for other boards, too. + +#define CONFIG_ARM920T 1 /* this is an ARM920T CPU */ It is enough to #define a switch, without setting the value. This should be only: #define CONFIG_ARM920T /* this is an ARM920T CPU */ This must be fixed globally. +#define CONFIG_IMX 1 /* in a Motorola MC9328MXL Chip */ Ditto, and so on.. +/* + * Definition of u-boot build in commands. Check out CONFIG_CMD_DFL if + * neccessary in include/cmd_confdefs.h file. (Un)comment for getting + * functionality or size of u-boot code. + */ + +#include config_cmd_default.h + +#define CONFIG_CMD_ASKENV/* ask for env variable */ +#define CONFIG_CMD_BSP /* Board Specific functions */ +#define CONFIG_CMD_CACHE /* icache, dcache */ +#define CONFIG_CMD_DATE /* support for RTC, date/time.. */ +#define CONFIG_CMD_DHCP /* DHCP Support */ +#define CONFIG_CMD_DIAG /* Diagnostics */ +#define CONFIG_CMD_EEPROM/* EEPROM read/write support*/ +#define CONFIG_CMD_FLASH /* flinfo, erase, protect */ +#define CONFIG_CMD_I2C /* I2C serial bus support */ +#define CONFIG_CMD_IMLS /* List all found images*/ IMLS is already part of default commands +#define CONFIG_CMD_IMMAP /* IMMR dump support*/ Is this not specific for PowerQuick processor ? +#define CONFIG_EXTRA_ENV_SETTINGS \ + env_version= CONFIG_ENV_VERSION \0\ + fileaddr= MK_STR(CONFIG_SYS_LOAD_ADDR)\0\ + filesize= MK_STR(CONFIG_SYS_MONITOR_LEN) \0\ filesize is dynamically computed, you should not add it + ntpserverip=217.147.208.1\0 \ No fixed IP address, please, even if they are related to known NTP servers. +#define CONFIG_MACH_TYPE MACH_TYPE_APF9328 Why do you need it ? Is it not enough to use directly MACH_TYPE_APF9328 ? +#define CONFIG_ETHADDR Not required, right ? +#define CONFIG_NETMASK 255.255.255.0 +#define CONFIG_IPADDR192.168.000.10 Please drop fix ip address. They should not be part of mainline, +#define CONFIG_BOARD_NAMEapf9328 +#define CONFIG_HOSTNAME apf9328 +#define CONFIG_GATEWAYIP 192.168.000.1 +#define CONFIG_SERVERIP 192.168.000.2 Ditto +/* + * Malloc pool need to host env + 128 Kb reserve for other allocations. + */ +#define CONFIG_SYS_MALLOC_LEN(CONFIG_ENV_SIZE + (12810)) I Think checkpatch will complain about missing spaces before and after +#define CONFIG_STACKSIZE (12010) /* stack size */ + +#ifdef CONFIG_USE_IRQ +#define CONFIG_STACKSIZE_IRQ (410) /* IRQ stack*/ +#define CONFIG_STACKSIZE_FIQ (410) /* FIQ stack*/ +#endif Do you need IRQ ? It is undefined, you can drop this part + +/* +* Clocks configuration +*/ +/* + * PLL configuration + * + * f_{dpll}=2*f{ref}*(MFI+MFN/(MFD+1))/(PD+1) + * f_ref=16,777216MHz + * 32768 Hz xtal + * 0x07B32DA5: 192.173 + * 0x002a141f: 191,9944MHz + * 0x040b2007: 144MHz + * 0x0FB32DA5: 96.0864 MHz + * 0x042a141f: 96MHz + * 0x0811140d: 64MHz + * 0x040e200e: 150MHz + * 0x00321431: 200MHz + * + *16 MHz xtal + * 0x08001800: 64MHz mit 16er Quarz + * 0x04001800: 96MHz mit 16er Quarz + * 0x04002400: 144MHz mit 16er Quarz + * + * 31|x x x x|x x x x|x x x x|x x x x|x x x x|x x x x|x x x x|x x x x| 0 + * |XXX|--PD---|---MFD-|XXX|--MFI--|-MFN---| + */ + +#define CONFIG_SYS_OSC32 32768 /* 32768 or 32000 Hz crystal */ +#undef CONFIG_SYS_OSC16/* there is no external 16MHz external clock */ + +/* MPU CLOCK source before PLL (should be named CONFIG_SYS_SYS_CLK_FREQ) */ +#define CONFIG_SYS_CLK_FREQ (512*CONFIG_SYS_OSC32) +#define CONFIG_SYS_MPCTL0_VAL0x07B32DA5 /* 192.17 MHz */ +#define CONFIG_SYS_MPCTL1_VAL0 + +/* system clock source before PLL (should be named CONFIG_SYS_SYSPLL_CLK_FREQ)*/ +#ifndef CONFIG_SYS_OSC16 +#define CONFIG_SYSPLL_CLK_FREQ (512*CONFIG_SYS_OSC32) +#if (CONFIG_SYS_OSC32 == 32000) +#define CONFIG_SYS_SPCTL0_VAL0x043F1437 /* 96
[U-Boot] [PATCH 5/9] apf9328: add default board configuration file
Signed-off-by: Eric Jarrige eric.jarr...@armadeus.org --- include/configs/apf9328.h | 1034 + 1 files changed, 1034 insertions(+), 0 deletions(-) create mode 100644 include/configs/apf9328.h diff --git a/include/configs/apf9328.h b/include/configs/apf9328.h new file mode 100644 index 000..b609887 --- /dev/null +++ b/include/configs/apf9328.h @@ -0,0 +1,1034 @@ +/* + * (C) Copyright 2005-2011 ej Armadeus Project eric.jarr...@armadeus.org + * + * Configuration settings for the Armadeus Project motherboard 9328. + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * 2005/01/14 Initial version taken from the scb9328 configuration file + * 2005/03/10 apf9328 configuration file and trial to improve of + * hardware register control. + * 2005/08/16 added APF9328 fpgas and ethernet + * 2005/12/02 added filesystem boot over NFS + * 2006/11/26 added filesystem boot over NFS + * 2010/03/28 U-Boot 2010.03 migration + change timer unit to ms (fixme) + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +#define CONFIG_VERSION_VARIABLE +#define CONFIG_ENV_VERSION 4.0 +#define CONFIG_IDENT_STRING apf9328 patch 4.0 + +#define CONFIG_ARM920T 1 /* this is an ARM920T CPU */ +#define CONFIG_IMX 1 /* in a Motorola MC9328MXL Chip */ +#define CONFIG_apf9328 1 /* on a Armadeus project board */ +#undef CONFIG_USE_IRQ /* don't need use IRQ/FIQ */ +#define CONFIG_SYS_DCACHE_OFF /* fix kernel 2.6.29 boot crash */ +/* + * Enable the call to misc_init_r() for miscellaneous platform + * dependent initialization. + */ + +#define CONFIG_MISC_INIT_R + +/* + * BOOTP options + */ +#define CONFIG_BOOTP_BOOTFILESIZE +#define CONFIG_BOOTP_BOOTPATH +#define CONFIG_BOOTP_GATEWAY +#define CONFIG_BOOTP_HOSTNAME + +#define CONFIG_BOOTP_SUBNETMASK +#define CONFIG_BOOTP_DNS +#define CONFIG_BOOTP_DNS2 + +/* + * Select serial console configuration + */ +#define CONFIG_IMX_SERIAL +#define CONFIG_IMX_SERIAL1 +#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, 230400 } +#define CONFIG_BAUDRATE115200 + +/* + * Definition of u-boot build in commands. Check out CONFIG_CMD_DFL if + * neccessary in include/cmd_confdefs.h file. (Un)comment for getting + * functionality or size of u-boot code. + */ + +#include config_cmd_default.h + +#define CONFIG_CMD_ASKENV /* ask for env variable */ +#define CONFIG_CMD_BSP /* Board Specific functions */ +#define CONFIG_CMD_CACHE /* icache, dcache */ +#define CONFIG_CMD_DATE/* support for RTC, date/time.. */ +#define CONFIG_CMD_DHCP/* DHCP Support */ +#define CONFIG_CMD_DIAG/* Diagnostics */ +#define CONFIG_CMD_EEPROM /* EEPROM read/write support*/ +#define CONFIG_CMD_FLASH /* flinfo, erase, protect */ +#define CONFIG_CMD_I2C /* I2C serial bus support */ +#define CONFIG_CMD_IMLS/* List all found images*/ +#define CONFIG_CMD_IMMAP /* IMMR dump support*/ +#define CONFIG_CMD_JFFS2 /* JFFS2 Support*/ +#define CONFIG_CMD_MTDPARTS/* MTD partition support*/ +#define CONFIG_CMD_PING/* ping support */ +#define CONFIG_CMD_SAVES /* save S record dump */ +#define CONFIG_CMD_SETEXPR /* setexpr support */ +#define CONFIG_CMD_SNTP/* SNTP support */ +#define CONFIG_CMD_NFS +#define CONFIG_CMD_DNS + +#undef CONFIG_DISPLAY_BOARDINFO +#undef CONFIG_DISPLAY_CPUINFO + +/* + * Select some advanced features of the commande line parser + */ +#define CONFIG_AUTO_COMPLETE 1 /* Enable auto completion of */ + /* commands using TAB */ +#define CONFIG_SYS_HUSH_PARSER 1 /* enable the hush shell */ +#define CONFIG_SYS_PROMPT_HUSH_PS2 /* secondary prompt string */ +#define CONFIG_CMDLINE_EDITING 1 + +#define CONFIG_MTD_DEVICE +#define CONFIG_MTD_PARTITIONS +/* + * Boot options. Setting delay to -1 stops autostart count down. + */ +#define