User:Jbilyk: Difference between revisions

From Alpine Linux
(→‎ARM port progress: updated with progress so far on new box)
Line 14: Line 14:
</pre>
</pre>


Gcc stage1:
stage1:


<pre>
<pre>
Line 23: Line 23:
apk add gmp-dev mpfr-dev libmpc-dev
apk add gmp-dev mpfr-dev libmpc-dev
download & unpack gcc-4.6.1 sources
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
./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
make all-gcc
make install-gcc
</pre>
 
stage2:
 
<pre>
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
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
PATH=${PATH}:/usr/local/armtoolchain/bin
make silentoldconfig
make -j1 pregen KERNEL_HEADERS="/usr/local/src/linux-3.0.4/include"
</pre>
That last make command didn't go over so well...
 
Attempt #2 is to use buildroot (even though I think for some reason that it doesn't/won't work on Alpine...) with the following config:
 
<pre>
 
BR2_HAVE_DOT_CONFIG=y
BR2_arm=y
BR2_generic_arm=y
 
BR2_ARM_TYPE="GENERIC_ARM"
BR2_ARM_EABI=y
BR2_ARCH="arm"
BR2_ENDIAN="LITTLE"
BR2_GCC_TARGET_ABI="aapcs-linux"
 
BR2_WGET="wget --passive-ftp -nd -t 3"
BR2_SVN="svn"
BR2_BZR="bzr"
BR2_GIT="git"
BR2_ZCAT="gzip -d -c"
BR2_BZCAT="bzcat"
BR2_XZCAT="xzcat"
BR2_TAR_OPTIONS=""
BR2_DL_DIR="$(TOPDIR)/dl"
BR2_HOST_DIR="$(BASE_DIR)/host"
 
BR2_PRIMARY_SITE=""
BR2_BACKUP_SITE="http://sources.buildroot.net/"
BR2_SOURCEFORGE_MIRROR="kent"
BR2_KERNEL_MIRROR="http://mirror.csclub.uwaterloo.ca/kernel.org/"
BR2_GNU_MIRROR="http://ftp.gnu.org/pub/gnu"
BR2_DEBIAN_MIRROR="http://ftp.debian.org"
BR2_JLEVEL=4
BR2_STRIP_none=y
BR2_OPTIMIZE_S=y
 
BR2_TOOLCHAIN_BUILDROOT=y
 
BR2_KERNEL_HEADERS_3_0=y
BR2_DEFAULT_KERNEL_HEADERS="3.0.4"
 
BR2_UCLIBC_VERSION_0_9_32=y
BR2_UCLIBC_VERSION_STRING="0.9.32"
BR2_UCLIBC_CONFIG="toolchain/uClibc/uClibc-0.9.32.config"
 
BR2_BINUTILS_VERSION_2_21_1=y
BR2_BINUTILS_VERSION="2.21.1"
BR2_BINUTILS_EXTRA_CONFIG_OPTIONS=""
 
BR2_GCC_VERSION_4_6_X=y
BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE=y
BR2_GCC_VERSION="4.6.1"
BR2_EXTRA_GCC_CONFIG_OPTIONS=""
BR2_GCC_SHARED_LIBGCC=y
BR2_GCC_ENABLE_TLS=y
 
BR2_INSTALL_LIBSTDCPP=y
BR2_TOOLCHAIN_HAS_THREADS=y
BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS=y
BR2_NEEDS_GETTEXT=y
BR2_USE_MMU=y
BR2_PREFER_SOFT_FLOAT=y
BR2_SOFT_FLOAT=y
BR2_TARGET_OPTIMIZATION="-pipe"
BR2_TARGET_LDFLAGS=""
 
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PTHREADS_NATIVE=y
BR2_ELF2FLT=y
 
BR2_TARGET_GENERIC_HOSTNAME="buildroot"
BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot"
BR2_ROOTFS_DEVICE_CREATION_STATIC=y
BR2_ROOTFS_DEVICE_TABLE="target/generic/device_table.txt"
BR2_ROOTFS_STATIC_DEVICE_TABLE="target/generic/device_table_dev.txt"
BR2_ROOTFS_SKELETON_DEFAULT=y
BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y
BR2_TARGET_GENERIC_GETTY_BAUDRATE="115200"
BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW=y
BR2_ROOTFS_POST_BUILD_SCRIPT=""
 
BR2_PACKAGE_BUSYBOX=y
BR2_BUSYBOX_VERSION_1_18_X=y
BR2_BUSYBOX_VERSION="1.18.5"
BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-1.18.x.config"
BR2_PACKAGE_CUSTOMIZE=y
 
