User:Jbilyk: Difference between revisions

From Alpine Linux
m (→‎ARM port progress: attempt #2 didn't work, so back to #1)
m (snippet)
 
(4 intermediate revisions by the same user not shown)
Line 32: Line 32:
<pre>
<pre>
unpack uclibc0.9.32 sources
unpack uclibc0.9.32 sources
sed -i -e "s/^ABI_VERSION.*/ABI_VERSION := 0.9.32/" -e "s/-Wold-style-declaration//g" Rules.mak
KERNEL_HEADERS=/usr/local/src/linux-3.0.4/include
KERNEL_HEADERS=/usr/local/src/linux-3.0.4/include
wget http://git.alpinelinux.org/cgit/aports/tree/main/libc0.9.32/uclibcconfig.arm -O /usr/local/src/uClibc-0.9.32/.config
CC=arm-linux-gcc
CC=arm-linux-gcc
PATH=${PATH}:/usr/local/armtoolchain/bin
PATH=${PATH}:/usr/local/armtoolchain/bin
cd ~
git clone git://git.alpinelinux.org/aports
cp -a ~/aports/main/lib0.9.32/*.patch /usr/local/src/uClibc-0.9.32/
cd /usr/local/src/uClibc-0.9.32
for i in `ls *.patch`; do patch -p1 -i $i; done
sed -i -e "s/^ABI_VERSION.*/ABI_VERSION := 0.9.32/" -e "s/-Wold-style-declaration//g" Rules.mak
wget http://git.alpinelinux.org/cgit/aports/tree/main/libc0.9.32/uclibcconfig.arm -O /usr/local/src/uClibc-0.9.32/.config
make silentoldconfig
make silentoldconfig
apply patches from http://git.alpinelinux.org/cgit/aports/tree/main/libc0.9.32 to uclibc0.9.32 source directory
make all CROSS=arm-linux-
make all CROSS=arm-linux-
</pre>
</pre>
That last make command didn't go over so well...
That last make command didn't go over so well:
 
<pre>
buildarm-edge:/usr/local/src/uClibc-0.9.32$ make all CROSS=arm-linux-
  CC ldso/ldso/ldso.oS
In file included from ./ldso/include/dl-string.h:11:0,
                from ./ldso/include/ldso.h:42,
                from ldso/ldso/ldso.c:33:
./ldso/ldso/arm/dl-sysdep.h: In function 'elf_machine_load_address':
./ldso/ldso/arm/dl-sysdep.h:119:37: warning: taking address of expression of type 'void' [enabled by default]
In file included from ldso/ldso/ldso.c:42:0:
ldso/ldso/dl-tls.c: In function 'init_tls':
ldso/ldso/dl-tls.c:1028:1: error: '__ARM_NR_set_tls' undeclared (first use in this function)
ldso/ldso/dl-tls.c:1028:1: note: each undeclared identifier is reported only once for each function it appears in
In file included from ldso/ldso/ldso.c:46:0:
ldso/ldso/arm/elfinterp.c: In function '_dl_linux_resolver':
ldso/ldso/arm/elfinterp.c:72:11: warning: assignment makes integer from pointer without a cast [enabled by default]
ldso/ldso/arm/elfinterp.c: In function '_dl_do_reloc':
ldso/ldso/arm/elfinterp.c:205:15: warning: assignment makes integer from pointer without a cast [enabled by default]
ldso/ldso/arm/elfinterp.c:191:19: warning: unused variable 'def' [-Wunused-variable]
ldso/ldso/ldso.c: In function '_dl_get_ready_to_run':
ldso/ldso/ldso.c:1011:1: error: '__ARM_NR_set_tls' undeclared (first use in this function)
make: *** [ldso/ldso/ldso.oS] Error 1
 
</pre>
 
<pre>
buildarm-edge:/usr/local/src/uClibc-0.9.32$ diff ./.config /home/jbilyk/aports/main/libc0.9.32/uclibcconfig.arm
--- ./.config
+++ /home/jbilyk/aports/main/libc0.9.32/uclibcconfig.arm
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Version: 0.9.32
-# Thu Sep 22 02:11:57 2011
+# Version: 0.9.32-rc3
+# Fri Mar 18 13:13:20 2011
#
# TARGET_alpha is not set
TARGET_arm=y
@@ -71,7 +71,7 @@
DO_C99_MATH=y
DO_XSI_MATH=y
UCLIBC_HAS_FENV=y
-KERNEL_HEADERS="/usr/local/src/linux-3.0.4/include"
+KERNEL_HEADERS="/usr/include"
HAVE_DOT_CONFIG=y
 
#
@@ -231,7 +231,7 @@
RUNTIME_PREFIX="/"
DEVEL_PREFIX="/usr"
MULTILIB_DIR="lib"
-# HARDWIRED_ABSPATH is not set
+# HARDWIRED_ABSPATH is not set=y
 
#
# Security options
@@ -252,7 +252,7 @@
#
# uClibc development/debugging options
#
-CROSS_COMPILER_PREFIX="/usr/local/src/armtoolchain"
+CROSS_COMPILER_PREFIX=""
UCLIBC_EXTRA_CFLAGS=""
# DODEBUG is not set
DOSTRIP=y
</pre>
 
Possible: http://www.mail-archive.com/uclibc@uclibc.org/msg00677.html
 
TODO (once the build is working):
* Rebuild gcc w/ all languages (not just C)
* Start build aports

Latest revision as of 21:08, 21 September 2011

ARM port progress

Process so far:

Binutils:

binutils-2.21.1a.tar.bz2 with the following patch:
http://git.yoctoproject.org/cgit.cgi/poky/plain/meta/recipes-devtools/binutils/binutils/clone-shadow.patch
apk add alpine-sdk zlib-dev
./configure --target=arm-linux --prefix=/usr/local/armtoolchain
make
make install

stage1:

unpack 3.0.4 kernel sources
modify makefile: SUBARCH = arm
apk add ncurses-dev
make menuconfig  (ARM Ltd. Versatile family)
apk add gmp-dev mpfr-dev libmpc-dev
download & unpack gcc-4.6.1 sources
./configure --target=arm-linux --prefix=/usr/local/armtoolchain --with-headers=/usr/local/src/linux-3.0.4/include --enable-languages=c --disable-threads --disable-shared
make all-gcc
make install-gcc

stage2:

unpack uclibc0.9.32 sources
KERNEL_HEADERS=/usr/local/src/linux-3.0.4/include
CC=arm-linux-gcc
PATH=${PATH}:/usr/local/armtoolchain/bin
cd ~
git clone git://git.alpinelinux.org/aports
cp -a ~/aports/main/lib0.9.32/*.patch /usr/local/src/uClibc-0.9.32/
cd /usr/local/src/uClibc-0.9.32
for i in `ls *.patch`; do patch -p1 -i $i; done
sed -i -e "s/^ABI_VERSION.*/ABI_VERSION := 0.9.32/" -e "s/-Wold-style-declaration//g" Rules.mak
wget http://git.alpinelinux.org/cgit/aports/tree/main/libc0.9.32/uclibcconfig.arm -O /usr/local/src/uClibc-0.9.32/.config
make silentoldconfig
make all CROSS=arm-linux-

That last make command didn't go over so well:

buildarm-edge:/usr/local/src/uClibc-0.9.32$ make all CROSS=arm-linux-
  CC ldso/ldso/ldso.oS
In file included from ./ldso/include/dl-string.h:11:0,
                 from ./ldso/include/ldso.h:42,
                 from ldso/ldso/ldso.c:33:
./ldso/ldso/arm/dl-sysdep.h: In function 'elf_machine_load_address':
./ldso/ldso/arm/dl-sysdep.h:119:37: warning: taking address of expression of type 'void' [enabled by default]
In file included from ldso/ldso/ldso.c:42:0:
ldso/ldso/dl-tls.c: In function 'init_tls':
ldso/ldso/dl-tls.c:1028:1: error: '__ARM_NR_set_tls' undeclared (first use in this function)
ldso/ldso/dl-tls.c:1028:1: note: each undeclared identifier is reported only once for each function it appears in
In file included from ldso/ldso/ldso.c:46:0:
ldso/ldso/arm/elfinterp.c: In function '_dl_linux_resolver':
ldso/ldso/arm/elfinterp.c:72:11: warning: assignment makes integer from pointer without a cast [enabled by default]
ldso/ldso/arm/elfinterp.c: In function '_dl_do_reloc':
ldso/ldso/arm/elfinterp.c:205:15: warning: assignment makes integer from pointer without a cast [enabled by default]
ldso/ldso/arm/elfinterp.c:191:19: warning: unused variable 'def' [-Wunused-variable]
ldso/ldso/ldso.c: In function '_dl_get_ready_to_run':
ldso/ldso/ldso.c:1011:1: error: '__ARM_NR_set_tls' undeclared (first use in this function)
make: *** [ldso/ldso/ldso.oS] Error 1

buildarm-edge:/usr/local/src/uClibc-0.9.32$ diff ./.config /home/jbilyk/aports/main/libc0.9.32/uclibcconfig.arm
--- ./.config
+++ /home/jbilyk/aports/main/libc0.9.32/uclibcconfig.arm
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Version: 0.9.32
-# Thu Sep 22 02:11:57 2011
+# Version: 0.9.32-rc3
+# Fri Mar 18 13:13:20 2011
 #
 # TARGET_alpha is not set
 TARGET_arm=y
@@ -71,7 +71,7 @@
 DO_C99_MATH=y
 DO_XSI_MATH=y
 UCLIBC_HAS_FENV=y
-KERNEL_HEADERS="/usr/local/src/linux-3.0.4/include"
+KERNEL_HEADERS="/usr/include"
 HAVE_DOT_CONFIG=y

 #
@@ -231,7 +231,7 @@
 RUNTIME_PREFIX="/"
 DEVEL_PREFIX="/usr"
 MULTILIB_DIR="lib"
-# HARDWIRED_ABSPATH is not set
+# HARDWIRED_ABSPATH is not set=y

 #
 # Security options
@@ -252,7 +252,7 @@
 #
 # uClibc development/debugging options
 #
-CROSS_COMPILER_PREFIX="/usr/local/src/armtoolchain"
+CROSS_COMPILER_PREFIX=""
 UCLIBC_EXTRA_CFLAGS=""
 # DODEBUG is not set
 DOSTRIP=y

Possible: http://www.mail-archive.com/uclibc@uclibc.org/msg00677.html

TODO (once the build is working):

  • Rebuild gcc w/ all languages (not just C)
  • Start build aports