History log of /openbmc/openpower-pnor-code-mgmt/generate-tar (Results 1 – 13 of 13)
Revision Date Author Comments
# cb3de146 05-Jul-2024 Rashmica Gupta <rashmica@linux.ibm.com>

generate-tar: Update private signing key

Updating from 1024 bits to 4096 bits for a more secure key

Change-Id: Ia73b7dcf280d729ed23e3e1113c257c68e979d25
Signed-off-by: Rashmica Gupta <rashmica@linu

generate-tar: Update private signing key

Updating from 1024 bits to 4096 bits for a more secure key

Change-Id: Ia73b7dcf280d729ed23e3e1113c257c68e979d25
Signed-off-by: Rashmica Gupta <rashmica@linux.ibm.com>

show more ...


# 15513dbb 08-Dec-2022 Patrick Williams <patrick@stwcx.xyz>

beautysh: re-format

beautysh is enabled in the openbmc-build-scripts on Bash/Zsh/POSIX-sh
files to have a consistent formatting. Re-run the formatter on the
whole repository.

Change-Id: I82c8272c4

beautysh: re-format

beautysh is enabled in the openbmc-build-scripts on Bash/Zsh/POSIX-sh
files to have a consistent formatting. Re-run the formatter on the
whole repository.

Change-Id: I82c8272c4838e848615995a864dff3301d53925f
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 095b1a02 23-May-2022 Adriana Kobylak <anoo@us.ibm.com>

Fix shellcheck errors

Change-Id: I71f8e41f73ce998fe351bdabbdc291f1aa006dcf
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>


# 7bd45a30 20-Apr-2021 Adriana Kobylak <anoo@us.ibm.com>

generate-tar: fix shellcheck warnings

Tested: Generated a static tarball with no errors.
Generated a squashfs tarball with no errors and verified code
update was succ

generate-tar: fix shellcheck warnings

Tested: Generated a static tarball with no errors.
Generated a squashfs tarball with no errors and verified code
update was successful on witherspoon and system powered on
afterwards.

Change-Id: Iaa7b757fa7f885031a9a5d4d18aa43dcda3639c2
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...


# 647d6134 31-Dec-2019 Lei YU <mine260309@gmail.com>

generate-tar: Add machine name

The openbmc image manager expects "MachineName" in MANIFEST that matches
the BMC's OPENBMC_TARGET_MACHINE in /etc/os-release.
* If there is no MachineN

generate-tar: Add machine name

The openbmc image manager expects "MachineName" in MANIFEST that matches
the BMC's OPENBMC_TARGET_MACHINE in /etc/os-release.
* If there is no MachineName in MANIFEST, it logs a warning for now;
* If they do not match, an error is reported and the version is deleted.

Add -m, --machine argument for generate-tar to make it support the
"MachineName".

Tested: Verify that when a correct machine name is given, the tarball is
processed by image manager correctly;
And if an invalid machine name is given, the tarball uploaded
will get "Machine name doesn't match" error and is deleted.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I8fbb5060cb1be348c39e0688fe7306426cc4ed77

show more ...


# 00d8ade5 13-Jan-2020 Lei YU <mine260309@gmail.com>

generate-tar: Add --interactive=never for rm

On generating Witherspoon PNOR tarball, rm is asking for confirmation on
removing the files in the temp dir, because the partitions are
r

generate-tar: Add --interactive=never for rm

On generating Witherspoon PNOR tarball, rm is asking for confirmation on
removing the files in the temp dir, because the partitions are
read-only now.

Add --interactive=never so that it does not ask for interaction.

Tested: Run the script to generate Witherspoon PNOR and verify it does
not ask for interfaction to remove the files in temp dir.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I89e94e47e02fab53eaca952a70dc672407b75cc7

show more ...


# 85f25407 09-Oct-2019 Adriana Kobylak <anoo@us.ibm.com>

generate-tar: Set permissions of partition files to read only

Set file permissions to 440 since the PNOR partition files are
intended to be read-only and managed by the mbox application,

generate-tar: Set permissions of partition files to read only

Set file permissions to 440 since the PNOR partition files are
intended to be read-only and managed by the mbox application, so the
permissions should be set accordingly for cases where the BMC root
filesystem is not read-only.

Tested:
Before:
-rw-r--r-- 1 root root 1179648 Oct 9 18:43 HBD

After:
-r--r----- 1 root root 1179648 Oct 9 15:33 HBD

Change-Id: I9eaf773fc09a12c4c0ed02302a41eb959719013f
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...


# ddf2b748 11-Sep-2019 Adriana Kobylak <anoo@us.ibm.com>

generate-tar: Call mksquashfs with -all-root option

The mksquashfs command preserves the owner of the files it squashes,
which is the login name of the user that runs generate-tar since

generate-tar: Call mksquashfs with -all-root option

The mksquashfs command preserves the owner of the files it squashes,
which is the login name of the user that runs generate-tar since the
partiton files are extracted into a local directory by pflash.

Bitbake sets the owner for the filesystem files to root as default,
so makes sense that the PNOR partition files are also owned by root
instead of a user name that doesn't exist on the BMC.

