[U-Boot-Users] [PATCH] - fixed missing System ACE CF device

Hi,
If there are any problems please let me know and I'll be more than happy to fix it. This patch is applied against the u-boot 1.1.1 release. The CHANGELOG is below.
Regards, Sean
======================================================================= CHANGELOG (ace_fat.patch): Patch by Sean Chang, 9 Aug 2004: Fixed missing System ACE CF device during get FAT partition info in fat_register_device function. =======================================================================

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Sean Chang wrote: | Hi, | | If there are any problems please let me know and I'll be more than happy | to fix it. This patch is applied against the u-boot 1.1.1 release. The | CHANGELOG is below. | | Regards, | Sean | | ======================================================================= | CHANGELOG (ace_fat.patch): | Patch by Sean Chang, 9 Aug 2004: | Fixed missing System ACE CF device during get FAT partition info | in fat_register_device function. | =======================================================================
This goes bad for me. I get an error i.e.
=> fatls ace 0 ** Partition 1 not valid on device 0 **
Now it is possible that get_partition_info can't handle my case. I have two partitions, partition 1 in the beginning is a FAT partion for the SystemACE to read ACE files, and 2 is a Linux partition w/ ext3. I can test on an unadulterated CF card, but I'm a little busy now - -- Steve Williams "The woods are lovely, dark and deep. steve at icarus.com But I have promises to keep, http://www.icarus.com and lines to code before I sleep, http://www.picturel.com And lines to code before I sleep."

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Sean Chang wrote: | Hi, | | If there are any problems please let me know and I'll be more than happy | to fix it. This patch is applied against the u-boot 1.1.1 release. The | CHANGELOG is below. | | Regards, | Sean | | ======================================================================= | CHANGELOG (ace_fat.patch): | Patch by Sean Chang, 9 Aug 2004: | Fixed missing System ACE CF device during get FAT partition info | in fat_register_device function. | =======================================================================
I did a few basic tests. This simply does not work. All I get is:
~ => fatls ace 0 ~ ** Partition 1 not valid on device 0 **
~ ** Unable to use ace 0:1 for fatls **
get_partition_info simply doesn't work on any CompactFlash cards that I tried. Have you seen any different? I tried a disk that was "formatted at the factory" and disks that I partitioned via fdisk. Even though Linux has no trouble with any of these, and fatls works without your patch, get_partition_info doesn't work.
- -- Steve Williams "The woods are lovely, dark and deep. steve at icarus.com But I have promises to keep, http://www.icarus.com and lines to code before I sleep, http://www.picturel.com And lines to code before I sleep."

