Hi all.
I have been trying various things to resize the initrd
partition on an SD flash card. I would like to be able to
add a few MB, and load a small number of extra programs to
allow me to run the board entirely from ram disk. Nothing
I have been able to do so far has reulted in a bootable
flash card. Besides accomplishing the near-term goal, I
would also really like to know how things work starting
from power-up, and what the expectations are by the
TS-BOOTROM code. There are some confusing aspects.
The SD flash card has four partitions:
- 1. FAT partition, only populated in the 2GB
distribution. Windows cross-development tools.
- 2. Non-filesystem partition, Linux kernel image.
- 3. Non-filesystem, initrd image (but...)
- 4. Full Debian JFFS2 filesystem (but I have
converted to ext2)
The initrd on partition 3 is mountable as an ext2
filesystem, although it is labled as a type 'da', Non-FS
data. This leads to my first question: how does TS=BOOTROM
find and load the partition as an initrd? Does it know how
to read the partition table on the flash card, or does it
'know' about specific fixed blocks to copy into RAM, or...?
Since TS distributes at least two different flavors of SD
Flash images, I assume there must be some run-time detection
of the flash partitioning. Is there some special constraints
on the partitioning? My Debian 6 host's fdisk can't seem to
create partitions that are not aligned on cylinder
boundaries. Does this matter?
What I thought should work:
- 1. burn the image to flash, using dd (works fine)
- 2. mount the last two partitions on a desktop host
- 3. tar the contents of each of the partitions to
disk files
- 4. use fdisk to delete and re-create different sized
partitions
- 5. restore the data to the partitions, from the tar
files.
When I do this, and try to boot from the flash disk, I get:
>> TS-BOOTROM - built Sep
24 2008
>> Copyright (c) 2008, Technologic Systems
>> Booting from SD card...
.
.
.
The series of dots seems to indicate some form of progress
by the bootloader, or other code. Anyone know how to
interpret these? Some things I've tried have resulted in
fewer dots being printed, so I assume that this indicates
even less success. :-(
Ultimately, I would like to be able to compose an image file
completely on a (Debian 6) development host, using standard
tools, and probably in some scripted way. I just seem to be
missing some key piece(s) of information. I would really
appreciate any help or pointers to the missing pieces of the
puzzle.
--- rod.