[coreboot-gerrit] Patch set updated for filo: Move i386/linux_head.c to x86/linux_head.c

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Sat Apr 16 00:29:44 CEST 2016


Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14372

-gerrit

commit 6e9b1208f53185b2cf9dee6763bee0a56869bf0f
Author: Stefan Reinauer <stefan.reinauer at coreboot.org>
Date:   Thu Apr 14 16:56:41 2016 -0700

    Move i386/linux_head.c to x86/linux_head.c
    
    Looks like this was created before and merged after the
    rename i386 -> x86.
    
    Change-Id: Ia0ffb505c3fb62151ccfe81603e1c60089c3e109
    Signed-off-by: Stefan Reinauer <stefan.reinauer at coreboot.org>
---
 Makefile          |  4 +--
 i386/linux_head.c | 89 -------------------------------------------------------
 x86/linux_head.c  | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 91 insertions(+), 91 deletions(-)

diff --git a/Makefile b/Makefile
index de1df17..39e477b 100644
--- a/Makefile
+++ b/Makefile
@@ -146,8 +146,8 @@ $(obj)/filo: $(OBJS) $(LIBPAYLOAD)
 	printf "  LD      $(subst $(shell pwd)/,,$(@))\n"
 	CC=$(CC) $(LPGCC) $(OBJS) $(LIBS) -o $@
 
-$(obj)/filo.bzImage: $(TARGET) $(obj)/i386/linux_head.o
-	$(OBJCOPY) -O binary $(obj)/i386/linux_head.o $@.tmp1
+$(obj)/filo.bzImage: $(TARGET) $(obj)/x86/linux_head.o
+	$(OBJCOPY) -O binary $(obj)/x86/linux_head.o $@.tmp1
 	$(OBJCOPY) -O binary $< $@.tmp2
 	cat $@.tmp1 $@.tmp2 > $@.tmp
 	mv $@.tmp $@
diff --git a/i386/linux_head.c b/i386/linux_head.c
deleted file mode 100644
index f089502..0000000
--- a/i386/linux_head.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * This file is part of FILO.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
- */
-
-/*
- * Linux/i386 loader
- * Supports bzImage, zImage and Image format.
- *
- * Based on work by Steve Gehlbach.
- * Portions are taken from mkelfImage.
- *
- * 2003-09 by SONE Takeshi
- */
-
-#include <libpayload.h>
-#include <libpayload-config.h>
-
-/* The header of Linux/i386 kernel */
-struct linux_header {
-	u8 reserved1[0x1f1];	/* 0x000 */
-	u8 setup_sects;		/* 0x1f1 */
-	u16 root_flags;		/* 0x1f2 */
-	u32 syssize;		/* 0x1f4 (2.04+) */
-	u8 reserved2[2];	/* 0x1f8 */
-	u16 vid_mode;		/* 0x1fa */
-	u16 root_dev;		/* 0x1fc */
-	u16 boot_sector_magic;	/* 0x1fe */
-	/* 2.00+ */
-	u8 reserved3[2];	/* 0x200 */
-	u8 header_magic[4];	/* 0x202 */
-	u16 protocol_version;	/* 0x206 */
-	u32 realmode_swtch;	/* 0x208 */
-	u16 start_sys;		/* 0x20c */
-	u16 kver_addr;		/* 0x20e */
-	u8 type_of_loader;	/* 0x210 */
-	u8 loadflags;		/* 0x211 */
-	u16 setup_move_size;	/* 0x212 */
-	u32 code32_start;	/* 0x214 */
-	u32 ramdisk_image;	/* 0x218 */
-	u32 ramdisk_size;	/* 0x21c */
-	u8 reserved4[4];	/* 0x220 */
-	/* 2.01+ */
-	u16 heap_end_ptr;	/* 0x224 */
-	u8 reserved5[2];	/* 0x226 */
-	/* 2.02+ */
-	u32 cmd_line_ptr;	/* 0x228 */
-	/* 2.03+ */
-	u32 initrd_addr_max;	/* 0x22c */
-	/* 2.05+ */
-	u32 kernel_alignment;	/* 0x230 */
-	u8 relocatable_kernel;	/* 0x234 */
-	u8 min_alignment;	/* 0x235 (2.10+) */
-	u8 reserved6[2];	/* 0x236 */
-	/* 2.06+ */
-	u32 cmdline_size;	/* 0x238 */
-	/* 2.07+ */
-	u32 hardware_subarch;	/* 0x23c */
-	u64 hardware_subarch_data;/* 0x240 */
-	/* 2.08+ */
-	u32 payload_offset;	/* 0x248 */
-	u32 payload_length;	/* 0x24c */
-	/* 2.09+ */
-	u64 setup_data;		/* 0x250 */
-	/* 2.10+ */
-	u64 pref_address;	/* 0x258 */
-	u32 init_size;		/* 0x260 */
-	u8 filler[0x1000-0x264];
-} __attribute__ ((packed));
-
-struct linux_header data = {
-	.setup_sects = 7,
-	.boot_sector_magic = 0xaa55,
-	.header_magic = { 'H', 'd', 'r', 'S' },
-	.protocol_version = 0x200,
-	.loadflags = 1,
-};
diff --git a/x86/linux_head.c b/x86/linux_head.c
new file mode 100644
index 0000000..f089502
--- /dev/null
+++ b/x86/linux_head.c
@@ -0,0 +1,89 @@
+/*
+ * This file is part of FILO.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ */
+
+/*
+ * Linux/i386 loader
+ * Supports bzImage, zImage and Image format.
+ *
+ * Based on work by Steve Gehlbach.
+ * Portions are taken from mkelfImage.
+ *
+ * 2003-09 by SONE Takeshi
+ */
+
+#include <libpayload.h>
+#include <libpayload-config.h>
+
+/* The header of Linux/i386 kernel */
+struct linux_header {
+	u8 reserved1[0x1f1];	/* 0x000 */
+	u8 setup_sects;		/* 0x1f1 */
+	u16 root_flags;		/* 0x1f2 */
+	u32 syssize;		/* 0x1f4 (2.04+) */
+	u8 reserved2[2];	/* 0x1f8 */
+	u16 vid_mode;		/* 0x1fa */
+	u16 root_dev;		/* 0x1fc */
+	u16 boot_sector_magic;	/* 0x1fe */
+	/* 2.00+ */
+	u8 reserved3[2];	/* 0x200 */
+	u8 header_magic[4];	/* 0x202 */
+	u16 protocol_version;	/* 0x206 */
+	u32 realmode_swtch;	/* 0x208 */
+	u16 start_sys;		/* 0x20c */
+	u16 kver_addr;		/* 0x20e */
+	u8 type_of_loader;	/* 0x210 */
+	u8 loadflags;		/* 0x211 */
+	u16 setup_move_size;	/* 0x212 */
+	u32 code32_start;	/* 0x214 */
+	u32 ramdisk_image;	/* 0x218 */
+	u32 ramdisk_size;	/* 0x21c */
+	u8 reserved4[4];	/* 0x220 */
+	/* 2.01+ */
+	u16 heap_end_ptr;	/* 0x224 */
+	u8 reserved5[2];	/* 0x226 */
+	/* 2.02+ */
+	u32 cmd_line_ptr;	/* 0x228 */
+	/* 2.03+ */
+	u32 initrd_addr_max;	/* 0x22c */
+	/* 2.05+ */
+	u32 kernel_alignment;	/* 0x230 */
+	u8 relocatable_kernel;	/* 0x234 */
+	u8 min_alignment;	/* 0x235 (2.10+) */
+	u8 reserved6[2];	/* 0x236 */
+	/* 2.06+ */
+	u32 cmdline_size;	/* 0x238 */
+	/* 2.07+ */
+	u32 hardware_subarch;	/* 0x23c */
+	u64 hardware_subarch_data;/* 0x240 */
+	/* 2.08+ */
+	u32 payload_offset;	/* 0x248 */
+	u32 payload_length;	/* 0x24c */
+	/* 2.09+ */
+	u64 setup_data;		/* 0x250 */
+	/* 2.10+ */
+	u64 pref_address;	/* 0x258 */
+	u32 init_size;		/* 0x260 */
+	u8 filler[0x1000-0x264];
+} __attribute__ ((packed));
+
+struct linux_header data = {
+	.setup_sects = 7,
+	.boot_sector_magic = 0xaa55,
+	.header_magic = { 'H', 'd', 'r', 'S' },
+	.protocol_version = 0x200,
+	.loadflags = 1,
+};



More information about the coreboot-gerrit mailing list