Hi Stephen,
I did a few basic tests. This simply does not work. All I get is:
~ => fatls ace 0 ~ ** Partition 1 not valid on device 0 **
~ ** Unable to use ace 0:1 for fatls **
get_partition_info simply doesn't work on any CompactFlash cards that I tried. Have you seen any different? I tried a disk that was "formatted at the factory" and disks that I partitioned via fdisk. Even though Linux has no trouble with any of these, and fatls works without your patch, get_partition_info doesn't work.
hum, without the patch nothing works for me. I was able to use the fat commands fine with the CompactFlash card that I tried. Perhaps you could forward me a copy of the disk image for the CompactFlash card that fails. Also, can you tell me what type of CompactFlash card you have (e.g. size) and what is your board environment (e.g. processor). Just trying to gather more information to figure out what is going wrong.
Thank you for your feedback and testing.
Regards, Sean

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Sean Chang wrote: | Hi Stephen, | | |>I did a few basic tests. This simply does not work. All I get is: |> |>~ => fatls ace 0 |>~ ** Partition 1 not valid on device 0 ** |> |>~ ** Unable to use ace 0:1 for fatls ** |> |>get_partition_info simply doesn't work on any CompactFlash cards |>that I tried. Have you seen any different? I tried a disk that was |>"formatted at the factory" and disks that I partitioned via fdisk. |>Even though Linux has no trouble with any of these, and fatls |>works without your patch, get_partition_info doesn't work. |> | | | hum, without the patch nothing works for me. I was able to use the fat | commands fine with the CompactFlash card that I tried. Perhaps you | could forward me a copy of the disk image for the CompactFlash card that | fails. Also, can you tell me what type of CompactFlash card you have | (e.g. size) and what is your board environment (e.g. processor). Just | trying to gather more information to figure out what is going wrong.
The board (Picture Elements JSE) is a PPC405GPr with a SystemACE attached to a compact flash socket. I've tested your patch with an off-the-shelf SanDisk 64MB CompactFlash card, and also with a card repartitioned (on my Linux workstation) with fdisk to have two primary partitions.
Without your patch, I can list the fat partition (which is the first partition) and load files from it just fine. With your patch, I get the error above and nothing works.
Here is a raw dump of the partition table (via fdisk) for an off-the-shelf disk, followed by a similar dump for a repartitioned disk.
Off the shelf...
Expert command (m for help): d Device: /dev/sdb 0x000: FA 33 C0 8E D0 BC 00 7C 8B F4 50 07 50 1F FB FC 0x010: BF 00 06 B9 00 01 F2 A5 EA 1D 06 00 00 BE BE 07 0x020: B3 04 80 3C 80 74 0E 80 3C 00 75 1C 83 C6 10 FE 0x030: CB 75 EF CD 18 8B 14 8B 4C 02 8B EE 83 C6 10 FE 0x040: CB 74 1A 80 3C 00 74 F4 BE 8B 06 AC 3C 00 74 0B 0x050: 56 BB 07 00 B4 0E CD 10 5E EB F0 EB FE BF 05 00 0x060: BB 00 7C B8 01 02 57 CD 13 5F 73 0C 33 C0 CD 13 0x070: 4F 75 ED BE A3 06 EB D3 BE C2 06 BF FE 7D 81 3D 0x080: 55 AA 75 C7 8B F5 EA 00 7C 00 00 49 6E 76 61 6C 0x090: 69 64 20 70 61 72 74 69 74 69 6F 6E 20 74 61 62 0x0A0: 6C 65 00 45 72 72 6F 72 20 6C 6F 61 64 69 6E 67 0x0B0: 20 6F 70 65 72 61 74 69 6E 67 20 73 79 73 74 65 0x0C0: 6D 00 4D 69 73 73 69 6E 67 20 6F 70 65 72 61 74 0x0D0: 69 6E 67 20 73 79 73 74 65 6D 00 00 00 00 00 00 0x0E0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0F0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1A0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1B0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 01 0x1C0: 01 00 06 07 60 E8 20 00 00 00 E0 E8 01 00 00 00 0x1D0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1E0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1F0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 AA
Repartitioned to have two primary partitions...
Expert command (m for help): d Device: /dev/sdb 0x000: FA 33 C0 8E D0 BC 00 7C 8B F4 50 07 50 1F FB FC 0x010: BF 00 06 B9 00 01 F2 A5 EA 1D 06 00 00 BE BE 07 0x020: B3 04 80 3C 80 74 0E 80 3C 00 75 1C 83 C6 10 FE 0x030: CB 75 EF CD 18 8B 14 8B 4C 02 8B EE 83 C6 10 FE 0x040: CB 74 1A 80 3C 00 74 F4 BE 8B 06 AC 3C 00 74 0B 0x050: 56 BB 07 00 B4 0E CD 10 5E EB F0 EB FE BF 05 00 0x060: BB 00 7C B8 01 02 57 CD 13 5F 73 0C 33 C0 CD 13 0x070: 4F 75 ED BE A3 06 EB D3 BE C2 06 BF FE 7D 81 3D 0x080: 55 AA 75 C7 8B F5 EA 00 7C 00 00 49 6E 76 61 6C 0x090: 69 64 20 70 61 72 74 69 74 69 6F 6E 20 74 61 62 0x0A0: 6C 65 00 45 72 72 6F 72 20 6C 6F 61 64 69 6E 67 0x0B0: 20 6F 70 65 72 61 74 69 6E 67 20 73 79 73 74 65 0x0C0: 6D 00 4D 69 73 73 69 6E 67 20 6F 70 65 72 61 74 0x0D0: 69 6E 67 20 73 79 73 74 65 6D 00 00 00 00 00 00 0x0E0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0F0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1A0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1B0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 0x1C0: 01 00 06 07 20 40 20 00 00 00 E0 40 00 00 00 00 0x1D0: 01 41 83 07 60 E9 00 41 00 00 00 A9 01 00 00 00 0x1E0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1F0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 AA
- -- Steve Williams "The woods are lovely, dark and deep. steve at icarus.com But I have promises to keep, http://www.icarus.com and lines to code before I sleep, http://www.picturel.com And lines to code before I sleep."

