General TC > Programming & Scripting - Unofficial
Minimizing Differences When Recompiling BusyBox for CorePure64(tinycore 14.x)
emdi.hsn.2023:
I've encountered an issue while trying to replace the default BusyBox in CorePure64(Tinycore 14.x) with a recompiled version. Despite using the default config file `busybox-1.36.0_config.nosuid` and not enabling any additional features, the differences between my recompiled binary and the original are more extensive than expected.
To analyze the differences, I used the following commands:
```bash
objdump -D -b binary -m i386:x86-64 ./busybox1 > busybox1.asm
objdump -D -b binary -m i386:x86-64 ./busybox5 > busybox5.asm
diff ./busybox1.asm ./busybox5.asm
```
Although the file sizes remain the same, I observed over 20 discrepancies beyond the anticipated changes in the date string. Here’s how I compiled BusyBox in TinyCore 11.x, as per the instructions:
1. **Setup and Download:**
```bash
tce-load -i compiletc sstrip
wget https://www.busybox.net/downloads/busybox-1.36.0.tar.bz2
cd busybox-1.36.0
```
2. **Applying Patches:**
```bash
patch -Np1 -i ../busybox-1.27.1-wget-make-default-timeout-configurable.patch
patch -Np1 -i ../busybox-1.29.3_root_path.patch
patch -Np1 -i ../busybox-1.33.0_modprobe.patch
patch -Np0 -i ../busybox-1.33.0_tc_depmod.patch
```
3. **Configuration and Compilation:**
```bash
cp busybox-1.36.0_config.suid .config
make oldconfig
make CC="gcc -flto -mtune=generic -Os -pipe" CXX="g++ -flto -mtune=generic -Os -pipe -fno-exceptions -fno-rtti"
sudo make CC="gcc -flto -mtune=generic -Os -pipe" CONFIG_PREFIX=/tmp/pkg install
sudo mv /tmp/pkg/bin/busybox /tmp/pkg/bin/busybox.suid
```
4. **Recompilation with No SUID:**
```bash
cp busybox-1.36.0_config.nosuid .config
make oldconfig
make CC="gcc -flto -mtune=generic -Os -pipe"
sudo make CC="gcc -flto -mtune=generic -Os -pipe" CONFIG_PREFIX=/tmp/pkg install
```
Despite following these steps, the number of differences is puzzling. My question to the community: How can I compile BusyBox so that it more closely matches the original BusyBox included with CorePure64? Any tips or insights would be greatly appreciated!
Thank you!
mocore:
what version !!!! of core ???
any thing in
http://tinycorelinux.net/15.x/x86_64/release/src/busybox/compile_busybox
helpful ?
IF you are running 15.x
i guess this would be a good start ?
--- Quote ---wget https://www.busybox.net/downloads/busybox-1.36.1.tar.bz2
--- End quote ---
looks like 14.x uses busybox-1.36.0.tar.bz2
http://tinycorelinux.net/14.x/x86_64/release/src/busybox/compile_busybox
...
emdi.hsn.2023:
@mocore
--- Quote ---what version !!!! of core ???
--- End quote ---
I used http://tinycorelinux.net/14.x/x86_64/release/src/busybox/compile_busybox to compile the busybox.
I'm using TinyCore 14.x (x86_64) and followed the official guide to build BusyBox. However, when I compare the BusyBox binary from CorePure64 with my compiled version, I see many differences, even though I haven't enabled any new features.
How can I compile BusyBox to match the original BusyBox included with CorePure64 more closely? Any tips or insights would be greatly appreciated!
Rich:
Hi emdi.hsn.2023
I'm not absolutely certain, but I think compilation might be
performed on a previous version of Tinycore.
Try compiling busybox-1.36.0 under TinyCore 13.x (x86_64)
and see if the results are any better.
Juanito:
From: http://tinycorelinux.net/14.x/x86_64/release/src/busybox/compile_busybox
--- Quote ---*** need to compile in tc-11.x as glibc >= 2.32 does not support rpc ***
--- End quote ---
:)
Navigation
[0] Message Index
[#] Next page
Go to full version