* BUGboot 0.2 - Boot Linux from flash on Moto boards @ 1999-09-30 20:45 Matt Porter 1999-10-11 22:37 ` Simone Piccardi 1999-11-12 23:45 ` BUGboot 0.3 - Boot Linux from flash on Moto boards Matt Porter 0 siblings, 2 replies; 7+ messages in thread From: Matt Porter @ 1999-09-30 20:45 UTC (permalink / raw) To: linuxppc-dev I've released my bugboot package at 0.2 since it doesn't look like PPCBUG will have residual data support in the RB facility any time soon. This adds a horrible kludge to copy a residual data tree included in the flash image. What is it? It's a simple tool and bootloader that creates a flashable image from a Linux kernel/initrd and a dump of a residual data tree. This image is flashed onto any Motorola PowerPlus board 4/8/16 MB flash bank and then Linux is booted from the flash. This works on MVME23xx/24xx/26xx/27xx/36xx/46xx, MCPx750, and MTX variants. Available at http://members.home.net/mmporter/linux/ -- Matt Porter Motorola Computer Group mporter@mcg.mot.com CIBU Linux Support ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: BUGboot 0.2 - Boot Linux from flash on Moto boards 1999-09-30 20:45 BUGboot 0.2 - Boot Linux from flash on Moto boards Matt Porter @ 1999-10-11 22:37 ` Simone Piccardi 1999-10-14 16:40 ` Matt Porter 1999-11-12 23:45 ` BUGboot 0.3 - Boot Linux from flash on Moto boards Matt Porter 1 sibling, 1 reply; 7+ messages in thread From: Simone Piccardi @ 1999-10-11 22:37 UTC (permalink / raw) To: Matt Porter; +Cc: linuxppc-dev Hi Matt, I'm trying your bugboot but I have some problem. I went through your readme, and these are the steps that I did. PPC4-Bug>nbh 0 0 ,,, res_data Network Booting from: DEC21143, Controller 0, Device 0 Device Name: /pci@80000000/pci1011,19@e,0:0,0 Loading: res_data Client IP Address = 192.84.146.131 Server IP Address = 192.84.146.138 Gateway IP Address = 0.0.0.0 Subnet IP Address Mask = 255.255.255.0 Boot File Name = res_data Argument File Name = Network Boot File load in progress... To abort hit <BREAK> Bytes Received =&0, Bytes Loaded =&0 Bytes/Second =&0, Elapsed Time =1 Second(s) Residual-Data Located at: $01F78000 IP =00049039 MSR =00003040 CR =00000000 FPSCR =00000000 R0 =00000000 R1 =01F78000 R2 =00000000 R3 =01F78000 R4 =00005000 R5 =00000000 R6 =00000000 R7 =00000000 R8 =00000000 R9 =00000000 R10 =00000000 R11 =00000000 R12 =00000000 R13 =00000000 R14 =00000000 R15 =00000000 R16 =00000000 R17 =00000000 R18 =00000000 R19 =00000000 R20 =00000000 R21 =00000000 R22 =00000000 R23 =00000000 R24 =00000000 R25 =00000000 R26 =00000000 R27 =00000000 R28 =00000000 R29 =00000000 R30 =00000000 R31 =00000000 SPR0 =00000000 SPR1 =00000000 SPR8 =00000000 SPR9 =00000000 00049039 E000013C WORD $E000013C PPC4-Bug>md $01F78000 01F78000 00006A0C 0001012C 20202020 20202020 ..j...., 01F78010 20202020 20202020 20202020 20202020 PPC4-Bug>niop Controller LUN =00? Device LUN =00? Get/Put =G? p File Name =? res_data Memory Address =00004000? 01F78000 Length =00000000? 00006A0C Bytes Sent =&27148 Bytes/Second =&27148, Elapsed Time =1 Second(s) After this I have: [root@pcwiz3 /root]# ls -l /tftpboot/ total 2348 -rwxr-xr-x 1 root root 649562 Oct 11 21:58 bugboot.bin* -rw-rw-rw- 1 root root 27148 Oct 11 22:30 res_data drwxr-xr-x 15 root root 1024 Oct 11 23:01 root/ -rwxr-xr-x 1 root root 622156 Sep 14 19:38 zimage* -rwxr-xr-x 1 root root 614252 Jul 7 14:33 zimage.old* -rw-rw-rw- 1 root root 471244 Jun 7 14:10 zimage.old.old Then I restart the board (my PC has some hardware problem, then I cannot use the cross compiler). I put bugboot in a NFS directory, and I copied the zImage that I'm using to boot to this directory (as kernel_image) and the res_data file. The compilation seems fine: [root@vmesez1 bugboot-0.2]# make bugboot.bin gcc -o mkbugboot mkbugboot.c gcc -c \ -DZIMAGE_SIZE=`wc -c <kernel_image | sed "s: ::g"` \ -DRESDATA_DEST=RESDATA_DEST \ -DRESDATA_SIZE=RESDATA_SIZE \ -o romboot.o romboot.S objcopy --output-target=binary romboot.o romboot.bin ./mkbugboot romboot.bin kernel_image res_data bugboot.bin Checksum = 0x13c7 and then I copied this back to /tftpboot. The kernel I'm using is for network booting, but with a SCSI disk root filesystem; the distribution I'm using is an old linuxPPC pre-R5. Should this be a problem? In any case after the compilaton I shutdown the board and I dit the rest of the work: PPC4-Bug>niop Controller LUN =00? Device LUN =00? Get/Put =G? File Name =? bugboot.bin Memory Address =00004000? Length =00000000? Byte Offset =00000000? Bytes Received =&649562, Bytes Loaded =&649562 Bytes/Second =&324781, Elapsed Time =2 Second(s) PPC4-Bug>pflash 4000:100000 ff000000 Source Starting/Ending Addresses =00004000/00103FFF Destination Starting/Ending Addresses =FF000000/FF0FFFFF Number of Effective Bytes =00100000 (&1048576) Program FLASH Memory (Y/N)? y Virtual-Device-Number =00 Manufacturer-Identifier =10001 Device-Identifier =22C422C4 Virtual-Device-Number =01 Manufacturer-Identifier =10001 Device-Identifier =22C422C4 Address-Mask =FF800000 Erasing sector =$FF000000 Erasing sector =$FF040000 Erasing sector =$FF080000 Erasing sector =$FF0C0000 Programming sector =$FF000000 Programming sector =$FF040000 Programming sector =$FF080000 Programming sector =$FF0C0000 FLASH Memory Programming Complete PPC4-Bug>env Bug or System environment [B/S] = B? Field Service Menu Enable [Y/N] = N? Remote Start Method Switch [G/M/B/N] = B? Probe System for Supported I/O Controllers [Y/N] = Y? Auto-Initialize of NVRAM Header Enable [Y/N] = Y? Network PReP-Boot Mode Enable [Y/N] = Y? Negate VMEbus SYSFAIL* Always [Y/N] = N? SCSI Bus Reset on Debugger Startup [Y/N] = Y? Primary SCSI Bus Negotiations Type [A/S/N] = A? Primary SCSI Data Bus Width [W/N] = W? Secondary SCSI Identifier = "07"? NVRAM Bootlist (GEV.fw-boot-path) Boot Enable [Y/N] = N? NVRAM Bootlist (GEV.fw-boot-path) Boot at power-up only [Y/N] = N? NVRAM Bootlist (GEV.fw-boot-path) Boot Abort Delay = 5? Auto Boot Enable [Y/N] = N? Auto Boot at power-up only [Y/N] = N? Auto Boot Scan Enable [Y/N] = Y? Auto Boot Scan Device Type List = FDISK/CDROM/TAPE/HDISK/? Auto Boot Controller LUN = 10? Auto Boot Device LUN = 50? Auto Boot Partition Number = 00? Auto Boot Abort Delay = 7? Auto Boot Default String [NULL for an empty string] = ? ROM Boot Enable [Y/N] = N? ROM Boot at power-up only [Y/N] = Y? ROM Boot Enable search of VMEbus [Y/N] = N? ROM Boot Abort Delay = 5? ROM Boot Direct Starting Address = FFF00000? ff000000 ROM Boot Direct Ending Address = FFFFFFFC? ff000100 Network Auto Boot Enable [Y/N] = N? . Update Non-Volatile RAM (Y/N)? y Reset Local System (CPU) (Y/N)? y PPC4-Bug>rb ;v ROMBoot about to Begin... Press <ESC> to Bypass, <SPC> to Continue Direct Adr: FF000000 FF000100: Searching for ROMboot Module at: FF000000 Executing ROMboot Module "LINUXROM" at FF000000 But here everything hangs! I looked at what i have in memory: PPC4-Bug>md ff000000:100 FF000000 424F4F54 00000014 0009E95A 4C494E55 BOOT.......ZLINU FF000010 58524F4D 3D20FF00 61290100 3D600009 XROM= ..a)..=`.. FF000020 616B7E4C 3D800000 618C5000 7D6903A6 ak~L=...a.P.}i.. FF000030 39A00000 85690004 956C0004 7DAD5A78 9....i...l..}.Zx FF000040 4200FFF4 3D20FF09 61297F4C 3D600000 B...= ..a).L=`.. FF000050 616B0000 3D800000 618C0000 7D6903A6 ak..=...a...}i.. FF000060 39A00000 85690004 956C0004 7DAD5A78 9....i...l..}.Zx FF000070 4200FFF4 3C600000 60630000 3DC00000 B...<`..`c..=... FF000080 61CE5400 7DC803A6 4E800020 00000000 a.T.}...N.. .... FF000090 00000000 00000000 00000000 00000000 ................ and then all zero for 0x400 bytes excepted: FF0002C0 02004101 124F0000 0000C004 00000000 ..A..O.......... FF0002D0 00000000 00000000 00000000 00000000 ................ FF0002E0 00000000 00000000 00000000 00000000 ................ FF0002F0 00000000 00000000 00000000 000055AA ..............U. FF000300 00040000 4C7E0900 00004C69 6E757800 ....L~....Linux. I hope that this could be sufficient to understand what was going on, I tried to look at the code, but I don't know the PPC assembler at all, and I cannot understand if this is something good or not (but it seems quite strange to me): PPC4-Bug>md ff000014:100;di FF000014 3D20FF00 ADDIS R9,R0,$FF00 FF000018 61290100 ORI R9,R9,$100 FF00001C 3D600009 ADDIS R11,R0,$9 FF000020 616B7E4C ORI R11,R11,$7E4C FF000024 3D800000 ADDIS R12,R0,$0 FF000028 618C5000 ORI R12,R12,$5000 FF00002C 7D6903A6 MTSPR 9,R11 FF000030 39A00000 ADDI R13,R0,$0 FF000034 85690004 LWZU R11,$4(R9) ($00000004) FF000038 956C0004 STWU R11,$4(R12) ($00000004) FF00003C 7DAD5A78 XOR R13,R13,R11 FF000040 4200FFF4 BC 16,0,$FF000034 FF000044 3D20FF09 ADDIS R9,R0,$FF09 FF000048 61297F4C ORI R9,R9,$7F4C FF00004C 3D600000 ADDIS R11,R0,$0 FF000050 616B0000 ORI R11,R11,$0 FF000054 3D800000 ADDIS R12,R0,$0 FF000058 618C0000 ORI R12,R12,$0 FF00005C 7D6903A6 MTSPR 9,R11 FF000060 39A00000 ADDI R13,R0,$0 FF000064 85690004 LWZU R11,$4(R9) ($00000004) FF000068 956C0004 STWU R11,$4(R12) ($00000004) FF00006C 7DAD5A78 XOR R13,R13,R11 FF000070 4200FFF4 BC 16,0,$FF000064 FF000074 3C600000 ADDIS R3,R0,$0 FF000078 60630000 ORI R3,R3,$0 FF00007C 3DC00000 ADDIS R14,R0,$0 FF000080 61CE5400 ORI R14,R14,$5400 FF000084 7DC803A6 MTSPR 8,R14 FF000088 4E800020 BCLR 20,0 Thank you in advance. Bye -- Simone Piccardi Microsoft is NOT the answer. Microsoft is the Question. The answer is: "NO!" ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: BUGboot 0.2 - Boot Linux from flash on Moto boards 1999-10-11 22:37 ` Simone Piccardi @ 1999-10-14 16:40 ` Matt Porter 1999-10-29 18:08 ` BUGboot 0.2 Patch Christian Zankel 0 siblings, 1 reply; 7+ messages in thread From: Matt Porter @ 1999-10-14 16:40 UTC (permalink / raw) To: Simone Piccardi; +Cc: linuxppc-dev On Tue, Oct 12, 1999 at 12:37:03AM +0200, Simone Piccardi wrote: > Hi Matt, > > I'm trying your bugboot but I have some problem. I went through your > readme, and these are the steps that I did. > <snip> Since I posted 0.2 I've been able to produce this problem with certain board/zImage combinations. This fell down my list of priorities a little bit for the short term, but I will fix the problems and make a working 0.3 version available ASAP. > I looked at what i have in memory: > > PPC4-Bug>md ff000000:100 > FF000000 424F4F54 00000014 0009E95A 4C494E55 BOOT.......ZLINU > FF000010 58524F4D 3D20FF00 61290100 3D600009 XROM= ..a)..=`.. > FF000020 616B7E4C 3D800000 618C5000 7D6903A6 ak~L=...a.P.}i.. > FF000030 39A00000 85690004 956C0004 7DAD5A78 9....i...l..}.Zx > FF000040 4200FFF4 3D20FF09 61297F4C 3D600000 B...= ..a).L=`.. > FF000050 616B0000 3D800000 618C0000 7D6903A6 > ak..=...a...}i.. > FF000060 39A00000 85690004 956C0004 7DAD5A78 9....i...l..}.Zx > FF000070 4200FFF4 3C600000 60630000 3DC00000 B...<`..`c..=... > FF000080 61CE5400 7DC803A6 4E800020 00000000 a.T.}...N.. .... > FF000090 00000000 00000000 00000000 00000000 ................ > and then all zero for 0x400 bytes excepted: > FF0002C0 02004101 124F0000 0000C004 00000000 > ..A..O.......... > FF0002D0 00000000 00000000 00000000 00000000 > ................ > FF0002E0 00000000 00000000 00000000 00000000 > ................ > FF0002F0 00000000 00000000 00000000 000055AA > ..............U. > FF000300 00040000 4C7E0900 00004C69 6E757800 > ....L~....Linux. You've followed the steps correctly according to this memory dump. I have definitely have some build problems in 0.2. -- Matt Porter Motorola Computer Group mporter@mcg.mot.com CIBU Linux Support ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/ ^ permalink raw reply [flat|nested] 7+ messages in thread
* BUGboot 0.2 Patch 1999-10-14 16:40 ` Matt Porter @ 1999-10-29 18:08 ` Christian Zankel 1999-11-02 9:24 ` Simone Piccardi 1999-11-02 9:45 ` Simone Piccardi 0 siblings, 2 replies; 7+ messages in thread From: Christian Zankel @ 1999-10-29 18:08 UTC (permalink / raw) To: Matt Porter, Simone Piccardi; +Cc: linuxppc-dev [-- Attachment #1: Type: text/plain, Size: 932 bytes --] Hi Matt, Hi Simone, Matt Porter wrote: > > On Tue, Oct 12, 1999 at 12:37:03AM +0200, Simone Piccardi wrote: > > Hi Matt, > > > > I'm trying your bugboot but I have some problem. I went through your > > readme, and these are the steps that I did. > > > > Since I posted 0.2 I've been able to produce this problem with certain > board/zImage combinations. This fell down my list of priorities a little > bit for the short term, but I will fix the problems and make a working > 0.3 version available ASAP. Enclosed you will find a patch that made bugboot work for me. You can also use a little-endian machine to build it if you have the apropriate cross-compiling tools. Ups.. I forgot to change the README file: RESDATA_DEST and RESDATA_SIZE are now in romboot.S and ZIMAGE_SIZE is now called KERNEL_IMAGE (in Makefile). Greetings, Christian -- Christian Zankel MontaVista Software, Inc. chris@mvista.com +1 408-328-9211 [-- Attachment #2: bugboot-0.2.diff --] [-- Type: text/plain, Size: 6273 bytes --] diff -c bugboot-0.2/Makefile bugboot-0.2.1/Makefile *** bugboot-0.2/Makefile Thu Sep 30 13:15:17 1999 --- bugboot-0.2.1/Makefile Fri Oct 29 10:44:49 1999 *************** *** 10,18 **** CFLAGS=-c OBJCOPY=$(CROSS_COMPILE)objcopy ! ZIMAGE_SIZE=602426 ! RESDATA_DEST=0x1f78000 ! RESDATA_SIZE=0x6a0c all: bugboot.bin --- 10,16 ---- CFLAGS=-c OBJCOPY=$(CROSS_COMPILE)objcopy ! ZIMAGE_SIZE=587399 all: bugboot.bin *************** *** 24,32 **** romboot.o: romboot.S $(CC) $(CFLAGS) \ ! -DZIMAGE_SIZE=`wc -c <kernel_image | sed "s: ::g"` \ ! -DRESDATA_DEST=RESDATA_DEST \ ! -DRESDATA_SIZE=RESDATA_SIZE \ -o romboot.o romboot.S mkbugboot: mkbugboot.c --- 22,28 ---- romboot.o: romboot.S $(CC) $(CFLAGS) \ ! -DKERNEL_IMAGE=`wc -c <kernel_image | sed "s: ::g"` \ -o romboot.o romboot.S mkbugboot: mkbugboot.c Only in bugboot-0.2.1: kernel_image diff -c bugboot-0.2/mkbugboot.c bugboot-0.2.1/mkbugboot.c *** bugboot-0.2/mkbugboot.c Thu Sep 30 11:44:09 1999 --- bugboot-0.2.1/mkbugboot.c Fri Oct 29 10:47:48 1999 *************** *** 17,22 **** --- 17,30 ---- #include <errno.h> #include <fcntl.h> + // ON LITTLE ENDIAN MACHINES: + + #ifdef LITTLE_ENDIAN + #define cpu_to_be32(x) le32_to_cpu(x) + #else + #define cpu_to_be32(x) (x) + #endif + #define cpu_to_le32(x) le32_to_cpu((x)) unsigned long le32_to_cpu(unsigned long x) { *************** *** 162,169 **** /* Fill in the PPCBUG ROM boot header */ strncpy(bbh->magic_word, "BOOT", 4); /* PPCBUG magic word */ ! bbh->entry_offset = header_size; /* Entry address */ ! bbh->routine_length = MAX_BOOT_SIZE+boot_size+2; /* Routine length */ strncpy(bbh->routine_name, "LINUXROM", 8); /* Routine name */ /* Output the header and bootloader to the file */ --- 170,177 ---- /* Fill in the PPCBUG ROM boot header */ strncpy(bbh->magic_word, "BOOT", 4); /* PPCBUG magic word */ ! bbh->entry_offset = cpu_to_be32(header_size); /* Entry address */ ! bbh->routine_length = cpu_to_be32(MAX_BOOT_SIZE+boot_size+2); /* Routine length */ strncpy(bbh->routine_name, "LINUXROM", 8); /* Routine name */ /* Output the header and bootloader to the file */ *************** *** 185,191 **** } /* BUG romboot requires that our size is divisible by 2 */ ! if (image_size % 2) { image_size++; write(out_fd, &zero, 1); --- 193,200 ---- } /* BUG romboot requires that our size is divisible by 2 */ ! /* align image to 4 byte boundary */ ! if (image_size % 4) { image_size++; write(out_fd, &zero, 1); Only in bugboot-0.2.1: mkbugboot.c.orig Only in bugboot-0.2.1: res_data diff -c bugboot-0.2/romboot.S bugboot-0.2.1/romboot.S *** bugboot-0.2/romboot.S Thu Sep 30 12:05:14 1999 --- bugboot-0.2.1/romboot.S Fri Oct 29 10:48:17 1999 *************** *** 5,51 **** */ #include "ppc_asm.tmpl" #define ZIMAGE_START 0xff000100 #define ZIMAGE_DEST 0x00005000 - #define BOOT_VECTOR ZIMAGE_DEST + 0x400 - #define RESDATA_START ZIMAGE_START + ZIMAGE_SIZE .text /* .globl main */ kernel: ! lis r9,ZIMAGE_START@h /* Get pointer to top of zImage */ ! ori r9,r9,ZIMAGE_START@l /* Bootloader starts immediately */ ! lis r11,ZIMAGE_SIZE@h /* Set zImage size */ ! ori r11,r11,ZIMAGE_SIZE@l ! lis r12,ZIMAGE_DEST@h /* Setup destination address for */ ! ori r12,r12,ZIMAGE_DEST@l /* zImage in RAM */ mtctr r11 /* Setup the counter */ - li r13,0 copy1: lwzu r11,4(r9) /* Load a word in and increment */ stwu r11,4(r12) /* Store a word out and increment */ - xor r13,r13,r11 /* Decrement and repeat until counter */ bdnz copy1 /* is 0 */ resdata: ! lis r9,RESDATA_START@h /* Set top of resdata */ ! ori r9,r9,RESDATA_START@l ! lis r11,RESDATA_SIZE@h /* Set resdata size */ ! ori r11,r11,RESDATA_SIZE@l ! lis r12,RESDATA_DEST@h /* Set destination address for */ ! ori r12,r12,RESDATA_DEST@l /* resdata in RAM */ mtctr r11 /* Setup the counter */ - li r13,0 copy2: lwzu r11,4(r9) /* Load a word in and increment */ stwu r11,4(r12) /* Store a word out and increment */ - xor r13,r13,r11 /* Decrement and repeat until counter */ bdnz copy2 /* is 0 */ lis r3,RESDATA_DEST@h /* Set pointer to resdata in R3 */ --- 5,52 ---- */ #include "ppc_asm.tmpl" + #define RESDATA_DEST 0x7f88000 + #define RESDATA_SIZE 0x6a0c + #define ZIMAGE_START 0xff000100 #define ZIMAGE_DEST 0x00005000 + #define ZIMAGE_SIZE (KERNEL_IMAGE + 3) & (~3) + #define BOOT_VECTOR ZIMAGE_DEST + 0x400 + #define RESDATA_START ZIMAGE_START + ZIMAGE_SIZE + .text /* .globl main */ kernel: ! lis r9,(ZIMAGE_START-4)@h /* Get pointer to top of zImage */ ! ori r9,r9,(ZIMAGE_START-4)@l/* Bootloader starts immediately */ ! lis r11,(ZIMAGE_SIZE+3)/4@h /* Set zImage size (number of words) */ ! ori r11,r11,(ZIMAGE_SIZE+3)/4@l ! lis r12,(ZIMAGE_DEST-4)@h /* Setup destination address for */ ! ori r12,r12,(ZIMAGE_DEST-4)@l /* zImage in RAM */ mtctr r11 /* Setup the counter */ copy1: lwzu r11,4(r9) /* Load a word in and increment */ stwu r11,4(r12) /* Store a word out and increment */ bdnz copy1 /* is 0 */ resdata: ! lis r9,(RESDATA_START-4)@h /* Set top of resdata */ ! ori r9,r9,(RESDATA_START-4)@l ! lis r11,(RESDATA_SIZE+3)/4@h /* Set resdata size */ ! ori r11,r11,(RESDATA_SIZE+3)/4@l ! lis r12,(RESDATA_DEST-4)@h /* Set destination address for */ ! ori r12,r12,(RESDATA_DEST-4)@l /* resdata in RAM */ mtctr r11 /* Setup the counter */ copy2: lwzu r11,4(r9) /* Load a word in and increment */ stwu r11,4(r12) /* Store a word out and increment */ bdnz copy2 /* is 0 */ lis r3,RESDATA_DEST@h /* Set pointer to resdata in R3 */ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: BUGboot 0.2 Patch 1999-10-29 18:08 ` BUGboot 0.2 Patch Christian Zankel @ 1999-11-02 9:24 ` Simone Piccardi 1999-11-02 9:45 ` Simone Piccardi 1 sibling, 0 replies; 7+ messages in thread From: Simone Piccardi @ 1999-11-02 9:24 UTC (permalink / raw) To: Christian Zankel; +Cc: Matt Porter, linuxppc-dev Hi Christian, I just tried your patch, it did not worked, but at least something more seems to happen when I tried the boot. I repeated all the steps that I already did the previous time. PPC4-Bug>nbh 0 0 ,,, res_data Network Booting from: DEC21143, Controller 0, Device 0 [snip] Residual-Data Located at: $01F78000 [snip] PPC4-Bug>md $01F78000 01F78000 00006A0C 0001012C 20202020 20202020 ..j...., So I have RESDATA_DEST = 01F78000 and RESDATA_SIZE = 6A0C; I put everything in res_data with: PPC4-Bug>niop Controller LUN =00? Device LUN =00? Get/Put =G? P File Name =? res_data Memory Address =00004000? 01F78000 Length =00000000? 00006A0C Bytes Sent =&27148 Bytes/Second =&27148, Elapsed Time =1 Second(s) And thenI put all in bugboot-2.0/: [root@pcwiz3 bugboot-0.2]# ls -l -rw-r--r-- 1 1000 1000 17992 Aug 31 18:10 COPYING -rw-r--r-- 1 1000 1000 537 Sep 30 22:29 ChangeLog -rw-r--r-- 1 root 1000 794 Nov 2 09:08 Makefile -rw-r--r-- 1 1000 1000 5136 Sep 30 22:42 README -rwxr-xr-x 1 root 1000 622156 Nov 2 09:06 kernel_image* -rw-r--r-- 1 root 1000 5614 Nov 2 08:13 mkbugboot.c -rw-r--r-- 1 1000 1000 918 Aug 31 18:35 mkchksum.c -rw-r--r-- 1 1000 1000 974 Aug 31 19:04 ppc_asm.tmpl -rw-r--r-- 1 root 1000 27148 Nov 2 09:06 res_data -rw-r--r-- 1 root 1000 1885 Nov 2 09:09 romboot.S -rw-r--r-- 1 root 1000 104 Nov 2 09:11 romboot.bin -rw-r--r-- 1 root 1000 707 Nov 2 09:11 romboot.o I used the board itself to compile putting the size on Makefile: ZIMAGE_SIZE=622156 and the RESDATA_DEST and RESDATA_SIZE in bugboot.S: #define RESDATA_DEST 0x1f78000 #define RESDATA_SIZE 0x6a0c and then: [root@vmesez1 bugboot-0.2]# make bugboot.bin gcc -o mkbugboot mkbugboot.c gcc -c \ -DKERNEL_IMAGE=`wc -c <kernel_image | sed "s: ::g"` \ -o romboot.o romboot.S objcopy --output-target=binary romboot.o romboot.bin ./mkbugboot romboot.bin kernel_image res_data bugboot.bin Checksum = 0xa98 Then I restarted, get the file and put it in flash: PPC4-Bug>niop Controller LUN =00? Device LUN =00? Get/Put =G? File Name =bugboot.bin? Memory Address =00004000? Length =00000000? Byte Offset =00000000? Bytes Received =&649562, Bytes Loaded =&649562 Bytes/Second =&324781, Elapsed Time =2 Second(s) PPC4-Bug>pflash 4000:100000 ff000000 Source Starting/Ending Addresses =00004000/00103FFF Destination Starting/Ending Addresses =FF000000/FF0FFFFF Number of Effective Bytes =00100000 (&1048576) Program FLASH Memory (Y/N)? y Virtual-Device-Number =00 Manufacturer-Identifier =10001 Device-Identifier =22C422C4 Virtual-Device-Number =01 Manufacturer-Identifier =10001 Device-Identifier =22C422C4 Address-Mask =FF800000 Erasing sector =$FF000000 Erasing sector =$FF040000 Erasing sector =$FF080000 Erasing sector =$FF0C0000 Programming sector =$FF000000 Programming sector =$FF040000 Programming sector =$FF080000 Programming sector =$FF0C0000 FLASH Memory Programming Complete PPC4-Bug>env [snip] ROM Boot Direct Starting Address = FF000000? ROM Boot Direct Ending Address = FF000100? Network Auto Boot Enable [Y/N] = N? . But when I give the bot command what I get is: PPC4-Bug>rb ;v ROMBoot about to Begin... Press <ESC> to Bypass, <SPC> to Continue Direct Adr: FF000000 FF000100: Searching for ROMboot Module at: FF000100 ROM : FF000104 FF7FFFFC: Searching for ROMboot Module at: FF7FFFFC Local RAM : 00000000 01FFFFFC: Searching for ROMboot Module at: 00004000 it seems to look up to the end of the flash memory then hangs. As in the previuos time I have in memory: PPC4-Bug>md ff000000:100 FF000000 424F4F54 14000000 5AE90900 4C494E55 BOOT....Z...LINU ^^^^ ^^^^ this seems an endianess problem!! FF000010 58524F4D 3D20FF00 612900FC 3D600002 XROM= ..a)..=`.. FF000020 616B5F93 3D800000 618C4FFC 7D6903A6 ak_.=...a.O.}i.. FF000030 85690004 956C0004 4200FFF8 3D20FF09 .i...l..B...= .. FF000040 61297F48 3D600000 616B1A83 3D8001F7 a).H=`..ak..=... FF000050 618C7FFC 7D6903A6 85690004 956C0004 a...}i...i...l.. FF000060 4200FFF8 3C6001F7 60638000 3DC00000 B...<`..`c..=... FF000070 61CE5400 7DC803A6 4E800020 00000000 a.T.}...N.. .... [all 00] FF000100 48000400 00000000 00000000 00000000 H............... [all 00] FF0002C0 02004101 124F0000 0000C004 00000000 ..A..O.......... FF0002D0 00000000 00000000 00000000 00000000 ................ FF0002E0 00000000 00000000 00000000 00000000 ................ FF0002F0 00000000 00000000 00000000 000055AA ..............U. FF000300 00040000 4C7E0900 00004C69 6E757800 ....L~....Linux. FF000310 00000000 00000000 00000000 00000000 ................ [all 00] FF000500 48000005 7C2802A6 38000000 9401FD8C H...|(..8....... FF000510 BF410008 48000005 7FC802A6 801E0358 .A..H..........X [...] Hi, and thanks for the help. -- Simone Piccardi Microsoft is NOT the answer. Microsoft is the Question. The answer is: "NO!" ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: BUGboot 0.2 Patch 1999-10-29 18:08 ` BUGboot 0.2 Patch Christian Zankel 1999-11-02 9:24 ` Simone Piccardi @ 1999-11-02 9:45 ` Simone Piccardi 1 sibling, 0 replies; 7+ messages in thread From: Simone Piccardi @ 1999-11-02 9:45 UTC (permalink / raw) To: Christian Zankel; +Cc: Matt Porter, linuxppc-dev Hi again, now it works!! I can boot from flash! It was just the problem of endianess; for some reason when I compiled mkbugboot.c on the board it take it as little-endian; it was sufficient to force the code putting: bbh->entry_offset =header_size; bbh->routine_length= MAX_BOOT_SIZE+boot_size+2; instead of: bbh->entry_offset = cpu_to_be32(header_size); /* Entry address */ bbh->routine_length = cpu_to_be32(MAX_BOOT_SIZE+boot_size+2); and everything went fine. I'll look to understand why it take it as LITTLE_ENDIAN on a big endian computer, but now I'm very happy! Thank you again for the good work. -- Simone Piccardi Microsoft is NOT the answer. Microsoft is the Question. The answer is: "NO!" ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/ ^ permalink raw reply [flat|nested] 7+ messages in thread
* BUGboot 0.3 - Boot Linux from flash on Moto boards 1999-09-30 20:45 BUGboot 0.2 - Boot Linux from flash on Moto boards Matt Porter 1999-10-11 22:37 ` Simone Piccardi @ 1999-11-12 23:45 ` Matt Porter 1 sibling, 0 replies; 7+ messages in thread From: Matt Porter @ 1999-11-12 23:45 UTC (permalink / raw) To: linuxppc-dev, linuxppc-embedded I've released a new 0.3 version of BUGboot to address some bugs where it just didn't work with certain sized kernel and residual data images. Also, the new version can build cross build flashable images as well now from both big and little endian machines. Thanks to Christian Zankel for a patch that helped me locate some of the problems with 0.2. I've tested builds on ppc and i386 and tested so far on MVME2300SC, MVME2400, and MTX+ targets. Available at http://members.home.net/mmporter/linux/ If you are wondering what it is: It's a simple tool and bootloader that creates a flashable image from a Linux kernel/initrd and a dump of a residual data tree. This image is flashed onto any Motorola PowerPlus board 4/8/16 MB flash bank and then Linux is booted from the flash. This works on MVME23xx/24xx/26xx/27xx/36xx/46xx, MCPx750, and MTX variants. -- Matt Porter mmporter@home.com This is Linux Country. On a quiet night, you can hear Windows reboot. ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/ ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~1999-11-12 23:45 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 1999-09-30 20:45 BUGboot 0.2 - Boot Linux from flash on Moto boards Matt Porter 1999-10-11 22:37 ` Simone Piccardi 1999-10-14 16:40 ` Matt Porter 1999-10-29 18:08 ` BUGboot 0.2 Patch Christian Zankel 1999-11-02 9:24 ` Simone Piccardi 1999-11-02 9:45 ` Simone Piccardi 1999-11-12 23:45 ` BUGboot 0.3 - Boot Linux from flash on Moto boards Matt Porter
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).