Patchwork LAB support for Asus M2V-MX SE

login
register
about
Submitter Cristi Magherusan
Date 2009-07-16 20:36:39
Message ID <1247776599.10725.45.camel@localhost.localdomain>
Download mbox | patch
Permalink /patch/40/
State Superseded
Headers show

Comments

Cristi Magherusan - 2009-07-16 20:36:39
Hi folks,

The attached patch enables LAB for this motherboard in coreboot-v2.
Should I change the ROM size or leave it as it is?
Also, Carl Daniel said something about CONFIG_XIP_ROM_SIZE calculation.
Is it ok if I just hardcode it to 64KB?

Signed-of by: Cristi Măgherușan<cristi.magherusan@net.utcluj.ro>
Myles Watson - 2009-07-16 20:45:44
> The attached patch enables LAB for this motherboard in coreboot-v2.
> Should I change the ROM size or leave it as it is?

I would leave it as it works for you.

> Also, Carl Daniel said something about CONFIG_XIP_ROM_SIZE calculation.
> Is it ok if I just hardcode it to 64KB?

Do you need to change it? It should be set correctly in src/mainboard/.../Options.lb if the board needs something different than the default.

> Signed-of by: Cristi Măgherușan<cristi.magherusan@net.utcluj.ro>

With the XIP question addressed:
Acked-by: Myles Watson <mylesgw@gmail.com>

Thanks,
Myles
Cristi Magherusan - 2009-07-16 22:24:44
On Thu, 2009-07-16 at 14:45 -0600, Myles Watson wrote:
> > The attached patch enables LAB for this motherboard in coreboot-v2.
> > Should I change the ROM size or leave it as it is?
> 
> I would leave it as it works for you.
Ok, I will.

> > Also, Carl Daniel said something about CONFIG_XIP_ROM_SIZE calculation.
> > Is it ok if I just hardcode it to 64KB?
> 
> Do you need to change it? It should be set correctly in src/mainboard/.../Options.lb if the board needs something different than the default.

Okay, the thing is that the other motherboards I've seen with LAB
support do have it defined the same way as I did. I'll see if they are
also having the same option duplicated in Options.lb and are just
overriding in here.

Also, I created a ROM and it seems the image is 64KB smaller than it
should (4MB). Does anyone have any idea why could it be like this?

Thanks,
Cristi
Myles Watson - 2009-07-17 02:16:14
> Okay, the thing is that the other motherboards I've seen with LAB
> support do have it defined the same way as I did. I'll see if they are
> also having the same option duplicated in Options.lb and are just
> overriding in here.
I did some of that.  I didn't understand where to put defaults at the time.

> Also, I created a ROM and it seems the image is 64KB smaller than it
> should (4MB). Does anyone have any idea why could it be like this?

Sorry I misunderstood.  I thought you had a working image.

Here's a simple diff from Config.lb that builds a 2 MB image for me.

Thanks,
Myles
Cristi Magherusan - 2009-07-17 08:02:14
On Thu, 2009-07-16 at 20:16 -0600, Myles Watson wrote:
> > Okay, the thing is that the other motherboards I've seen with LAB
> > support do have it defined the same way as I did. I'll see if they are
> > also having the same option duplicated in Options.lb and are just
> > overriding in here.
> I did some of that.  I didn't understand where to put defaults at the time.
> 
> > Also, I created a ROM and it seems the image is 64KB smaller than it
> > should (4MB). Does anyone have any idea why could it be like this?
> 
> Sorry I misunderstood.  I thought you had a working image.
I thought so, but I didn't yet attempt to burn it to make sure it works, my bad :(

> Here's a simple diff from Config.lb that builds a 2 MB image for me.
I'll give it a try, thanks!

Cristi

Patch

--- a/src/mainboard/asus/m2v-mx_se/Options.lb

+++ b/src/mainboard/asus/m2v-mx_se/Options.lb

@@ -92,6 +92,7 @@  uses CONFIG_HT_CHAIN_END_UNITID_BASE

 uses CONFIG_SB_HT_CHAIN_UNITID_OFFSET_ONLY
 # bx_b005+
 uses CONFIG_SB_HT_CHAIN_ON_BUS0
+uses CONFIG_PRECOMPRESSED_PAYLOAD

 uses CONFIG_COMPRESSED_PAYLOAD_NRV2B
 uses CONFIG_COMPRESSED_PAYLOAD_LZMA
 uses CONFIG_USE_PRINTK_IN_CAR
--- /dev/null

+++ b/targets/asus/m2v-mx_se/Config-lab.lb

@@ -0,0 +1,24 @@ 

+# Sample config file for 

+# the Asus M2V-MX-SE

+# This will make a target directory of ./m2v-mx_se

+

+target m2v-mx_se

+mainboard asus/m2v-mx_se

+

+option CONFIG_COMPRESSED_PAYLOAD_LZMA=1

+option CONFIG_PRECOMPRESSED_PAYLOAD=1

+

+# I have a 4MB SPI flash

+option CONFIG_ROM_SIZE= 4096 * 1024

+

+# reserved for coreboot 

+option CONFIG_ROM_IMAGE_SIZE = 128 * 1024

+	

+option CONFIG_XIP_ROM_SIZE = 65536

+

+romimage "image" 

+	option COREBOOT_EXTRA_VERSION="$(shell cat ../../VERSION)_Fallback"

+	payload ../payload.elf.lzma

+end

+

+buildrom ./coreboot.rom CONFIG_ROM_SIZE "image"