diff options
author | Jeremy Compostella <jeremyx.compostella@intel.com> | 2011-10-24 16:45:08 +0200 |
---|---|---|
committer | Patrick Tjin <pattjin@google.com> | 2014-07-21 20:22:40 -0700 |
commit | 1a86f0aeb6fc921c58dfdf97bc7fa23c58ff65f3 (patch) | |
tree | 9bccd16108d420f4385f944d0aa8bb0bd0b81871 | |
parent | 4c56e4505d7b0f66515667edd56ba49c84b63172 (diff) | |
download | bootstub-1a86f0aeb6fc921c58dfdf97bc7fa23c58ff65f3.tar.gz |
Bootstub: Increase the command line size in bootstub
BZ: 12336
Bootstub is currently allocated only 256 bytes for kernel boot command-line
options. The Android kernel boot command line options is getting larger and
with the current size of 256 bytes in size, it's not enough.
This patch added to increase the allocation of the kernel boot command-line
options to 1024 bytes in bootstub. Also, bump up the bootstub version to v1.2
Change-Id: Id8804359899ee1facb621de2cb8fd3c6ef4e14ad
Signed-off-by: Jeremy Compostella <jeremyx.compostella@intel.com>
Signed-off-by: Leonard Mai <leonard.mai@intel.com>
Reviewed-on: http://android.intel.com:8080/22416
Reviewed-by: Du, Alek <alek.du@intel.com>
Reviewed-by: Romieu, Benoit <benoit.romieu@intel.com>
Tested-by: Seibel, Eric <eric.seibel@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
-rw-r--r-- | Android.mk | 9 | ||||
-rw-r--r-- | Makefile | 12 | ||||
-rw-r--r-- | VERSION | 1 | ||||
-rw-r--r-- | bootstub.c | 4 | ||||
-rw-r--r-- | bootstub.h | 8 |
5 files changed, 23 insertions, 11 deletions
diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..8ea7489 --- /dev/null +++ b/Android.mk @@ -0,0 +1,9 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +bootstub: $(PRODUCT_OUT)/boot/bootstub + +$(PRODUCT_OUT)/boot/bootstub: + cd device/intel/bootstub/ && CC=$(ANDROID_BUILD_TOP)/$($(my_prefix)CC) CMDLINE_SIZE=$(BOARD_KERNEL_CMDLINE_SIZE) make + mkdir -p $(PRODUCT_OUT)/boot + mv device/intel/bootstub/bootstub $(PRODUCT_OUT)/boot @@ -1,5 +1,7 @@ OBJ=bootstub.o spi-uart.o head.o sfi.o -CFLAGS=-m32 -ffreestanding -Wall +CMDLINE_SIZE ?= 0x400 +CFLAGS=-m32 -ffreestanding -Wall -DCMDLINE_SIZE=${CMDLINE_SIZE} +CC ?= gcc all: bootstub @@ -13,16 +15,16 @@ bootstub.elf:bootstub.lds $(OBJ) ld -m elf_i386 -T bootstub.lds $(OBJ) -o $@ bootstub.o:bootstub.c bootstub.h - gcc $(CFLAGS) -c bootstub.c + ${CC} $(CFLAGS) -c bootstub.c spi-uart.o:spi-uart.c spi-uart.h - gcc $(CFLAGS) -c spi-uart.c + ${CC} $(CFLAGS) -c spi-uart.c sfi.o:sfi.c - gcc $(CFLAGS) -c sfi.c + ${CC} $(CFLAGS) -c sfi.c head.o:head.S bootstub.h - gcc $(CFLAGS) -c head.S + ${CC} $(CFLAGS) -c head.S clean: rm -rf *.o *.bin *.elf *.bz2 *.rpm @@ -1,3 +1,4 @@ +1.2 add support to "large" kernel command line. Oct 20, 2011 1.1 add cloverview support. Oct 6, 2011 1.0 fix alignment issue in SFI mmap searching. Oct 13, 2010 0.9 support medfield. Jun 9, 2010 @@ -109,7 +109,7 @@ static void setup_boot_params(struct boot_params *bp, struct setup_header *sh) bp->alt_mem_k = 128*1024; // hard coded 128M mem here, since SFI will override it memcpy(&bp->hdr, sh, sizeof (struct setup_header)); bp->hdr.cmd_line_ptr = CMDLINE_OFFSET; - bp->hdr.cmdline_size = strnlen((const char *)CMDLINE_OFFSET,256); + bp->hdr.cmdline_size = strnlen((const char *)CMDLINE_OFFSET, CMDLINE_SIZE); bp->hdr.type_of_loader = 0xff; //bootstub is unknown bootloader for kernel :) bp->hdr.ramdisk_size = *(u32 *)INITRD_SIZE_OFFSET; bp->hdr.ramdisk_image = (bp->alt_mem_k*1024 - bp->hdr.ramdisk_size) & 0xFFFFF000; @@ -187,7 +187,7 @@ int bootstub(void) setup_idt(); setup_gdt(); setup_spi(); - bs_printk("Bootstub Version: 1.1 ...\n"); + bs_printk("Bootstub Version: 1.2 ...\n"); setup_boot_params((struct boot_params *)BOOT_PARAMS_OFFSET, (struct setup_header *)SETUP_HEADER_OFFSET); bs_printk("Jump to kernel 32bit entry ...\n"); @@ -11,10 +11,10 @@ #define MRST_CPU_CHIP_CLOVERVIEW 3 #define CMDLINE_OFFSET 0x1100000 -#define BZIMAGE_SIZE_OFFSET 0x1100100 -#define INITRD_SIZE_OFFSET 0x1100104 -#define SPI_UART_SUPPRESSION 0x1100108 -#define SPI_TYPE 0x110010c /*0:SPI0 1:SPI1*/ +#define BZIMAGE_SIZE_OFFSET (CMDLINE_OFFSET + CMDLINE_SIZE) +#define INITRD_SIZE_OFFSET (BZIMAGE_SIZE_OFFSET + 4) +#define SPI_UART_SUPPRESSION (INITRD_SIZE_OFFSET + 4) +#define SPI_TYPE (SPI_UART_SUPPRESSION + 4) /*0:SPI0 1:SPI1*/ #define STACK_OFFSET 0x1101000 #define BZIMAGE_OFFSET 0x1102000 |