This adds two features that can be set in the rootfs that Qi is checking.
- if it finds /boot/noboot-<device>, eg /boot/noboot-GTA02 then it will
skip the rootfs for booting and try the next one if any
- if it finds /boot/append-<device>, eg, /boot/append-GTA02 then it will
append the contents of this file to the kernel commandline.
Signed-off-by: Andy Green <andy@openmoko.com>
We dedicate 256MB for bootloader in GTA03 SD image, but actually they're
around 25KB currently. Reduce the stage2 pull to 32KByte.
Signed-off-by: Andy Green <andy@openmoko.com>
This patch changes Qi to insist to fetch device-specific kernels from
filesystems that have named kernels. The kernels looked for are now
called
GTA01: /boot/uImage-GTA01.bin
GTA02: /boot/uImage-GTA02.bin
GTA03: /boot/uImage-GTA03.bin
This is part of the support for single rootfs that can be run on
multiple devices with correct kernel and module handling by the
bootloader.
Signed-off-by: Andy Green <andy@openmoko.com>
The hack to find the number of sectors turns out to be
sensitive to the host kernel. This is a workaround until
we find something in /proc or /sys that has the same info
in a more accessible way.
Signed-off-by: Christopher Hall <hsw@openmoko.com>
The first revision for GTA03 A1 is "1", but we only populated
the info for revision 0.
Reported-by: Christopher Hall <hsw@openmoko.org>
Signed-off-by: Andy Green <andy@openmoko.com>
We don't have card detect connected. Try to fake it better by
enabling the peripheral fuction to the ball and forcing pulldown
(card detect is active-low).
Signed-off-by: Andy Green <andy@openmoko.com>
Prefer GTA03, enable dual mDDR init (killing SMDK compatability for now)
fix bugs in GPIO register offsets, set loglevel=8 for GTA03
Signed-off-by: Andy Green <andy@openmoko.com>
This gives compatability with SD Cards using the old U-Boot scheme of an initial
VFAT part for kernel and then ext2. If you put the kernel you actually want to
use in /boot/uImage.bin in the ext2 partition, it can boot these cards then.
Signed-off-by: Andy Green <andy@openmoko.com>
This makes a new behaviour for Qi, when there are no valid kernels then it
performs the memory test. It means you can either move kernels out of the way
to get the memory test, or make an SD Card just with normal Qi on it and no
kernels to get a memory test.
Signed-off-by: Andy Green <andy@openmoko.com>
Some of utils.c isn't used until the full Qi image has been loaded into
memory, to save space in 4K steppingstone case on 2442, we split utils.c now
so only the interesting routines for steppingstone time take up space there.
Signed-off-by: Andy Green <andy@openmoko.com>
We need putc even when we are operating entirely from steppingstone.
Arrange that the board-specific putc code is in a section that goes into
steppingstone, and adapt the utils.c putc() so that it no longer needs to
indirect through the board_api struct that is in main memory.
Signed-off-by: Andy Green <andy@openmoko.com>
This adds the memory testing code to Qi. It tests the range of memory with
several constants and then a 32-bit walking 1 pattern, and repeats forever.
The entire main SDRAM can be tested due to the fact this runs out of
steppingstone only and does not need to store anything outside of it.
It introduces a steppingstone-based stack for use entirely in steppingstone.
Signed-off-by: Andy Green <andy@openmoko.com>
Improve glamo-mmc so that it uses MMC_READ_MULTIPLE_BLOCK and copes with
64 blocks in one command (and STOP sent after each set), instead of sending
a new command per-block
Signed-off-by: Andy Green <andy@openmoko.com>
Little cleanup and new code that collects and defers contiguous sector reads
into one potentially more efficient larger sequential read action.
This matters for example on SD Card protocol.
Signed-off-by: Andy Green <andy@openmoko.com>
Naughty bug bug U-Boot ext2 implementation -- cut and paste of stanza above for
indir1 check used for indir2 but not all the check was not updated.
This removes hundreds of repeated reads of same sector during kernel load.
Signed-off-by: Andy Green <andy@openmoko.com>
There was a bug about dealing with last ext2 sector of file
because we failed to return the number of sectors pulled
Signed-off-by: Andy Green <andy@openmoko.com>