BR2_TARGET_ROOTFS_SQUASHFS=y
BR2_TARGET_ROOTFS_SQUASHFS4=y
BR2_TARGET_ROOTFS_SQUASHFS4_GZIP=y
BR2_TARGET_ROOTFS_TAR=y
BR2_TARGET_ROOTFS_TAR_NONE=y
BR2_TARGET_ROOTFS_TAR_OPTIONS=""
</pre>
</pre>

Revision as of 19:59, 17 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
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
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
PATH=${PATH}:/usr/local/armtoolchain/bin
make silentoldconfig
make -j1 pregen KERNEL_HEADERS="/usr/local/src/linux-3.0.4/include"

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

Attempt #2 is to use buildroot (even though I think for some reason that it doesn't/won't work on Alpine...) with the following config:


BR2_HAVE_DOT_CONFIG=y
BR2_arm=y
BR2_generic_arm=y

BR2_ARM_TYPE="GENERIC_ARM"
BR2_ARM_EABI=y
BR2_ARCH="arm"
BR2_ENDIAN="LITTLE"
BR2_GCC_TARGET_ABI="aapcs-linux"

BR2_WGET="wget --passive-ftp -nd -t 3"
BR2_SVN="svn"
BR2_BZR="bzr"
BR2_GIT="git"
BR2_ZCAT="gzip -d -c"
BR2_BZCAT="bzcat"
BR2_XZCAT="xzcat"
BR2_TAR_OPTIONS=""
BR2_DL_DIR="$(TOPDIR)/dl"
BR2_HOST_DIR="$(BASE_DIR)/host"

BR2_PRIMARY_SITE=""
BR2_BACKUP_SITE="http://sources.buildroot.net/"
BR2_SOURCEFORGE_MIRROR="kent"
BR2_KERNEL_MIRROR="http://mirror.csclub.uwaterloo.ca/kernel.org/"
BR2_GNU_MIRROR="http://ftp.gnu.org/pub/gnu"
BR2_DEBIAN_MIRROR="http://ftp.debian.org"
BR2_JLEVEL=4
BR2_STRIP_none=y
BR2_OPTIMIZE_S=y

BR2_TOOLCHAIN_BUILDROOT=y

BR2_KERNEL_HEADERS_3_0=y
BR2_DEFAULT_KERNEL_HEADERS="3.0.4"

BR2_UCLIBC_VERSION_0_9_32=y
BR2_UCLIBC_VERSION_STRING="0.9.32"
BR2_UCLIBC_CONFIG="toolchain/uClibc/uClibc-0.9.32.config"

BR2_BINUTILS_VERSION_2_21_1=y
BR2_BINUTILS_VERSION="2.21.1"
BR2_BINUTILS_EXTRA_CONFIG_OPTIONS=""

BR2_GCC_VERSION_4_6_X=y
BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE=y
BR2_GCC_VERSION="4.6.1"
BR2_EXTRA_GCC_CONFIG_OPTIONS=""
BR2_GCC_SHARED_LIBGCC=y
BR2_GCC_ENABLE_TLS=y

BR2_INSTALL_LIBSTDCPP=y
BR2_TOOLCHAIN_HAS_THREADS=y
BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS=y
BR2_NEEDS_GETTEXT=y
BR2_USE_MMU=y
BR2_PREFER_SOFT_FLOAT=y
BR2_SOFT_FLOAT=y
BR2_TARGET_OPTIMIZATION="-pipe"
BR2_TARGET_LDFLAGS=""

BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PTHREADS_NATIVE=y
BR2_ELF2FLT=y

BR2_TARGET_GENERIC_HOSTNAME="buildroot"
BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot"
BR2_ROOTFS_DEVICE_CREATION_STATIC=y
BR2_ROOTFS_DEVICE_TABLE="target/generic/device_table.txt"
BR2_ROOTFS_STATIC_DEVICE_TABLE="target/generic/device_table_dev.txt"
BR2_ROOTFS_SKELETON_DEFAULT=y
BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y
BR2_TARGET_GENERIC_GETTY_BAUDRATE="115200"
BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW=y
BR2_ROOTFS_POST_BUILD_SCRIPT=""

BR2_PACKAGE_BUSYBOX=y
BR2_BUSYBOX_VERSION_1_18_X=y
BR2_BUSYBOX_VERSION="1.18.5"
BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-1.18.x.config"
BR2_PACKAGE_CUSTOMIZE=y

BR2_TARGET_ROOTFS_SQUASHFS=y
BR2_TARGET_ROOTFS_SQUASHFS4=y
BR2_TARGET_ROOTFS_SQUASHFS4_GZIP=y
BR2_TARGET_ROOTFS_TAR=y
BR2_TARGET_ROOTFS_TAR_NONE=y
BR2_TARGET_ROOTFS_TAR_OPTIONS=""