Re: [coreboot] [PATCH] x86: add coreboot framebuffer support

2014-09-08 Thread Gerd Hoffmann
  Hi,

> > Yes, efifb has the same semantics. We just need some ID with clear 
> > documentation saying sth like "implies framebuffer without
> > anything else" so that noone will get an idea to plug e.g. vga
> > hooks into it.
> > 
> 
> Want to make a patch?

Attached.  Can someone test with the patched coreboot trampoline please?

cheers,
  Gerd

>From cadf8315cb5d76a89a1b84e7ea22565f6b1945dc Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann 
Date: Tue, 9 Sep 2014 08:10:09 +0200
Subject: [PATCH] Add VIDEO_TYPE_LINEAR

Add VIDEO_TYPE_LINEAR for a simple linear framebuffer,
initialized by the firmware (for example coreboot).

Needs CONFIG_X86_SYSFB=y and CONFIG_FB_SIMPLE=y to work.

Signed-off-by: Gerd Hoffmann 
---
 arch/x86/kernel/sysfb_simplefb.c | 4 +++-
 include/uapi/linux/screen_info.h | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/sysfb_simplefb.c b/arch/x86/kernel/sysfb_simplefb.c
index 86179d4..0742c82 100644
--- a/arch/x86/kernel/sysfb_simplefb.c
+++ b/arch/x86/kernel/sysfb_simplefb.c
@@ -36,7 +36,9 @@ __init bool parse_mode(const struct screen_info *si,
 	unsigned int i;
 
 	type = si->orig_video_isVGA;
-	if (type != VIDEO_TYPE_VLFB && type != VIDEO_TYPE_EFI)
+	if (type != VIDEO_TYPE_VLFB &&
+	type != VIDEO_TYPE_EFI &&
+	type != VIDEO_TYPE_LINEAR)
 		return false;
 
 	for (i = 0; i < ARRAY_SIZE(formats); ++i) {
diff --git a/include/uapi/linux/screen_info.h b/include/uapi/linux/screen_info.h
index 7530e74..d27126d 100644
--- a/include/uapi/linux/screen_info.h
+++ b/include/uapi/linux/screen_info.h
@@ -66,6 +66,8 @@ struct screen_info {
 
 #define VIDEO_TYPE_EFI		0x70	/* EFI graphic mode		*/
 
+#define VIDEO_TYPE_LINEAR	0x80	/* simple linear framebuffer	*/
+
 #define VIDEO_FLAGS_NOCURSOR	(1 << 0) /* The video mode has no cursor set */
 
 #define VIDEO_CAPABILITY_SKIP_QUIRKS	(1 << 0)
-- 
1.8.3.1

-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

Re: [coreboot] Linux-kernel as payload

2014-09-08 Thread Werner Zeh


Hi Ron.
 
Thank you for the command line suggestion.
My kernel was booting in qemu but I was not able to see output due to the 
missing command line.
Especially the "eralyprintk"-thing helped me!
Now every thing seems to work just fine. There is no need to use mkelfImage.
Great, I love it!

Thanks guys
Werner
 

Gesendet: Montag, 08. September 2014 um 17:54 Uhr
Von: "ron minnich" 
An: "John Lewis" 
Cc: coreboot 
Betreff: Re: [coreboot] Linux-kernel as payload
As of last week, I am booting a bzimage+initramfs combination just
fine. bzimage will be fine.

It's a good idea to set the command line args, and I recomment, for testing
console=ttyS0,115200 earlyprintk=ttyS0,115200,keep

Your best bet is to do the standard trivial initramfs with a simple program:
main(){printf("hi\n"); while (1);}

Let's pretend it's called mymain.c
cc -o mymain -static mymain.c

put that in your prototype root file system with the name init. make
sure you create /dev/console. Then bundle it all up with cpio and
you've got an initramfs


I can start some notes on the wiki if you're still stuck.

ron

--
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

Re: [coreboot] Linux-kernel as payload

2014-09-08 Thread ron minnich
I think it's time to retire mkelfImage and I can submit that patch now
if we agree.

ron

-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot


Re: [coreboot] Linux-kernel as payload

2014-09-08 Thread Patrick Georgi
Am 08.09.2014 um 13:44 schrieb John Lewis:
>>> No, you don't.
>> I meant "You can use", okay?
Sorry, my reply came across harsher than I intended..

> And I was also thinking using it from within SeaBIOS, and didn't make
> the distinction.
Ah, okay. Please note that 3c12cb03847d2db41809ae434530782a7dbef48b
fixes the issues that prevented the native linux payload feature from
working with SeaBIOS.

Maybe we should retire mkelfImage. I'm actually amazed that it still works!


Patrick



signature.asc
Description: OpenPGP digital signature
-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

[coreboot] AMD R-series APU based boards

2014-09-08 Thread sanjeev chauhan
Hi all,
I am wondering if there are any AMD R-series APU (not SoC) based
boards supported by coreboot.  I know some AMD G-series APU based
boards are supported but am specifically interested in R-series APUs
because of their higher processing power.

Thanks,

sanjeev

-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot


Re: [coreboot] Linux-kernel as payload

2014-09-08 Thread ron minnich
As of last week, I am booting a bzimage+initramfs combination just
fine. bzimage will be fine.

It's a good idea to set the command line args, and I recomment, for testing
console=ttyS0,115200 earlyprintk=ttyS0,115200,keep

Your best bet is to do the standard trivial initramfs with a simple program:
main(){printf("hi\n"); while (1);}

Let's pretend it's called mymain.c
cc -o mymain -static mymain.c

put that in your prototype root file system with the name init. make
sure you create /dev/console. Then bundle it all up with cpio and
you've got an initramfs


I can start some notes on the wiki if you're still stuck.

ron

-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot


Re: [coreboot] Linux-kernel as payload

2014-09-08 Thread John Lewis

On 08/09/14 12:40, John Lewis wrote:



On 08/09/14 12:37, Patrick Georgi wrote:

Am 08.09.2014 um 12:09 schrieb John Lewis:

You have to use mkelfImage to convert the bzImage to elf format. It's in
the utils folder of coreboot.

No, you don't.


I meant "You can use", okay?

John.

And I was also thinking using it from within SeaBIOS, and didn't make 
the distinction.


--
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot


Re: [coreboot] Linux-kernel as payload

2014-09-08 Thread John Lewis



On 08/09/14 12:37, Patrick Georgi wrote:

Am 08.09.2014 um 12:09 schrieb John Lewis:

You have to use mkelfImage to convert the bzImage to elf format. It's in
the utils folder of coreboot.

No, you don't.


I meant "You can use", okay?

John.

--
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot


Re: [coreboot] Linux-kernel as payload

2014-09-08 Thread Patrick Georgi
Am 08.09.2014 um 10:25 schrieb Werner Zeh:
> PAYLOAD../bzImage (compression: none)
> E: The stage file is not in ELF format!
Well, that's certainly true, isn't it? :-)

(technical details: we have three payload parsers - ELF, bzImage and
special-Tianocore, of which the ELF parser is the first. If it fails, it
whines a bit on the console, then the others get a chance).


> Am I wrong assumimg that the image may be a real (compressed) bzImage?
> Should I use a vmlinuz better? Or is my bzImage is not suitable (maybe
> parts of it are compressed or so)?
Using a bzImage is the most recently tested approach to making a payload
out of a linux kernel, so this is the way to go.


Patrick



signature.asc
Description: OpenPGP digital signature
-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

Re: [coreboot] Linux-kernel as payload

2014-09-08 Thread Patrick Georgi
Am 08.09.2014 um 12:09 schrieb John Lewis:
> You have to use mkelfImage to convert the bzImage to elf format. It's in
> the utils folder of coreboot.
No, you don't.


Patrick



signature.asc
Description: OpenPGP digital signature
-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

Re: [coreboot] Linux-kernel as payload

2014-09-08 Thread John Lewis

Hi,

You have to use mkelfImage to convert the bzImage to elf format. It's in 
the utils folder of coreboot.


John.

On 08/09/14 09:25, Werner Zeh wrote:

Hi.
I try to use the linux kernel as payload in coreboot. I use a bzImage of
the kernel.
When I compile, I get the following message:
OBJCOPYcpu/x86/smm/smm_wrap.ramstage.o
 CC generated/ramstage.o
 CC cbfs/fallback/ramstage.debug
 OBJCOPYcbfs/fallback/ramstage.elf
 CBFS   coreboot.rom
 PAYLOAD../bzImage (compression: none)
E: The stage file is not in ELF format!
 CONFIG .config
 CBFSPRINT  coreboot.rom
coreboot.rom: 4096 kB, bootblocksize 848, romsize 4194304, offset 0x0
alignment: 64 bytes
Name   Offset Type Size
fallback/romstage  0x0stage20906
fallback/ramstage  0x5200 stage62994
fallback/payload   0x14880payload  1392465
config 0x168840   raw  3366
(empty)0x1695c0   null 2713240
Am I wrong assumimg that the image may be a real (compressed) bzImage?
Should I use a vmlinuz better? Or is my bzImage is not suitable (maybe
parts of it are compressed or so)?
Thanks.




--
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot


[coreboot] Linux-kernel as payload

2014-09-08 Thread Werner Zeh
Hi.

 

I try to use the linux kernel as payload in coreboot. I use a bzImage of the kernel.

When I compile, I get the following message:

 


OBJCOPY    cpu/x86/smm/smm_wrap.ramstage.o
    CC generated/ramstage.o
    CC cbfs/fallback/ramstage.debug
    OBJCOPY    cbfs/fallback/ramstage.elf
    CBFS   coreboot.rom
    PAYLOAD    ../bzImage (compression: none)
E: The stage file is not in ELF format!
    CONFIG .config
    CBFSPRINT  coreboot.rom

coreboot.rom: 4096 kB, bootblocksize 848, romsize 4194304, offset 0x0
alignment: 64 bytes

Name   Offset Type Size
fallback/romstage  0x0    stage    20906
fallback/ramstage  0x5200 stage    62994
fallback/payload   0x14880    payload  1392465
config 0x168840   raw  3366
(empty)    0x1695c0   null 2713240

 

Am I wrong assumimg that the image may be a real (compressed) bzImage?

Should I use a vmlinuz better? Or is my bzImage is not suitable (maybe parts of it are compressed or so)?

 

Thanks.


-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot