Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README25
-rwxr-xr-xbuild_stage1.sh7
-rwxr-xr-xinstall_host.sh3
-rw-r--r--packages-i486-stage1/bc11
-rw-r--r--packages-i486-stage1/ed2
-rw-r--r--packages-i486-stage1/inetutils5
-rw-r--r--packages-i486-stage1/libedit5
-rw-r--r--packages-i486-stage1/linux16
-rw-r--r--packages-i486-stage1/linux-api-headers2
-rw-r--r--packages-i486-stage1/openssh12
10 files changed, 60 insertions, 28 deletions
diff --git a/README b/README
index 671ffa4..e9a74ac 100644
--- a/README
+++ b/README
@@ -169,17 +169,16 @@ archlinux-keyring archlinux32-keyring pacman-mirrorlist pacman \
make mpfr gawk libmpc binutils gcc \
linux uinit \
glibc \
-libedit openssh \
+ \
sysfsutils libidn nettle iputils"
# libunwind
# mpfr for gawk, gcc
-# libedit for openssh
# sysfsutils and libidn, nettle for iputils
SYSROOT_PACKAGES=" \
\
file libmpc mpfr \
-libedit sysfsutils libidn"
+sysfsutils libidn"
@@ -316,13 +315,6 @@ sed -i 's/make /make CC=i486-unknown-linux-gnu-gcc /g' uinit/PKGBUILD
# remove git dependency
sed -i 's@makedepends\(.*\)@#makedepends\1@g' uinit/PKGBUILD
-# linux
-sed -i 's@make@make ARCH=i386 CROSS_COMPILE=$HOME/x-tools/i486-unknown-linux-gnu/bin/i486-unknown-linux-gnu-@g' linux/PKGBUILD
-# remove make dependencies, currently we build without module support
-sed -i 's@makedepends\(.*\)@#makedepends\1@g' linux/PKGBUILD
-# remove dependencies from kernel package, we don't have modules or a ramdisk right now
-sed -i 's/ \+\(depends=\)/#\1/' PKGBUILD
-# ignore failing hooks on installation, it's just depmod and mkinitcpio which we both don't need
# glibc
sed -i 's@/configure"@/configure" --host=i486-unknown-linux-gnu --build=x86_64-pc-linux-gnu@g' PKGBUILD
@@ -346,20 +338,7 @@ sed -i "/pkgname/s/lib32-glibc//g" PKGBUILD
-# libedit
-sed -i 's@./configure@./configure --host=i486-unknown-linux-gnu --build=x86_64-pc-linux-gnu@g' libedit/PKGBUILD
-# openssh
-sed -i 's@./configure@./configure --host=i486-unknown-linux-gnu --build=x86_64-pc-linux-gnu@g' openssh/PKGBUILD
-# package suffers from featuritis
-# remove ldns and kerberos5 support, keep libedit (as it's easy to build)
-# ssh => not good, openssl <> unbound <> openssl cycle and mess
-sed -i 's@^makedepends\(.*\)@#makedepends\1@g' openssh/PKGBUILD
-sed -i 's@^depends\(.*\)@#depends\1@g' openssh/PKGBUILD
-sed -i 's@--with-ldns@--without-ldns@g' openssh/PKGBUILD
-sed -i 's@--with-kerberos5=/usr@--without-kerberos5@g' openssh/PKGBUILD
-#ln: failed to create symbolic link '/build/openssh/pkg/openssh/usr/share/man/man1/slogin.1.gz': No such file or directory
-sed -i 's@\(ln -sf ssh.1.gz.*\)@#\1@g' PKGBUILD
# libidn
sed -i 's@./configure@./configure --host=i486-unknown-linux-gnu --build=x86_64-pc-linux-gnu@g' libidn/PKGBUILD
diff --git a/build_stage1.sh b/build_stage1.sh
index 73ef55f..f4b00a5 100755
--- a/build_stage1.sh
+++ b/build_stage1.sh
@@ -11,13 +11,14 @@ PACKAGES="iana-etc filesystem linux-api-headers tzdata
ncurses readline bash joe
attr acl gmp gdbm db perl openssl
zlib pambase cracklib libtirpc pam libcap coreutils
-util-linux e2fsprogs
+util-linux inetutils e2fsprogs
expat bzip2 lz4 xz pcre less gzip tar libarchive curl
elfutils
sed texinfo grep findutils file diffutils ed patch
kbd procps-ng shadow
-
-net-tools libmnl libnfnetlink iptables iproute2"
+bc linux
+net-tools libmnl libnfnetlink iptables iproute2
+libedit openssh"
for p in $PACKAGES; do
"$SCRIPT_DIR/build_stage1_package.sh" "$p" || exit 1
diff --git a/install_host.sh b/install_host.sh
index d531a4b..f8cf5f2 100755
--- a/install_host.sh
+++ b/install_host.sh
@@ -22,6 +22,9 @@ pacman --noconfirm --needed -S arch-install-scripts
# for linux kernel
pacman --noconfirm --needed -S bc
+# for bc
+pacman --noconfirm --needed -S ed
+
# for pam
pacman --noconfirm --needed -S flex
diff --git a/packages-i486-stage1/bc b/packages-i486-stage1/bc
new file mode 100644
index 0000000..b7720fd
--- /dev/null
+++ b/packages-i486-stage1/bc
@@ -0,0 +1,11 @@
+# bc is needed by linux
+SYSROOT_INSTALL=1
+
+# prepare configure for cross-compilation
+sed -i "s@./configure@./configure --host=$TARGET_ARCH --build=$BUILD_ARCH@g" PKGBUILD
+
+# fbc is built with target compiler instead of host compiler:
+# /bin/sh: ./fbc: No such file or directory
+# http://lists.busybox.net/pipermail/buildroot/2017-July/196239.html
+# we take the host bc instead of the bootstrapped fbc
+sed -i '1!N; /build() *{\n *cd/ a \ sed -i "s@./fbc -c@bc -c@" bc\/Makefile.in' PKGBUILD
diff --git a/packages-i486-stage1/ed b/packages-i486-stage1/ed
index cdcaa7b..9fff229 100644
--- a/packages-i486-stage1/ed
+++ b/packages-i486-stage1/ed
@@ -1,4 +1,4 @@
-# ed is needed for patch
+# ed is needed for patch and bc
SYSROOT_INSTALL=1
# prepare configure for cross-compilation
diff --git a/packages-i486-stage1/inetutils b/packages-i486-stage1/inetutils
new file mode 100644
index 0000000..aa9cde5
--- /dev/null
+++ b/packages-i486-stage1/inetutils
@@ -0,0 +1,5 @@
+# prepare configure for cross-compilation
+sed -i "s@./configure@./configure --host=$TARGET_ARCH --build=$BUILD_ARCH@g" PKGBUILD
+
+# no man page generation
+sed -i "/depends=/s/help2man//" PKGBUILD
diff --git a/packages-i486-stage1/libedit b/packages-i486-stage1/libedit
new file mode 100644
index 0000000..6ee9176
--- /dev/null
+++ b/packages-i486-stage1/libedit
@@ -0,0 +1,5 @@
+# libedit is needed by openssh
+SYSROOT_INSTALL=1
+
+# prepare configure for cross-compilation
+sed -i "s@./configure@./configure --host=$TARGET_ARCH --build=$BUILD_ARCH@g" PKGBUILD
diff --git a/packages-i486-stage1/linux b/packages-i486-stage1/linux
new file mode 100644
index 0000000..37d75a5
--- /dev/null
+++ b/packages-i486-stage1/linux
@@ -0,0 +1,16 @@
+# we currently build a monolitic kernel for the basic stuff which was
+# available since 25 years. :-)
+
+# the Linux kernel has it's own way for cross compilation
+sed -i "s@make prepare@make prepare ARCH=$KERNEL_ARCH CROSS_COMPILE=$XTOOLS_ARCH_PREFIX@g" PKGBUILD
+sed -i "s@make config@make config ARCH=$KERNEL_ARCH CROSS_COMPILE=$XTOOLS_ARCH_PREFIX@g" PKGBUILD
+
+# remove make dependencies, currently we build without module support
+sed -i "s@make bzImage modules@make bzImage ARCH=$KERNEL_ARCH CROSS_COMPILE=$XTOOLS_ARCH_PREFIX@g" PKGBUILD
+sed -i "s@make modules_install@#make modules_install@g" PKGBUILD
+
+# TODO: build what's possible, ommit the rest
+# remove dependencies from kernel package, we don't have modules or a ramdisk right now
+#sed -i 's/ \+\(depends=\)/#\1/' PKGBUILD
+# ignore failing hooks on installation, it's just depmod and mkinitcpio which we both don't need
+#sed -i 's@makedepends\(.*\)@#makedepends\1@g' PKGBUILD
diff --git a/packages-i486-stage1/linux-api-headers b/packages-i486-stage1/linux-api-headers
index 2b9a2e2..b2ad3b4 100644
--- a/packages-i486-stage1/linux-api-headers
+++ b/packages-i486-stage1/linux-api-headers
@@ -1,4 +1,4 @@
-# the Linux kernel has it's own way for cross compilations, we need
+# the Linux kernel has it's own way for cross compilation, we need
# only the header files for glibc later, but it's better to make sure
# to pick the correct target archicture right away
sed -i "s@make@make ARCH=$KERNEL_ARCH CROSS_COMPILE=$XTOOLS_ARCH_PREFIX@g" PKGBUILD
diff --git a/packages-i486-stage1/openssh b/packages-i486-stage1/openssh
new file mode 100644
index 0000000..453eaff
--- /dev/null
+++ b/packages-i486-stage1/openssh
@@ -0,0 +1,12 @@
+# prepare configure for cross-compilation
+sed -i "s@./configure@./configure --host=$TARGET_ARCH --build=$BUILD_ARCH@g" PKGBUILD
+
+# remove ldns and kerberos5 support, keep libedit (as it's easy to build)
+# ssh => not good, openssl <> unbound <> openssl cycle
+sed -i "/depends=/s/krb5//" PKGBUILD
+sed -i "/depends=/s/ldns//" PKGBUILD
+sed -i 's@--with-ldns@--without-ldns@g' PKGBUILD
+sed -i 's@--with-kerberos5=/usr@--without-kerberos5@g' PKGBUILD
+
+#ln: failed to create symbolic link '/build/openssh/pkg/openssh/usr/share/man/man1/slogin.1.gz': No such file or directory
+sed -i 's@\(ln -sf ssh.1.gz.*\)@#\1@g' PKGBUILD