updated files and added busybox vars
This commit is contained in:
+9
-8
@@ -11,12 +11,13 @@
|
||||
#----------- Building busybox for rootfs ----------
|
||||
busybox_rootfs() {
|
||||
printf "$UGREEN** Building busybox for rootfs\n$RESET"
|
||||
rm -rv $build/busybox # &>> $fulllogfile
|
||||
mkdir -pv $build/busybox # &>> $fulllogfile
|
||||
rm -r $build/busybox # &>> $fulllogfile
|
||||
mkdir -p $build/busybox # &>> $fulllogfile
|
||||
cd $build/busybox
|
||||
tar -xvjf $root/downloads/busybox-1.36.1.tar.bz2 # &>> $fulllogfile
|
||||
cd busybox-1.36.1
|
||||
cp -v $root/busybox/busybox-rootfs-config .config # &>> $fulllogfile
|
||||
tar -xjf $root/downloads/busybox-${BUSYBOX_VERSION}.tar.bz2 # &>> $fulllogfile
|
||||
cd busybox-${BUSYBOX_VERSION}
|
||||
sed -i 's/|| ctx->process_block == sha1_process_block64_shaNI/|| ctx->process_block == sha1_process_block64/' libbb/hash_md5_sha.c
|
||||
cp $root/board/${BOARD_NAME}/busybox-${BUSYBOX_VERSION}.config .config # &>> $fulllogfile
|
||||
printf "$UGREEN** Configuring busybox\n$RESET"
|
||||
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- oldconfig # &>> $fulllogfile
|
||||
check $? "Configure busybox all logs in .log"
|
||||
@@ -32,10 +33,10 @@ busybox_initramfs() {
|
||||
rm -r $build/busybox # &>> $fulllogfile
|
||||
mkdir -p $build/busybox
|
||||
cd $build/busybox
|
||||
tar -xjf $root/downloads/busybox-1.36.1.tar.bz2
|
||||
tar -xjf $root/downloads/busybox-${BUSYBOX_VERSION}.tar.bz2
|
||||
check $? "Extract busybox"
|
||||
cd busybox-1.36.1
|
||||
cp $root/busybox/busybox-initramfs-config .config
|
||||
cd busybox-${BUSYBOX_VERSION}
|
||||
cp -v $root/board/${BOARD_NAME}/busybox-initrd-${BUSYBOX_VERSION}.config .config
|
||||
# export PATH=$PATH:/opt/toolchains/x86_64-buildroot-linux-uclibc-gcc/bin
|
||||
printf "$UGREEN** Configuring busybox\n$RESET"
|
||||
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- oldconfig # &>> $fulllogfile
|
||||
|
||||
@@ -22,7 +22,7 @@ initramfs() {
|
||||
busybox_initramfs
|
||||
cp $build/busybox/busybox-1.36.1/busybox $initramfspath/bin
|
||||
cd $initramfspath/bin
|
||||
for i in $(cat $root/busybox/busybox_initramfs_list); do ln -s busybox $i; done
|
||||
for i in $(cat $BUSYBOX_INITRD_LIST_FILE); do ln -s busybox $i; done
|
||||
cd ..
|
||||
#--------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
+3
-3
@@ -11,12 +11,12 @@ kernel() {
|
||||
mkdir -p $build/kernel # &>> $fulllogfile
|
||||
cd $build/kernel
|
||||
printf "$UGREEN** Extracting Linux Kernel\n$RESET"
|
||||
tar -xvf $root/downloads/linux-$KERNEL_VERSION.tar.xz # &>> $fulllogfile
|
||||
tar -xf $root/downloads/linux-$KERNEL_VERSION.tar.xz # &>> $fulllogfile
|
||||
check $? "Extract Linux Kernel"
|
||||
cd linux-$KERNEL_VERSION
|
||||
printf "$UGREEN** Configuring Linux Kernel\n$RESET"
|
||||
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- mrproper # &>> $fulllogfile
|
||||
cp -v $root/board/${BOARD_NAME}/linux-$KERNEL_VERSION.config .config # &>> $fulllogfile
|
||||
cp $root/board/${BOARD_NAME}/linux-$KERNEL_VERSION.config .config # &>> $fulllogfile
|
||||
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- oldconfig # &>> $fulllogfile
|
||||
check $? "Configure Linux Kernel"
|
||||
printf "$UGREEN** Building Linux Kernel\n$RESET"
|
||||
@@ -67,7 +67,7 @@ kernel_headers() {
|
||||
printf "$UGREEN** Building Linux Kernel headers\n$RESET"
|
||||
[ ! -d $build/kernel-headers ] && mkdir $build/kernel-headers
|
||||
cd $build/kernel-headers
|
||||
tar -xvf $root/downloads/linux-$KERNEL_VERSION.tar.xz
|
||||
tar -xf $root/downloads/linux-$KERNEL_VERSION.tar.xz
|
||||
check $? "Extract Linux Kernel"
|
||||
cd linux-$KERNEL_VERSION
|
||||
make ARCH=$ARCH headers
|
||||
|
||||
+10
-1
@@ -57,7 +57,7 @@ EOF
|
||||
busybox_rootfs
|
||||
cp -v $build/busybox/busybox-1.36.1/busybox $rootfspath/usr/bin # &>> $fulllogfile
|
||||
cd $rootfspath/usr/bin
|
||||
for i in $(cat $root/busybox/busybox_list); do ln -sv busybox $i; done
|
||||
for i in $(cat $BUSYBOX_LIST_FILE); do ln -sv busybox $i; done
|
||||
cp -v $root/rootfs/init.in $rootfspath/init
|
||||
kernel_headers
|
||||
uclibc
|
||||
@@ -85,6 +85,15 @@ EOF
|
||||
[ "$KO8821AU_ENABLE" = "y" ] && ko8821au
|
||||
[ "$LIBSQLITE3_ENABLE" = "Y"] && libsqlite3
|
||||
|
||||
if [ ! -z "$DEFAULT_HOSTNAME" ]; then
|
||||
echo "$DEFAULT_HOSTNAME" > $rootfspath/etc/hostname
|
||||
cat << EOF > $rootfspath/etc/hosts
|
||||
127.0.0.1 localhost
|
||||
::1 localhost
|
||||
127.0.1.1 $DEFAULT_HOSTNAME.localdomain $DEFAULT_HOSTNAME
|
||||
EOF
|
||||
fi
|
||||
|
||||
chmod 640 $rootfspath/etc/shadow $rootfspath/etc/inittab
|
||||
chmod 755 $rootfspath/etc/init.d/* $rootfspath/usr/share/udhcpc/default.script $rootfspath/init
|
||||
chmod 644 $rootfspath/etc/{passwd,group,hostname,hosts,fstab,shells,issue} $rootfspath/etc/network/interfaces
|
||||
|
||||
Reference in New Issue
Block a user