From df756884a3d9a6c033c961dbad7d13fca691dedb Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Fri, 8 Nov 2013 19:30:38 +0100 Subject: [PATCH 1/4] scripts/setupmbr: fix documentation The documentation says setupmbr should be used with the image named 'barebox', but it should instead be done with the 'barebox.bin' image. Attempting to use setupmbr on the ELF barebox image simply fails: $ ./scripts/setupmbr/setupmbr -s 32 -m ./barebox -d disk.img No MBR signature found barebox image seems not valid: Bad MBR signature Signed-off-by: Thomas Petazzoni Signed-off-by: Sascha Hauer --- scripts/setupmbr/setupmbr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/setupmbr/setupmbr.c b/scripts/setupmbr/setupmbr.c index 918fbe38b..0060c2e93 100644 --- a/scripts/setupmbr/setupmbr.c +++ b/scripts/setupmbr/setupmbr.c @@ -666,10 +666,10 @@ and populating the root filesystem for example) to make it useful. In the next step, @a barebox gets installed to this boot media: @verbatim -[jb@host]~> scripts/setupmbr/setupmbr -s 32 -m ./barebox -d /dev/sda +[jb@host]~> scripts/setupmbr/setupmbr -s 32 -m ./barebox.bin -d /dev/sda @endverbatim -This command writes the @a barebox image file './barebox' onto the device +This command writes the @a barebox image file './barebox.bin' onto the device @p /dev/sda. The @p -s option will keep the persistant storage sectors free and untouched From 54911a588784f5cc1bfc06e6e62cb543228a7393 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Fri, 8 Nov 2013 19:30:39 +0100 Subject: [PATCH 2/4] arch/x86: fix link with recent gcc Due to unwind tables being generated by recent versions of gcc by default, the x86 Barebox link fails with: ld: section .eh_frame loaded at [00000000000197c4,000000000001f31f] overlaps section .barebox_initcalls loaded at [00000000000197c4,0000000000019833] Passing -fno-unwind-tables -fno-asynchronous-unwind-tables avoids this problem. Signed-off-by: Thomas Petazzoni Signed-off-by: Sascha Hauer --- arch/x86/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 518b37fe2..a78fa22ac 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -5,7 +5,8 @@ machine-y := i386 TEXT_BASE = $(CONFIG_TEXT_BASE) -CPPFLAGS += -march=i386 -m32 -DTEXT_BASE=$(TEXT_BASE) +CPPFLAGS += -march=i386 -m32 -DTEXT_BASE=$(TEXT_BASE) \ + -fno-unwind-tables -fno-asynchronous-unwind-tables LDFLAGS += -m elf_i386 ifndef CONFIG_MODULES From 2bd891b0ae266bd7cac58805092fc3f4ae67e55e Mon Sep 17 00:00:00 2001 From: Alexander Shiyan Date: Sat, 9 Nov 2013 00:02:35 +0400 Subject: [PATCH 3/4] scripts: Add fix_size & kernel-install to .gitignore Signed-off-by: Alexander Shiyan Signed-off-by: Sascha Hauer --- scripts/.gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/.gitignore b/scripts/.gitignore index b88f8d866..24f6cd91d 100644 --- a/scripts/.gitignore +++ b/scripts/.gitignore @@ -1,7 +1,9 @@ bareboxenv bin2c +fix_size gen_netx_image kallsyms +kernel-install kwbimage kwboot mk-am35xx-spi-image From ddc2269a5d763bb0799b787bdcdd06bca4482abe Mon Sep 17 00:00:00 2001 From: Alexander Shiyan Date: Sat, 9 Nov 2013 00:02:36 +0400 Subject: [PATCH 4/4] Makefile: Align "DTB" string to others Signed-off-by: Alexander Shiyan Signed-off-by: Sascha Hauer --- scripts/Makefile.lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 3ff094f01..458b944ed 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -194,7 +194,7 @@ cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -n -f -9 > $@) || \ # --------------------------------------------------------------------------- # Generate an assembly file to wrap the output of the device tree compiler -quiet_cmd_dt_S_dtb= DTB $@ +quiet_cmd_dt_S_dtb = DTB $@ cmd_dt_S_dtb= \ ( \ echo '\#include '; \