<feed xmlns='http://www.w3.org/2005/Atom'>
<title>staging/pepe2k/include/image.mk, branch v19.07.7</title>
<subtitle>Staging tree of Piotr Dymacz</subtitle>
<id>https://git.openwrt.org/openwrt/staging/pepe2k/atom?h=v19.07.7</id>
<link rel='self' href='https://git.openwrt.org/openwrt/staging/pepe2k/atom?h=v19.07.7'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/pepe2k/'/>
<updated>2020-12-17T21:16:36Z</updated>
<entry>
<title>build/json: add filesystem information</title>
<updated>2020-12-17T21:16:36Z</updated>
<author>
<name>Paul Spooren</name>
</author>
<published>2020-12-14T00:36:17Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/pepe2k/commit/?id=42e478eb0dbfce71ba21d2a6ed7297ec6db8cc19'/>
<id>urn:sha1:42e478eb0dbfce71ba21d2a6ed7297ec6db8cc19</id>
<content type='text'>
Some images are created using different filesystems, most popular
squashfs and ext4. To allow downstream projects to distinguesh between
those, add the `filesystem` information to created json files.

Signed-off-by: Paul Spooren &lt;mail@aparcar.org&gt;
(cherry picked from commit bc0ffff36a0bd8043e958913f574cb8d2a79e93d)
</content>
</entry>
<entry>
<title>build: store default/device packages in JSON</title>
<updated>2020-07-13T20:24:30Z</updated>
<author>
<name>Paul Spooren</name>
</author>
<published>2020-06-30T11:02:43Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/pepe2k/commit/?id=e3618eb2cc210763fe1b309fd7e337fdf8a98f0b'/>
<id>urn:sha1:e3618eb2cc210763fe1b309fd7e337fdf8a98f0b</id>
<content type='text'>
With this commit the `profiles.json` contain both the target specific
`default_packages` as well as the device specific `device_packages` as a
array of strings.

This information is required for downstream projects like the various
web-based interactive firmware generators.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
Signed-off-by: Paul Spooren &lt;mail@aparcar.org&gt;
(cherry picked from commit 263f7e5bbd119ebed1f514c16f659a2e2a2b132c)
</content>
</entry>
<entry>
<title>build: refactor JSON info files to `profiles.json`</title>
<updated>2020-06-30T20:12:58Z</updated>
<author>
<name>Paul Spooren</name>
</author>
<published>2020-03-12T22:55:41Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/pepe2k/commit/?id=3572711e3cea24dd5276666860f57a2c3a72525e'/>
<id>urn:sha1:3572711e3cea24dd5276666860f57a2c3a72525e</id>
<content type='text'>
JSON info files contain machine readable information of built profiles
and resulting images. These files were added in commit 881ed09ee6e2
("build: create JSON files containing image info").

They are useful for firmware wizards and script checking for
reproducibility.

Currently all JSON files are stored next to the built images, resulting
in up to 168 individual files for the ath79/generic target.

This patch refactors the JSON creation to store individual per image
(not per profile) files in $(BUILD_DIR)/json_info_files and create an
single overview file called `profiles.json` in the target directory.

Storing per image files and not per profile solves the problem of
parallel file writes. If a profiles sysupgrade and factory image are
finished at the same time both processes would write to the same JSON
file, resulting in randomly broken outputs.

Some target like x86/64 do not use the image code yet, resulting in
missing JSON files. If no JSON info files were created, no
`profiles.json` files is created as it would be empty anyway.

As before, this creation is enabled by default only if `BUILDBOT` is set.

Tested via buildroot &amp; ImageBuilder on ath79/generic, imx6 and x86/64.

Signed-off-by: Paul Spooren &lt;mail@aparcar.org&gt;
[json_info_files dir handling in Make, if case refactoring]
Signed-off-by: Petr Štetiar &lt;ynezz@true.cz&gt;
(backported from commit 07449f692ce4c4525e946401f4c3ed0cbbc8c4df)
Signed-off-by: Adrian Schmutzler &lt;freifunk@adrianschmutzler.de&gt;
</content>
</entry>
<entry>
<title>build: image: fix build breakage of some images</title>
<updated>2020-06-30T20:12:50Z</updated>
<author>
<name>Petr Štetiar</name>
</author>
<published>2019-11-05T22:57:37Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/pepe2k/commit/?id=b7bac0737e3227d1b581efc9f8951fcdf7391e6f'/>
<id>urn:sha1:b7bac0737e3227d1b581efc9f8951fcdf7391e6f</id>
<content type='text'>
Commit 881ed09ee6e2 ("build: create JSON files containing image info")
has removed the crucial empty new line from the image copy step
resulting in the following errors during make function expansion:

 GZ_SUFFIX :=
 bash: GZ_SUFFIX: command not found
 Makefile:86: recipe for target 'openwrt-ath79-generic-tplink_archer-c7-v5-squashfs-sysupgrade.bin' failed

Fixes: 881ed09ee6e2 ("build: create JSON files containing image info")
Signed-off-by: Petr Štetiar &lt;ynezz@true.cz&gt;
(cherry picked from commit 0fb23d67f00a18c3f9e712ca97cfc34b38071f4a)
</content>
</entry>
<entry>
<title>build: create JSON files containing image info</title>
<updated>2020-06-30T20:12:39Z</updated>
<author>
<name>Paul Spooren</name>
</author>
<published>2019-08-18T19:56:45Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/pepe2k/commit/?id=8a0362c6992d2a432ecb79905531a6c7324fa6a8'/>
<id>urn:sha1:8a0362c6992d2a432ecb79905531a6c7324fa6a8</id>
<content type='text'>
The JSON info files contain details about the created firmware images
per device and are stored next to the created images.

The JSON files are stored as "$(IMAGE_PREFIX).json" and contain some
device/image meta data as well as a list of created firmware images.

An example of openwrt-ramips-rt305x-aztech_hw550-3g.json

    {
      "id": "aztech_hw550-3g",
      "image_prefix": "openwrt-ramips-rt305x-aztech_hw550-3g",
      "images": [
        {
          "name": "openwrt-ramips-rt305x-aztech_hw550-3g-squashfs-sysupgrade.bin",
          "sha256": "db2b34b0ec4a83d9bf612cf66fab0dc3722b191cb9bedf111e5627a4298baf20",
          "type": "sysupgrade"
        }
      ],
      "metadata_version": 1,
      "supported_devices": [
        "aztech,hw550-3g",
        "hw550-3g"
      ],
      "target": "ramips/rt305x",
      "titles": [
        {
          "model": "HW550-3G",
          "vendor": "Aztech"
        },
        {
          "model": "ALL0239-3G",
          "vendor": "Allnet"
        }
      ],
      "version_commit": "r10920+123-0cc87b3bac",
      "version_number": "SNAPSHOT"
    }

Signed-off-by: Paul Spooren &lt;mail@aparcar.org&gt;
(backported from commit 881ed09ee6e23f6c224184bb7493253c4624fb9f)
Signed-off-by: Adrian Schmutzler &lt;freifunk@adrianschmutzler.de&gt;
</content>
</entry>
<entry>
<title>Revert "build: remove harmful -nopad option from mksquashfs"</title>
<updated>2019-09-08T16:50:11Z</updated>
<author>
<name>Jonas Gorski</name>
</author>
<published>2019-09-06T12:55:36Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/pepe2k/commit/?id=4c8258c925a0cd6a4738b9eed7cd503c1873e88f'/>
<id>urn:sha1:4c8258c925a0cd6a4738b9eed7cd503c1873e88f</id>
<content type='text'>
This reverts commit 1c0290c5cc6258c48b8ba46b4f9c85a21de4f875.

Dropping the nopad can make the padding overflow into the next erase
block on devices using a non-aligned rootfs start. This breaks the jffs2
overlay partition with the following messages:

[   30.343877] jffs2_scan_eraseblock(): End of filesystem marker found at 0x10000
[   30.376512] jffs2: Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
[   30.385253] jffs2: empty_blocks 196, bad_blocks 0, c-&gt;nr_blocks 197

Signed-off-by: Jonas Gorski &lt;jonas.gorski@gmail.com&gt;
(cherry picked from commit f11d90a76b719106336b94d85b166b4ebf19dbb0)
</content>
</entry>
<entry>
<title>build: remove harmful -nopad option from mksquashfs</title>
<updated>2019-09-04T11:44:20Z</updated>
<author>
<name>Christian Lamparter</name>
</author>
<published>2019-08-30T14:52:25Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/pepe2k/commit/?id=5a102a010fe6be82d5793104acefabbbc01d6b85'/>
<id>urn:sha1:5a102a010fe6be82d5793104acefabbbc01d6b85</id>
<content type='text'>
While the -nopad option prevents mksquashfs from padding the
image to an arbitrary 4k. It does not take into consideration
that squashfs is programmed to have this 4k padding when it's
being used on on a block device... which is its main "use-case".

Now, after a week long discussion on the ML that included a
back-and-forth between some of the possible options.
But this is likely the best KISS patch to deal with the issue
right away given the limited resources.

From squashfs code point of view, be warned. The 4k padding is
not enough when dealing with devices that have a PAGE_SIZE
bigger than 4k.

if it turns out to be affecting you, then please look-up either:
"FS#2460 - kernel panic reading squashfs from ubi volume" bug
Or the discussion on the OpenWrt-Devel ML in
"amp821xx: use newly added pad-squashfs for Meraki MR24" and
"Squashfs breakage lottery with UBI..."
before making an educated guess.

Note: This will not affect the "tiny"/small flash devices as
much as it seems at first. This is because the the rootfs_data
partition that follows uses jffs2. And it requires to be aligned
to the flash block-size in order to work at all.

So either the involved FSes will meet in the middle as before,
or not at all. But in that latter case the image was already
hoping for the "undefined behaviour" gamble to turn out in its
favour and this is probably why this was unnoticed for so long.

Fixes: FS#2460
Reported-by: Russell Senior &lt;russell@personaltelco.net&gt;
Signed-off-by: Christian Lamparter &lt;chunkeey@gmail.com&gt;
(cherry picked from commit 1c0290c5cc6258c48b8ba46b4f9c85a21de4f875)
</content>
</entry>
<entry>
<title>build: allow overriding default selection state for devices</title>
<updated>2019-09-04T11:39:37Z</updated>
<author>
<name>Jonas Gorski</name>
</author>
<published>2019-08-13T10:33:47Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/pepe2k/commit/?id=f783ad5b5b105407fd47123b02217a8a09525b44'/>
<id>urn:sha1:f783ad5b5b105407fd47123b02217a8a09525b44</id>
<content type='text'>
Allow overriding the default selection state for Devices, similar to
setting a default for packages.

E.g. by setting DEFAULT to n, they won't be selected by default anymore
when enabling all device in the multi device profile.

This allows preventing images being built by the default config for
known broken devices, devices without enough RAM/flash, or devices not
working with a certain kernel versions.

This does not prevent the devices from being manually selected or images
being built by the ImageBuilder. These devices often still have worth
with a reduced package-set, or as a device for regression testing, when
no better device is available.

Signed-off-by: Jonas Gorski &lt;jonas.gorski@gmail.com&gt;
(cherry picked from commit 7546be60074e452751ba2a48eddbc13910bec708)
</content>
</entry>
<entry>
<title>build: add UBOOT_PATH to DEFAULT_DEVICE_VARS and set a default</title>
<updated>2019-05-18T14:37:30Z</updated>
<author>
<name>Christian Lamparter</name>
</author>
<published>2019-02-11T17:55:32Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/pepe2k/commit/?id=80f861ef757af33828edcefba8666dec5781c8db'/>
<id>urn:sha1:80f861ef757af33828edcefba8666dec5781c8db</id>
<content type='text'>
The helper shared Build/append-uboot in include/image-commands.mk
uses it, so include this variable in DEFAULT_DEVICE_VARS.

Signed-off-by: Christian Lamparter &lt;chunkeey@gmail.com&gt;
</content>
</entry>
<entry>
<title>build: remove sgid permission from tar</title>
<updated>2019-04-06T17:14:06Z</updated>
<author>
<name>Eneas U de Queiroz</name>
</author>
<published>2019-03-28T16:58:07Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/pepe2k/commit/?id=8252511dc0b5a71e9e64b96f233a27ad73e28b7f'/>
<id>urn:sha1:8252511dc0b5a71e9e64b96f233a27ad73e28b7f</id>
<content type='text'>
Otherwise tar will keep the sgid bit when running
from a sgid-set directory, resulting in a different
file being generated.

Signed-off-by: Eneas U de Queiroz &lt;cote2004-github@yahoo.com&gt;
Signed-off-by: Christian Lamparter &lt;chunkeey@gmail.com&gt;
[reworked commit message, removed DMARC]
</content>
</entry>
</feed>