Tested:
Before:
root@witherspoon:~# ls -l /media/pnor-ro-652c7b59/
-rw-rw-r-- 1 253760 401855 32768 Aug 15 14:39 ATTR_PERM

After:
root@witherspoon:~# ls -l /media/pnor-ro-944751fd/
-rw-rw-r-- 1 root root 32768 Sep 11 15:07 ATTR_PERM
-rw-rw-r-- 1 root root 32768 Sep 11 15:07 ATTR_TMP

Change-Id: Ic2cbed13e0da687e51a5c15041f54fef93c07be9
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...


# d23b5b74 30-Jul-2019 Oliver O'Halloran <oohall@gmail.com>

Use wc to calculate file sizes

Milton pointed out that for the du command the -b and -k options aren't
really compatible. From the man page:

-b, --bytes

Use wc to calculate file sizes

Milton pointed out that for the du command the -b and -k options aren't
really compatible. From the man page:

-b, --bytes
equivalent to '--apparent-size --block-size=1'

-k like --block-size=1K

As a result 'du -bk' will act as if the following args were
used:
--apparent-size --block-size=1K

However, it's probably not safe to assume this. Fix this by replacing the
use of du with "wc -c". POSIX requires that wc -c prints size of each
input file in bytes so it should be safe (and portable).

Fixes: adf91f58dac9 ("Fix generate-tar on ppc64 hosts")
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Change-Id: I1baf96b4c5304a27ddedf3384cf23d2c346134d8

show more ...


# adf91f58 16-Jul-2019 Oliver O'Halloran <oohall@gmail.com>

Fix generate-tar on ppc64 hosts

Currently the tarball MANIFEST is garbaled when building the tarball on
a ppc64 host. This is because the check to determine if the secureboot
header

Fix generate-tar on ppc64 hosts

Currently the tarball MANIFEST is garbaled when building the tarball on
a ppc64 host. This is because the check to determine if the secureboot
header needs to be removed is sensitive to the system page size. By
default the scratch directory used when running generate-tar is placed
in /tmp. Typically this is a tmpfs file system which has a minimum block
of one system page, which is 64KB on ppc64.

We use the du utility to calculate the size of the VERSION partition and
when a file is smaller than the file systems minimum allocation block it
gives an unexpected result:

$ du -k /tmp/tmp.BhDKg0pQGF/VERSION
64 /tmp/tmp.BhDKg0pQGF/VERSION

$ du -bk /tmp/tmp.BhDKg0pQGF/VERSION
8 /tmp/tmp.BhDKg0pQGF/VERSION

We can fix this by passing the '-b' parameter to du to make it ignore
the filesystem block size.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Change-Id: I03e47d81d837f73159a523bacdd481d6e294b84b

show more ...


# 851bc064 05-Jun-2019 Adriana Kobylak <anoo@us.ibm.com>

generate-tar: Extract PNOR contents to a subdir

Extract the PNOR contents to a subdir to support creating an ext4 image
that takes a directory as a parameter instead of individual files.

generate-tar: Extract PNOR contents to a subdir

Extract the PNOR contents to a subdir to support creating an ext4 image
that takes a directory as a parameter instead of individual files.

Tested: Generated a squashfs image and verified it contained the PNOR
partitions.

Change-Id: I4aef816b55833b5e4df8e93c29d9484c2c9b3d3d
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...


# 8004ff59 05-Jun-2019 Adriana Kobylak <anoo@us.ibm.com>

generate-tar: Always remove scratch dir

Add a trap to generate-tar to remove the scratch dir on exit,
otherwise the scratch dir was not being removed if the script
failed before it r

generate-tar: Always remove scratch dir

Add a trap to generate-tar to remove the scratch dir on exit,
otherwise the scratch dir was not being removed if the script
failed before it reached the end where the rm command was.

Tested: Verified the scratch dir was removed on failure.

Change-Id: I177201976d19d5b7a44a909090739f7e74f75320
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...


# dcb3fd79 20-Feb-2019 Lei YU <mine260309@gmail.com>

Static layout: Generate tar.gz for static layout pnor

Add --image_type option to specify the image type of generated PNOR in
tarball.
Support "squashfs" and "static" image types.

Static layout: Generate tar.gz for static layout pnor

Add --image_type option to specify the image type of generated PNOR in
tarball.
Support "squashfs" and "static" image types.
Rename `generate-squashfs` to `generate-tar` to reflect that this util
is to generate a tarball instead of squashfs.

Example of usage:

# Generate unsigned tarball for Witherspoon
./generate-tar -i squashfs witherspoon.pnor

# Generate signed tarball with default key for Witherspoon
./generate-tar -i squashfs -s -- witherspoon.pnor

# Generate unsigned tarball for Romulus
./generate-tar -i static romulus.pnor

# Generate signed tarball with default key for Romulus
./generate-tar -i static -s -- romulus.pnor

Tested: Verify the generated tarball contains correct files.

Change-Id: Ibb66605663b28888bd643baf92d6e4bdbf60c206
Signed-off-by: Lei YU <mine260309@gmail.com>

show more ...