* [PATCH v3 01/14] dpkg-raw: Respect file permissions defined by recipe if requested
2019-01-16 5:32 [PATCH v3 00/14] Vacation hacks & more Jan Kiszka
@ 2019-01-16 5:32 ` Jan Kiszka
2019-01-16 9:41 ` Henning Schild
2019-01-16 5:32 ` [PATCH v3 02/14] bootimg-efi-isar: Run grub-mkimage without own config Jan Kiszka
` (13 subsequent siblings)
14 siblings, 1 reply; 26+ messages in thread
From: Jan Kiszka @ 2019-01-16 5:32 UTC (permalink / raw)
To: isar-users; +Cc: Henning Schild
From: Jan Kiszka <jan.kiszka@siemens.com>
dh_fixperms overwrites the permissions do_install may have defined. To
avoid that, allow the recipe write to define an exception list via the
PRESERVE_PERMS variable.
Fixes: f301ccb2b5b1 ("meta/dpkg-raw: build raw packages like all others")
CC: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
RECIPE-API-CHANGELOG.md | 7 +++++++
meta/classes/dpkg-raw.bbclass | 9 ++++++++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md
index 06a01e3..2bc1585 100644
--- a/RECIPE-API-CHANGELOG.md
+++ b/RECIPE-API-CHANGELOG.md
@@ -124,3 +124,10 @@ updated hence recipes using them shouldn't be impacted per se.
These packages depend on a specific kernel. Its identification is now appended
to the binary package names in the form "-${KERNEL_NAME}".
+
+### PRESERVE_PERMS needed with dpkg-raw for implicit file permission setting
+
+In order to use the same file permissions for an input file to a dpkg-raw
+package on the build machine as well as on the target, its absolute target path
+needs to be listed in the PRESERVE_PERMS variable (space-separated list of
+files). Otherwise, default permissions are used.
diff --git a/meta/classes/dpkg-raw.bbclass b/meta/classes/dpkg-raw.bbclass
index 8d11433..42276e5 100644
--- a/meta/classes/dpkg-raw.bbclass
+++ b/meta/classes/dpkg-raw.bbclass
@@ -53,12 +53,19 @@ Description: ${DESCRIPTION}
EOF
}
+FIXPERM_EXCLUSIONS = \
+ "${@' '.join(['-X ' + x for x in \
+ (d.getVar('PRESERVE_PERMS', False) or '').split()])}"
+
deb_create_rules() {
cat << EOF > ${S}/debian/rules
#!/usr/bin/make -f
+
+override_dh_fixperms:
+ dh_fixperms ${FIXPERM_EXCLUSIONS}
+
%:
dh \$@
-
EOF
chmod +x ${S}/debian/rules
}
--
2.16.4
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v3 01/14] dpkg-raw: Respect file permissions defined by recipe if requested
2019-01-16 5:32 ` [PATCH v3 01/14] dpkg-raw: Respect file permissions defined by recipe if requested Jan Kiszka
@ 2019-01-16 9:41 ` Henning Schild
2019-01-16 12:11 ` Jan Kiszka
0 siblings, 1 reply; 26+ messages in thread
From: Henning Schild @ 2019-01-16 9:41 UTC (permalink / raw)
To: Jan Kiszka; +Cc: isar-users
Am Wed, 16 Jan 2019 06:32:14 +0100
schrieb Jan Kiszka <jan.kiszka@siemens.com>:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> dh_fixperms overwrites the permissions do_install may have defined. To
> avoid that, allow the recipe write to define an exception list via the
> PRESERVE_PERMS variable.
>
> Fixes: f301ccb2b5b1 ("meta/dpkg-raw: build raw packages like all
> others") CC: Henning Schild <henning.schild@siemens.com>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> RECIPE-API-CHANGELOG.md | 7 +++++++
> meta/classes/dpkg-raw.bbclass | 9 ++++++++-
> 2 files changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md
> index 06a01e3..2bc1585 100644
> --- a/RECIPE-API-CHANGELOG.md
> +++ b/RECIPE-API-CHANGELOG.md
> @@ -124,3 +124,10 @@ updated hence recipes using them shouldn't be
> impacted per se.
> These packages depend on a specific kernel. Its identification is
> now appended to the binary package names in the form
> "-${KERNEL_NAME}". +
> +### PRESERVE_PERMS needed with dpkg-raw for implicit file permission
> setting +
> +In order to use the same file permissions for an input file to a
> dpkg-raw +package on the build machine as well as on the target, its
> absolute target path +needs to be listed in the PRESERVE_PERMS
> variable (space-separated list of +files). Otherwise, default
> permissions are used. diff --git a/meta/classes/dpkg-raw.bbclass
> b/meta/classes/dpkg-raw.bbclass index 8d11433..42276e5 100644
> --- a/meta/classes/dpkg-raw.bbclass
> +++ b/meta/classes/dpkg-raw.bbclass
> @@ -53,12 +53,19 @@ Description: ${DESCRIPTION}
> EOF
> }
>
> +FIXPERM_EXCLUSIONS = \
> + "${@' '.join(['-X ' + x for x in \
> + (d.getVar('PRESERVE_PERMS', False) or
> '').split()])}" +
> deb_create_rules() {
> cat << EOF > ${S}/debian/rules
> #!/usr/bin/make -f
> +
> +override_dh_fixperms:
> + dh_fixperms ${FIXPERM_EXCLUSIONS}
> +
This should be done only if the variable is non-empty, to keep that
code generic. Also the variable name should maybe start with DH_ or
DEBIAN_.
Henning
> %:
> dh \$@
> -
> EOF
> chmod +x ${S}/debian/rules
> }
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v3 01/14] dpkg-raw: Respect file permissions defined by recipe if requested
2019-01-16 9:41 ` Henning Schild
@ 2019-01-16 12:11 ` Jan Kiszka
2019-01-16 15:24 ` Henning Schild
0 siblings, 1 reply; 26+ messages in thread
From: Jan Kiszka @ 2019-01-16 12:11 UTC (permalink / raw)
To: Henning Schild; +Cc: isar-users
On 16.01.19 10:41, Henning Schild wrote:
> Am Wed, 16 Jan 2019 06:32:14 +0100
> schrieb Jan Kiszka <jan.kiszka@siemens.com>:
>
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> dh_fixperms overwrites the permissions do_install may have defined. To
>> avoid that, allow the recipe write to define an exception list via the
>> PRESERVE_PERMS variable.
>>
>> Fixes: f301ccb2b5b1 ("meta/dpkg-raw: build raw packages like all
>> others") CC: Henning Schild <henning.schild@siemens.com>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>> RECIPE-API-CHANGELOG.md | 7 +++++++
>> meta/classes/dpkg-raw.bbclass | 9 ++++++++-
>> 2 files changed, 15 insertions(+), 1 deletion(-)
>>
>> diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md
>> index 06a01e3..2bc1585 100644
>> --- a/RECIPE-API-CHANGELOG.md
>> +++ b/RECIPE-API-CHANGELOG.md
>> @@ -124,3 +124,10 @@ updated hence recipes using them shouldn't be
>> impacted per se.
>> These packages depend on a specific kernel. Its identification is
>> now appended to the binary package names in the form
>> "-${KERNEL_NAME}". +
>> +### PRESERVE_PERMS needed with dpkg-raw for implicit file permission
>> setting +
>> +In order to use the same file permissions for an input file to a
>> dpkg-raw +package on the build machine as well as on the target, its
>> absolute target path +needs to be listed in the PRESERVE_PERMS
>> variable (space-separated list of +files). Otherwise, default
>> permissions are used. diff --git a/meta/classes/dpkg-raw.bbclass
>> b/meta/classes/dpkg-raw.bbclass index 8d11433..42276e5 100644
>> --- a/meta/classes/dpkg-raw.bbclass
>> +++ b/meta/classes/dpkg-raw.bbclass
>> @@ -53,12 +53,19 @@ Description: ${DESCRIPTION}
>> EOF
>> }
>>
>> +FIXPERM_EXCLUSIONS = \
>> + "${@' '.join(['-X ' + x for x in \
>> + (d.getVar('PRESERVE_PERMS', False) or
>> '').split()])}" +
>> deb_create_rules() {
>> cat << EOF > ${S}/debian/rules
>> #!/usr/bin/make -f
>> +
>> +override_dh_fixperms:
>> + dh_fixperms ${FIXPERM_EXCLUSIONS}
>> +
>
> This should be done only if the variable is non-empty, to keep that
> code generic. Also the variable name should maybe start with DH_ or
> DEBIAN_.
I can change the naming, but I disagree regarding your other concern:
dh_fixperms is by definition the default case if there is no override. Therefore
override_dh_fixperms:
dh_fixperms
would be pointless but always correct.
Jan
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v3 01/14] dpkg-raw: Respect file permissions defined by recipe if requested
2019-01-16 12:11 ` Jan Kiszka
@ 2019-01-16 15:24 ` Henning Schild
2019-01-16 19:09 ` Jan Kiszka
0 siblings, 1 reply; 26+ messages in thread
From: Henning Schild @ 2019-01-16 15:24 UTC (permalink / raw)
To: Jan Kiszka; +Cc: isar-users
Am Wed, 16 Jan 2019 13:11:47 +0100
schrieb Jan Kiszka <jan.kiszka@siemens.com>:
> On 16.01.19 10:41, Henning Schild wrote:
> > Am Wed, 16 Jan 2019 06:32:14 +0100
> > schrieb Jan Kiszka <jan.kiszka@siemens.com>:
> >
> >> From: Jan Kiszka <jan.kiszka@siemens.com>
> >>
> >> dh_fixperms overwrites the permissions do_install may have
> >> defined. To avoid that, allow the recipe write to define an
> >> exception list via the PRESERVE_PERMS variable.
> >>
> >> Fixes: f301ccb2b5b1 ("meta/dpkg-raw: build raw packages like all
> >> others") CC: Henning Schild <henning.schild@siemens.com>
> >> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> >> ---
> >> RECIPE-API-CHANGELOG.md | 7 +++++++
> >> meta/classes/dpkg-raw.bbclass | 9 ++++++++-
> >> 2 files changed, 15 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md
> >> index 06a01e3..2bc1585 100644
> >> --- a/RECIPE-API-CHANGELOG.md
> >> +++ b/RECIPE-API-CHANGELOG.md
> >> @@ -124,3 +124,10 @@ updated hence recipes using them shouldn't be
> >> impacted per se.
> >> These packages depend on a specific kernel. Its identification is
> >> now appended to the binary package names in the form
> >> "-${KERNEL_NAME}". +
> >> +### PRESERVE_PERMS needed with dpkg-raw for implicit file
> >> permission setting +
> >> +In order to use the same file permissions for an input file to a
> >> dpkg-raw +package on the build machine as well as on the target,
> >> its absolute target path +needs to be listed in the PRESERVE_PERMS
> >> variable (space-separated list of +files). Otherwise, default
> >> permissions are used. diff --git a/meta/classes/dpkg-raw.bbclass
> >> b/meta/classes/dpkg-raw.bbclass index 8d11433..42276e5 100644
> >> --- a/meta/classes/dpkg-raw.bbclass
> >> +++ b/meta/classes/dpkg-raw.bbclass
> >> @@ -53,12 +53,19 @@ Description: ${DESCRIPTION}
> >> EOF
> >> }
> >>
> >> +FIXPERM_EXCLUSIONS = \
> >> + "${@' '.join(['-X ' + x for x in \
> >> + (d.getVar('PRESERVE_PERMS', False) or
> >> '').split()])}" +
> >> deb_create_rules() {
> >> cat << EOF > ${S}/debian/rules
> >> #!/usr/bin/make -f
> >> +
> >> +override_dh_fixperms:
> >> + dh_fixperms ${FIXPERM_EXCLUSIONS}
> >> +
> >
> > This should be done only if the variable is non-empty, to keep that
> > code generic. Also the variable name should maybe start with DH_ or
> > DEBIAN_.
>
> I can change the naming, but I disagree regarding your other concern:
> dh_fixperms is by definition the default case if there is no
> override. Therefore
>
> override_dh_fixperms:
> dh_fixperms
I would not be sure. Say a later step in some layers append would want
to set an actual override would the two conflict?
Henning
>
> would be pointless but always correct.
>
> Jan
>
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v3 01/14] dpkg-raw: Respect file permissions defined by recipe if requested
2019-01-16 15:24 ` Henning Schild
@ 2019-01-16 19:09 ` Jan Kiszka
2019-01-18 9:01 ` Henning Schild
0 siblings, 1 reply; 26+ messages in thread
From: Jan Kiszka @ 2019-01-16 19:09 UTC (permalink / raw)
To: Henning Schild; +Cc: isar-users
On 16.01.19 16:24, Henning Schild wrote:
> Am Wed, 16 Jan 2019 13:11:47 +0100
> schrieb Jan Kiszka <jan.kiszka@siemens.com>:
>
>> On 16.01.19 10:41, Henning Schild wrote:
>>> Am Wed, 16 Jan 2019 06:32:14 +0100
>>> schrieb Jan Kiszka <jan.kiszka@siemens.com>:
>>>
>>>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>>>
>>>> dh_fixperms overwrites the permissions do_install may have
>>>> defined. To avoid that, allow the recipe write to define an
>>>> exception list via the PRESERVE_PERMS variable.
>>>>
>>>> Fixes: f301ccb2b5b1 ("meta/dpkg-raw: build raw packages like all
>>>> others") CC: Henning Schild <henning.schild@siemens.com>
>>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>>> ---
>>>> RECIPE-API-CHANGELOG.md | 7 +++++++
>>>> meta/classes/dpkg-raw.bbclass | 9 ++++++++-
>>>> 2 files changed, 15 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md
>>>> index 06a01e3..2bc1585 100644
>>>> --- a/RECIPE-API-CHANGELOG.md
>>>> +++ b/RECIPE-API-CHANGELOG.md
>>>> @@ -124,3 +124,10 @@ updated hence recipes using them shouldn't be
>>>> impacted per se.
>>>> These packages depend on a specific kernel. Its identification is
>>>> now appended to the binary package names in the form
>>>> "-${KERNEL_NAME}". +
>>>> +### PRESERVE_PERMS needed with dpkg-raw for implicit file
>>>> permission setting +
>>>> +In order to use the same file permissions for an input file to a
>>>> dpkg-raw +package on the build machine as well as on the target,
>>>> its absolute target path +needs to be listed in the PRESERVE_PERMS
>>>> variable (space-separated list of +files). Otherwise, default
>>>> permissions are used. diff --git a/meta/classes/dpkg-raw.bbclass
>>>> b/meta/classes/dpkg-raw.bbclass index 8d11433..42276e5 100644
>>>> --- a/meta/classes/dpkg-raw.bbclass
>>>> +++ b/meta/classes/dpkg-raw.bbclass
>>>> @@ -53,12 +53,19 @@ Description: ${DESCRIPTION}
>>>> EOF
>>>> }
>>>>
>>>> +FIXPERM_EXCLUSIONS = \
>>>> + "${@' '.join(['-X ' + x for x in \
>>>> + (d.getVar('PRESERVE_PERMS', False) or
>>>> '').split()])}" +
>>>> deb_create_rules() {
>>>> cat << EOF > ${S}/debian/rules
>>>> #!/usr/bin/make -f
>>>> +
>>>> +override_dh_fixperms:
>>>> + dh_fixperms ${FIXPERM_EXCLUSIONS}
>>>> +
>>>
>>> This should be done only if the variable is non-empty, to keep that
>>> code generic. Also the variable name should maybe start with DH_ or
>>> DEBIAN_.
>>
>> I can change the naming, but I disagree regarding your other concern:
>> dh_fixperms is by definition the default case if there is no
>> override. Therefore
>>
>> override_dh_fixperms:
>> dh_fixperms
>
> I would not be sure. Say a later step in some layers append would want
> to set an actual override would the two conflict?
There is no overlay method for rules files. You replace them, or patch them
knowing how the original version looks like.
Jan
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v3 01/14] dpkg-raw: Respect file permissions defined by recipe if requested
2019-01-16 19:09 ` Jan Kiszka
@ 2019-01-18 9:01 ` Henning Schild
0 siblings, 0 replies; 26+ messages in thread
From: Henning Schild @ 2019-01-18 9:01 UTC (permalink / raw)
To: Jan Kiszka; +Cc: isar-users
Am Wed, 16 Jan 2019 20:09:33 +0100
schrieb Jan Kiszka <jan.kiszka@siemens.com>:
> On 16.01.19 16:24, Henning Schild wrote:
> > Am Wed, 16 Jan 2019 13:11:47 +0100
> > schrieb Jan Kiszka <jan.kiszka@siemens.com>:
> >
> >> On 16.01.19 10:41, Henning Schild wrote:
> >>> Am Wed, 16 Jan 2019 06:32:14 +0100
> >>> schrieb Jan Kiszka <jan.kiszka@siemens.com>:
> >>>
> >>>> From: Jan Kiszka <jan.kiszka@siemens.com>
> >>>>
> >>>> dh_fixperms overwrites the permissions do_install may have
> >>>> defined. To avoid that, allow the recipe write to define an
> >>>> exception list via the PRESERVE_PERMS variable.
> >>>>
> >>>> Fixes: f301ccb2b5b1 ("meta/dpkg-raw: build raw packages like all
> >>>> others") CC: Henning Schild <henning.schild@siemens.com>
> >>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> >>>> ---
> >>>> RECIPE-API-CHANGELOG.md | 7 +++++++
> >>>> meta/classes/dpkg-raw.bbclass | 9 ++++++++-
> >>>> 2 files changed, 15 insertions(+), 1 deletion(-)
> >>>>
> >>>> diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md
> >>>> index 06a01e3..2bc1585 100644
> >>>> --- a/RECIPE-API-CHANGELOG.md
> >>>> +++ b/RECIPE-API-CHANGELOG.md
> >>>> @@ -124,3 +124,10 @@ updated hence recipes using them shouldn't
> >>>> be impacted per se.
> >>>> These packages depend on a specific kernel. Its
> >>>> identification is now appended to the binary package names in
> >>>> the form "-${KERNEL_NAME}". +
> >>>> +### PRESERVE_PERMS needed with dpkg-raw for implicit file
> >>>> permission setting +
> >>>> +In order to use the same file permissions for an input file to a
> >>>> dpkg-raw +package on the build machine as well as on the target,
> >>>> its absolute target path +needs to be listed in the
> >>>> PRESERVE_PERMS variable (space-separated list of +files).
> >>>> Otherwise, default permissions are used. diff --git
> >>>> a/meta/classes/dpkg-raw.bbclass b/meta/classes/dpkg-raw.bbclass
> >>>> index 8d11433..42276e5 100644 --- a/meta/classes/dpkg-raw.bbclass
> >>>> +++ b/meta/classes/dpkg-raw.bbclass
> >>>> @@ -53,12 +53,19 @@ Description: ${DESCRIPTION}
> >>>> EOF
> >>>> }
> >>>>
> >>>> +FIXPERM_EXCLUSIONS = \
> >>>> + "${@' '.join(['-X ' + x for x in \
> >>>> + (d.getVar('PRESERVE_PERMS', False) or
> >>>> '').split()])}" +
> >>>> deb_create_rules() {
> >>>> cat << EOF > ${S}/debian/rules
> >>>> #!/usr/bin/make -f
> >>>> +
> >>>> +override_dh_fixperms:
> >>>> + dh_fixperms ${FIXPERM_EXCLUSIONS}
> >>>> +
> >>>
> >>> This should be done only if the variable is non-empty, to keep
> >>> that code generic. Also the variable name should maybe start with
> >>> DH_ or DEBIAN_.
> >>
> >> I can change the naming, but I disagree regarding your other
> >> concern: dh_fixperms is by definition the default case if there is
> >> no override. Therefore
> >>
> >> override_dh_fixperms:
> >> dh_fixperms
> >
> > I would not be sure. Say a later step in some layers append would
> > want to set an actual override would the two conflict?
>
> There is no overlay method for rules files. You replace them, or
> patch them knowing how the original version looks like.
Exactly and if i wanted an actual override a >> would not work, because
i would have to patch out the useless one first. That is why this noop
should not be included.
Henning
> Jan
>
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v3 02/14] bootimg-efi-isar: Run grub-mkimage without own config
2019-01-16 5:32 [PATCH v3 00/14] Vacation hacks & more Jan Kiszka
2019-01-16 5:32 ` [PATCH v3 01/14] dpkg-raw: Respect file permissions defined by recipe if requested Jan Kiszka
@ 2019-01-16 5:32 ` Jan Kiszka
2019-01-16 5:32 ` [PATCH v3 03/14] bootimg-efi-isar: Retrieve boot disk during runtime Jan Kiszka
` (12 subsequent siblings)
14 siblings, 0 replies; 26+ messages in thread
From: Jan Kiszka @ 2019-01-16 5:32 UTC (permalink / raw)
To: isar-users; +Cc: Henning Schild
From: Jan Kiszka <jan.kiszka@siemens.com>
This avoids hard-coding hd0 into the generated image. Rather rely on
grub automatically setting 'prefix' to 'cmdpath', the location where the
firmware started the grub executable.
CC: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
index 44ce399..0d5d018 100644
--- a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
+++ b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
@@ -91,12 +91,6 @@ class BootimgEFIPlugin(SourcePlugin):
cfg.write(grubefi_conf)
cfg.close()
- cfg = open("%s/hdd/boot/EFI/BOOT/grub-mkimage.cfg" % cr_workdir, "w")
- mkimage_conf = "set root='hd0,gpt%d'\n" % bootpart.realnum
- mkimage_conf += "set prefix=($root)/EFI/BOOT\n"
- cfg.write(mkimage_conf)
- cfg.close()
-
@classmethod
def do_configure_systemdboot(cls, hdddir, creator, cr_workdir, source_params):
"""
@@ -211,8 +205,6 @@ class BootimgEFIPlugin(SourcePlugin):
if source_params['loader'] == 'grub-efi':
shutil.copyfile("%s/hdd/boot/EFI/BOOT/grub.cfg" % cr_workdir,
"%s/grub.cfg" % cr_workdir)
- shutil.copyfile("%s/hdd/boot/EFI/BOOT/grub-mkimage.cfg" % cr_workdir,
- "%s/grub-mkimage.cfg" % cr_workdir)
for mod in [x for x in os.listdir(kernel_dir) if x.startswith("grub-efi-")]:
cp_cmd = "cp %s/%s %s/EFI/BOOT/%s" % (kernel_dir, mod, hdddir, mod[9:])
exec_cmd(cp_cmd, True)
@@ -245,7 +237,6 @@ class BootimgEFIPlugin(SourcePlugin):
# TODO: check that grub-mkimage is available
grub_cmd = "grub-mkimage -p /EFI/BOOT "
- grub_cmd += "-c %s/grub-mkimage.cfg " % cr_workdir
grub_cmd += "-O %s -o %s/EFI/BOOT/%s " \
% (grub_target, bootimg_dir, grub_image)
grub_cmd += "part_gpt part_msdos ntfs ntfscomp fat ext2 "
--
2.16.4
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v3 03/14] bootimg-efi-isar: Retrieve boot disk during runtime
2019-01-16 5:32 [PATCH v3 00/14] Vacation hacks & more Jan Kiszka
2019-01-16 5:32 ` [PATCH v3 01/14] dpkg-raw: Respect file permissions defined by recipe if requested Jan Kiszka
2019-01-16 5:32 ` [PATCH v3 02/14] bootimg-efi-isar: Run grub-mkimage without own config Jan Kiszka
@ 2019-01-16 5:32 ` Jan Kiszka
2019-01-16 5:32 ` [PATCH v3 04/14] isar-cfg-localepurge: Also set /etc/default/locale Jan Kiszka
` (11 subsequent siblings)
14 siblings, 0 replies; 26+ messages in thread
From: Jan Kiszka @ 2019-01-16 5:32 UTC (permalink / raw)
To: isar-users; +Cc: Henning Schild
From: Jan Kiszka <jan.kiszka@siemens.com>
Use regexp on 'prefix' in order to define the boot disk. This still
binds boot and root partition to the same disk but at least removes the
assumption that this is hd0.
CC: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
index 0d5d018..1ca200f 100644
--- a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
+++ b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
@@ -71,7 +71,8 @@ class BootimgEFIPlugin(SourcePlugin):
grubefi_conf += "timeout=%s\n" % bootloader.timeout
for part in creator.parts:
if part.mountpoint == "/":
- grubefi_conf += "set root='hd0,gpt%d'\n" % part.realnum
+ grubefi_conf += "regexp --set bootdisk '(hd[0-9]*),' $prefix\n"
+ grubefi_conf += "set root=$bootdisk',gpt%d'\n" % part.realnum
grubefi_conf += "menuentry 'boot'{\n"
kernel = "/vmlinuz"
@@ -245,7 +246,7 @@ class BootimgEFIPlugin(SourcePlugin):
grub_cmd += "terminal minicmd test loadenv echo help "
grub_cmd += "reboot serial terminfo iso9660 loopback tar "
grub_cmd += "memdisk ls search_fs_uuid udf btrfs xfs lvm "
- grub_cmd += "reiserfs " + grub_modules
+ grub_cmd += "reiserfs regexp " + grub_modules
exec_cmd(grub_cmd)
elif source_params['loader'] == 'systemd-boot':
for mod in [x for x in os.listdir(kernel_dir) if x.startswith("systemd-")]:
--
2.16.4
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v3 04/14] isar-cfg-localepurge: Also set /etc/default/locale
2019-01-16 5:32 [PATCH v3 00/14] Vacation hacks & more Jan Kiszka
` (2 preceding siblings ...)
2019-01-16 5:32 ` [PATCH v3 03/14] bootimg-efi-isar: Retrieve boot disk during runtime Jan Kiszka
@ 2019-01-16 5:32 ` Jan Kiszka
2019-01-16 5:32 ` [PATCH v3 05/14] Fix LIC_FILES_CHKSUM paths Jan Kiszka
` (10 subsequent siblings)
14 siblings, 0 replies; 26+ messages in thread
From: Jan Kiszka @ 2019-01-16 5:32 UTC (permalink / raw)
To: isar-users; +Cc: Claudius Heine
From: Jan Kiszka <jan.kiszka@siemens.com>
This is required in order to localize more applications, such as desktop
environments.
CC: Claudius Heine <ch@denx.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
meta/recipes-support/isar-cfg-localepurge/files/postinst | 2 ++
meta/recipes-support/isar-cfg-localepurge/isar-cfg-localepurge.bb | 5 +++++
2 files changed, 7 insertions(+)
diff --git a/meta/recipes-support/isar-cfg-localepurge/files/postinst b/meta/recipes-support/isar-cfg-localepurge/files/postinst
index c5f1c51..9dfd6f9 100644
--- a/meta/recipes-support/isar-cfg-localepurge/files/postinst
+++ b/meta/recipes-support/isar-cfg-localepurge/files/postinst
@@ -3,6 +3,8 @@ set -e
cat /usr/lib/isar-cfg-localepurge/locale.gen \
>> /etc/locale.gen
+cat /usr/lib/isar-cfg-localepurge/locale.default \
+ > /etc/default/locale
cat /usr/lib/isar-cfg-localepurge/locale.nopurge \
> /etc/locale.nopurge
diff --git a/meta/recipes-support/isar-cfg-localepurge/isar-cfg-localepurge.bb b/meta/recipes-support/isar-cfg-localepurge/isar-cfg-localepurge.bb
index bdbc2b1..62b4b2d 100644
--- a/meta/recipes-support/isar-cfg-localepurge/isar-cfg-localepurge.bb
+++ b/meta/recipes-support/isar-cfg-localepurge/isar-cfg-localepurge.bb
@@ -42,6 +42,9 @@ do_gen_config() {
locales locales/locales_to_be_generated multiselect ${@get_dc_locale_gen(d)}
locales locales/default_environment_locale select ${LOCALE_DEFAULT}
__EOF__
+ cat<<-__EOF__ > ${WORKDIR}/locale.default
+ LANG=${LOCALE_DEFAULT}
+ __EOF__
cat<<-__EOF__ > ${WORKDIR}/locale.nopurge
#USE_DPKG
MANDELETE
@@ -60,6 +63,8 @@ do_install() {
${D}/usr/lib/${PN}/locale.debconf
install -v -m 644 ${WORKDIR}/locale.gen \
${D}/usr/lib/${PN}/locale.gen
+ install -v -m 644 ${WORKDIR}/locale.default \
+ ${D}/usr/lib/${PN}/locale.default
install -v -m 644 ${WORKDIR}/locale.nopurge \
${D}/usr/lib/${PN}/locale.nopurge
}
--
2.16.4
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v3 05/14] Fix LIC_FILES_CHKSUM paths
2019-01-16 5:32 [PATCH v3 00/14] Vacation hacks & more Jan Kiszka
` (3 preceding siblings ...)
2019-01-16 5:32 ` [PATCH v3 04/14] isar-cfg-localepurge: Also set /etc/default/locale Jan Kiszka
@ 2019-01-16 5:32 ` Jan Kiszka
2019-01-16 5:32 ` [PATCH v3 06/14] Move repo variables to proper conf file Jan Kiszka
` (9 subsequent siblings)
14 siblings, 0 replies; 26+ messages in thread
From: Jan Kiszka @ 2019-01-16 5:32 UTC (permalink / raw)
To: isar-users
From: Jan Kiszka <jan.kiszka@siemens.com>
The licenses are located in the core layer.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
meta-isar/recipes-app/example-hello/example-hello.bb | 2 +-
meta-isar/recipes-app/libhello/libhello.bb | 2 +-
meta-isar/recipes-core/images/isar-image-base.bb | 2 +-
meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 2 +-
meta/recipes-devtools/buildchroot/buildchroot.inc | 2 +-
meta/recipes-devtools/sdkchroot/sdkchroot.bb | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/meta-isar/recipes-app/example-hello/example-hello.bb b/meta-isar/recipes-app/example-hello/example-hello.bb
index d23ee6c..9b35537 100644
--- a/meta-isar/recipes-app/example-hello/example-hello.bb
+++ b/meta-isar/recipes-app/example-hello/example-hello.bb
@@ -6,7 +6,7 @@
DESCRIPTION = "Sample application for ISAR"
LICENSE = "gpl-2.0"
-LIC_FILES_CHKSUM = "file://${LAYERDIR_isar}/licenses/COPYING.GPLv2;md5=751419260aa954499f7abaabaa882bbe"
+LIC_FILES_CHKSUM = "file://${LAYERDIR_core}/licenses/COPYING.GPLv2;md5=751419260aa954499f7abaabaa882bbe"
PV = "0.2-86cc719"
diff --git a/meta-isar/recipes-app/libhello/libhello.bb b/meta-isar/recipes-app/libhello/libhello.bb
index 4e75f98..ab271b5 100644
--- a/meta-isar/recipes-app/libhello/libhello.bb
+++ b/meta-isar/recipes-app/libhello/libhello.bb
@@ -6,7 +6,7 @@
DESCRIPTION = "Sample shared library for ISAR"
LICENSE = "gpl-2.0"
-LIC_FILES_CHKSUM = "file://${LAYERDIR_isar}/licenses/COPYING.GPLv2;md5=751419260aa954499f7abaabaa882bbe"
+LIC_FILES_CHKSUM = "file://${LAYERDIR_core}/licenses/COPYING.GPLv2;md5=751419260aa954499f7abaabaa882bbe"
PV = "0.1-98f2e41"
diff --git a/meta-isar/recipes-core/images/isar-image-base.bb b/meta-isar/recipes-core/images/isar-image-base.bb
index 074e566..c86e63b 100644
--- a/meta-isar/recipes-core/images/isar-image-base.bb
+++ b/meta-isar/recipes-core/images/isar-image-base.bb
@@ -6,7 +6,7 @@
DESCRIPTION = "Isar target filesystem"
LICENSE = "gpl-2.0"
-LIC_FILES_CHKSUM = "file://${LAYERDIR_isar}/licenses/COPYING.GPLv2;md5=751419260aa954499f7abaabaa882bbe"
+LIC_FILES_CHKSUM = "file://${LAYERDIR_core}/licenses/COPYING.GPLv2;md5=751419260aa954499f7abaabaa882bbe"
PV = "1.0"
diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
index f411ad1..8f7ed04 100644
--- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
+++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
@@ -6,7 +6,7 @@
# SPDX-License-Identifier: MIT
LICENSE = "gpl-2.0"
-LIC_FILES_CHKSUM = "file://${LAYERDIR_isar}/licenses/COPYING.GPLv2;md5=751419260aa954499f7abaabaa882bbe"
+LIC_FILES_CHKSUM = "file://${LAYERDIR_core}/licenses/COPYING.GPLv2;md5=751419260aa954499f7abaabaa882bbe"
FILESPATH_prepend := "${THISDIR}/files:"
SRC_URI = " \
file://isar-apt.conf \
diff --git a/meta/recipes-devtools/buildchroot/buildchroot.inc b/meta/recipes-devtools/buildchroot/buildchroot.inc
index 2c44db9..764bc5e 100644
--- a/meta/recipes-devtools/buildchroot/buildchroot.inc
+++ b/meta/recipes-devtools/buildchroot/buildchroot.inc
@@ -4,7 +4,7 @@
# Copyright (C) 2015-2018 ilbers GmbH
LICENSE = "gpl-2.0"
-LIC_FILES_CHKSUM = "file://${LAYERDIR_isar}/licenses/COPYING.GPLv2;md5=751419260aa954499f7abaabaa882bbe"
+LIC_FILES_CHKSUM = "file://${LAYERDIR_core}/licenses/COPYING.GPLv2;md5=751419260aa954499f7abaabaa882bbe"
FILESPATH_prepend := "${THISDIR}/files:"
SRC_URI = "file://configscript.sh \
diff --git a/meta/recipes-devtools/sdkchroot/sdkchroot.bb b/meta/recipes-devtools/sdkchroot/sdkchroot.bb
index ba84d53..f6b9cce 100644
--- a/meta/recipes-devtools/sdkchroot/sdkchroot.bb
+++ b/meta/recipes-devtools/sdkchroot/sdkchroot.bb
@@ -6,7 +6,7 @@
DESCRIPTION = "Isar SDK Root filesystem"
LICENSE = "gpl-2.0"
-LIC_FILES_CHKSUM = "file://${LAYERDIR_isar}/licenses/COPYING.GPLv2;md5=751419260aa954499f7abaabaa882bbe"
+LIC_FILES_CHKSUM = "file://${LAYERDIR_core}/licenses/COPYING.GPLv2;md5=751419260aa954499f7abaabaa882bbe"
SRC_URI = "file://configscript.sh"
PV = "0.1"
--
2.16.4
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v3 06/14] Move repo variables to proper conf file
2019-01-16 5:32 [PATCH v3 00/14] Vacation hacks & more Jan Kiszka
` (4 preceding siblings ...)
2019-01-16 5:32 ` [PATCH v3 05/14] Fix LIC_FILES_CHKSUM paths Jan Kiszka
@ 2019-01-16 5:32 ` Jan Kiszka
2019-01-16 5:32 ` [PATCH v3 07/14] Move debian distro conf files to meta Jan Kiszka
` (8 subsequent siblings)
14 siblings, 0 replies; 26+ messages in thread
From: Jan Kiszka @ 2019-01-16 5:32 UTC (permalink / raw)
To: isar-users
From: Jan Kiszka <jan.kiszka@siemens.com>
These definitely do not belong to a layer.conf. Rather, they are so
essential that placing them in the custom bitbake.conf is justified.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
meta-isar/conf/layer.conf | 11 -----------
meta/conf/bitbake.conf | 11 +++++++++++
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/meta-isar/conf/layer.conf b/meta-isar/conf/layer.conf
index 5d3ae88..9939bdc 100644
--- a/meta-isar/conf/layer.conf
+++ b/meta-isar/conf/layer.conf
@@ -17,14 +17,3 @@ LAYERVERSION_isar = "3"
LAYERSERIES_COMPAT_isar = "v0.6"
LAYERDIR_isar = "${LAYERDIR}"
-
-# Codename of the repository created by the caching class
-DEBDISTRONAME = "isar"
-
-# Isar apt repository paths
-REPO_ISAR_DIR ?= "${DEPLOY_DIR}/isar-apt/apt"
-REPO_ISAR_DB_DIR ?= "${DEPLOY_DIR}/isar-apt/db"
-
-# Base apt repository paths
-REPO_BASE_DIR ?= "${DL_DIR}/base-apt/apt"
-REPO_BASE_DB_DIR ?= "${DL_DIR}/base-apt/db"
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 7e8dea1..b067a0d 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -55,6 +55,17 @@ BUILDCHROOT_HOST_DIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/buildchroot-host
BUILDCHROOT_TARGET_DIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/buildchroot-target/rootfs"
CACHE = "${TMPDIR}/cache"
+# Codename of the repository created by the caching class
+DEBDISTRONAME = "isar"
+
+# Isar apt repository paths
+REPO_ISAR_DIR = "${DEPLOY_DIR}/isar-apt/apt"
+REPO_ISAR_DB_DIR = "${DEPLOY_DIR}/isar-apt/db"
+
+# Base apt repository paths
+REPO_BASE_DIR = "${DL_DIR}/base-apt/apt"
+REPO_BASE_DB_DIR = "${DL_DIR}/base-apt/db"
+
OVERRIDES_append = ":${DISTRO}:${DISTRO_ARCH}"
BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH BBSERVER DL_DIR \
--
2.16.4
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v3 07/14] Move debian distro conf files to meta
2019-01-16 5:32 [PATCH v3 00/14] Vacation hacks & more Jan Kiszka
` (5 preceding siblings ...)
2019-01-16 5:32 ` [PATCH v3 06/14] Move repo variables to proper conf file Jan Kiszka
@ 2019-01-16 5:32 ` Jan Kiszka
2019-01-17 16:34 ` Maxim Yu. Osipov
2019-01-16 5:32 ` [PATCH v3 08/14] bootimg-efi-isar: Fix serial console setup for grub Jan Kiszka
` (7 subsequent siblings)
14 siblings, 1 reply; 26+ messages in thread
From: Jan Kiszka @ 2019-01-16 5:32 UTC (permalink / raw)
To: isar-users
From: Jan Kiszka <jan.kiszka@siemens.com>
This only keeps specialties and examples in meta-isar, allowing to base
normal Debian layers solely on meta.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
meta-isar/conf/distro/raspbian-jessie.conf | 2 +-
meta/classes/isar-image.bbclass | 4 ++--
{meta-isar => meta}/conf/distro/debian-buster.conf | 0
{meta-isar => meta}/conf/distro/debian-buster.list | 0
{meta-isar => meta}/conf/distro/debian-common.conf | 0
{meta-isar => meta}/conf/distro/debian-configscript.sh | 0
{meta-isar => meta}/conf/distro/debian-jessie.conf | 0
{meta-isar => meta}/conf/distro/debian-jessie.list | 0
{meta-isar => meta}/conf/distro/debian-stretch.conf | 0
{meta-isar => meta}/conf/distro/debian-stretch.list | 0
10 files changed, 3 insertions(+), 3 deletions(-)
rename {meta-isar => meta}/conf/distro/debian-buster.conf (100%)
rename {meta-isar => meta}/conf/distro/debian-buster.list (100%)
rename {meta-isar => meta}/conf/distro/debian-common.conf (100%)
rename {meta-isar => meta}/conf/distro/debian-configscript.sh (100%)
rename {meta-isar => meta}/conf/distro/debian-jessie.conf (100%)
rename {meta-isar => meta}/conf/distro/debian-jessie.list (100%)
rename {meta-isar => meta}/conf/distro/debian-stretch.conf (100%)
rename {meta-isar => meta}/conf/distro/debian-stretch.list (100%)
diff --git a/meta-isar/conf/distro/raspbian-jessie.conf b/meta-isar/conf/distro/raspbian-jessie.conf
index de8b5a1..5e907e5 100644
--- a/meta-isar/conf/distro/raspbian-jessie.conf
+++ b/meta-isar/conf/distro/raspbian-jessie.conf
@@ -8,5 +8,5 @@ BASE_DISTRO_CODENAME = "jessie"
DISTRO_APT_SOURCES += "conf/distro/raspbian-jessie.list"
DISTRO_APT_KEYS += "https://archive.raspbian.org/raspbian.public.key;sha256sum=ca59cd4f2bcbc3a1d41ba6815a02a8dc5c175467a59bd87edeac458f4a5345de"
-DISTRO_CONFIG_SCRIPT?= "raspbian-configscript.sh"
+DISTRO_CONFIG_SCRIPT ?= "${LAYERDIR_isar}/conf/distro/raspbian-configscript.sh"
DISTRO_KERNELS ?= "rpi rpi2 rpi-rpfv rpi2-rpfv"
diff --git a/meta/classes/isar-image.bbclass b/meta/classes/isar-image.bbclass
index 754e896..cf68947 100644
--- a/meta/classes/isar-image.bbclass
+++ b/meta/classes/isar-image.bbclass
@@ -6,7 +6,7 @@
inherit image
inherit isar-bootstrap-helper
-FILESPATH =. "${LAYERDIR_isar}/conf/distro:"
+FILESPATH =. "${LAYERDIR_core}/conf/distro:"
SRC_URI += "${@ 'file://${DISTRO_CONFIG_SCRIPT}' if '${DISTRO_CONFIG_SCRIPT}' else '' }"
DEPENDS += "${IMAGE_INSTALL} ${IMAGE_TRANSIENT_PACKAGES}"
@@ -15,7 +15,7 @@ IMAGE_TRANSIENT_PACKAGES += "isar-cfg-localepurge"
WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PN}"
-ISAR_RELEASE_CMD_DEFAULT = "git -C ${LAYERDIR_isar} describe --tags --dirty --match 'v[0-9].[0-9]*'"
+ISAR_RELEASE_CMD_DEFAULT = "git -C ${LAYERDIR_core} describe --tags --dirty --match 'v[0-9].[0-9]*'"
ISAR_RELEASE_CMD ?= "${ISAR_RELEASE_CMD_DEFAULT}"
do_rootfs[root_cleandirs] = "${IMAGE_ROOTFS} \
diff --git a/meta-isar/conf/distro/debian-buster.conf b/meta/conf/distro/debian-buster.conf
similarity index 100%
rename from meta-isar/conf/distro/debian-buster.conf
rename to meta/conf/distro/debian-buster.conf
diff --git a/meta-isar/conf/distro/debian-buster.list b/meta/conf/distro/debian-buster.list
similarity index 100%
rename from meta-isar/conf/distro/debian-buster.list
rename to meta/conf/distro/debian-buster.list
diff --git a/meta-isar/conf/distro/debian-common.conf b/meta/conf/distro/debian-common.conf
similarity index 100%
rename from meta-isar/conf/distro/debian-common.conf
rename to meta/conf/distro/debian-common.conf
diff --git a/meta-isar/conf/distro/debian-configscript.sh b/meta/conf/distro/debian-configscript.sh
similarity index 100%
rename from meta-isar/conf/distro/debian-configscript.sh
rename to meta/conf/distro/debian-configscript.sh
diff --git a/meta-isar/conf/distro/debian-jessie.conf b/meta/conf/distro/debian-jessie.conf
similarity index 100%
rename from meta-isar/conf/distro/debian-jessie.conf
rename to meta/conf/distro/debian-jessie.conf
diff --git a/meta-isar/conf/distro/debian-jessie.list b/meta/conf/distro/debian-jessie.list
similarity index 100%
rename from meta-isar/conf/distro/debian-jessie.list
rename to meta/conf/distro/debian-jessie.list
diff --git a/meta-isar/conf/distro/debian-stretch.conf b/meta/conf/distro/debian-stretch.conf
similarity index 100%
rename from meta-isar/conf/distro/debian-stretch.conf
rename to meta/conf/distro/debian-stretch.conf
diff --git a/meta-isar/conf/distro/debian-stretch.list b/meta/conf/distro/debian-stretch.list
similarity index 100%
rename from meta-isar/conf/distro/debian-stretch.list
rename to meta/conf/distro/debian-stretch.list
--
2.16.4
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v3 07/14] Move debian distro conf files to meta
2019-01-16 5:32 ` [PATCH v3 07/14] Move debian distro conf files to meta Jan Kiszka
@ 2019-01-17 16:34 ` Maxim Yu. Osipov
0 siblings, 0 replies; 26+ messages in thread
From: Maxim Yu. Osipov @ 2019-01-17 16:34 UTC (permalink / raw)
To: Jan Kiszka, isar-users
On 1/16/19 6:32 AM, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> This only keeps specialties and examples in meta-isar, allowing to base
> normal Debian layers solely on meta.
This patch causes RaspberryPi build failure (see log
http://isar-build.org:8080/job/isar_mosipov_next/119/console)
v4 (fixing the problem) is followed in the next email.
Regards,
Maxim.
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> meta-isar/conf/distro/raspbian-jessie.conf | 2 +-
> meta/classes/isar-image.bbclass | 4 ++--
> {meta-isar => meta}/conf/distro/debian-buster.conf | 0
> {meta-isar => meta}/conf/distro/debian-buster.list | 0
> {meta-isar => meta}/conf/distro/debian-common.conf | 0
> {meta-isar => meta}/conf/distro/debian-configscript.sh | 0
> {meta-isar => meta}/conf/distro/debian-jessie.conf | 0
> {meta-isar => meta}/conf/distro/debian-jessie.list | 0
> {meta-isar => meta}/conf/distro/debian-stretch.conf | 0
> {meta-isar => meta}/conf/distro/debian-stretch.list | 0
> 10 files changed, 3 insertions(+), 3 deletions(-)
> rename {meta-isar => meta}/conf/distro/debian-buster.conf (100%)
> rename {meta-isar => meta}/conf/distro/debian-buster.list (100%)
> rename {meta-isar => meta}/conf/distro/debian-common.conf (100%)
> rename {meta-isar => meta}/conf/distro/debian-configscript.sh (100%)
> rename {meta-isar => meta}/conf/distro/debian-jessie.conf (100%)
> rename {meta-isar => meta}/conf/distro/debian-jessie.list (100%)
> rename {meta-isar => meta}/conf/distro/debian-stretch.conf (100%)
> rename {meta-isar => meta}/conf/distro/debian-stretch.list (100%)
>
> diff --git a/meta-isar/conf/distro/raspbian-jessie.conf b/meta-isar/conf/distro/raspbian-jessie.conf
> index de8b5a1..5e907e5 100644
> --- a/meta-isar/conf/distro/raspbian-jessie.conf
> +++ b/meta-isar/conf/distro/raspbian-jessie.conf
> @@ -8,5 +8,5 @@ BASE_DISTRO_CODENAME = "jessie"
>
> DISTRO_APT_SOURCES += "conf/distro/raspbian-jessie.list"
> DISTRO_APT_KEYS += "https://archive.raspbian.org/raspbian.public.key;sha256sum=ca59cd4f2bcbc3a1d41ba6815a02a8dc5c175467a59bd87edeac458f4a5345de"
> -DISTRO_CONFIG_SCRIPT?= "raspbian-configscript.sh"
> +DISTRO_CONFIG_SCRIPT ?= "${LAYERDIR_isar}/conf/distro/raspbian-configscript.sh"
> DISTRO_KERNELS ?= "rpi rpi2 rpi-rpfv rpi2-rpfv"
> diff --git a/meta/classes/isar-image.bbclass b/meta/classes/isar-image.bbclass
> index 754e896..cf68947 100644
> --- a/meta/classes/isar-image.bbclass
> +++ b/meta/classes/isar-image.bbclass
> @@ -6,7 +6,7 @@
> inherit image
> inherit isar-bootstrap-helper
>
> -FILESPATH =. "${LAYERDIR_isar}/conf/distro:"
> +FILESPATH =. "${LAYERDIR_core}/conf/distro:"
> SRC_URI += "${@ 'file://${DISTRO_CONFIG_SCRIPT}' if '${DISTRO_CONFIG_SCRIPT}' else '' }"
>
> DEPENDS += "${IMAGE_INSTALL} ${IMAGE_TRANSIENT_PACKAGES}"
> @@ -15,7 +15,7 @@ IMAGE_TRANSIENT_PACKAGES += "isar-cfg-localepurge"
>
> WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PN}"
>
> -ISAR_RELEASE_CMD_DEFAULT = "git -C ${LAYERDIR_isar} describe --tags --dirty --match 'v[0-9].[0-9]*'"
> +ISAR_RELEASE_CMD_DEFAULT = "git -C ${LAYERDIR_core} describe --tags --dirty --match 'v[0-9].[0-9]*'"
> ISAR_RELEASE_CMD ?= "${ISAR_RELEASE_CMD_DEFAULT}"
>
> do_rootfs[root_cleandirs] = "${IMAGE_ROOTFS} \
> diff --git a/meta-isar/conf/distro/debian-buster.conf b/meta/conf/distro/debian-buster.conf
> similarity index 100%
> rename from meta-isar/conf/distro/debian-buster.conf
> rename to meta/conf/distro/debian-buster.conf
> diff --git a/meta-isar/conf/distro/debian-buster.list b/meta/conf/distro/debian-buster.list
> similarity index 100%
> rename from meta-isar/conf/distro/debian-buster.list
> rename to meta/conf/distro/debian-buster.list
> diff --git a/meta-isar/conf/distro/debian-common.conf b/meta/conf/distro/debian-common.conf
> similarity index 100%
> rename from meta-isar/conf/distro/debian-common.conf
> rename to meta/conf/distro/debian-common.conf
> diff --git a/meta-isar/conf/distro/debian-configscript.sh b/meta/conf/distro/debian-configscript.sh
> similarity index 100%
> rename from meta-isar/conf/distro/debian-configscript.sh
> rename to meta/conf/distro/debian-configscript.sh
> diff --git a/meta-isar/conf/distro/debian-jessie.conf b/meta/conf/distro/debian-jessie.conf
> similarity index 100%
> rename from meta-isar/conf/distro/debian-jessie.conf
> rename to meta/conf/distro/debian-jessie.conf
> diff --git a/meta-isar/conf/distro/debian-jessie.list b/meta/conf/distro/debian-jessie.list
> similarity index 100%
> rename from meta-isar/conf/distro/debian-jessie.list
> rename to meta/conf/distro/debian-jessie.list
> diff --git a/meta-isar/conf/distro/debian-stretch.conf b/meta/conf/distro/debian-stretch.conf
> similarity index 100%
> rename from meta-isar/conf/distro/debian-stretch.conf
> rename to meta/conf/distro/debian-stretch.conf
> diff --git a/meta-isar/conf/distro/debian-stretch.list b/meta/conf/distro/debian-stretch.list
> similarity index 100%
> rename from meta-isar/conf/distro/debian-stretch.list
> rename to meta/conf/distro/debian-stretch.list
>
--
Maxim Osipov
ilbers GmbH
Maria-Merian-Str. 8
85521 Ottobrunn
Germany
+49 (151) 6517 6917
mosipov@ilbers.de
http://ilbers.de/
Commercial register Munich, HRB 214197
General Manager: Baurzhan Ismagulov
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v3 08/14] bootimg-efi-isar: Fix serial console setup for grub
2019-01-16 5:32 [PATCH v3 00/14] Vacation hacks & more Jan Kiszka
` (6 preceding siblings ...)
2019-01-16 5:32 ` [PATCH v3 07/14] Move debian distro conf files to meta Jan Kiszka
@ 2019-01-16 5:32 ` Jan Kiszka
2019-01-16 9:47 ` Henning Schild
2021-09-01 9:11 ` Henning Schild
2019-01-16 5:32 ` [PATCH v3 09/14] bootimg-efi-isar: Reformat generated grub.cfg Jan Kiszka
` (6 subsequent siblings)
14 siblings, 2 replies; 26+ messages in thread
From: Jan Kiszka @ 2019-01-16 5:32 UTC (permalink / raw)
To: isar-users
From: Jan Kiszka <jan.kiszka@siemens.com>
We were lacking terminal_input/output to make the serial console truly
work.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
index 1ca200f..c6a6a02 100644
--- a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
+++ b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
@@ -65,8 +65,10 @@ class BootimgEFIPlugin(SourcePlugin):
# Create grub configuration using parameters from wks file
bootloader = creator.ks.bootloader
- grubefi_conf = ""
- grubefi_conf += "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1\n"
+ grubefi_conf = "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1\n"
+ grubefi_conf += "terminal_input --append serial\n"
+ grubefi_conf += "terminal_output --append serial\n"
+ grubefi_conf += "\n"
grubefi_conf += "default=boot\n"
grubefi_conf += "timeout=%s\n" % bootloader.timeout
for part in creator.parts:
--
2.16.4
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v3 08/14] bootimg-efi-isar: Fix serial console setup for grub
2019-01-16 5:32 ` [PATCH v3 08/14] bootimg-efi-isar: Fix serial console setup for grub Jan Kiszka
@ 2019-01-16 9:47 ` Henning Schild
2019-01-16 12:17 ` Jan Kiszka
2021-09-01 9:11 ` Henning Schild
1 sibling, 1 reply; 26+ messages in thread
From: Henning Schild @ 2019-01-16 9:47 UTC (permalink / raw)
To: [ext] Jan Kiszka; +Cc: isar-users
Am Wed, 16 Jan 2019 06:32:21 +0100
schrieb "[ext] Jan Kiszka" <jan.kiszka@siemens.com>:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> We were lacking terminal_input/output to make the serial console truly
> work.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
> b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py index
> 1ca200f..c6a6a02 100644 ---
> a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py +++
> b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py @@ -65,8
> +65,10 @@ class BootimgEFIPlugin(SourcePlugin): # Create grub
> configuration using parameters from wks file bootloader =
> creator.ks.bootloader
> - grubefi_conf = ""
> - grubefi_conf += "serial --unit=0 --speed=115200 --word=8
> --parity=no --stop=1\n"
> + grubefi_conf = "serial --unit=0 --speed=115200 --word=8
> --parity=no --stop=1\n"
> + grubefi_conf += "terminal_input --append serial\n"
> + grubefi_conf += "terminal_output --append serial\n"
> + grubefi_conf += "\n"
Good catch and very useful improvement! Would it help to involve
grub-mkconfig into the flow and create the config from something
like /etc/default/grub?
Henning
> grubefi_conf += "default=boot\n"
> grubefi_conf += "timeout=%s\n" % bootloader.timeout
> for part in creator.parts:
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v3 08/14] bootimg-efi-isar: Fix serial console setup for grub
2019-01-16 9:47 ` Henning Schild
@ 2019-01-16 12:17 ` Jan Kiszka
0 siblings, 0 replies; 26+ messages in thread
From: Jan Kiszka @ 2019-01-16 12:17 UTC (permalink / raw)
To: Henning Schild; +Cc: isar-users
On 16.01.19 10:47, Henning Schild wrote:
> Am Wed, 16 Jan 2019 06:32:21 +0100
> schrieb "[ext] Jan Kiszka" <jan.kiszka@siemens.com>:
>
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> We were lacking terminal_input/output to make the serial console truly
>> work.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>> meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py | 6 ++++--
>> 1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
>> b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py index
>> 1ca200f..c6a6a02 100644 ---
>> a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py +++
>> b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py @@ -65,8
>> +65,10 @@ class BootimgEFIPlugin(SourcePlugin): # Create grub
>> configuration using parameters from wks file bootloader =
>> creator.ks.bootloader
>> - grubefi_conf = ""
>> - grubefi_conf += "serial --unit=0 --speed=115200 --word=8
>> --parity=no --stop=1\n"
>> + grubefi_conf = "serial --unit=0 --speed=115200 --word=8
>> --parity=no --stop=1\n"
>> + grubefi_conf += "terminal_input --append serial\n"
>> + grubefi_conf += "terminal_output --append serial\n"
>> + grubefi_conf += "\n"
>
> Good catch and very useful improvement! Would it help to involve
> grub-mkconfig into the flow and create the config from something
> like /etc/default/grub?
We could work towards evaluating (and configuring via) default/grub, but that
would be an add-on topic for later. We already do that for u-boot (via
u-boot-script), in fact.
Jan
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v3 08/14] bootimg-efi-isar: Fix serial console setup for grub
2019-01-16 5:32 ` [PATCH v3 08/14] bootimg-efi-isar: Fix serial console setup for grub Jan Kiszka
2019-01-16 9:47 ` Henning Schild
@ 2021-09-01 9:11 ` Henning Schild
2021-09-01 10:02 ` Jan Kiszka
1 sibling, 1 reply; 26+ messages in thread
From: Henning Schild @ 2021-09-01 9:11 UTC (permalink / raw)
To: [ext] Jan Kiszka; +Cc: isar-users
I am currently looking at re-forking that efi plugin to get it down to
minimal isar specific changes. This patch looks more like upstream
worthy instead of isar specific.
But in fact on a recent (bullseye) amd64 grub comes up on serial
without those lines. Any clue which DISTRO/DISTRO_ARCH needed that?
I am tempted to leave it out in the re-fork.
Henning
Am Wed, 16 Jan 2019 06:32:21 +0100
schrieb "[ext] Jan Kiszka" <jan.kiszka@siemens.com>:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> We were lacking terminal_input/output to make the serial console truly
> work.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
> b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py index
> 1ca200f..c6a6a02 100644 ---
> a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py +++
> b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py @@ -65,8
> +65,10 @@ class BootimgEFIPlugin(SourcePlugin): # Create grub
> configuration using parameters from wks file bootloader =
> creator.ks.bootloader
> - grubefi_conf = ""
> - grubefi_conf += "serial --unit=0 --speed=115200 --word=8
> --parity=no --stop=1\n"
> + grubefi_conf = "serial --unit=0 --speed=115200 --word=8
> --parity=no --stop=1\n"
> + grubefi_conf += "terminal_input --append serial\n"
> + grubefi_conf += "terminal_output --append serial\n"
> + grubefi_conf += "\n"
> grubefi_conf += "default=boot\n"
> grubefi_conf += "timeout=%s\n" % bootloader.timeout
> for part in creator.parts:
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v3 08/14] bootimg-efi-isar: Fix serial console setup for grub
2021-09-01 9:11 ` Henning Schild
@ 2021-09-01 10:02 ` Jan Kiszka
0 siblings, 0 replies; 26+ messages in thread
From: Jan Kiszka @ 2021-09-01 10:02 UTC (permalink / raw)
To: Henning Schild; +Cc: isar-users
On 01.09.21 11:11, Henning Schild wrote:
> I am currently looking at re-forking that efi plugin to get it down to
> minimal isar specific changes. This patch looks more like upstream
> worthy instead of isar specific.
>
> But in fact on a recent (bullseye) amd64 grub comes up on serial
> without those lines. Any clue which DISTRO/DISTRO_ARCH needed that?
>
2019 - likely stretch, likely x86.
> I am tempted to leave it out in the re-fork.
>
Just test it, at least also on buster, then decide.
Jan
> Henning
>
> Am Wed, 16 Jan 2019 06:32:21 +0100
> schrieb "[ext] Jan Kiszka" <jan.kiszka@siemens.com>:
>
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> We were lacking terminal_input/output to make the serial console truly
>> work.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>> meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py | 6 ++++--
>> 1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
>> b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py index
>> 1ca200f..c6a6a02 100644 ---
>> a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py +++
>> b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py @@ -65,8
>> +65,10 @@ class BootimgEFIPlugin(SourcePlugin): # Create grub
>> configuration using parameters from wks file bootloader =
>> creator.ks.bootloader
>> - grubefi_conf = ""
>> - grubefi_conf += "serial --unit=0 --speed=115200 --word=8
>> --parity=no --stop=1\n"
>> + grubefi_conf = "serial --unit=0 --speed=115200 --word=8
>> --parity=no --stop=1\n"
>> + grubefi_conf += "terminal_input --append serial\n"
>> + grubefi_conf += "terminal_output --append serial\n"
>> + grubefi_conf += "\n"
>> grubefi_conf += "default=boot\n"
>> grubefi_conf += "timeout=%s\n" % bootloader.timeout
>> for part in creator.parts:
>
--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v3 09/14] bootimg-efi-isar: Reformat generated grub.cfg
2019-01-16 5:32 [PATCH v3 00/14] Vacation hacks & more Jan Kiszka
` (7 preceding siblings ...)
2019-01-16 5:32 ` [PATCH v3 08/14] bootimg-efi-isar: Fix serial console setup for grub Jan Kiszka
@ 2019-01-16 5:32 ` Jan Kiszka
2019-01-16 5:32 ` [PATCH v3 10/14] scripts: Add rpm2cpio.sh Jan Kiszka
` (5 subsequent siblings)
14 siblings, 0 replies; 26+ messages in thread
From: Jan Kiszka @ 2019-01-16 5:32 UTC (permalink / raw)
To: isar-users
From: Jan Kiszka <jan.kiszka@siemens.com>
Remove unneeded variables for kernel and initrd to make the code more
readable. Indent menu entry to make the conf file more readable.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
index c6a6a02..25b12ca 100644
--- a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
+++ b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
@@ -75,17 +75,11 @@ class BootimgEFIPlugin(SourcePlugin):
if part.mountpoint == "/":
grubefi_conf += "regexp --set bootdisk '(hd[0-9]*),' $prefix\n"
grubefi_conf += "set root=$bootdisk',gpt%d'\n" % part.realnum
+ grubefi_conf += "\n"
grubefi_conf += "menuentry 'boot'{\n"
-
- kernel = "/vmlinuz"
-
- grubefi_conf += "linux %s root=%s rootwait %s\n" \
- % (kernel, creator.rootdev, bootloader.append or "")
-
- initrd = "/initrd.img"
-
- grubefi_conf += "initrd %s\n" % initrd
-
+ grubefi_conf += " linux /vmlinuz root=%s rootwait %s\n" \
+ % (creator.rootdev, bootloader.append or "")
+ grubefi_conf += " initrd /initrd.img\n"
grubefi_conf += "}\n"
logger.debug("Writing grubefi config %s/hdd/boot/EFI/BOOT/grub.cfg",
--
2.16.4
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v3 10/14] scripts: Add rpm2cpio.sh
2019-01-16 5:32 [PATCH v3 00/14] Vacation hacks & more Jan Kiszka
` (8 preceding siblings ...)
2019-01-16 5:32 ` [PATCH v3 09/14] bootimg-efi-isar: Reformat generated grub.cfg Jan Kiszka
@ 2019-01-16 5:32 ` Jan Kiszka
2019-01-16 5:32 ` [PATCH v3 11/14] rootfs-u-boot: Handle empty kernel command line appendix Jan Kiszka
` (4 subsequent siblings)
14 siblings, 0 replies; 26+ messages in thread
From: Jan Kiszka @ 2019-01-16 5:32 UTC (permalink / raw)
To: isar-users
From: Jan Kiszka <jan.kiszka@siemens.com>
Bitbake is able to unpack rpm packages. For this to work, it just needs
rpm2cpio.sh in scripts. Add it from rpm upstream, similar to what OE
core did.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
scripts/rpm2cpio.sh | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)
create mode 100755 scripts/rpm2cpio.sh
diff --git a/scripts/rpm2cpio.sh b/scripts/rpm2cpio.sh
new file mode 100755
index 0000000..db3cae6
--- /dev/null
+++ b/scripts/rpm2cpio.sh
@@ -0,0 +1,59 @@
+#!/bin/sh -efu
+#
+# This software is a part of ISAR,
+# originating from the RPM Package Manager version 4.14
+#
+# SPDX-License-Identifier: GPL-2.0
+
+fatal() {
+ echo "$*" >&2
+ exit 1
+}
+
+pkg="$1"
+[ -n "$pkg" -a -e "$pkg" ] ||
+ fatal "No package supplied"
+
+_dd() {
+ local o="$1"; shift
+ dd if="$pkg" skip="$o" iflag=skip_bytes status=none $*
+}
+
+calcsize() {
+ offset=$(($1 + 8))
+
+ local i b b0 b1 b2 b3 b4 b5 b6 b7
+
+ i=0
+ while [ $i -lt 8 ]; do
+ b="$(_dd $(($offset + $i)) bs=1 count=1)"
+ [ -z "$b" ] &&
+ b="0" ||
+ b="$(exec printf '%u\n' "'$b")"
+ eval "b$i=\$b"
+ i=$(($i + 1))
+ done
+
+ rsize=$((8 + ((($b0 << 24) + ($b1 << 16) + ($b2 << 8) + $b3) << 4) + ($b4 << 24) + ($b5 << 16) + ($b6 << 8) + $b7))
+ offset=$(($offset + $rsize))
+}
+
+case "$(_dd 0 bs=8 count=1)" in
+ "$(printf '\355\253\356\333')"*) ;; # '\xed\xab\xee\xdb'
+ *) fatal "File doesn't look like rpm: $pkg" ;;
+esac
+
+calcsize 96
+sigsize=$rsize
+
+calcsize $(($offset + (8 - ($sigsize % 8)) % 8))
+hdrsize=$rsize
+
+case "$(_dd $offset bs=3 count=1)" in
+ "$(printf '\102\132')"*) _dd $offset | bunzip2 ;; # '\x42\x5a'
+ "$(printf '\037\213')"*) _dd $offset | gunzip ;; # '\x1f\x8b'
+ "$(printf '\375\067')"*) _dd $offset | xzcat ;; # '\xfd\x37'
+ "$(printf '\135\000')"*) _dd $offset | unlzma ;; # '\x5d\x00'
+ "$(printf '\050\265')"*) _dd $offset | unzstd ;; # '\x28\xb5'
+ *) fatal "Unrecognized rpm file: $pkg" ;;
+esac
--
2.16.4
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v3 11/14] rootfs-u-boot: Handle empty kernel command line appendix
2019-01-16 5:32 [PATCH v3 00/14] Vacation hacks & more Jan Kiszka
` (9 preceding siblings ...)
2019-01-16 5:32 ` [PATCH v3 10/14] scripts: Add rpm2cpio.sh Jan Kiszka
@ 2019-01-16 5:32 ` Jan Kiszka
2019-01-16 5:32 ` [PATCH v3 12/14] bitbake.conf: Clean up and enhance OVERRIDES Jan Kiszka
` (3 subsequent siblings)
14 siblings, 0 replies; 26+ messages in thread
From: Jan Kiszka @ 2019-01-16 5:32 UTC (permalink / raw)
To: isar-users
From: Jan Kiszka <jan.kiszka@siemens.com>
Avoids appending "None" of no extra command line options are given.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
meta/scripts/lib/wic/plugins/source/rootfs-u-boot.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/scripts/lib/wic/plugins/source/rootfs-u-boot.py b/meta/scripts/lib/wic/plugins/source/rootfs-u-boot.py
index 37baea9..f60afb8 100644
--- a/meta/scripts/lib/wic/plugins/source/rootfs-u-boot.py
+++ b/meta/scripts/lib/wic/plugins/source/rootfs-u-boot.py
@@ -69,7 +69,7 @@ class RootfsUBootPlugin(RootfsPlugin):
cfg.write('# Generated by wic, rootfs-u-boot plugin\n')
cfg.write('ROOT_PARTITION="%d"\n' % part.realnum)
cfg.write('KERNEL_ARGS="root=%s %s"\n' % \
- (cr.rootdev, cr.ks.bootloader.append))
+ (cr.rootdev, cr.ks.bootloader.append or ""))
no_initrd = source_params.get('no_initrd') or ''
cfg.write('NO_INITRD="%s"\n' % no_initrd)
overlays = source_params.get('overlays') or ''
--
2.16.4
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v3 12/14] bitbake.conf: Clean up and enhance OVERRIDES
2019-01-16 5:32 [PATCH v3 00/14] Vacation hacks & more Jan Kiszka
` (10 preceding siblings ...)
2019-01-16 5:32 ` [PATCH v3 11/14] rootfs-u-boot: Handle empty kernel command line appendix Jan Kiszka
@ 2019-01-16 5:32 ` Jan Kiszka
2019-01-16 5:32 ` [PATCH v3 13/14] linux-module: Simplify interface to module makefiles Jan Kiszka
` (2 subsequent siblings)
14 siblings, 0 replies; 26+ messages in thread
From: Jan Kiszka @ 2019-01-16 5:32 UTC (permalink / raw)
To: isar-users
From: Jan Kiszka <jan.kiszka@siemens.com>
We do no use any "local" override, and there is no TARGET_OS and
TARGET_ARCH in Isar. Rather adopt the OE core ordering of
arch:machine:distro and also add the "forcevariable" the OE provides.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
meta/conf/bitbake.conf | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index b067a0d..0e521bb 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -28,7 +28,6 @@ FILE_DIRNAME = "${@os.path.dirname(d.getVar('FILE', False))}"
GITDIR = "${DL_DIR}/git"
IMAGE_CMD = "_NO_DEFINED_IMAGE_TYPES_"
IMAGE_ROOTFS = "${TMPDIR}/rootfs"
-OVERRIDES = "local:${MACHINE}:${TARGET_OS}:${TARGET_ARCH}"
P = "${PN}-${PV}"
PF = "${PN}-${PV}-${PR}"
PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[0] or 'defaultpkgname'}"
@@ -55,6 +54,8 @@ BUILDCHROOT_HOST_DIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/buildchroot-host
BUILDCHROOT_TARGET_DIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/buildchroot-target/rootfs"
CACHE = "${TMPDIR}/cache"
+OVERRIDES = "${DISTRO_ARCH}:${MACHINE}:${DISTRO}:forcevariable"
+
# Codename of the repository created by the caching class
DEBDISTRONAME = "isar"
@@ -66,8 +67,6 @@ REPO_ISAR_DB_DIR = "${DEPLOY_DIR}/isar-apt/db"
REPO_BASE_DIR = "${DL_DIR}/base-apt/apt"
REPO_BASE_DB_DIR = "${DL_DIR}/base-apt/db"
-OVERRIDES_append = ":${DISTRO}:${DISTRO_ARCH}"
-
BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH BBSERVER DL_DIR \
SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM \
USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST \
--
2.16.4
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v3 13/14] linux-module: Simplify interface to module makefiles
2019-01-16 5:32 [PATCH v3 00/14] Vacation hacks & more Jan Kiszka
` (11 preceding siblings ...)
2019-01-16 5:32 ` [PATCH v3 12/14] bitbake.conf: Clean up and enhance OVERRIDES Jan Kiszka
@ 2019-01-16 5:32 ` Jan Kiszka
2019-01-16 5:32 ` [PATCH v3 14/14] example-module: Use simplified custom module interface Jan Kiszka
2019-01-18 7:53 ` [PATCH v3 00/14] Vacation hacks & more Maxim Yu. Osipov
14 siblings, 0 replies; 26+ messages in thread
From: Jan Kiszka @ 2019-01-16 5:32 UTC (permalink / raw)
To: isar-users
From: Jan Kiszka <jan.kiszka@siemens.com>
Not all module makefile respect DESTDIR nor even have build targets
which take KDIR as input. So call the kernel makefile ourselves, just
requiring the module makefile to provide Kbuild rules.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
RECIPE-API-CHANGELOG.md | 5 +++++
meta/recipes-kernel/linux-module/files/debian/rules | 6 ++++++
meta/recipes-kernel/linux-module/module.inc | 1 +
3 files changed, 12 insertions(+)
diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md
index 2bc1585..dcfbbee 100644
--- a/RECIPE-API-CHANGELOG.md
+++ b/RECIPE-API-CHANGELOG.md
@@ -131,3 +131,8 @@ In order to use the same file permissions for an input file to a dpkg-raw
package on the build machine as well as on the target, its absolute target path
needs to be listed in the PRESERVE_PERMS variable (space-separated list of
files). Otherwise, default permissions are used.
+
+### Reduce requirements on custom module makefiles
+
+It's now sufficient to provide only kbuild rules. Makefile targets like modules
+or modules_install as well as KDIR and DESTDIR evaluation are no longer needed.
diff --git a/meta/recipes-kernel/linux-module/files/debian/rules b/meta/recipes-kernel/linux-module/files/debian/rules
index 5c1d8be..7a89e41 100755
--- a/meta/recipes-kernel/linux-module/files/debian/rules
+++ b/meta/recipes-kernel/linux-module/files/debian/rules
@@ -21,5 +21,11 @@ ifneq (,$(findstring 86,$(DEB_HOST_GNU_CPU)))
export ARCH=x86
endif
+override_dh_auto_build:
+ $(MAKE) -C $(KDIR) M=$(PWD) modules
+
+override_dh_auto_install:
+ $(MAKE) -C $(KDIR) M=$(PWD) INSTALL_MOD_PATH=$(PWD)/debian/$(PN) modules_install
+
%:
CFLAGS= LDFLAGS= dh $@ --parallel
diff --git a/meta/recipes-kernel/linux-module/module.inc b/meta/recipes-kernel/linux-module/module.inc
index 5d85200..cb7b8ad 100644
--- a/meta/recipes-kernel/linux-module/module.inc
+++ b/meta/recipes-kernel/linux-module/module.inc
@@ -43,4 +43,5 @@ dpkg_runbuild_prepend() {
export KDIR=$(dpkg -L --root=${BUILDCHROOT_DIR} ${KERNEL_DEP} | \
grep "/lib/modules/.*/build")
fi
+ export PN=${PN}
}
--
2.16.4
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v3 14/14] example-module: Use simplified custom module interface
2019-01-16 5:32 [PATCH v3 00/14] Vacation hacks & more Jan Kiszka
` (12 preceding siblings ...)
2019-01-16 5:32 ` [PATCH v3 13/14] linux-module: Simplify interface to module makefiles Jan Kiszka
@ 2019-01-16 5:32 ` Jan Kiszka
2019-01-18 7:53 ` [PATCH v3 00/14] Vacation hacks & more Maxim Yu. Osipov
14 siblings, 0 replies; 26+ messages in thread
From: Jan Kiszka @ 2019-01-16 5:32 UTC (permalink / raw)
To: isar-users
From: Jan Kiszka <jan.kiszka@siemens.com>
Quit some boilerplate code can simply be removed now, just obj-m needs
to be defined since the last change to recipes-kernel/linux-module.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
meta-isar/recipes-kernel/example-module/files/src/Makefile | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/meta-isar/recipes-kernel/example-module/files/src/Makefile b/meta-isar/recipes-kernel/example-module/files/src/Makefile
index 1625b28..2561cfd 100644
--- a/meta-isar/recipes-kernel/example-module/files/src/Makefile
+++ b/meta-isar/recipes-kernel/example-module/files/src/Makefile
@@ -6,13 +6,3 @@
# SPDX-License-Identifier: GPL-2.0
obj-m := example-module.o
-
-INSTALL_MOD_PATH ?= $(DESTDIR)
-export INSTALL_MOD_PATH
-
-modules modules_install clean:
- $(MAKE) -C $(KDIR) M=$(PWD) $@
-
-install: modules_install
-
-.PHONY: modules modules_install install clean
--
2.16.4
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v3 00/14] Vacation hacks & more
2019-01-16 5:32 [PATCH v3 00/14] Vacation hacks & more Jan Kiszka
` (13 preceding siblings ...)
2019-01-16 5:32 ` [PATCH v3 14/14] example-module: Use simplified custom module interface Jan Kiszka
@ 2019-01-18 7:53 ` Maxim Yu. Osipov
14 siblings, 0 replies; 26+ messages in thread
From: Maxim Yu. Osipov @ 2019-01-18 7:53 UTC (permalink / raw)
To: Jan Kiszka, isar-users; +Cc: Claudius Heine, Henning Schild
On 1/16/19 6:32 AM, Jan Kiszka wrote:
> These patches are mostly the outcome of modeling the base and rescue
> image of a family machine with Isar. They
> - allow to preserve file permissions of dpkg-raw content
> - allow to boot via grub-efi from secondary disks
> - enhance locale settings
> - overcome meta-isar as dependency for most projects
>
> Furthermore, the follow features were added later on:
> - allow to unpack rpm packages
> - bitbake.conf cleanup
> - linux-module simplifications
>
> As some patches have already been updated to "v2" after the first round
> while others added dependencies, this is a complete resend as v3 with
> all patches up-to-date.
Applied to the 'next'.
Notes:
* for patch #1 "dpkg-raw: Respect file permissions defined by recipe if
requested, variable FIXPERM_EXCLUSIONS was renamed to
DH_FIXPERM_EXCLUSIONS"
* v4 of patch 07/14 "Move debian distro conf files to meta" was applied
Thanks,
Maxim.
> Jan
>
>
> CC: Claudius Heine <ch@denx.de>
> CC: Henning Schild <henning.schild@siemens.com>
>
> Jan Kiszka (14):
> dpkg-raw: Respect file permissions defined by recipe if requested
> bootimg-efi-isar: Run grub-mkimage without own config
> bootimg-efi-isar: Retrieve boot disk during runtime
> isar-cfg-localepurge: Also set /etc/default/locale
> Fix LIC_FILES_CHKSUM paths
> Move repo variables to proper conf file
> Move debian distro conf files to meta
> bootimg-efi-isar: Fix serial console setup for grub
> bootimg-efi-isar: Reformat generated grub.cfg
> scripts: Add rpm2cpio.sh
> rootfs-u-boot: Handle empty kernel command line appendix
> bitbake.conf: Clean up and enhance OVERRIDES
> linux-module: Simplify interface to module makefiles
> example-module: Use simplified custom module interface
>
> RECIPE-API-CHANGELOG.md | 12 +++++
> meta-isar/conf/distro/raspbian-jessie.conf | 2 +-
> meta-isar/conf/layer.conf | 11 ----
> .../recipes-app/example-hello/example-hello.bb | 2 +-
> meta-isar/recipes-app/libhello/libhello.bb | 2 +-
> meta-isar/recipes-core/images/isar-image-base.bb | 2 +-
> .../example-module/files/src/Makefile | 10 ----
> meta/classes/dpkg-raw.bbclass | 9 +++-
> meta/classes/isar-image.bbclass | 4 +-
> meta/conf/bitbake.conf | 14 ++++-
> {meta-isar => meta}/conf/distro/debian-buster.conf | 0
> {meta-isar => meta}/conf/distro/debian-buster.list | 0
> {meta-isar => meta}/conf/distro/debian-common.conf | 0
> .../conf/distro/debian-configscript.sh | 0
> {meta-isar => meta}/conf/distro/debian-jessie.conf | 0
> {meta-isar => meta}/conf/distro/debian-jessie.list | 0
> .../conf/distro/debian-stretch.conf | 0
> .../conf/distro/debian-stretch.list | 0
> .../recipes-core/isar-bootstrap/isar-bootstrap.inc | 2 +-
> meta/recipes-devtools/buildchroot/buildchroot.inc | 2 +-
> meta/recipes-devtools/sdkchroot/sdkchroot.bb | 2 +-
> .../recipes-kernel/linux-module/files/debian/rules | 6 +++
> meta/recipes-kernel/linux-module/module.inc | 1 +
> .../isar-cfg-localepurge/files/postinst | 2 +
> .../isar-cfg-localepurge/isar-cfg-localepurge.bb | 5 ++
> .../lib/wic/plugins/source/bootimg-efi-isar.py | 34 ++++---------
> .../lib/wic/plugins/source/rootfs-u-boot.py | 2 +-
> scripts/rpm2cpio.sh | 59 ++++++++++++++++++++++
> 28 files changed, 126 insertions(+), 57 deletions(-)
> rename {meta-isar => meta}/conf/distro/debian-buster.conf (100%)
> rename {meta-isar => meta}/conf/distro/debian-buster.list (100%)
> rename {meta-isar => meta}/conf/distro/debian-common.conf (100%)
> rename {meta-isar => meta}/conf/distro/debian-configscript.sh (100%)
> rename {meta-isar => meta}/conf/distro/debian-jessie.conf (100%)
> rename {meta-isar => meta}/conf/distro/debian-jessie.list (100%)
> rename {meta-isar => meta}/conf/distro/debian-stretch.conf (100%)
> rename {meta-isar => meta}/conf/distro/debian-stretch.list (100%)
> create mode 100755 scripts/rpm2cpio.sh
>
--
Maxim Osipov
ilbers GmbH
Maria-Merian-Str. 8
85521 Ottobrunn
Germany
+49 (151) 6517 6917
mosipov@ilbers.de
http://ilbers.de/
Commercial register Munich, HRB 214197
General Manager: Baurzhan Ismagulov
^ permalink raw reply [flat|nested] 26+ messages in thread