]> code.bitgloo.com Git - clyne/linux-486.git/commitdiff
linux: force our config, busybox: don't link m/crypt
authorClyne Sullivan <clyne@bitgloo.com>
Tue, 1 Nov 2022 22:28:31 +0000 (18:28 -0400)
committerClyne Sullivan <clyne@bitgloo.com>
Tue, 1 Nov 2022 22:28:31 +0000 (18:28 -0400)
build-busybox.sh
build-linux.sh
busybox/Makefile.flags.patch [new file with mode: 0644]

index e370e9cb42975a8c70ca7107b399e3704675fcd1..41e7481de25a65be3875bdd6ad1f43c664d6ef37 100755 (executable)
@@ -10,11 +10,13 @@ if [ ! -e ./busybox-1.20.0 ] ; then
     tar xf busybox-1.20.0.tar.bz2
     cp config-busybox-1.20.0 busybox-1.20.0/.config
     cd busybox-1.20.0
+    echo "Patching busybox..."
     patch include/libbb.h < ../busybox/libbb.h.patch
+    patch Makefile.flags < ../busybox/Makefile.flags.patch
     cd ..
 fi
 
-make -C busybox-1.20.0 -j8
+BUSYBOX_NO_CRYPT_CHECK=1 make -C busybox-1.20.0 -j8
 
 lzma -zc9 busybox-1.20.0/busybox > floppy/boot/busyboz
 echo "Busybox is now installed to the floppy folder."
index d29ccac78b4ac1f7d490873b2261253085e6a171..59fd8836a6333853f1e25dad50346553930a2a5a 100755 (executable)
@@ -15,6 +15,8 @@ if [ ! -e ./linux-5.17.2 ] ; then
     echo "Patching Linux..."
     patch usr/gen_initramfs.sh < ../linux/patches/gen_initramfs.sh.patch
     # TODO: Other patches necessary? They do save some space...
+
+    ARCH=x86 CROSS_COMPILE=i486-buildroot-linux-uclibc- make olddefconfig
 else
     cd ./linux-5.17.2
 fi
@@ -31,7 +33,7 @@ echo "Calling sudo to create initramfs's /dev/console..."
 sudo mknod initrd/dev/console c 5 1
 
 echo "Building Linux..."
-make -j8
+ARCH=x86 CROSS_COMPILE=i486-buildroot-linux-uclibc- make -j8
 
 echo "Calling sudo to copy bzImage to the floppy folder..."
 sudo cp arch/x86/boot/bzImage ../floppy/boot/bzImage
diff --git a/busybox/Makefile.flags.patch b/busybox/Makefile.flags.patch
new file mode 100644 (file)
index 0000000..7988561
--- /dev/null
@@ -0,0 +1,18 @@
+--- Makefile.flags     2022-11-01 18:18:43.006550705 -0400
++++ Makefile.flags.new 2022-11-01 18:20:21.794697686 -0400
+@@ -108,12 +108,15 @@
+ # gcc-4.2.1 fails if we try to feed C source on stdin:
+ #  echo 'int main(void){return 0;}' | $(CC) $(CFLAGS) -lcrypt -o /dev/null -xc -
+ # fall back to using a temp file:
++ifeq ($(BUSYBOX_NO_CRYPT_CHECK),1)
++else
+ CRYPT_AVAILABLE := $(shell echo 'int main(void){return 0;}' >crypttest.c; $(CC) $(CFLAGS) -lcrypt -o /dev/null crypttest.c >/dev/null 2>&1 && echo "y"; rm crypttest.c)
+ ifeq ($(CRYPT_AVAILABLE),y)
+ LDLIBS += m crypt
+ else
+ LDLIBS += m
+ endif
++endif
+ ifeq ($(CONFIG_PAM),y)
+ # libpam uses libpthread, so for static builds busybox must be linked to