FS#15976 - [kernel26] Set correct ARCH during make (prepare|config|bzImage|modules) steps

Attached to Project: Arch Linux
Opened by Evangelos Foutras (foutrelis) - Tuesday, 18 August 2009, 13:13 GMT
Last edited by Aaron Griffin (phrakture) - Tuesday, 18 August 2009, 17:26 GMT
Task Type Feature Request
Category Kernel
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Yesterday I wanted to build a i686 kernel inside a clean i686 chroot on a x86_64 host. However, it kept changing my slightly modified .config to 64 bit (i.e.: x86_64). I had to edit the PKGBUILD and introduce ARCH=i386 to all make commands, in order to build it successfully. The resulting kernel package worked flawlessly on the netbook it was installed later.

See the attached patch for a proposed fix. Of course, if there is a better way to address this issue, I'd like to hear it. :)

Additional info:
* package version(s): kernel26 2.6.30.5-1

Steps to reproduce:

Try building a i686 kernel inside a clean i686 chroot on a x86_64 host.
This task depends upon

Closed by  Aaron Griffin (phrakture)
Tuesday, 18 August 2009, 17:26 GMT
Reason for closing:  Not a bug
Additional comments about closing:  Use linux32
Comment by Evangelos Foutras (foutrelis) - Tuesday, 18 August 2009, 13:14 GMT
(Forgot to include the patch in the original message.)
Comment by xduugu (xduugu) - Tuesday, 18 August 2009, 13:36 GMT
Did you use "linux32 makepkg"?
Comment by Evangelos Foutras (foutrelis) - Tuesday, 18 August 2009, 13:40 GMT
I used `sudo makechrootpkg -c -r /opt/arch/stable-i686', where "/opt/arch/stable-i686" is the location of a i686 chroot created following this guide: http://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_Clean_Chroot

I've built several i686 packages using the above technique, but it appears that the kernel looks at the current running kernel and decides the ARCH based on that, if it's not explicitly defined.
Comment by Jan de Groot (JGC) - Tuesday, 18 August 2009, 15:02 GMT
You should wrap i686 chroots using linux32 anyways, as there's more than just kernel26 that freaks out when building inside chroots without linux32.
Comment by Evangelos Foutras (foutrelis) - Tuesday, 18 August 2009, 16:01 GMT
You guys are right. Prepending the `sudo makechrootpkg' command with `linux32' produces the desired behavior.

Many thanks. :)

Loading...