Skip to content

Add version to uboot image name #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 6, 2017
Merged

Conversation

Avinash95
Copy link
Contributor

@Avinash95 Avinash95 commented Jan 4, 2017

This connects #28
Name of the file when top commit is annotated and EXTRAVERSION = v1.0.4 -> u-boot-pistachio_marduk-2015.10-v1.0.4.img
else
u-boot-pistachio_marduk-2015.10-v1.0.4-00004-gcd3b541.img
Signed-off-by: Avinash Tahakik [email protected]

Copy link
Contributor

@abhijit-mahajani-imgtec abhijit-mahajani-imgtec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

u-boot-pistachio_marduk-2015.10.img
should really be
u-boot-pistachio_marduk-2015.10-1.0.3.img in case the tag is equal to last commit
or
u-boot-pistachio_marduk-2015.10-99b3c1690c8b0e581daea1c5902619a66844c24f.img
githash should be used in case there are extra commits after the last tag(which is the current case)
For this EXTRAVERSION in the Makefile should be 1.0.3 (or whatever the current tag), once this is approved, tested and tagged as git tag -a 1.0.4 and EXTRAVERSION would be 1.0.4

ifeq ($(UBOOTRELEASE),)
-mv u-boot-pistachio-nor.img u-boot-$(subst $\",,$(CONFIG_SYS_CONFIG_NAME))-$(UBOOTVERSION).img
else
-mv u-boot-pistachio-nor.img "u-boot-$(subst $\",,$(CONFIG_SYS_CONFIG_NAME))-\
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to change JenkinsFile too .. It has still u-boot-pistachio-nor.img that's why it has failed
http://jenkins.creatordev.io/job/CreatorDev/job/u-boot/job/PR-29/lastBuild/console

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that UBOOTRELEASE is not set for the first CI build of this PR, which leads to the image being created as "u-boot-pistachio_marduk-2015.10.img", but for subsequent CI builds, UBOOTRELEASE gets a value and an image in the name "u-boot-pistachio_marduk-2015.10-g77f85c3.img" is being generated along with the image from first build.

There are 2 problems:

  1. The first build itself should create image with the proper name that include the git commit hash
  2. The subsequent builds should be made clean

@Shpinkso
Copy link
Contributor

Shpinkso commented Jan 5, 2017

shouldn't this connect to #28?

@nikhil-zinjurde-imgtec
Copy link
Contributor

nikhil-zinjurde-imgtec commented Jan 5, 2017

Verified the u-boot version now shown as below:

U-Boot 2015.10-gb9ed160 (Jan 05 2017 - 09:30:29 +0000)
mips-img-linux-gnu-gcc (Codescape GNU Tools 2016.05-03 for MIPS IMG Linux) 4.9.2
GNU ld (Codescape GNU Tools 2016.05-03 for MIPS IMG Linux) 2.24.90

Also, checked the boot-up version

U-Boot SPL 2015.10-gb9ed160 (Jan 05 2017 - 09:30:29)

U-Boot 2015.10-gb9ed160 (Jan 05 2017 - 09:30:29 +0000), Build: jenkins-CreatorDev-u-boot-PR-29-1

@Avinash95 Avinash95 force-pushed the image_version branch 2 times, most recently from 18b7b62 to 5ab0d9e Compare January 5, 2017 10:51
Copy link
Member

@Ham22 Ham22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs the README file updated too

checkout scm
}
stage('Build') {
sh 'make CROSS_COMPILE=/opt/toolchains/mips-img-linux-gnu/2016.05-03/bin/mips-img-linux-gnu- pistachio_marduk_defconfig'
sh 'make CROSS_COMPILE=/opt/toolchains/mips-img-linux-gnu/2016.05-03/bin/mips-img-linux-gnu-'
}
stage('Upload') {
archiveArtifacts 'u-boot-pistachio-nor.img'
archiveArtifacts 'u-boot-pistachio*.img'
deleteDir() // clean up the workspace to save space
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really needed for such a small build?

@@ -3,14 +3,16 @@ node('docker && imgtec') {
docker_image = docker.image "imgtec/creator-builder:latest" // TODO for now using the creator one
docker_image.inside {
stage('Prepare') {
deleteDir() // clean up the workspace to save space
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be causing build issues. Perhaps just better to go with the clean checkout, instead of 'checkout scm' you can use a full custom one:

            checkout([$class: 'GitSCM',
                userRemoteConfigs: scm.userRemoteConfigs,
                branches: scm.branches,
                doGenerateSubmoduleConfigurations: scm.doGenerateSubmoduleConfigurations,
                submoduleCfg: scm.submoduleCfg,
                browser: scm.browser,
                gitTool: scm.gitTool,
                extensions: scm.extensions + [
                    [$class: 'CleanCheckout'],
                    [$class: 'PruneStaleBranch'],
                ],
            ])

@Avinash95 Avinash95 force-pushed the image_version branch 2 times, most recently from 948e698 to 75cbe38 Compare January 6, 2017 07:10
@@ -11,7 +11,8 @@ For the MIPS official toolchain see
$ make CROSS_COMPILE=<toolchain-prefix> pistachio_marduk_defconfig
$ make CROSS_COMPILE=<toolchain-prefix>

This will generate u-boot-pistachio-nor.img
This will generate u-boot-pistachio_<board_name>-<version>.img
eg. u-boot-pistachio_marduk-2015.10-v1.0.4.img
Copy link
Contributor

@abhijit-mahajani-imgtec abhijit-mahajani-imgtec Jan 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also mention that both conditions. i.e. if there are extra commits above the tag then it will add githash.
e.g. u-boot-pistachio_marduk-2015.10-g75cbe38.img or
u-boot-pistachio_marduk-2015.10-v1.0.4-ga6d02dd.img

May be version command output would be useful to add.

This will generate u-boot-pistachio_<board_name>-<version>.img
eg. u-boot-pistachio_marduk-2015.10-v1.0.4.img OR
u-boot-pistachio_<board_name>-<version>-<githash>.img, if there are extra commits above the tag.
e.g. u-boot-pistachio_marduk-2015.10-v1.0.4-g75cbe38.img
Copy link
Contributor

@nikhil-zinjurde-imgtec nikhil-zinjurde-imgtec Jan 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't look good on the Readme home page. Please add proper indentation as follows

This will generate 'u-boot-pistachio_<board_name>-<tag_version>.img'

eg. u-boot-pistachio_marduk-2015.10-v1.0.4.img

OR 'u-boot-pistachio_<board_name>-<tag_version>-<git_hash>.img', if there are extra commits above the tag.

e.g. u-boot-pistachio_marduk-2015.10-v1.0.4-g75cbe38.img

@@ -11,7 +11,13 @@ For the MIPS official toolchain see
$ make CROSS_COMPILE=<toolchain-prefix> pistachio_marduk_defconfig
$ make CROSS_COMPILE=<toolchain-prefix>

This will generate u-boot-pistachio-nor.img
This will generate 'u-boot-pistachio_<board_name>-<tag_version>.img'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be u-boot-pistachio_<board_name>-<tag-version>.img
it should be ` not, '

@Avinash95 Avinash95 force-pushed the image_version branch 2 times, most recently from ff28c25 to bae8add Compare January 6, 2017 10:17
Avinash Tahakik and others added 2 commits January 6, 2017 15:47
Copy link
Contributor

@abhijit-mahajani-imgtec abhijit-mahajani-imgtec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified, the filenameu-boot-pistachio_marduk-2015.10-v1.0.4-gbae8add.img once flashed, gives the version command output as

pistachio # version

U-Boot 2015.10-v1.0.4-gbae8add (Jan 06 2017 - 10:18:02 +0000)
mips-img-linux-gnu-gcc (Codescape GNU Tools 2016.05-03 for MIPS IMG Linux) 4.9.2
GNU ld (Codescape GNU Tools 2016.05-03 for MIPS IMG Linux) 2.24.90

and bootlog shows as
U-Boot SPL 2015.10-v1.0.4-gbae8add (Jan 06 2017 - 10:18:02)

U-Boot 2015.10-v1.0.4-gbae8add (Jan 06 2017 - 10:18:02 +0000), Build: jenkins-CreatorDev-u-boot-PR-29-15

Copy link
Member

@Ham22 Ham22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks to work for building and cleaning in all 3 cases I could thing of:

  • u-boot-pistachio_marduk-2015.10-v1.0.4-00146-gbae8add-dirty.img
  • u-boot-pistachio_marduk-2015.10-v1.0.4-00146-gbae8add.img
  • u-boot-pistachio_marduk-2015.10-v1.0.4.img

@Ham22 Ham22 merged commit adaab9b into CreatorDev:2015.10 Jan 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants