LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 12-09-2012, 02:33 PM   #1
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,612

Rep: Reputation: 584Reputation: 584Reputation: 584Reputation: 584Reputation: 584Reputation: 584
Slackware standard configure script options?


It seems I need to recompile binutils for some stoopid option in objcopy. It's being compiled on Slackware64-14.0, for slackware64-14.0. I'd need to get efi object compatibility on objcopy. So from the top source, does this look OK?

mkdir ../binutils-build
cd ../binutils-build
../binutils-2.23.1/configure --prefix=/usr --libdir=/usr/lib64 --sysconfdir=/etc --host=x86_64 --build=x86_64 --enable-shared --??

what I can find on efi stuff is this

Quote:
--subsystem which:major.minor
Specifies the subsystem under which your program will execute. The
legal values for which are "native", "windows", "console", "posix",
"efi-app", "efi-bsd", "efi-rtd", "sal-rtd", and "xbox". You may
optionally set the subsystem version also. Numeric values are also
accepted for which. [This option is specific to PE targets.]
and this :-o.

Quote:
Using GNU toolchain for compiling and debugging EFI applications

GNU development toolchain consist of binutils package (assembler, linker, various utilities for manipulating executable images), GCC compiler, GNU make and GDB debugger. Advantages are obvious - build system is very flexible, the tools have very rich functionality, they are free and open source, your EFI application code can be easily integrated to any project. Most of open source software prefers this way.

The first step is to compile your tools with required options. Firstly you need to compile binutils package. Obtain the latest from http://ftp.gnu.org/gnu/binutils/. You will need to enable "i386-efi-pe" target to have support for EFI PE+ executable format. If you use the same toolchain for compiling something else in your project (e.g. OS kernel) you can also specify required target (e.g. x86_64-myOS-freebsd) Note that it is BFD target, not the target platform. If you want to develop for 64-bits platform add "--enable-64-bit-bfd" options to "configure" script.

../src/configure --prefix=$PREFIX --target=$TARGET --disable-nls --build=$BUILD --enable-64-bit-bfd \
--enable-targets=i386-efi-pe,x86_64-phoenix-freebsd
These targets don't show in ./configure --help, and there's talk 5 years back of this stuff, so I presume they exist. So I tried all those options to see what it would throw out. It threw out build, host & target but pointed out (wrongly) that most of the tools had been just compiled :-/.

Can anyone point me?
 
Old 12-10-2012, 01:04 AM   #2
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,775

Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
First, you'll want to use the same options used when compiling the standard package (plus your options), so refer to the official SlackBuild for those. Then, find out about the efi options available with `./configure --help` or by searching the configure.ac or configure.in file for 'efi'. Then edit the SlackBuild to add the options you need and use it to create the package.
 
Old 12-10-2012, 01:33 AM   #3
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 755

Rep: Reputation: 227Reputation: 227Reputation: 227
Checking the Slackbuild in Slackware it seems to already be setup.
 
Old 12-10-2012, 12:39 PM   #4
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,612

Original Poster
Rep: Reputation: 584Reputation: 584Reputation: 584Reputation: 584Reputation: 584Reputation: 584
Quote:
Originally Posted by wildwizard View Post
Checking the Slackbuild in Slackware it seems to already be setup.

One bit of it is. When I built it straight with my own options and none of the other stuff, last night, I had no problems and it swallowed everything. Building from the slackbuild, it's complaining about the --enable-targets line and keeps barfing because of the silly things. At least I have the original options, which is good. I'll postpone this until I'm sure objcopy barfs.

On another note, I needed to rebuild the kernel to add in the 'relocatable' option. This whole UEFI thing is a @#@%! nightmare, because everyone does it differently. It can be disabled, and you can use a 'legacy OS' But how to set up a bootloader for the legacy os is the best kept secret out there.

Last edited by business_kid; 12-10-2012 at 12:41 PM.
 
Old 12-11-2012, 09:22 AM   #5
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,612

Original Poster
Rep: Reputation: 584Reputation: 584Reputation: 584Reputation: 584Reputation: 584Reputation: 584
From gnu-efi-3.0/README.gnuefi:

Quote:
** Prerequisites:

To develop x86 and x86_64 EFI applications, the following tools are needed:
. . . . .
- A version of "objcopy" that supports EFI applications. To
check if your version includes EFI support, issue the
command:

objcopy --help

and verify that the line "supported targets" contains the
string "efi-app-ia32" and "efi-app-x86_64". The binutils release
binutils-2.17.50.0.14 supports Intel64 EFI.

- For debugging purposes, it's useful to have a version of
"objdump" that supports EFI applications as well. This
allows inspect and disassemble EFI binaries.
Slackware's does not. And we need a relocatable kernel.
 
Old 12-15-2012, 06:31 AM   #6
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 755

Rep: Reputation: 227Reputation: 227Reputation: 227
That readme is very, very out of date

The correct symbols are pei-*

See binutils-${VER}/bfd/Changelog-2009
 
Old 12-15-2012, 08:54 AM   #7
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,612

Original Poster
Rep: Reputation: 584Reputation: 584Reputation: 584Reputation: 584Reputation: 584Reputation: 584
So they updated everything except the README :-/.

Thx Wildwizard. I tried Slackware's
objcopy --help, and it said not.

I tried it on the job, and it worked.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Best way to invoke gcc with many standard warning flags/options? keithostertag Programming 4 02-02-2012 05:21 PM
Standard for commandline options brianmcgee Programming 3 02-23-2011 05:04 PM
src2pkg and non-standard configure BCarey Slackware 4 09-19-2007 11:06 PM
standard configure and Mandrake 10.1 CE FireHawk321 Linux - Software 3 11-24-2004 05:18 PM
How do I configure my standard Session-type erik_wout_ew2 Linux - Software 4 12-09-2003 12:02 PM


All times are GMT -5. The time now is 06:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration