APEX Bootloader

From eLinux.org
Revision as of 23:34, 19 November 2009 by Prpplague (Talk | contribs)

Jump to: navigation, search

Summary

APEX is a boot loader for embedded systems. It was written to support the Sharp LH series of wp:System_on_chip processors though it has been ported to a few other ARM targets including the Samsung S3C24xx series.

  • Easy to build. It depends only on shell utilities and GCC.
  • Easy to configure. There is a single configuration file and it uses the linux-2.6 Kconfig infrastructure.
  • Excellent dependency management. Uses Linux kernel Kbuild to optimally manage dependencies.
  • Modular. Commands and drivers may be included or excluded by configuration.
  • Supported targets: LH79520, LH79524, LH7A400, LH7A404, IXP42x (e.g. Linksys NSLU2), S3C24xx, and iMX31.
  • Support for RARP IP configuration and TFTP transfers to the target.
  • Filesystem drivers for FAT, EXT2, and JFFS2.
  • Partition driver for FIS as used by Redboot.
  • Small footprint. A limited feature version can be as small as 16KiB.
  • Support for booting APEX from non-memory-mapped storage, e.g. NAND flash, OneNAND, I2C

Apex Source Download

Change Log

Version 1.6 Series

2009-05-17 Version 1.6.9

  • Makefile (SUBLEVEL): v1.6.9
  • Closed debian bugs by fixing configuration files.
  • Applied http://svn.nslu2-linux.org/svnroot/kernel/trunk/patches/apex
  • src/drivers/driver.c (open_helper): New open helper used by the serial drivers and the memory driver. It's an always-success impementation for drivers that have nothing to do on open.
  • src/mach-orion5x/serial.c (orion5x_serial_init): Removed old console initialization as this is now done as a service.
  • src/mach-s3c2410/serial.c (s3c2410_serial_init): Removed old console initialization as this is now done as a service.
  • src/mach-lh7952x/serial.c (lh7952x_serial_init): Removed old console initialization as this is now done as a service.
  • src/mach-lh7a40x/serial.c (lh7a40x_serial_init): Removed old console initialization as this is now done as a service.
  • src/mach-mx3/serial-sc16c652.c (sc16c652_serial_init): Removed old console initialization as this is now done as a service.
  • src/mach-mx3/serial-mx31.c (mx31_serial_init): Removed old console initialization as this is now done as a service.
  • src/mach-ixp42x/serial.c (ixp42x_serial_init): Removed old console initialization as this is now done as a service.
  • src/apex/console.c (console_init): Console initialize as a service and configurable in the environment.
  • include/service.h (__service_4): Annotation that console is initialized in service 8.
  • include/driver.h (DRIVER_CONSOLE): Cleanup of macros.
  • src/mach-ixp42x/pci.c (pci_init): Commented out broken PCI interrupt type macros. Should be fixed.
  • src/apex/command.c (expand_variables): Revised expand_variables code to expand references within expanded references. This change permits us to define the kernel location, for example, as depending on the $serverip.

2009-01-23 Version 1.6.8

  • Makefile (SUBLEVEL): v1.6.8
  • src/mach-lh7a40x/initialize.c (target_init): Added code to the target initialization for Companion that initializes the modem.

2009-01-21 Version 1.6.7

  • Makefile (SUBLEVEL): v1.6.7 for push of new features.
  • src/drivers-lh/drv-mmc.c (mmc_report): Revised reporting to make it easier to troubleshoot cards.

2009-01-20 Version 1.6.6

  • include/mmc.h (mmc_card_acquired): Revised the card acquisition code so that we don't assume that the first byte of the CID register is non-zero. IMHO, our assumption was correct based on the SD association's documentation, but we found that the Eye-FI card has a bogus looking card ID (CID) register and we have to be lenient to see it.
  • Makefile (SUBLEVEL): v1.6.6 for Companion fixes so it can use a 1.6.x version of APEX.
  • src/drivers/relocate-nand.c: Revised NAND relocator to work with the LPD7A404. Considering that the only other user of the code is a test implemented for the LH79524, this should be safe to rework. The key difference is that the relocator will address each page in turn instead of depending on an unreliable feature of NAND flash that automatically loads successive sectors.
  • src/arch-arm/Kconfig: Changed the Companion bootstrap to use the NAND relocator. This allows us to have a loader that is larger than 80KiB, the size of SRAM. Added a page size configuration option for relocation from NAND flash.
  • src/apex/cmd-version.c (cmd_version): Fixed display of environment variables s.t. the >64KiB length is properly shown in the version command output.
  • src/apex/cmd-image.c (cmd_image): Added an option to relocate the ramdisk image s.t. the uBoot image format can be loaded with "image load" and then used to boot the system.

2009-01-05 Version 1.6.5

  • src/mach-orion5x/mv2120_config: Moving to the CodeSourcery compiler for thumb support.
  • src/arch-arm/lib/cp15-invalidate-dcache-va.c (invalidate_dcache_va): Conditionally compiling the invalidate-dcache-va function based on the presence of the macro and, therefore, the CP15 feature.
  • Makefile (SUBLEVEL): 1.6.5 for orion5x merge.
  • src/apex/cmd-flashusage.c (cmd_flashusage): New command to scan eraseblocks of a flash device for the presence of data.
  • src/mach-lh7952x/memory.h (RAM_BANK0_LENGTH): Fixed the declarations of the extents for the memory regions in the LH7952x. The macros were correct for the LH79524 but not the LH79520. This is now fixed.
  • src/drivers/drv-ext2.c (ext2_identify): Revised EXT2 driver to took for extended partitions and to cope with 64 bit IO.
  • include/driver.h: Support for 64 bit IO sizes. This is only necessary for large devices like those accessible via ATA/SATA. It is optional and somewhat expensive. Even the EXT2 driver will function without it, but it won't be able to see partitions past 2GiB. This change trickled into lots of areas of APEX because of the change of types in the descriptor structure. However, there should be no size or performance impact when the system is compiled without CONFIG_DRIVER_LONG_LONG_SIZE.
  • src/arch-arm/lib/muldi3.S: Inclusion of another kernel function for handling aeabi entry points. This was required by drv-ata when we compiled it with THUMB.
  • src/arch-arm/lib/cp15-wait.c: This and other cp15 functions so that cp15 operations can be invoked from THUMB code without THUMB2 support and without specialized code to detect the operation mode. These functions allow all code that lacks __asm's to be compiled with THUMB.
  • src/drivers/drv-fat.c (fat_open): Adding greater specificity to the region construction from the block_driver().
  • src/drivers/drv-ext2.c (ext2_open): Adding greater specificity to the region construction from the block_driver().
  • src/drivers/driver.c (parse_descriptor): Fix to disambiguate regions that could have path elements. The parser would not interpret driver:10k as having a start address of 10k when the driver could accept a path. Now, parser will interpret driver:bin as having a path of 'bin', but driver:10k as having a starting offset as 10k. The region can be unambiguously constructed using '@' and '/' appropriately.
  • src/mach-mx3/drv-i2c.c: New I2C driver for MX3x. Not complete, but working for writes to the I2C#1 controller.
  • src/mach-mx3/cmd-wm8955.c: New command for sending control messages to the WM8955L on the PSJL Karma.
  • src/drivers/driver.c (parse_descriptor): Fix for the parsing of FS descriptors such that the start address and length parameters may be set.(parse_descriptor): Added the '%' special character for combining one or more descriptors. This is used by the drivers that have a basis driver defined in an environment variable, s.t. the driver can specify a starting address and/or length without knowing the exact form specified by the

2008-12-18 Version 1.6.4

  • Makefile (SUBLEVEL): Rolling revision for PSJL implementation. 1.6.4.
  • src/drivers/drv-nor-cfi.c (nor_probe_chip): Support for broken AMD/Spansion NOR flash that does not properly report top-boot vs. bottom-boot.
  • src/drivers/drv-nor-cfi.c: In order to support the Micronix (Spansion compatible) NOR flash in the HP MediaVault 2120, we needed to completely fill out the Spansion support. There is support for a single byte wide bus and a 16 bit internal logic as is the case on the MV2120.
  • src/drivers/drv-nor-cfi.c (ReadArray): Changed the ReadArray command for Spansion to 0xf0.
  • src/arch-arm/lib/cp15.c (cp15_ctrl): Enhanced the cp15 report on the control register to be more readable and to show more bits (ARMv6).
  • src/apex/cmd-image.c (cmd_image): Adding descriptor_open() call to image load so that we can read from tftp.
  • src/drivers/drv-nor-cfi.c (nor_report): Cleanup of the nor flash driver report. Added start address and length that match the mem driver.
  • Makefile: Thumb support restored, required a little work to the src/arch-arm/lib code to guarantee interwork compatibility.
  • src/mach-mx3/exception_vectors.c: Implementation of exception vectors on MX31, primarily in support of debugging THUMB.
  • src/arch-arm/lib/div64.S: Slight recoding of platform implementations of basic functions to be interwork compatible.
  • src/net/tftp.c (tftp_receiver): Reporting on TFTP errors s.t. we properly detect file-not-found problems.

2008-11-13 Version 1.6.3

  • Makefile (SUBLEVEL): Version 1.6.3 for dm9000. The initial
         orion patches are in as well, but not yet supported.

* src/drivers/drv-dm9000.c (dm9000_read): Implementation of dm9000_{read,write} to round out support for dm9000 as a complete Ethernet MAC/PHY driver.

2008-09-16 Marc Singer <elf@zealous.synapse.com>

* src/lib/strtol.c: Adding strtol as a separate library function, in case it is needed. The memlimit command will use this function.

* src/mach-mx3/rosencrantz.h (CCM_PDR0_V): Override for the PDR0 so that the CSI clock scalar is non-default.

* src/mach-mx3/mx31.h (CCM_UPCTL_266_V): Fixed the UPCTL initialization values. This PLL is based on the CKIH, so it doesn't need to change when the CPU clock speed changes. (CCM_PDR0_V): Allowing this value to be overridden by the board specific header.

* src/drivers/drv-mem.c (cmd_memlimit): Revised memlimit to permit a negative offset which is then subtracted from the total system memory.

2008-09-15 Marc Singer <elf@buici.com>

* debian/rules (binary-arch): Adding apex-image to the tools installed in the debian package.

2008-09-12 Marc Singer <elf@zealous.synapse.com>

* src/apex/cmd-image-uboot.c: Documentation for UBOOT image format. (verify_uboot_image): Added support for multi-images. Now loading UBOOT images the same way that UBOOT does.

* src/apex/region-checksum.c (region_checksum): Fixed the checksum to account for incoming CRC value as is necessary for UBOOT image CRC computation.

* src/apex/cmd-image-uboot.c: Added uboot image support. No multi-images, but the rest works OK.

* src/apex/region-checksum.c (region_checksum): Added neglected check for whether or not the caller wants the length added to the checksum

* src/apex/cmd-image-apex.c (handle_apex_image): Factored out the APEX image code so we can implement UBOOT in separate file with optional compilation.

2008-09-11 Marc Singer <elf@zealous.synapse.com>

* scripts/Makefile.build (modorder-target): Removed build of the module.order files.

* src/apex/cmd-copy.c (cmd_copy): Fixed the return value so copy doesn't stop startup.

* src/apex/cmd-image.c (handle_load_apex_image): Cleaned up the output and make the check and load functions look similar in output.

* src/apex/region-checksum.c (region_checksum): Fixed checksumming so that we can sum over a defined range instead of being limited to summing the whole region.

2008-09-10 Marc Singer <elf@buici.com>

* src/apex/cmd-image.c (apex_image): Refactored cmd-image code to support a single driver for parsing through the header data.

2008-09-10 Marc Singer <elf@zealous.synapse.com>

* src/apex/cmd-image.c (cmd_image): Fixed cascade testing of options.

* src/lib/gmtime.c (gmtime_r): Fixed year calc (typo). (gmtime_r): Fixed month calc, off by one. (convert_two_digits): Fixed representation of numbers; digits swapped.

* src/lib/strimatch.c (strimatch): Fixed this function to properly match when the case is identical.

2008-08-28 Marc Singer <elf@zealous.synapse.com>

* src/apex/cmd-help.c (compare_commands): Righted command sort order. (cmd_help): Eliminated a possible overflow of command listing array.

2008-08-27 Marc Singer <elf@zealous.synapse.com>

* src/drivers/drv-mem.c (memory_write): Fixed un-aligned write code. The original test used were allowing invalid unaligned accesses.

2008-08-26 Marc Singer <elf@zealous.synapse.com>

* src/mach-mx3/nor-cfi.h: Removed bogus override of the NOR flash memory command type.

* src/mach-mx3/initialize.c (target_init): New initialization of the DM9000 memory region for MX31. The timing is much tighter and the OE and R_Wn timing has a better guarantee of accuracy.

* src/drivers/drv-dm9000.c (cmd_eth): New 'r' and 'w' subcommands for inspecting registers of the DM9000. Renamed the 're' command to eeprom since that's what it does.

* src/apex/services.c (init_services): More clear output from service startup in LL mode.

* Makefile (SUBLEVEL): New version for changes to DM9000 code and for new KarmaV configuration.

2008-07-09 Marc Singer <elf@zealous.synapse.com>

* src/drivers/drv-ext2.c: Added support for the inode_size field in the first revision of the second-extended filesystem's superblock.

2008-05-20 Marc Singer <elf@buici.com>

* debian/postinst: Fixed the postinst script to only run on the NSLU2.

2007-10-16 Marc Singer <elf@zealous.synapsedev.com>

* Makefile: The help make target now shows the configurations and the descriptions of them. (SUBLEVEL): 1.5.13.

* src/drivers/relocate-nand.c: Fixed the basic NAND relocator. The code was previously broken as there was no configuration that used it.

* src/drivers-lh/Kconfig: Added 565 option for LCD panel. Odd, that we'd never implemented this before, but it is important to note that the NXP LCD controller doesn't cope with 565 as well as 555.

* src/mach-mx3/ipu.c: Inverted sense of LED outputs for testing Rosencrantz.

* src/mach-lh7a40x/clcdc-karma.c: Added adapter code for Karam LCD panel.

* src/mach-lh7a40x/cmd-karmaaccel.c: Added accelerometer test code for Karma.

* src/mach-lh7a40x/cmd-karmatouch.c: Added touch controller test code for Karma.

* Removed a lot of cruft associated with older NAND flash implementations. NAND code is moved to the drivers directory.

2007-08-06 Marc Singer <elf@zealous.synapsedev.com>

* Makefile (SUBLEVEL): Rolling to 1.5.11 just to make sure we got all of the timing parameter changes in a unique version.

2007-07-24 Marc Singer <elf@buici.com>

* Makefile (SUBLEVEL): rolling to 1.5.10 for fix to CPU timing on lh7a404.

2007-07-24 Marc Singer <elf@zealous.synapsedev.com>

* src/mach-lh7a40x/initialize.c: Moved the clock speed setup to the early initialization routine so that it is properly configured.

2007-06-27 Marc Singer <elf@buici.com>

* usr/apex-env.cc (arg_parser): Added force option to the apex-env command. (main): Added partial command support so that 'apex-env rel' shows the release version.

2007-06-26 Marc Singer <elf@buici.com>

* src/arch-arm/entry/apex.lds.S: Removed Companion section from the general build.

2007-06-25 Marc Singer <elf@cerise.buici.com>

* Makefile (SUBLEVEL): 1.5.8: Releasing for Debian package.

* usr/apex-env.cc: Added release and region commands for probing the APEX environment.

* src/apex/env.c: Added prefix option to the startup command. Removed crufty old ENV_STARTUP option that was mach specific.

2007-06-03 Marc Singer <elf@cerise.buici.com>

* src/arch-arm/entry/apex.lds.S: Renamed some of the sections to make the meanings clear. Preemtively fixed a vulnerability to section reordering. Fixed the setting of fSDRAMBoot so that it works for INLINE init mode and for the older form.

* src/mach-ixp42x/initialize.c (bootstrap_sdram_pre): Revamped the initialization code for ixp42x to use inline mode. Took the opportunity to elide a lot of cruft from the routines. It isn't yet tested as written to flash as this requires setup of one of the wigglers. None of the typical uses of APEX on the ixp42x install APEX as the primary boot loader, so this can wait.

* src/arch-arm/Kconfig: Configuration option to override the default SDRAM execution detection code. Most platforms can use the execution address to detect whether or not APEX is running in SDRAM. Some, like the ixp42x map flash over SDRAM, so we have to use a custom piece of code to detect this circumstance.

2007-06-03 Marc Singer <elf@buici.com>

* src/arch-arm/Kconfig: Added AEABI configuration option so that we can link APEX with an AEABI toolchain. Really, the only difference is the inclusion of a couple of math functions.

* src/arch-arm/lib/lib1funcs.S: Added config.h to build of lib1funcs so that the configuration dependencies are checked.

2007-06-02 Marc Singer <elf@buici.com>

* Makefile (SUBLEVEL): 1.5.6: Releasing version with fix section ordering.

2007-06-01 Marc Singer <elf@cerise.buici.com>

* src/arch-arm/entry/reset.c: Fixed a problem in the ordering of the reset sections that was illuminated by rwhitby's default compiler.

2007-06-01 Marc Singer <elf@zealous.synapsedev.com>

* Makefile (SUBLEVEL): 1.5.5 for the SAVEATONCE option, very necessary for OneNAND stored environment.

* src/lib/env.c: New option, CONFIG_ENV_SAVEATONCE implements a cached environment that is saved at one time to non-volatile storage instead of through incremental updates. This is necessary for some types of NAND flash where multiple writes to the same page are limited.

* src/apex/*.c: Groomed error reporting for opening regions.

* src/lib/env.c: Changed the environment region descriptor name to d_env so that it is easier to remember.

2007-05-30 Marc Singer <elf@cerise.buici.com>

* Makefile (SUBLEVEL): 1.5.4. Rolling revision for the sake of the xscale fixes.

* src/mach-mx3/cmd-sleep.c (cmd_sleep): Test code for MX31 sleep modes.

* src/mach-mx3/cmd-reset.c (cmd_reset): Command verified.

* src/arch-arm/entry/reset.c: Added a jump to reset_exit() from reset() in the event that we disable the MMU at startup. The ixp42x needs this because the xscale MMU flush code allocates data in the text section.

* src/mach-ixp42x/initialize-sdram.c (cmd_initialize_sdram): Fixed the scan of 256Mib SDRAM chips. A small change to the algorithm and we seem to be able to detect 64MiB of memory just fine.

* src/drivers/drv-mem.c (cmd_memscan): Error detection for region too small.

2007-05-24 Marc Singer <elf@buici.com>

* src/drivers/driver.c (parse_descriptor): Unparseable regions will now generate an error.

* src/apex/cmd-version.c (cmd_version): Added a message about the currently set variation.

2007-05-24 Marc Singer <elf@zealous.synapsedev.com>

* Makefile (SUBLEVEL): 1.5.3. Rolling rev for the sake of working IPU code, working sensor capture, and turing off of the illumination LEDs.

* src/mach-mx3/ipu.c (cmd_ipu): Fixed the shutter width to increase frame rate.

* src/mach-mx3/ipu.c (ipu_setup): Fixed the burst width to memory through the IPU DMAC.

2007-05-22 Marc Singer <elf@zealous.synapsedev.com>

* src/drivers/drv-dm9000.c: Fixed failed probe code path. If the dm9000 isn't found, there will be no report.

* src/mach-mx3/ipu.c: Adding view finder DMA task.

* src/lib/env.c (env_check_magic): Fixed empty/broken environment region case.

2007-05-18 Marc Singer <elf@zealous.synapsedev.com>

* Makefile (ARCH): Releasing 1.5.2.

* src/arch-arm/Kconfig: Fixed companion boot by explicitly enabling the simple/NOR flash relocator as the primary relocator.

* src/drivers/drv-nand.c (nand_sequential_input): Fixed the NAND driver to R/W on ST NAND parts.

2007-05-17 Marc Singer <elf@zealous.synapsedev.com>

* src/mach-lh7952x/debug_ll.h: Fixed UART declarations.

* src/mach-lh7952x/init-motoedge.c: Converted to inline platform initialization.

* src/arch-arm/entry/relocate-simple.c: fixed relocate-simple() because we changed the way we handle offsets.

2007-05-16 Marc Singer <elf@zealous.synapsedev.com>

* Makefile (SUBLEVEL): Rolled to 1.5.2 so that we can keep track of this interim release.

* src/apex/command.c (exec_monitor): Eliminated representation of empty commands in startup command list.

2007-05-15 Marc Singer <elf@cerise.buici.com>

* src/arch-arm/entry/apex.lds.S: Reorganized the sections and the section names to be more readable and consistent.

2007-05-12 Marc Singer <elf@cerise.buici.com>

* src/arch-arm/entry/reset.c: Restructured to allow for cleaner startup code. Legacy implementations are still OK, but the new plumbing permits seamless transitions between various initialization elements to handle constrained boot situations. Also removed an onerous constraint on register usage in the relocate_apex() function. The caller is now forced to assume that no registers are saved.

* src/arch-arm/linux/atag.c (atag_header): Eliminated the core tag.

2007-05-10 Marc Singer <elf@buici.com>

* Releasing 1.5.0 with iMX31 and OneNAND.

2007-05-10 Marc Singer <elf@zealous.synapsedev.com>

* src/drivers/relocate-onenand.c: Groomed the relocation for OneNAND to remove unneeded return address calculation.

* src/drivers/drv-dm9000.c: Added code to help select the proper default interface when there could be two and only one is present.

* src/mach-mx3/initialize.c: Groomed the startup code to remove much cruft.

* src/apex/env.c: Fixed typo in the default environment startup command that was including the ramdisk startup even though there was none needed.

2007-05-10 Marc Singer <elf@cerise.buici.com>

* src/apex/command.c (call_command): Reorganized command invocation to report bogus command requests.

2007-05-09 Marc Singer <elf@zealous.synapsedev.com>

* src/arch-arm/entry/apex.lds.S: Start of reorganization of the bootstrap so that we don't need to use function calls to handle early setup *and* we don't depend on macros.

2007-05-07 Marc Singer <elf@zealous.synapsedev.com>

* src/drivers/relocate-onenand.c: Implementation of OneNAND APEX relocation for bootstrap.

* src/apex/env.c: Improved the environment link so that it can exist even if there is no user-modifiable environment. This is to allow user-land to browse environment variables even if they cannot set them.

* src/mach-lh7a40x/preinitialization-companion.c: Comment on preinitialization.

2007-05-04 Marc Singer <elf@zealous.synapsedev.com>

* src/mach-mx3/ipu.c (cmd_ipu): Fixed the i2c code and added hooks to enable camera test patterns.

* src/mach-mx3/initialize.c: Substantially enhanced the system setup. The IPU test code is now able to write to memory.

* src/apex/cmd-version.c (cmd_version): Added target board description string.

2007-04-30 Marc Singer <elf@zealous.synapsedev.com>

* src/mach-mx3/initialize.c: Extra check in the initialization routine so that we don't alter the timing registers if the CPU is already in the target mode. It looks like the CPU doesn't like the PLLs being changed once it has booted. It may be the SDRAM that doesn't like the timing change.

* src/arch-arm/entry/reset.c: Restored setting of the CPSR mode in the loader. The CPU boots in the undefined mode. We move to supervisor mode, though this doesn't appear to be necessary for the kernel to boot.

* src/mach-mx3/ipu.c (ipu_report): Improved clarity of IPU report to break out fields and to describe the formats in English.

2007-04-27 Marc Singer <elf@buici.com>

* include/asm/cp15-armv6.h: Fixed the cache control macros for the ARMV6.

2007-04-27 Marc Singer <elf@zealous.synapsedev.com>

* src/mach-mx3/ipu.c: More IPU debug code. The report function has a clean rendering of the registers.

* src/mach-mx3/mx31.h (CCM_PDR0_533_V): Switched to 533MHz CPU clock.

* src/mach-mx3/uart.h (INITIALIZE_CONSOLE_UART): extended the FIFOS to 16 bytes.

* src/mach-mx3/initialize.c: Added initialization of COSR even though we don't use it.

* src/mach-mx3/Kconfig: New architecture number for Rosencrantz.

2007-04-24 Marc Singer <elf@zealous.synapsedev.com>

* src/apex/services.c: Created this file to hold service init/release code.

* src/apex/env.c: Added a "" to the startup command so that we can have an empty startup command.

2007-04-09 Marc Singer <elf@zealous.synapsedev.com>

* 1.4.18 for mx31 changes.

2007-04-06 Marc Singer <elf@zealous.synapsedev.com>

* src/drivers/drv-mem.c (memory_read): Fixed the memory read function so that it properly reads from word width regions.

* src/mach-mx3/initialize.c: Fixed the usleep timer programming. There were two problems. First, the base frequency is not as advertized. The CPU can only use the IPG clock as the basis. Second, our programming of the timer was wrong and needed to be reworked so that we properly detected the timer expiration. (__section): Added DM9000 region initialization.

2007-03-01 Marc Singer <elf@zealous.synapsedev.com>

* src/drivers/drv-mem.c (memory_write): Revised the drv-mem write function so that it does it's best to match the requested IO width when we're writing from the fill command. Other users should be unaffected.

2007-02-25 Marc Singer <elf@cerise.buici.com>

* 1.4.17

* src/drivers/drv-nor-cfi.c (nor_read): Fixed the nor-cfi driver cache support. It wasn't properly purging cache entries so the write and erase code was failing. Now, we invalidate entries for the area we've read. We still see the significant improvement in read throughput.

* src/arch-arm/entry/mmu.c: Added comment about how it is the called who must purge the cache on marking a block uncacheable. This also removes a bit of code that did nothing.

* src/mach-ixp42x/initialize-sdram.c (cmd_initialize_sdram): SDRAM initialization code for the ixp42x so that we can initialize SDRAM even though we're not the primary boot loader. It *looks* OK, but I haven't been able to test it with multi-chip slugs.

2007-02-15 Marc Singer <elf@cerise.buici.com>

* src/drivers/drv-nand.c: Revised the NAND flash initialization code to allow for better/more flexible detection of NAND chip organizations. Without a comprehensive directory of chip IDs, we're looking for an easy way represent the ID->organization mapping.

2007-02-14 Marc Singer <elf@cerise.buici.com>

* Makefile (SUBLEVEL): 1.4.16. Rev for fat-slug support.

* src/drivers/drv-mem.c (memory_scan): Fixed error in memory scan that wasn't accoounting for the last block in a region. This probably would never have been a problem, but was noticed while testing the memscan function. (cmd_memscan): New command that scans a region of memory as if we're scanning memory when APEX starts. This is useful when debugging memory initialization issues. (cmd_memscan): Added -u switch to memscan so that we can update the memory map passed to the kernel after APEX has made it's pass at initialization time.

2007-02-13 Marc Singer <elf@cerise.buici.com>

* src/drivers/drv-nor-cfi.c: Added Spansion command support to the nor-cfi driver. This is a configuration time option. Only one command set/protocol may be selected at a time.

2007-02-12 Marc Singer <elf@zealous.synapsedev.com>

* src/drivers/drv-nand.c: Augmented NAND driver to allow for both Toshiba style command and ST style commands. The ST stuff is incomplete, but reading ought to be OK.

2007-02-05 Marc Singer <elf@buici.com>

* Makefile (SUBLEVEL): 1.4.15, allows a wait of 0 for a check for ^C before continuing. Mainly done to release to debian.

2007-02-05 <elf@baker.buici.com>

* debian/rules: Dumb typo when I revised the rules. The name of the output file changed and I didn't want it to.

2007-02-02 Marc Singer <elf@zealous.synapsedev.com>

* src/apex/cmd-wait.c: Allowing a zero TIMEOUT.

* src/apex/command.c (TIMECMD_INIT): Added command execution timer.

2007-01-31 Marc Singer <elf@cerise.buici.com>

* debian/rules: Cross-building support.

* src/mach-ixp42x/serial.c: Minor change to the ixp42x serial driver to raise RTS for the same of systems that use it.

2007-01-30 Marc Singer <elf@buici.com>

* src/arch-arm/lib/lib1funcs.S: New version of lib1funcs so that armel is happy. This code was pulled directly from the Linux kernel source.

2007-01-29 Marc Singer <elf@cerise.buici.com>

* Added alternatives to Debian configs.

2007-01-29 Marc Singer <elf@zealous.synapsedev.com>

* Makefile (SUBLEVEL): Rolled rev for block cache fix.

* src/drivers/drv-ext2.c: inode/block cache flush was broken. Now, it is not.

2007-01-27 Marc Singer <elf@buici.com>

* usr/apex-env.8: Man page.

* usr/link.h: Added cleanup code to Link object. It isn't strictly necessary, but it is good hygiene.

2007-01-27 Marc Singer <elf@cerise.buici.com>

* Makefile: 1.4.12 for new environment program and to prepare for publishing a new release.

* usr/apex-env.cc: New user-mode program for updating the APEX environment once the system is booted. It replaces the printenv program that was only able to print the environment as it stood, combining the flash data with the defaults from APEX. This program is smart enough to be able to set/unset variables and erase the whole environment.

2007-01-25 Marc Singer <elf@zealous.synapsedev.com>

* src/mach-lh7a40x/clcdc-companion.c: Removed the DDS hack form the LCD init on Companion. No DDS circuit present anymore.

2007-01-23 Marc Singer <elf@cerise.buici.com>

* src/lib/memtest.c (memory_test_0): Revised the memory test walking bit loop on advice from a collegue. Made the full memory test an option on top of the basic memory test.

2007-01-23 Marc Singer <elf@zealous.synapsedev.com>

* src/mach-lh7a40x/variation-companion.c (variation_init): Added variation support to the Companion. Pressing three keys at power-on will activate the variation boot.

2007-01-13 Marc Singer <elf@cerise.buici.com>

* src/arch-arm/entry/reset.c (__section): Slight change to MMU disabling code.

* src/arch-arm/entry/mmu-xscale.h (CACHE_CLEAN_D): Revised cache clean code to match Nicolas Pitre's work in the Linux kernel.

2007-01-09 Marc Singer <elf@zealous.synapsedev.com>

* src/drivers/drv-fis.c (end_of_table): Added back the end-of-table check. We're now checking the same way that the kernel checks.

2007-01-09 Marc Singer <elf@cerise.buici.com>

* Makefile (SUBLEVEL): 1.4.11, to fix partition table swapped-ness check.

* src/drivers/drv-fis.c (prescan_directory): Fixed the partition table swapped-ness check to a more robust comparison of the partition table entry's erase block with the erase block from which the table is being read.

2007-01-08 Marc Singer <elf@cerise.buici.com>

* 1.4.10.

* src/drivers/drv-fis.c (deleted_entry): Replaced the end_of_table() checks with deleted_entry checks. Really, we cannot be sure that we've seen the end of the table since a 0xff in the first byte indicates a deleted entry and we have to check for that first. We previously thought that (u32)~0 was the end of the table, but we cannot now be sure. Argh.

* Applyied nas100d and dsmg600 patches as well as a slew of config file patches courtesy of rwhitby.

* src/drivers/drv-nor-cfi.c (SWAP_ONE): Fixed the nor flash driver to properly write when in an endian mismatched mode. This may be peculiar to the nslu2 (and other ixp4xx systems) where flash is assumed to be written in one endian-ness while the system is executing in the opposite endian-ness.

* src/mach-ixp42x/variation-nslu2.c (variation_init): Variation now uses the fact that the power button is depressed (instead of the reset button).

* src/lib/dump.c (dumpw): Fixed the printability check on dump so that we don't write non-ascii characters.

* src/lib/env.c (env_check_magic): Streamlined the environment magic number check.

2007-01-06 Marc Singer <elf@cerise.buici.com>

* src/apex/env.c: Many more environment variables may be defined.

* src/apex/cmd-boot.c (atag_commandline): boot command performs lookup of the default command line that allows for alternatives.

* src/arch-arm/Kconfig: Reworking of the environment configuration section. We now have options to set alternative kernel command line, kernel source region, and ramdisk region. Default variation suffix is a config parameter. The default startup command is more clearly controlled.

* src/mach-ixp42x/variation-nslu2.c (variation_init): Added variation for nslu2. Holding the reset button while booting will select the alternative boot and set the variation to the configured value.

* src/apex/command.c (expand_variables): Added '-' to the list of acceptable characters when scanning a command for variables to expand. This is helpful for variations.

* src/lib/lookup.c (lookup_alias_or_env): Variation support added to the standard lookup function.

2006-12-13 Marc Singer <elf@zealous.synapsedev.com>

* src/apex/command.c (parse_command): Added '-' command prefix that tells APEX to ignore the return value of a command. This is helpful in the startup command.

2006-11-07 Marc Singer <elf@zealous.synapse.com>

* Makefile (SUBLEVEL): Rolling rev for memory test.

* src/lib/memtest.c (memory_test_0): memory test for system setup. It checks SDRAM before copying the loader post-bootstrap. Works generally on any target, but requires that the initialize_bootstrap () function return TRUE when it initializes SDRAM.

2006-10-25 Marc Singer <elf@zealous.synapse.com>

* src/drivers/drv-nand.c (cmd_nand): NAND commands moved to a configurable option. (nand_report): Fixed the display of the NAND status.

2006-10-23 Marc Singer <elf@cerise.buici.com>

* src/drivers/drv-fis.c (prescan_directory): Modified the check for swapped partitions to compare the address of the directory partition with the address being scanned. Should be more robust than the original test. Also added a further limit to directory scanning using the length of the directory partition.

2006-10-23 Marc Singer <elf@zealous.synapse.com>

* src/arch-arm/entry/mmu-alloc.c (alloc_uncached_top_retain): Function returns a block of memory from the top of scanned RAM. It also removes the memory from the pool passed to the kernel.

* src/drivers-lh/drv-clcdc.c (clcdc_init): New configuration option to allocate the frame buffer from the top of memory and remove it from the pool given the kernel. It also prevents the LCD display from being shut down when the loader passes control to the boot or go application.

2006-10-18 Marc Singer <elf@zealous.synapse.com>

* Makefile: v1.4.7

* src/mach-lh7a40x/preinitialization-companion.c: Preinitialization support to work-around limitation in Sharp Boot ROM. The ROM only loads 512 bytes from modern NAND parts. We need to pull more of this down in order to properly initialize the system and copy the loader to SDRAM.

* src/drivers/drv-nand.c: Genericized NAND driver.

* src/drivers-lh/drv-clcdc.c: New panels. Reorganized the panel setup code to better conform to standard nomenclature.

* src/drivers/drv-dm9000.c: Support for more than one DM9000 chip. It can write to both mac address roms as well.

2006-08-18 <elf@scarlet.buici.com>

* src/drivers/drv-fis.c (compare_skips): Fixed the comparison function. The sign sense was wrong and it sorted to the wrong order.

2006-08-12 <elf@scarlet.buici.com>

* Makefile (SUBLEVEL): v1.4.3

* src/drivers/drv-fis.c (fis_report): Added skips to the report.

* debian/rules: Removed headerization so that slugimage can be responsible for it.

* src/drivers/drv-fis.c: Added skip descriptor handling. This means that partitions may include 'skips' where some data physically located in the partition is ignored when performing IO on the partition. This feature was added for the slug with a dumb version of Redboot that ignores the partition table when looking for the data it must copy to SDRAM.

* src/apex/cmd-fill.c (cmd_fill): Removed unwanted printf.

* src/lib/sort.c (sort): Check for degenerate cases of sorting 0 or 1 element.

* debian/*: Fixed the control file and and changelog to properly reflect this release.

2006-07-30 Marc Singer <elf@buici.com>

* Makefile (SUBLEVEL): Rolling revision in preparation for release of the BSP. apex-1.4.2

* src/mach-lh7952x/env.c: Moved all lh7952x's to use the amba-pl011 serial driver in the kernel.

2006-07-29 Marc Singer <elf@buici.com>

* src/drivers-lh/drv-clcdc.c (clcdc_release): Revised the order of the clcdc driver release so it works on the lh79520 which will disable the controller clock.

* src/drivers/drv-cf.c (ready_wait): Recoded ready_wait to use the attribute pin replacement register. This doesn't really have an impact on performance, but it does require that the driver is properly configured in the drv_cf.h header.

2006-07-27 Marc Singer <elf@buici.com>

* src/drivers/drv-cf.c (cf_identify): Fixed attribute reading for some cards that return the value in the high and low bytes. Attribute memory is really only byte addressable. This fixes a problem with recognizing some brands of CF cards.

2006-07-25 Marc Singer <elf@buici.com>

* usr/printenv.cc: Rewritten printenv program to support the new environment memory format.

* README_environment: New README about the environment.

* Makefile: Removed envmagic.h and it's computation. The new environment is free-standing and removal of envmagic makes the build much quicker.

2006-07-25 Marc Singer <elf@cerise.buici.com>

* src/lib/env.c (_env_locate): New environment implementation is self-contained for both reading and writing.

2006-07-25 <elf@scarlet.buici.com>

* src/mach-ixp42x/debian-nslu2-arm_config: Moved the start of the kernel and ramdisk regions to skip the 16 byte sercomm header.

* include/atag.h: Fixed atag section macros.

2006-07-23 <elf@scarlet.buici.com>

* src/mach-ixp42x/cpuinfo.c (cpuinfo_report): Alignment change to the cpuinfo function.

* include/driver.h: Added query function to the driver jump table.

* src/drivers/drv-nor-cfi.c (nor_query): New query function allows a driver to return information about the device. NOR flash is the only implementer because it's the one that needs this most. (copy_from): Implementation of a byte swapping copy routine for the sake of BE/LE conversion.

* src/drivers/drv-fis.c (prescan_directory): New directory prescan detemines if the flash directory has a different endian-ness from APEX. (map_region): New function to map the directory entry to a region. Now, the region use the underlying flash driver.

* src/apex/cmd-copy.c (cmd_copy): Added -s option to copy for byte swapping data where the source is a different ending from APEX.

2006-07-22 <elf@scarlet.buici.com>

* src/drivers/drv-mem.c (memory_read): Checks the width field and performs IO accordingly.

* src/apex/cmd-help.c: Revised command line help.

* include/driver.h: New descriptor field specifies the IO width. This allows, in particular, the memory driver to tailor the I/O to a specific width. Some regions must be read as words (CPU registers), others as bytes (CF).

* src/apex/cmd-dump.c (cmd_dump): Here, and elsewhere, added alignment attributes so that byte arrays on the stack are word aligned. I had thought that this was a given but the 4.x compilers no longer make this true.

* src/drivers/drv-nor-cfi.c (nor_report): Code to detect endian mismatch. A debugging aid for nslu2.

2006-07-21 Marc Singer <elf@buici.com>

* Many: Modified several source files to cope with GCC 4.1. Found a bug detected by GCC's null statement detection. Mostly warning fixes dues to signed/unsigned coercion.

2006-07-20 Marc Singer <elf@buici.com>

* Makefile: Release 1.3.30. Debianized. New FIS driver.

* src/apex/command.c (expand_variables): Using new lookup function to resolve variable/macro references in command expansion.

* src/lib/lookup.c: New lookup function to handle checks to aliases as well as environment without explicitly including ifdefs.

* src/drivers/drv-jffs2.c (block_driver): Replacing static block driver string with a function that looks at aliases and the environment.

* src/drivers/drv-fat.c (block_driver): Replacing static block driver string with a function that looks at aliases and the environment.

* src/drivers/drv-ext2.c (block_driver): Replacing static block driver string with a function that looks at aliases and the environment.

* src/drivers/drv-fis.c: New FIS partition driver.

2006-07-18 Marc Singer <elf@buici.com>

* src/arch-arm/entry/reset.c: Added code to support forcing the CPU into LITTLEENDIAN mode. This is necessary for running the NSLU2 is LE mode for Debian without replacing the Redboot loader.

2006-07-14 Marc Singer <elf@buici.com>

* Makefile: added logic to the build to archive prebuilt binaries for each configuration.

2006-07-11 Marc Singer <elf@buici.com>

* src/arch-arm/entry/reset.c: Fix for register being clobbered in apex_relocate() and messing with PUTC_LL().

2006-07-10 Marc Singer <elf@buici.com>

* src/apex/cmd-help.c (cmd_help): Added option to suppress the short help descriptions. It saves a little bit on memory.

* src/arch-arm/entry/apex.lds.S: Optimized the RAM memory footprint, especially in the xbss section. Added stack_size configuration parameter.

* src/apex/cmd-boot.c (cmd_boot): Boot address may not come from the environment. (atag_commandline): Simplified the command line from environment code such that there is no code to read from environment when there is no environment.

2006-06-02 Marc Singer <elf@buici.com>

* Makefile: Release 1.3.28. Added dm9000 mac address programming.

2006-06-02 Marc Singer <elf@cerise.buici.com>

* Makefile: Release 1.3.27. Version for companion as well.

2006-06-01 Marc Singer <elf@buici.com>

* src/mach-lh7a40x/relocate-companion.c: Fixed the section of the relocation function. Added console feedback for the bootstrap.

* src/drivers-lh/drv-mmc.c: Added proper configuration checks for the companion relocation.

* Many changes to the environment handling so that the environment is present, and usable, even if the commands to manipulate it are not.

* src/apex/cmd-env.c: Fixed a stupid error in the environment command code that required the setenv command in order to use the printenv command.

2006-05-29 Marc Singer <elf@buici.com>

* src/drivers/drv-ext2.c (ext2_info): Fixed the way that partitions are detected so that changing partitions will properly flush cached information about the filesystem.

2006-05-28 Marc Singer <elf@buici.com>

* Makefile (SUBLEVEL): Rolled to 1.3.25 for the MMC driver fixes.

* src/arch-arm/entry/apex.lds.S: The bootstrap data location is properly calculated.

* src/drivers-lh/drv-mmc.c: MMC driver can read multiple blocks. Well, two to be precise, but at least we know it works. The status returned from wait_for_status it more than 16 bits because of the timeout. All of the reference to status are widened to int's to make this easier. (execute_command): Default wait_for status is not better tuned to the command being executed. The driver gets a nice, smooth data stream from the card.

2006-05-27 Marc Singer <elf@cerise.buici.com>

* Makefile (SUBLEVEL): New sub-level for the companion changes. This will roll to a new patchlevel when we get the drivers going for sure.

* src/mach-lh7a40x/relocate-companion.c: relocate-apex () implementation for the synapse companion.

* src/arch-arm/Kconfig: Added more configuration options for compiler optimizations.

* src/drivers-lh/drv-i2c.c: i2c driver for reading/writing EEPROM.

* src/drivers-lh/drv-mmc.c: Mmc driver, SD capable, bootstrap capable

* include/mmc.h: Factored out the mmc header for the sake of relocation from SD/MMC.

* src/arch-arm/entry/apex.lds.S: Special section for bootstrap stack and bootstrap data.

* include/apex.h: Aide functions for mdelay and msleep.

2006-05-04 Marc Singer <elf@buici.com>

* src/drivers-lh/drv-clcdc.c: Added support for BGR color format in the frame buffer. This is really for the benefit of testing, but may also be important when we support a splash screen being visible through the kernel boot process.

2006-04-03 Marc Singer <elf@buici.com>

* Makefile: 1.3.23 * Additions to the kconfig directory so that make menuconfig works again.

2006-04-01 Marc Singer <elf@buici.com>

* Makefile: 1.3.22

* src/mach-lh7952x/drv-emac.c (cmd_emac): Moved static structure to .rodata.

* src/drivers/drv-smc91x.c (cmd_eth): Moved static structure to .rodata.

* src/apex/command.c (expand_variables): Allowing '\' escape of '$' to prevent expansion of variables for the sake of storing them in other environment strings, e.g. startup.

* include/attributes.h: Grooming.

* src/apex/console.c: Added (optional) command editing...finally...no kidding.

2006-03-31 Marc Singer <elf@buici.com>

* src/apex/console.c (read_command): Added (optional) support for ANSI key sequences.

* src/apex/command-history.c: Added (optional) command history recall.

2006-03-30 Marc Singer <elf@buici.com>

* src/mach-lh7952x/drv-emac.c (emac_release): added a release function to the emac driver. We were having problems with spurrious corruption of kernel memory and it looks like the problem was that the emac was in an indeterminate state as it was being initialized.

2006-03-23 Marc Singer <elf@buici.com>

* src/apex/cmd-version.c (cmd_version): Fixed the presentation of the apex region for the case when the length is greater than four hex digits.

* src/apex/console.c (read_command): Configuration option allows DEL to be interpreted as BS.

* Makefile: 1.3.21

* usr/printenv.cc (main): Application that reads APEX environment from user-land.

* src/apex/env.c: added environment link support so that user-land applications can read the APEX environment.

2006-03-22 Marc Singer <elf@buici.com>

* src/drivers-lh/drv-clcdc.c (VSW): Fixed error in the VSW macro.

* src/drivers/drv-ext2.c (ext2_find_inode): Fixed the computation of the first block where the group descriptors are found. This allows APEX to read cards with block sizes other than 1K.

2006-03-16 Marc Singer <elf@buici.com>

* src/mach-lh7a40x/freq: Perl script that aids in finding clock frequency dividers.

* src/mach-lh7a40x/Kconfig: Added more overclocking frequencies to the lh7a40x configuration.

* Brought Kconfig sources up to date.

2006-03-15 Marc Singer <elf@buici.com>

* Makefile: 1.3.20

* src/mach-lh7a40x/initialize.c: Adjusted the SMC controller timing setup to be sensitive to HCLK as configured.

* src/mach-lh7a40x/lh7a40x.h: Kconfig selectable operating frequencies.

* Adding support for new architecture, s3c2410, and new machine m7200.

2006-03-02 Marc Singer <elf@buici.com>

* Makefile: 1.3.19

* src/mach-lh7952x/lh79524.h (RCPC_CPUCLKPRE_V): Added support for faster clocking of the LH79524. It isn't, yet, compatible with the Linux kernel. However, this may help someone who is looking for a little more speed.

* src/mach-lh7a40x/initialize.c (target_init): Added support for the LPD7A404-10, PN 80000258, USB_PWR_EN. The sense of this line changed between the -10 and the -11 releases of the LPD7A404 CardEngine.

2006-02-23 Marc Singer <elf@buici.com>

* Makefile: 1.3.18

* src/mach-lh7952x/init-lpd79524.c: Tighetened the CF region timing as is done for the other targets.

* src/mach-lh7952x/init-lpd79520.c: Adjusted to the CompactFlash region timing to meet the CF spec.

* src/mach-lh7a40x/initialize.c (SMC_BCR6_V): Tightened the CF region timing to be closer to the specified minimums. The original WST1 delay was 320ns which may interfere with the LCD controller FIFO.

2006-02-22 Marc Singer <elf@buici.com>

* src/mach-lh7a40x/initialize.c (SMC_BCR1_V): Tightened the IOBARRIER region timing to see if we can get access to NOR flash without causing display flicker.

2006-02-17 Marc Singer <elf@buici.com>

* src/lib/zlib-heap.c (CB_HEAP): Increased the size of the heap so I can decompress very large PNG images.

* Makefile: 1.3.17

* src/drivers-lh/drv-clcdc.c: New timings for the 6.4" display. The vertical front porch is one less than the spec.

* src/mach-lh7a40x/initialize.c (SDRAM_RAS): Relaxed memory timings on the lh7a40x's. This seems to eliminate display glitching as long as we don't use the CF.

2006-02-07 Marc Singer <elf@buici.com>

* Makefile: 1.3.16

* src/mach-lh7952x/init-lpd79524.c: Reworked SDRAM initialization. Now, we can init the CPU with a 16 bit SDRAM bus even if the SDRAM chips are configured in a 32 bit bus. Half of the SDRAM will idle in this configuration, but we can test CPU performance with the 16 bit bus.

* src/mach-lh7a40x/cmd-cp15test.c: Added a cp15 test register manipulation function.

2006-02-06 Marc Singer <elf@buici.com>

* lh7a404_config: Setting default memory mode to SROM_LL.

2006-01-20 Marc Singer <elf@buici.com>

* src/lib/pngr.c (read_pngr_plte): When found, a palette is read from the PNG file and stored for the decoder.

* src/drivers-lh/drv-clcdc.c (cmd_splash): Added support for palettized images, but only at 8 bits per pel. Other pel sizes require unpacking of the image data.

2006-01-13 Marc Singer <elf@buici.com>

* src/mach-ixp42x/openslug_config: Openslug 3.1 no longer puts the kernel in the jffs2 partition. We default to reading the kernel from flash.

* src/arch-arm/entry/mmu.c (mmu_release): In order to support XScale MMU (and caches) we need to customize the MMU disabling code to cope with a different method of cleaning the data cache. This is done for the sake of faster loading of a JFFS2 filesystem image. The kernel is stored in a JFFS2 filesystem in flash for compactness. The faster we can read this data, the better. Also, reads from flash of ramdisk images benefits from caching.

2005-12-27 Marc Singer <elf@buici.com>

* src/arch-arm/lib/relocate.c (relocate_apex): Improved the scarce register version of the system copy routine. It's now using the same form as the fastest version.

* src/mach-lh7a40x/cmd-reset.c (cmd_reset): Added reset command for the lh7a40x targets. It used the watchdog timer to perform the system reset.

* src/arch-arm/entry/entry.c (setup_c): Added code for clearing stacks to a known value.

* src/mach-lh7952x/exception_vectors.c: The exception handling code works. APEX can use interrupts.

* src/arch-arm/lib/relocate.c (relocate_apex) :recoded relocation test to reduce the number of registers and to update the syntax for __asm constraints. This code was substantially modified to reflect some minor optimizations.

* src/mach-lh7952x/relocate-nand.c (relocate_apex): recoded relocation test to reduce the number of registers and to update the syntax for __asm constraints.

* src/mach-lh7a40x/initialize.c (usleep): recoded timer to update the syntax for __asm constraints.

* src/mach-lh7952x/init-kev79524.c (usleep): recoded timer to update the syntax for __asm constraints.

* src/mach-lh7952x/init-lpd79520.c (usleep): recoded timer to update the syntax for __asm constraints.

* src/mach-lh7952x/init-lnode80.c (usleep): recoded timer to update the syntax for __asm constraints.

* src/mach-lh7952x/init-lpd79524.c (usleep): recoded timer to update the syntax for __asm constraints.

2005-12-22 Marc Singer <elf@buici.com>

* src/lib/pngr.c (open_pngr): Function modified to allow for reading from TFTP where we don't know the length of the stream a priori.

* src/net/tftp.c (tftp_seek): Rudimentary seek function implemented for the sake of splash decoding. We needed to be able to seek over the CRC (or unused portion of any chunk) in order to decode PNG images over the network.

* src/lib/zlib-heap.c: Makde the zlib heap larger since the decompressor was choking on the decode of a large splash image. Also moved the memory to xbss. We're still using a stupid null free heap which has to be as large as all of the allocated memory. RAM is cheap, at the moment. Perhaps we should switch to the kernel's zlib decompressor instead of the uboot version.

* src/drivers-lh/drv-clcdc.c: Common LCD driver for Sharp LH parts.

* src/arch-arm/entry/mmu-alloc.c (alloc_uncached): Function to allocate memory that won't be cached even when the MMU is enabled.

2005-12-19 Marc Singer <elf@buici.com>

* src/arch-arm/entry/mmu.c: Service to enable and disable the MMU. This makes the boot loader execute much faster than without.

* src/mach-lh7952x/serial.c (lh7952x_serial_release): Added a release function so that serial data in the FIFO is flushed.

* src/mach-lh7a40x/serial.c (lh7a40x_serial_release): Added a release function so that serial data in the FIFO is flushed.

2005-12-16 Marc Singer <elf@buici.com>

* src/mach-lh7a40x/lh7a40x.h: Added an overclocking mode.

* src/mach-lh7a40x/initialize.c: Added more explicit macros to handle bus clocking modes. Also, we've switched to the synchronous bus mode as the default.

* src/mach-lh7a40x/lh7a40x.h: Added more explicit macros to handle bus clocking modes.

* src/drivers/drv-mem.c: Added memlimit command so that we can constrain the amount of memory that the Linux kernel sees. It's a handy debug feature.

2005-11-18 Marc Singer <elf@buici.com>

* src/drivers/drv-nor-cfi.c: Added option to inhibit the NOR CFI buffered write code, for lnode80.

* src/mach-lh7952x/Kconfig: Added lnode80, patch from Dave Anders.

2005-11-07 Marc Singer <elf@buici.com>

* Makefile: Rolling release for 79525 and for a fix to the emac79524 driver.

2005-10-08 Marc Singer <elf@buici.com>

* src/net/ethernet.c (arp_terminate): Added a check for ^C in the ARP termination function.

* src/net/tftp.c (tftp_open): Reorganized the tftp open sequence in case ARP for the TFTP server has yet to be achieved. This was a crash bug.

2005-10-07 Marc Singer <elf@buici.com>

* src/mach-lh7952x/Kconfig: Start of changes for the kev79525.

* src/arch-arm/entry/apex.lds.S: Fixed the drv-mem probe code to be reliable and safe.

2005-09-30 Marc Singer <elf@buici.com>

* src/mach-lh7a40x/initialize.c: Slowed the timing down for the IOBARRIER. Now, we're using the slowest timing because that's all that seems to work.

* src/arch-arm/entry/sdramboot.c (sdramboot_report): Unified support for reporting when APEX is booted from SDRAM. While only informational, this will help explain to new users the difference between booting from flash or SRAM and from SDRAM.

2005-09-29 Marc Singer <elf@buici.com>

* src/apex/env.c: Updated autoboot cancellation message to be more correct. Only ^C cancels now.

2005-09-28 Marc Singer <elf@cerise.buici.com>

* src/arch-arm/Makefile: architecture and tune features. This fixes a build problem with native compilers.

* src/arch-arm/Kconfig: New configuration features to select the right architecture. Lack of this was the source of a nasty build error having to do with the fact that the default CPU type on ARM doesn't support the half-word load.

2005-09-27 Marc Singer <elf@cerise.buici.com>

* src/arch-arm/entry/apex.lds.S: Enlarged the stacks. We were crashing from a stack overflow in the jffs2 decompression path.

* src/lib/zlib.c: Changes so that we can use the debug option.

* src/drivers/drv-jffs2.c (jffs2_load_cache): Fixed bug in jffs2 filesystem cache. Cancelled cache operation which was restarted would create duplicate entries in the cache.

2005-09-18 Marc Singer <elf@buici.com>

* include/attributes.h (__xbss): New attribute macro for easy xbss spec.

2005-09-15 Marc Singer <elf@buici.com>

* src/lib/env.c (_env_check_magic): Modified the environment check before writing to look for a large block of 0xff's before declaring the area blank.

2005-09-02 Marc Singer <elf@buici.com>

* src/arch-arm/entry/apex.lds.S: Needed to set the xbss section to NOLOAD so that the loader image wouldn't bloat with BSS areas

2005-08-22 Marc Singer <elf@buici.com>

* src/arch-arm/entry/apex.lds.S: Reorganized the BSS sections. Needed to put the BSS outside of the protected region so that the memory scan finds all of memory correctly. This change also prevents some of the BSS memory from being zeroed.

2005-08-15 Marc Singer <elf@buici.com>

* src/mach-lh7a40x/initialize.c (target_init): Modified the target init for lpd7a404 so that the SMC91x controller works properly on the latest lpd7a404 CardEngines; PCN-285 2005.5.4.

2005-08-11 Marc Singer <elf@buici.com>

* src/mach-lh7a40x/lpd7a40x.h (CPLD_CONTROL_WLPEN): Changed constant name to match that used by the driver and the LPD79520.

* src/mach-lh7a40x/timer.c (timer_delta): The interval timer was wrong, too.

* src/mach-lh7a40x/initialize.c: The usleep timer setup was wrong. Don't know how this ever worked.  ;-) Had to move it to timer2 so that it didn't conflict with the interval timer.

2005-08-10 Marc Singer <elf@buici.com>

* src/drivers/drv-mem.c (memory_report): Groomed the memory report to eliminate first blank line.

* src/apex/command.c (exec_monitor): Removed leading whitespace in startup command reports.

2005-08-08 Marc Singer <elf@buici.com>

* src/apex/cmd-copy.c (cmd_copy): Detecting copy errors and returning appropriate error code.

* src/apex/command.c (exec_monitor): Fixed parser for startup command so that semicolon no longer needed at the end of the command. Fixed a bug in the routine that writes to address zero on startup.

* src/apex/console.c (console_poll): Improved methods for detecting user break condition. Injected a meta-driver between the serial driver and the functions that communicate with the user.

2005-08-03 Marc Singer <elf@buici.com>

* src/mach-lh7952x/ads7843.c: ads7843 test command.

2005-08-01 Marc Singer <elf@buici.com>

* src/net/ipconfig.c (cmd_ipconfig): IP configuration via RARP or manual configuration.

* src/mach-lh7952x/drv-emac.c (cmd_emac): Some grooming of the diagnostic outputs.

* src/net/tftp.c (ping_terminate): Fixed abort of tftp by keystroke.

* src/mach-lh7952x/drv-emac.c (eth_read): Check for buffer looping on read. This is untested.

2005-07-29 Marc Singer <elf@buici.com>

* src/net/tftp.c: fixed the tftp state machine and tested that retries work correctly. it seems to be stable and reliable in light of packet losses.

* src/apex/cmd-copy.c (cmd_copy): Fixed a long-standing bug in the copy command where the din descriptor was being opened twice.

2005-07-28 Marc Singer <elf@buici.com>

* src/drivers/drv-smc91x.c: Implemented smc91x driver which is available to both the lpd79520 and the lpd7a40x boards.

* src/mach-lh7952x/init-lpd79520.c: Fixed the initialization of the memory region where CF is found. CF driver working again.

2005-07-11 Marc Singer <elf@buici.com>

* src/apex/cmd-dump.c (cmd_dump): Added dump display width to make it easier to read registers and machine code.

2005-07-07 Marc Singer <elf@buici.com>

* src/net/rarp.c (cmd_rarp): RARP implemented.

* src/apex/cmd-help.c (cmd_help): Changed the way that commands are sorted such that there is no change to the R/O portion of the file. Now, sorting is done only when displaying the help text.

* src/mach-lh7952x/drv-emac.c (eth_open): Basis of ethernet driver is working.

* src/arch-arm/entry/apex.lds.S: Neglected alignment caused a crash when the data segment wasn't aligned. The service data was misaligned such that the service start addresses were wrong.

2005-07-06 Marc Singer <elf@buici.com>

* src/apex/cmd-dump.c (cmd_dump): Added more mode to the dump command.

* src/apex/command.c (expand_variables): Alias and environment expansion in the command line. This will make some people's lives easier.

2005-06-15 Marc Singer <elf@buici.com>

* src/apex/command.c (exec_monitor): Adding configuration option to sort commands for the sake of better help.

* src/apex/cmd-xreceive.c: Revising help text.

2005-06-14 Marc Singer <elf@buici.com>

* src/drivers/driver.c (parse_descriptor): Fixed the driver parser dependency on the filesystem drivers.

* src/drivers/drv-fat.c (fat_read): Region length calc, again.

* src/drivers/drv-ext2.c (ext2_read): Fixed the region length calcs.

* src/drivers/drv-jffs2.c (jffs2_open): Fixed some of the region length calcs.

2005-06-13 Marc Singer <elf@buici.com>

* src/drivers/drv-jffs2.c (jffs2_path_to_inode): Needed to invalidate the cached block after chasing links. (find_cached_inode): Enhanced find_cached_inode() to accept an offset within the file. This may improve the performance of reading since it doesn't have to scan the inode list from the top every time. Moreover, the algorithm of the find_cached_inode function is more efficient for larget files. (jffs2_load_cache): Changed the logic for handling reversed markers. The previous code would prematurely terminate if a reversed marker was found among the filesystem detritus. (jffs2_load_cache): Added a CRC check for inodes. (jffs2_path_to_inode): Added a CRC check for filenames.

2005-06-12 Marc Singer <elf@buici.com>

* src/apex/cmd-info.c: New command to query information about a region from a driver. It's used by the jffs2 driver to show the contents of a directory. Other filesystems ought to follow suit.

* src/drivers/drv-jffs2.c: New jffs2 reading filesystem driver.

2005-05-15 Marc Singer <elf@buici.com>

* src/mach-ixp42x/pci.c (pci_init): Added IRQ setup for all of the PCI interrupt pins.

2005-05-15 Marc Singer <elf@cerise.buici.com>

* src/lib/spinner.c (spinner_clear): clearing LED spinner when the user enters a command prompt.

* src/mach-ixp42x/pci.c (pci_init): Proper PCI initialization brings USB and ethernet online. Woot.

* src/mach-ixp42x/nslu2.h: GPIO constants and macros for init.

* src/mach-ixp42x/ixp42x.h: GPIO constants and macros for init.

* src/mach-ixp42x/initialize.c (target_init): Addition of dead code to initialize GPIO for the Intel dev board.

* src/mach-ixp42x/serial.c (ixp42x_serial_init): Enabled the serial FIFO.

2005-05-04 Marc Singer <elf@buici.com>

* src/mach-lh7952x/drv-emac.c: Diagnostic code can be enabled from the configuration.

* src/apex/cmd-version.c (cmd_version): Display the length of apex in bytes as well as hex.

2005-04-14 Marc Singer <elf@buici.com>

* src/arch-arm/Kconfig: New option to let the user configure a default commandline to override the target's default.

* src/mach-ixp42x/initialize.c (target_init): Added neglected EXP controller initializations for the nslu2.

2005-04-13 Marc Singer <elf@buici.com>

* src/drivers/drv-ext2.c: Added configuration option to set the block device for both (fat & ext2) filesystem drivers.

* src/apex/env.c: Fixed errors in the autoboot macros left over from the transition to Kconfig.

2005-04-08 Marc Singer <elf@buici.com>

* src/mach-lh7952x/drv-emac.c (emac_init): Fixed detection of the PHY. Needed to setup MUX to get the PHY to enable.

* src/mach-ixp42x/coprocessor.h (COPROCESSOR_WAIT\): New headers to define an instruction sequence to let the MMU/coprocessor catch up when there are changes to the setup.

* src/arch-arm/entry/entry.c (__section): New options for disabling MMU at startup.

* Makefile (every): Fixed every target for the sake of adding new configuration options.

2005-04-07 Marc Singer <elf@buici.com>

* src/mach-lh7952x/Makefile (obj-$(CONFIG_DRIVER_EMAC_LH79524)): Same as below.

* src/mach-lh7952x/drv-emac.c: Corrected configuration references for the new configurator. Macros were wrong for EMAC.

2005-03-22 Marc Singer <elf@buici.com>

* src/apex/env.c (_s): Fixed references to CONFIG_ macros that may already be quoted.

2005-03-20 Marc Singer <elf@buici.com>

* src/mach-lh7a40x/initialize.c (__section): initializing the SMC control so that flash works correctly.

* Makefile (SUBLEVEL): Fixed the reset of the config hooks so that the build is now optimal with respect to the configuration.

* Fixed menuconfig. Still, I've never been able to edit strings, hex's, or int's in menuconfig. It's there for the folks who want it.

* Makefile (SUBLEVEL): Rolling revision for integration of new configuration support. This is a big deal because it means that configurations are easier to build and more robust.

* scripts/configtoh: Stripping the quotes from config options. We're using the kernel configurator, so we have less control over the user's actions. This may prove to be overly zealous in situations where the configuration option needs quotes. ...Now it is really fixed. Needed it and there was no way around it.

2005-03-17 Marc Singer <elf@buici.com>

* src/mach-lh7a40x/cpuinfo.c (cpuinfo_report): Fixed the CPUID reporting for the lh7a404.

* src/mach-lh7a40x/initialize.c: Added hack to the lpd7a40x initialization to enable PCMCIA. May be a work-around for a NOR flash problem.

* src/drivers/drv-nor-cfi.c (nor_read): Eliminated (most) references to nor chip length except when necessary.

2005-03-16 Marc Singer <elf@buici.com>

* src/mach-lh7952x/timer-lh79520.c (lh79520_timer_init): Fixed the initialization of the boot loader timer.

* src/mach-lh7952x/lpd79520_config (CONFIG_NOR_BANK0_START): Fixed the starting address of the NOR flash so that the REMAP register doesn't make a difference.

* src/apex/cmd-boot.c: Making sure that the ATAG pointer is valid.

2005-03-15 Marc Singer <elf@buici.com>

* src/arch-arm/entry/apex.lds.S: Added new START identifier for the sake of the memory scan function.

* src/drivers/drv-mem.c (memory_scan): The memory scan function needed to make sure not to write to BSS. It now avoids the entire memory image of APEX.

2005-03-10 Marc Singer <elf@buici.com>

* src/mach-lh7a40x/initialize.c: SDRAM initialization was completely broken since 1.1.0. It works again.

* src/drivers/drv-cf.c: Moved Compact Flash code to live among generic drivers. Implemented CF for the 79520's. Wrote code for the 7a40x's, but it isn't working.

* src/drivers/drv-ext2.c (ext2_path_to_inode): Fixed dumb error in the symlink traversal code.

* src/drivers/drv-nor-cfi.c: Improved TALK for troubleshooting flash.

2005-03-09 Marc Singer <elf@buici.com>

* src/drivers/drv-nor-cfi.c: Moved the cfi driver into the generic driver directory. There is a machine specific header to handle the target controlled constants.

* Makefile (ENV_CROSS_COMPILE): Fixed the selection of the cross compiler so that the environment will override the configured value.

2005-03-07 Marc Singer <elf@buici.com>

* src/drivers/drv-ext2.c: ext2 driver is working. It supports paths and following symlinks.

* scripts/envmagic: Grooming. Properly fixed.

* src/mach-ixp42x/serial.c (ixp42x_serial_write): Waiting for all data to write before returning.

* src/mach-ixp42x/cmd-reset.c (cmd_reset): Resetting services before reset so that the nor flash has a chance to enter array-read mode.

* src/mach-lh7952x/cmd-reset.c (cmd_reset): Resetting services before reset so that the nor flash has a chance to enter array-read mode.

* src/mach-lh7952x/drv-nor-cfi.c (nor_release): Release function added so that cmd-reset will reliably perform.

* src/drivers/drv-fat.c (fat_find): Fat filename comparisions are not case insensitive without requiring the descriptor parser to lower-case the path elements.

2005-03-06 Marc Singer <elf@buici.com>

* src/drivers/drv-ext2.c: A rudimentary ext2 driver is implemented. It has not received much testing.

* src/apex/command.c (call_command): Added strings to error reporting when not CONFIG_SMALL and a string has not yet been set.

2005-03-04 Marc Singer <elf@buici.com>

* scripts/envmagic: Removed undesirable paths from the find.

2005-03-03 Marc Singer <elf@buici.com>

* src/lib/png.c (read_png_row): Decoder working properly with the logo and with cc.

* src/lib/zlib.c: Fixed the zlib declarations s.t. there is no initialized, mutable data.

* src/lib/png.c: Added png interpreter for the sake of splash screen images.

* src/lib/zlib.c: Added zlib decompressor. Modified code to comply with data section standards of APEX.

2005-02-24 Marc Singer <elf@buici.com>

* src/mach-ixp42x/initialize.c: detection of the chip size from the config parameters. All fat slugs should be simple settings in the config.

2005-02-23 Marc Singer <elf@buici.com>

* src/mach-lh7952x/drv-emac.c, src/apex/cmd-copy.c: Work-around for gcc-2.95 preprocessor bug.

2005-02-22 Marc Singer <elf@buici.com>

* src/drivers/drv-fat.c (fat_open): Typo prevented reading from any partition other than 1.

* src/drivers/drv-mem.c (memory_init): Reorganized the configuration of SDRAM s.t. it is cleaner in the configuration file and controlled by a mach- specific header. This make it easier to make sure the initialization is correct.

2005-02-21 Marc Singer <elf@buici.com>

* Makefile (SUBLEVEL): rolled to 1.1.0 for release with Milestone2. Yipee!

* src/mach-lh7952x/drv-emac.c: Cleanup of the driver. Better control over compile options. Added help and report features.

2005-02-20 Marc Singer <elf@buici.com>

* Makefile Revision in preparation for milestone2 release.

* src/mach-lh7952x/drv-nor-cfi.c (NOR_1_LENGTH): added logic necessary to support the double bank of NOR flash on the LPD79524 boards. (nor_init_chip): Changed initialization to properly cope with two banks (or a pair of identical chips).

2005-02-19 Marc Singer <elf@buici.com>

* src/arch-arm/lib/lib1funcs.S: Imported this file from kernel in order to get general purpose integer divide and modulo functions.

2005-02-18 Marc Singer <elf@buici.com>

* src/mach-lh7952x/init-lpd79520.c: Fixed SDRAM init to comply with Sharp recommendations in their SDRAM application note. Thanks to prplague :-).

2005-02-17 Marc Singer <elf@buici.com>

* src/arch-arm/lib/relocate.c: Implemented a simpler copy loop to help some platforms along.

2005-02-16 Marc Singer <elf@buici.com>

* src/mach-ixp42x/nslu2_config (CONFIG_ENV_REGION): Changed the environment region for the nslu2 so that it can be written without clobbering the second redboot block.

* src/apex/cmd-copy.c (cmd_copy): Added a -v switch to copy which performs a double read of the source and a read after write of the destination to make sure the copy is correct.

* src/mach-ixp42x/initialize.c (__section): Added DEBUG_LL support.

* src/apex/cmd-compare.c (cmd_compare): Added -c switch to compare so we can see more than one difference in a block.

2005-02-15 Marc Singer <elf@buici.com>

* src/mach-lh7952x/serial.c Errors in the UART macros prevented serial output on the 79520.

2005-02-14 Marc Singer <elf@buici.com>

* Makefile 1.0.25: for good measure

2005-02-12 Marc Singer <elf@buici.com>

* Makefile 1.0.24 for debug_ll changes

2005-02-12 Marc Singer <elf@cerise.buici.com>

* Makefile: Moved the compiler declarations to the config files.

* include/debug_ll.h: Added low-level debug support via the serial console.

2005-02-11 Marc Singer <elf@buici.com>

* src/lib/spinner.c (spinner_step): Smoothed out the spinner.

2005-02-11 Marc Singer <elf@cerise.buici.com>

* Makefile 1.0.23 for the nslu2 spinner.

2005-02-11 Marc Singer <elf@buici.com>

* src/mach-ixp42x/spinner-nslu2.c (nslu2_spinner): Implemented a spinner for the platform. It uses the LEDs to show progress.

* Makefile: 1.0.22 for NSLU2 updates.

* src/mach-ixp42x/nslu2.h: Adding header specific to this target.

* src/mach-ixp42x/initialize.c (initialize_bootstrap): Initializing the GPIO lines. Adding more LED changes.

* src/mach-ixp42x/nslu2_config (CONFIG_SPINNER): Adding configuration options for more.

2005-02-10 Marc Singer <elf@buici.com>

* include/attributes.h (__attribute__): Builds with 2.95.3. Not yet tested.

2005-01-26 Marc Singer <elf@buici.com>

* src/mach-lh7952x/adc.c (cmd_adc): Basic adc code working.

* src/apex/console-printf.c (printf): Automatic insertion of carriage-returns before newlines.

2005-01-21 Marc Singer <elf@buici.com>

* src/mach-lh7952x/drv-nor-cfi.c (nor_report): Added report function to nor driver.

* src/mach-lh7a40x/drv-nor.c (nor_report): Added report funtion to nor driver.

2005-01-13 Marc Singer <elf@buici.com>

* src/apex/cmd-version.c (cmd_version): Rewording signon.

* src/mach-lh7952x/Makefile (obj-$(CONFIG_MACH_LPD79524)): Moved adc to 79524 specific build.

* scripts/configtoh: Fixed the script to properly elide comments.

2005-01-12 Marc Singer <elf@buici.com>

* README_config: Editing the documentation.

* Makefile (include/config.h): Fixed the script that generates the configuration file. (tidy): New target to remove debris.

2004-12-05 Marc Singer <elf@buici.com>

* src/lib/env.c (_env_check_magic): Magic number inserted at the start of the environment to protect user from bogus data.

* src/mach-lh7a40x/drv-nor.c (nor_write): LPD7A40X targets completely supported though buffered writes to NOR flash not yet implemented.

2004-12-01 Marc Singer <elf@buici.com>

* README: New README(s) in preparation to release the source.

2004-11-17 Marc Singer <elf@buici.com>

* src/mach-lh7952x/drv-nor.c (nor_write): Fixed a buglet in buffered writes where the size of the write was incorrect in some edge cases.

* src/mach-lh7952x/drv-cpld-spi.c: Added cpld-spi drivers for configuration EEPROM and for the MAC EEPROM.

* src/mach-lh7952x/drv-emac.c (emac_read_mac): Fixed the EEPROM code. (cmd_emac): Removed eeprom specifics into another driver.

* src/lib/dump.c (dump): Correct bug offset to rgb.

2004-11-16 Marc Singer <elf@buici.com>

* src/mach-lh7952x/drv-emac.c (cmd_emac): Ethernet MAC maintenance function as well as interface initialization.

* src/lib/dump.c (dump): Factored the dump code into a library function.

2004-11-15 Marc Singer <elf@buici.com>

* src/mach-lh7952x/drv-nor.c (nor_write): Implementing buffered write. It's about 16 times as fast. Will leave other code for the time being since it is smaller by about 260 bytes.

* First release, 1.0.