Re: [U-Boot] NOR sectors are not all protected as they should be.
Dear Wolfgang, Thanks for your reply and your help. On 02/09/2011 07:50 PM, Wolfgang Denk wrote: The first sectors #0,1,2,3 are protected and sectors #8,9 (U-Boot environment) are protected. It should be sectors #0,1,2,3,4,5,6,7 and sectors #8,9. No, it should not. Only the sectors that actually contain the U-Boot code and environment are protected. Obviously your image is small enough to fit in the first 4 sectors (= 256 KiB). Actually this is a perfectly normal size, and your reservation of 512 KiB was just a waste of memory. You can see that the following sectors are unused from the 'E' (= empty) flag. Even if the first 4 sectors are empty they are protected (see below). So the protected sectors are not selected depending on if U-Boot is burnt in them, isn't it ? Sector Start Addresses: A000 E RO A001 E RO A002 E RO A003 E RO A004 E A005 E A006 E A007 E A008 RO A009 E RO A00A E A00B E A00C E A00D E A00E E A00F E A010 E A011 E A012 E A013 E A014 E A015 E A016 E A017 E A018 E A019 E A01A E A01B E A01C E A01D E A01E E A01F E A020 E A021 E A022 E I know my image fit in 256KiB, my image is 220KiB that I reserved more space just in case for the future releases. When they don't contain any code, there is also no need to pretect them, right? It should be, but it's not completely true. Best regards. Best regards, Wolfgang Denk ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] NOR sectors are not all protected as they should be.
Dear Alexandre Gambier, In message 4d539e01.6070...@ftemaximal.fr you wrote: waste of memory. You can see that the following sectors are unused from the 'E' (= empty) flag. Even if the first 4 sectors are empty they are protected (see below). So the protected sectors are not selected depending on if U-Boot is burnt in them, isn't it ? No, they are selected based on the real size of the (running) U-Boot image. 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 Of course there's no reason for it, it's just our policy. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] NOR sectors are not all protected as they should be.
Ok. Thank you very much. On 02/10/2011 10:48 AM, Wolfgang Denk wrote: Dear Alexandre Gambier, In message4d539e01.6070...@ftemaximal.fr you wrote: waste of memory. You can see that the following sectors are unused from the 'E' (= empty) flag. Even if the first 4 sectors are empty they are protected (see below). So the protected sectors are not selected depending on if U-Boot is burnt in them, isn't it ? No, they are selected based on the real size of the (running) U-Boot image. Best regards, Wolfgang Denk ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] NOR sectors are not all protected as they should be.
Hello, I'm using U-Boot with a NOR and a NAND Flash. U-Boot is stored into the NOR flash. The NOR flash is setup as : 0xA000 - 0xA008 - 512k - 8 sectors - reserved for U-Boot.bin 0xA008 - 0xA00A - 128k - 2 sectors - reserved for U-Boot environment If I use the command `flinfo` to see which sectors are protected I see this... Sector Start Addresses: A000 RO A001 RO A002 RO A003 RO A004 E A005 E A006 E A007 E A008 RO A009 E RO A00A E A00B E A00C E A00D E A00E E A00F E A010 E A011 E A012 E A013 E A014 E A015 E A016 E A017 E A018 E A019 E A01A E A01B E A01C E A01D E A01E E A01F E A020 E A021 E A022 E A023 E A024 E A025 E A026 E A027 E A028 E A029 E A02A E A02B E A02C E A02D E A02E E A02F E A030 E A031 E A032 E A033 E A034 E A035 E A036 E A037 E A038 E A039 E A03A E A03B E A03C E A03D E A03E E A03F E A040 E A041 E A042 E A043 E A044 E A045 E A046 E A047 E A048 E A049 E A04A E A04B E A04C E A04D E A04E E A04F E A050 E A051 E A052 E A053 E A054 E A055 E A056 E A057 E A058 E A059 E A05A E A05B E A05C E A05D E A05E E A05F E A060 E A061 E A062 E A063 E A064 E A065 E A066 E A067 E A068 E A069 E A06A E A06B E A06C E A06D E A06E E A06F E A070 E A071 E A072 E A073 E A074 E A075 E A076 E A077 E A078 E A079 E A07A E A07B E A07C E A07D E A07E E A07F E The first sectors #0,1,2,3 are protected and sectors #8,9 (U-Boot environment) are protected. It should be sectors #0,1,2,3,4,5,6,7 and sectors #8,9. I had a looked into U-Boot source to find a constant that defines how many sectors should be protected for the monitor but I didn't find it. I guess U-Boot protect these sectors during the boot sequence. What constant must be defined to protect all of the sectors (#0,1,2,3,4,5,6,7) ? thanks in advance. Alex ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] NOR sectors are not all protected as they should be.
Dear Alexandre Gambier, In message 4d52ba80.4060...@ftemaximal.fr you wrote: Hello, I'm using U-Boot with a NOR and a NAND Flash. U-Boot is stored into the NOR flash. The NOR flash is setup as : 0xA000 - 0xA008 - 512k - 8 sectors - reserved for U-Boot.bin 0xA008 - 0xA00A - 128k - 2 sectors - reserved for U-Boot environment If I use the command `flinfo` to see which sectors are protected I see this... Sector Start Addresses: A000 RO A001 RO A002 RO A003 RO A004 E A005 E A006 E A007 E A008 RO A009 E RO A00A E A00B E A00C E A00D E A00E E A00F E A010 E A011 E A012 E A013 E ... The first sectors #0,1,2,3 are protected and sectors #8,9 (U-Boot environment) are protected. It should be sectors #0,1,2,3,4,5,6,7 and sectors #8,9. No, it should not. Only the sectors that actually contain the U-Boot code and environment are protected. Obviously your image is small enough to fit in the first 4 sectors (= 256 KiB). Actually this is a perfectly normal size, and your reservation of 512 KiB was just a waste of memory. You can see that the following sectors are unused from the 'E' (= empty) flag. When they don't contain any code, there is also no need to pretect them, right? 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 What about WRITING it first and rationalizing it afterwords? :-) - Larry Wall in 8...@jpl-devvax.jpl.nasa.gov ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot