Bootstrap loader for CL-PS7111 and EP7211 ========================================= Copyright (C) 1999 Ben Williamson Latest version: The 7111 and 7211 have internal SRAM and bootstrap ROM. This package connects to the device in bootstrap mode over a serial connection, to load and boot a Linux kernel with ramdisk filesystem. It's called shoehorn because I got sick of writing programs called bootstrap. The piece of code loaded into SRAM (loader.c) knows nothing about the target hardware, except that it's a 7111 or a 7211 in bootstrap mode. All the board-specific initialisation is done by remote control, by the shoehorn program on the host. The loader will detect 16 or 32 bit DRAM banks, and scan for available areas. At the moment, shoehorn only knows about AppForge's Anvil board. If you have other 7111- or 7211- based hardware, you should be able to add support for it by making a few changes to shoehorn.c. Ideally there would be a runtime command-line option to select your board, rather than lots of #ifdefs. Send me your patches in whatever state, and I'll try to include them in the package. Better yet, send me your hardware and I'll keep it warm for you. :) Any and all success/failure reports, suggestions and complaints are welcome. The best place to discuss this stuff at the moment is probably the linux-7110 mailing list, see for more info. - Ben. Thu Nov 18 23:42:27 EST 1999 --- Here is some sample output from shoehorn, on an Anvil board. The kernel is 2.2.1 patched up to cb26-benw3 from the ftp site above. The initrd image is available there too. ./shoehorn --anvil --kernel ../linux/arch/arm/boot/Image \ --initrd ../initrd/initrd --terminal ../linux/arch/arm/boot/Image: 724208 bytes ../initrd/initrd: 102400 bytes loader.bin: 1120 bytes Waiting for target - press Wakeup now. Writing SRAM loader... Pinging loader Initialising Anvil hardware: - flushing cache/TLB - 73MHz core clock - 32kHz DRAM refresh - enabling UART2 Switching to 115200 baud Pinging loader Detecting DRAM - 16 bits wide - start: 0xc0000000 size: 0x00040000 - start: 0xc0080000 size: 0x00040000 - start: 0xc0200000 size: 0x00040000 - start: 0xc0280000 size: 0x00040000 - start: 0xc0800000 size: 0x00040000 - start: 0xc0880000 size: 0x00040000 - start: 0xc0a00000 size: 0x00040000 - start: 0xc0a80000 size: 0x00040000 Total DRAM: 2048kB Writing fragment list Writing parameter area Loading ../linux/arch/arm/boot/Image: Loading ../initrd/initrd: Switching back to 9600 baud Pinging loader Starting kernel Pretending to be a terminal - interrupt to exit. boot no options Linux version 2.2.1-rmk2-philb990208-cb26-benw3 (benw@bart.linux.bogus) (gcc version egcs-2.91.66 19990325/philb (egcs-1.1.2 release)) #72 Mon Nov 29 20:50:08 EST 1999 initrd: start 0xc0aa7000, size 102400 -> start c01e7000, end 0xc0200000 NetWinder Floating Point Emulator V0.94.1 (c) 1998 Corel Computer Corp. c0101e8c-c0200000 memzero alloc_init_page [ mem c0105400, virt 00000000 -> phys c0804400 ]: D c0034000 := c00e16c8 alloc_init_page [ mem c0105800, virt 00000000 -> phys c0804400 ]: P c0105400 setup_pagetables flush_tlb_all paging_init trap_init init_IRQ sched_init time_init (0) parse_options: parse_options (0xc010a880) console_init (67, 0xc010a880) init_modules (68) prof_shift (69) cpsr = 0x60000013 (70) SR1 0x0000090c MR1 0x00001200 SR2 0x00001004 MR2 0x00000000 sti (73, 0xc010a880) kmem_cache_init (0xc010a880) sti Calibrating delay loop... 68.61 BogoMIPS calibrate_delay Memory: 880k/2M available (656k code, 224k reserved, 184k data, 4k init) POSIX conformance testing by UNIFIX &<6>Linux NET4.0 for Linux 2.2 Based upon Swansea University Computer Society NET3.039 NET4: Linux TCP/IP 1.0 for NET4.0 IP Protocols: ICMP, UDP, TCP Starting kswapd v 1.1.1.1 Power: PCMCIA 3300 mV ýRAM disk driver initialized: 16 RAM disks of 4096K size PPP: version 2.3.3 (demand dialling) TCP compression code copyright 1989 Regents of the University of California PPP line discipline registered. RAMDISK: ext2 filesystem found at block 0 RAMDISK: Loading 100 blocks [1 disk] into ram disk... done. VFS: Mounted root (ext2 filesystem). open console 0 errno 0 /proc/meminfo total: used: free: shared: buffers: cached: Mem: 999424 401408 598016 4096 102400 4096 Swap: 0 0 0 MemTotal: 976 kB MemFree: 584 kB MemShared: 4 kB Buffers: 100 kB Cached: 4 kB SwapTotal: 0 kB SwapFree: 0 kB /proc/cpuinfo Processor : ARM/Cirrus arm720t rev 2 BogoMips : 68.61 Hardware : AppForge Anvil Optimisation : ARM7 IO Bus : none /proc/devices Character devices: 1 mem 2 pty 3 ttyp 4 ttyS 5 console 10 misc Block devices: 1 ramdisk /proc/filesystems ext2 nodev proc /proc/interrupts 9: 126 timer 12: 25 rs7211tx 13: 0 rs7211rx 28: 1 rs7211tx 29: 0 rs7211rx /proc/ioports /proc/loadavg 0.00 0.00 0.00 3/4 4 /proc/misc 154 pm /proc/mounts /dev/root / ext2 rw 0 0 /proc proc rw 0 0 /proc/stat cpu 0 0 25 101 disk 0 0 0 0 disk_rio 0 0 0 0 disk_wio 0 0 0 0 disk_rblk 0 0 0 0 disk_wblk 0 0 0 0 page 0 100 swap 0 0 intr 158 0 0 0 0 0 0 0 0 0 126 0 0 31 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 ctxt 3 btime 0 processes 4 /proc/uptime 2.01 1.74 /proc/version Linux version 2.2.1-rmk2-philb990208-cb26-benw3 (benw@bart.linux.bogus) (gcc version egcs-2.91.66 19990325/philb (egcs-1.1.2 release)) #72 Mon Nov 29 20:50:08 EST 1999 Welcome to Linux on EP7211. What is your name? Ben Pleased to meet you, Ben Sorry, but we have to crash now. VFS: Cannot open root device 00:00 Kernel panic: VFS: Unable to mount root fs on 00:00