Hello,
I wrote a blog post about this:
http://blogs.coreboot.org/blog/2011/04/30/u-boot-as-coreboot-payload/
I'm attaching patches so you see what I have right now. Please consider them just a "test" I did not change the copyrights etc. Maybe they are just a big mess. Maybe you find them useful.
The current problems are:
1) I have PCI resource conflicts with QEMU and coreboot
This is just now a showstopper. Definetely no time to investigate right now/
2) I have in plan to get rid of u-boot relocation by relocating it exactly 0 bytes ;)
3) I still don't know git despite F1 from Carebear ;)
Thanks, Rudolf
Hi again,
Getting rid of u-boot option CONFIG_PCI_PNP fixes the PCI stuff ;)
And I also did an insane hack, which just inject RSDP to right place making the u-boot boot system a kernel and system on AMD 64bit platform (Asrock 939A785G)!
Jumping to boot code at fc0013 POST: 0xf8 entry = 0x00fc0013 lb_start = 0x00100000 lb_size = 0x00094000 adjust = 0x2fd5c000 buffer = 0x2fdc8000 elf_boot_notes = 0x0011ae90 adjusted_boot_notes = 0x2fe76e90 dram init type: 16, base 0 size 1000 type: 1, base 1000 size 9f000 type: 1, base c0000 size 2fe30000 type: 16, base 2fef0000 size 110000 RSDP found at 2fef2400type: 2, base 30000000 size 10000000
U-Boot 2011.03-00214-g24b6bc2-dirty (May 03 2011 - 23:58:39)
DRAM Configuration: Bank #0: 00001000 636 KiB Bank #1: 000c0000 766.2 MiB Bank #2: 00000000 0 Bytes Bank #3: 00000000 0 Bytes ## Unknown flash on Bank 1 - Size = 0x00000000 = 0 MB ## Unknown flash on Bank 2 - Size = 0x00000000 = 0 MB ## Unknown flash on Bank 3 - Size = 0x00000000 = 0 MB Flash: 0 Bytes *** Warning - bad CRC, using default environment
In: serial Out: serial Err: serial IDE: Bus 0: OK Device 0: Model: WDC WD600BB-00CAA1 Firm: 17.07W17 Ser#: WD-WMA8F113824 Type: Hard Disk Capacity: 57241.8 MB = 55.9 GB (117231408 x 512) Net: No ethernet found. Serck Controls eNET boot > ext2ls ide 0:5 /boot <DIR> 4096 . <DIR> 4096 .. 2063256 bzImage <DIR> 4096 filo <DIR> 12288 grub 22608 memdisk 71290880 a.tar <DIR> 4096 a 1225518 System.map-2.6.26-1-amd64 85588 config-2.6.26-1-amd64 1755088 vmlinuz-2.6.26-1-amd64 2172192 bzImage28 2236288 bzImage29 7707622 initrd.img-2.6.26-1-amd64 33554432 disk 2414688 vmlinuz-2.6.32-5-amd64 6802950 initrd.img-2.6.26-1-amd64.bak 104510 config-2.6.32-5-amd64 165084 memtest86+.bin 1660631 System.map-2.6.32-5-amd64 9446666 initrd.img-2.6.32-5-amd64 124648 memtest86.bin 167264 memtest86+_multiboot.bin boot > setenv bootargs console=ttyS0,9600 root=/dev/sda boot > ext2load ext2load - load binary file from a Ext2 filesystem
Usage: ext2load <interface> <dev[:part]> [addr] [filename] [bytes] - load binary file 'filename' from 'dev' on 'interface' to address 'addr' from ext2 filesystem boot > ext2load 0:5 2000000 /boot/bzImage29 ** No boot file defined ** boot > ext2load ide 0:5 2000000 /boot/bzImage29 Loading file "/boot/bzImage29" from ide device 0:5 (hda5) 2236288 bytes read boot > zboot 2000000 Valid Boot Flag Magic signature found Setup Size = 0x00002c00 Moving Real-Mode Code to 0x00090000 (11264 bytes) Using boot protocol version 2.09 Linux kernel version 2.6.29.2 (root@ruiktest) #1 SMP PREEMPT Sat May 2 00:24:59 CEST 2009 Kernel command line: "console=ttyS0,9600 root=/dev/sda" Loading bzImage at address 0x00100000 (2225024 bytes) ## Transferring control to Linux (at address 00090000) ...
Starting kernel ...
copy to 7c0 from 101e3d4 size 166 copied 9c666066 Linux version 2.6.29.2 (root@ruiktest) (gcc version 4.3.2 (Debian 4.3.2-1) ) #1 SMP PREEMPT Sat May 2 00:24:59 CEST 2009 Command line: console=ttyS0,9600 root=/dev/sda KERNEL supported cpus: Intel GenuineIntel AMD AuthenticAMD Centaur CentaurHauls BIOS-provided physical RAM map: BIOS-e801: 0000000000000000 - 000000000009f000 (usable) BIOS-e801: 0000000000100000 - 0000000004000000 (usable) DMI present. AMI BIOS detected: BIOS may corrupt low RAM, working around it. last_pfn = 0x4000 max_arch_pfn = 0x100000000 Scanning 0 areas for low memory corruption modified physical RAM map: modified: 0000000000000000 - 0000000000010000 (reserved) modified: 0000000000010000 - 000000000009f000 (usable) modified: 0000000000100000 - 0000000004000000 (usable) init_memory_mapping: 0000000000000000-0000000004000000 last_map_addr: 4000000 end: 4000000 ACPI: RSDP 000F0540, 0014 (r0 CORE ) ACPI: RSDT 2FEF2424, 0034 (r1 CORE COREBOOT 0 CORE 0) ACPI: HPET 2FEF24C8, 0038 (r1 CORE COREBOOT 0 CORE 0) ACPI: APIC 2FEF2500, 0054 (r1 CORE COREBOOT 0 CORE 0) ACPI: SSDT 2FEF2554, 020C (r2 CORE DYNADATA 2A CORE 2A) ACPI: FACP 2FEF3B49, 00F4 (r3 CORE COREBOOT 0 CORE 0) ...
Rest is attached.
Thanks, Rudolf
Hi
Due to popular demand here is the yet another patch on the top of those two previously posted. It bit talks to coreboot tables.
Known issues:
* The memory is still 64MB for linux - this can be fixed by reporting correct amount to uboot (bios_*.c) but because there is no e820 just need to report continuous memory to the first hole.
* loading stuff just in 1MB wont work because the LMA is set for bios and realmode trampoline there, please now load kernel from 2MB or more.
* I had to swap IDE drives because this board has only secondary IDE
Thanks, Rudolf