Skip to content

Commit

Permalink
output lkp files
Browse files Browse the repository at this point in the history
  • Loading branch information
elliott10 committed Mar 8, 2016
1 parent d92d9af commit b3b538f
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 13 deletions.
17 changes: 11 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ unset LD_LIBRARY_PATH
linux_repo="/media/vdb1/xly/linux"
linux_config="$linux_repo/arch/x86/configs/x86_64_defconfig"

tmp_branch="/home/chy/xly/kernelci/test_"
tmp_branch="/home/chy/xly/kernelci/ka/tmp_branch"
branch_name="$1"
commit_id="$2"

buildroot_path="/home/chy/xly/kernelci/buildroot"
buildroot_path="/home/chy/xly/kernelci/ka/buildroot"
buildroot_linux="$buildroot_path/output/build/linux-custom"
buildroot_config="/home/chy/xly/kernelci"
buildroot_mod="$buildroot_path/output/target/MOD"
buildroot_config="$buildroot_path/buildroot_config"

web_path="/var/www/html/~lkp"

cd $linux_repo

Expand All @@ -28,11 +31,13 @@ git checkout $commit_id
#echo -e "Syncing from $linux_repo to $buildroot_linux"
#rsync -au --chmod=u=rwX,go=rX --exclude .svn --exclude .git --exclude .hg --exclude .bzr --exclude CVS --exclude .stamp_rsynced $linux_repo/ $buildroot_linux

rm -rf $buildroot_linux
rm -rf $buildroot_linux $buildroot_mod

cp $buildroot_config/buildroot_config $buildroot_path/.config
cp $buildroot_config $buildroot_path/.config

echo -e "
WEB_PATH=\"$web_path\"
COMMIT_ID=\"$commit_id\"
BR2_DEFCONFIG=\"$buildroot_path/configs/qemu_x86_64_defconfig\"
BR2_LINUX_KERNEL_CUSTOM_LOCAL_PATH=\"$linux_repo\"
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE=\"$linux_config\"" >> $buildroot_path/.config
Expand Down Expand Up @@ -65,5 +70,5 @@ do
done

echo -e "$sec $branch_name $commit_id --> (${!file_time[@]})" >> $tmp_branch/build.log
echo -e "Output files: (\033[32m ${!file_time[@]} \033[0m) in $buildroot_path/output/images"
echo -e "$branch_name \033[32m$commit_id\033[0m output files: (\033[32m ${!file_time[@]} \033[0m) in $buildroot_path/output/images"

1 change: 1 addition & 0 deletions buildroot/buildroot_config
Original file line number Diff line number Diff line change
Expand Up @@ -2812,3 +2812,4 @@ BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION=""
# BR2_PACKAGE_INPUT_TOOLS_EVTEST is not set
# BR2_BFIN_FDPIC is not set
# BR2_BFIN_FLAT is not set

13 changes: 9 additions & 4 deletions buildroot/linux/linux.mk
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ LINUX_MAKE_FLAGS = \
HOSTCC="$(HOSTCC)" \
HOSTCFLAGS="$(HOSTCFLAGS)" \
ARCH=$(KERNEL_ARCH) \
INSTALL_MOD_PATH=$(TARGET_DIR) \
INSTALL_MOD_PATH=$(TARGET_DIR)/MOD \
CROSS_COMPILE="$(TARGET_CROSS)" \
DEPMOD=$(HOST_DIR)/sbin/depmod

Expand Down Expand Up @@ -279,6 +279,7 @@ define LINUX_BUILD_CMDS
$(if $(BR2_LINUX_KERNEL_USE_CUSTOM_DTS),
cp $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)) $(KERNEL_ARCH_PATH)/boot/dts/)
$(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_TARGET_NAME)
mkdir -p $(WEB_PATH)/pkg/$(shell uname -s)/$(shell uname -n)/gcc-$(BR2_GCC_VERSION)/$(COMMIT_ID) ;\
@if grep -q "CONFIG_MODULES=y" $(@D)/.config; then \
$(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) modules ; \
fi
Expand All @@ -304,7 +305,8 @@ endef


define LINUX_INSTALL_IMAGES_CMDS
cp $(LINUX_IMAGE_PATH) $(BINARIES_DIR)
cp $(LINUX_IMAGE_PATH) $(BINARIES_DIR) ; \
cp $(LINUX_IMAGE_PATH) $(WEB_PATH)/pkg/$(shell uname -s)/$(shell uname -n)/gcc-$(BR2_GCC_VERSION)/$(COMMIT_ID)/vmlinuz-$(LINUX_VERSION_PROBED) ;\
$(LINUX_INSTALL_DTB)
endef

Expand All @@ -314,8 +316,11 @@ define LINUX_INSTALL_TARGET_CMDS
# directories, not relevant on the target
@if grep -q "CONFIG_MODULES=y" $(@D)/.config; then \
$(LINUX_MAKE_ENV) $(MAKE1) $(LINUX_MAKE_FLAGS) -C $(@D) modules_install; \
rm -f $(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED)/build ; \
rm -f $(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED)/source ; \
$(LINUX_MAKE_ENV) $(MAKE1) $(LINUX_MAKE_FLAGS) -C $(@D) firmware_install; \
rm -f $(TARGET_DIR)/MOD/lib/modules/$(LINUX_VERSION_PROBED)/build ; \
rm -f $(TARGET_DIR)/MOD/lib/modules/$(LINUX_VERSION_PROBED)/source ; \
cd $(TARGET_DIR)/MOD && find lib | cpio -o -H newc --owner=root.root | gzip -n -9 > modules.cgz ; \
cp modules.cgz $(WEB_PATH)/pkg/$(shell uname -s)/$(shell uname -n)/gcc-$(BR2_GCC_VERSION)/$(COMMIT_ID)/ ; cd - ;\
fi
$(LINUX_INSTALL_HOST_TOOLS)
endef
Expand Down
2 changes: 1 addition & 1 deletion tmp_branch/master
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7d46af2084eabe73ce4dbf06072fded34b58b0c7
f691b77b1fc491dae601631c8531a0a13e915466
4 changes: 2 additions & 2 deletions updateGIT.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

linux_repo="/media/vdb1/xly/linux"

tmp_branch="/home/chy/xly/kernelci/test_"
build_sh="/home/chy/xly/kernelci/build.sh"
tmp_branch="/home/chy/xly/kernelci/ka/tmp_branch"
build_sh="/home/chy/xly/kernelci/ka/build.sh"

cd $linux_repo

Expand Down

0 comments on commit b3b538f

Please sign in to comment.