Stephen Williams wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Sean Chang wrote: | Hi Stephen, | | |>I did a few basic tests. This simply does not work. All I get is: |> |>~ => fatls ace 0 |>~ ** Partition 1 not valid on device 0 ** |> |>~ ** Unable to use ace 0:1 for fatls ** |> |>get_partition_info simply doesn't work on any CompactFlash cards |>that I tried. Have you seen any different? I tried a disk that was |>"formatted at the factory" and disks that I partitioned via fdisk. |>Even though Linux has no trouble with any of these, and fatls |>works without your patch, get_partition_info doesn't work. |> | | | hum, without the patch nothing works for me. I was able to use the fat | commands fine with the CompactFlash card that I tried. Perhaps you | could forward me a copy of the disk image for the CompactFlash card that | fails. Also, can you tell me what type of CompactFlash card you have | (e.g. size) and what is your board environment (e.g. processor). Just | trying to gather more information to figure out what is going wrong.
The board (Picture Elements JSE) is a PPC405GPr with a SystemACE attached to a compact flash socket. I've tested your patch with an off-the-shelf SanDisk 64MB CompactFlash card, and also with a card repartitioned (on my Linux workstation) with fdisk to have two primary partitions.
Without your patch, I can list the fat partition (which is the first partition) and load files from it just fine. With your patch, I get the error above and nothing works.
Here is a raw dump of the partition table (via fdisk) for an off-the-shelf disk, followed by a similar dump for a repartitioned disk.
Off the shelf...
Expert command (m for help): d Device: /dev/sdb 0x000: FA 33 C0 8E D0 BC 00 7C 8B F4 50 07 50 1F FB FC 0x010: BF 00 06 B9 00 01 F2 A5 EA 1D 06 00 00 BE BE 07 0x020: B3 04 80 3C 80 74 0E 80 3C 00 75 1C 83 C6 10 FE 0x030: CB 75 EF CD 18 8B 14 8B 4C 02 8B EE 83 C6 10 FE 0x040: CB 74 1A 80 3C 00 74 F4 BE 8B 06 AC 3C 00 74 0B 0x050: 56 BB 07 00 B4 0E CD 10 5E EB F0 EB FE BF 05 00 0x060: BB 00 7C B8 01 02 57 CD 13 5F 73 0C 33 C0 CD 13 0x070: 4F 75 ED BE A3 06 EB D3 BE C2 06 BF FE 7D 81 3D 0x080: 55 AA 75 C7 8B F5 EA 00 7C 00 00 49 6E 76 61 6C 0x090: 69 64 20 70 61 72 74 69 74 69 6F 6E 20 74 61 62 0x0A0: 6C 65 00 45 72 72 6F 72 20 6C 6F 61 64 69 6E 67 0x0B0: 20 6F 70 65 72 61 74 69 6E 67 20 73 79 73 74 65 0x0C0: 6D 00 4D 69 73 73 69 6E 67 20 6F 70 65 72 61 74 0x0D0: 69 6E 67 20 73 79 73 74 65 6D 00 00 00 00 00 00 0x0E0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0F0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1A0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1B0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 01 0x1C0: 01 00 06 07 60 E8 20 00 00 00 E0 E8 01 00 00 00 0x1D0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1E0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1F0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 AA
Repartitioned to have two primary partitions...
Expert command (m for help): d Device: /dev/sdb 0x000: FA 33 C0 8E D0 BC 00 7C 8B F4 50 07 50 1F FB FC 0x010: BF 00 06 B9 00 01 F2 A5 EA 1D 06 00 00 BE BE 07 0x020: B3 04 80 3C 80 74 0E 80 3C 00 75 1C 83 C6 10 FE 0x030: CB 75 EF CD 18 8B 14 8B 4C 02 8B EE 83 C6 10 FE 0x040: CB 74 1A 80 3C 00 74 F4 BE 8B 06 AC 3C 00 74 0B 0x050: 56 BB 07 00 B4 0E CD 10 5E EB F0 EB FE BF 05 00 0x060: BB 00 7C B8 01 02 57 CD 13 5F 73 0C 33 C0 CD 13 0x070: 4F 75 ED BE A3 06 EB D3 BE C2 06 BF FE 7D 81 3D 0x080: 55 AA 75 C7 8B F5 EA 00 7C 00 00 49 6E 76 61 6C 0x090: 69 64 20 70 61 72 74 69 74 69 6F 6E 20 74 61 62 0x0A0: 6C 65 00 45 72 72 6F 72 20 6C 6F 61 64 69 6E 67 0x0B0: 20 6F 70 65 72 61 74 69 6E 67 20 73 79 73 74 65 0x0C0: 6D 00 4D 69 73 73 69 6E 67 20 6F 70 65 72 61 74 0x0D0: 69 6E 67 20 73 79 73 74 65 6D 00 00 00 00 00 00 0x0E0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0F0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1A0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1B0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 0x1C0: 01 00 06 07 20 40 20 00 00 00 E0 40 00 00 00 00 0x1D0: 01 41 83 07 60 E9 00 41 00 00 00 A9 01 00 00 00 0x1E0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1F0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 AA
I was able to return from the get_partition_info function without problem by using your partition table. Stephen, if time permits could you find out why the condition:
if ((pt->sys_ind != 0) && (part_num == which_part) && (is_extended(pt->sys_ind) == 0))
was not true (I assumed this since this is the only place where it will return a valid value).
Anyone who also had problems with this before? Wolfgang? Thanks in advance.
Regards, Sean

In message 411824A7.28F80D09@xilinx.com you wrote:
Patch by Sean Chang, 9 Aug 2004: Fixed missing System ACE CF device during get FAT partition info in fat_register_device function.
Added, thanks.
Best regards,
Wolfgang Denk

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Wolfgang Denk wrote: | In message 411824A7.28F80D09@xilinx.com you wrote: | |>Patch by Sean Chang, 9 Aug 2004: |> Fixed missing System ACE CF device during get FAT partition info |>in fat_register_device function. | | | Added, thanks. | | Best regards, | | Wolfgang Denk |
There was a patch related to this that fixed a bug in the System ACE support that was exposed by the applied patch here. However, Sean and I were back-and-forth debugging the situation so the patch proper might not have found its way into your queue.
Do you have another patch to common/cmd_ace.c in your backlog, or should I resubmit the patch?
- -- Steve Williams "The woods are lovely, dark and deep. steve at icarus.com But I have promises to keep, http://www.icarus.com and lines to code before I sleep, http://www.picturel.com And lines to code before I sleep."

In message 415DA6DC.9060303@icarus.com you wrote:
Do you have another patch to common/cmd_ace.c in your backlog, or should I resubmit the patch?
There are several relates patches / messages in my "to-be-processed" queue:
08/10 Sean Chang [U-Boot-Users] Re: [PATCH] - fixed missing System ACE CF device 08/10 Stephen Williams [U-Boot-Users] Re: [PATCH] - fixed missing System ACE CF device 08/11 Sean Chang Re: [U-Boot-Users] Re: [PATCH] - fixed missing System ACE CF device 08/13 Stephen Williams Re: [U-Boot-Users] Re: [PATCH] - fixed missing System ACE CF device
Best regards,
Wolfgang Denk
participants (3)
-
Sean Chang
-
Stephen Williams
-
Wolfgang Denk