Skip to content

Commit 6ed707c

Browse files
committed
Rootfs out of busybox
Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
1 parent 7c3cce4 commit 6ed707c

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

busybox-rootfs

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/usr/bin/env bash
2+
3+
# This is create quick rootfs filesystem for kernel testing
4+
5+
basepath=/home/bhaskar/git-linux/
6+
7+
cd $basepath || exit 1
8+
9+
git clone --depth=1 https://github.com/mirror/busybox.git && cd "$(basename busybox .git)"
10+
# git clone git://busybox.net/busybox.git && cd "$(basename busybox .git)"
11+
12+
make defconfig # if you need to add more specific option then run menuconfig
13+
14+
# Checking out wheather the static is set or not , we don't need dynamic stuff
15+
16+
grep CONFIG_STATIC .config
17+
18+
echo Setting the static stuff
19+
echo
20+
21+
# echo "CONFIG_STATIC=y" >> .config
22+
23+
24+
sed -i 's/# CONFIG_STATIC is not set/CONFIG_STATIC=y/' .config
25+
sed -i 's/CONFIG_TC=y/# CONFIG_TC is not set/' .config
26+
27+
grep CONFIG_STATIC .config
28+
29+
# Lets build it with the option set
30+
31+
make -j$(nproc)
32+
33+
# Install binaries in specific directory, so, it wont mess up system
34+
35+
make CONFIG_PREFIX=$PWD/BUSYBOX install
36+
37+
# Finding those damn installed binaries
38+
39+
sh -c "find BUSYBOX -type d -exec ls -al {} \;"

0 commit comments

Comments
 (0)