Re: [yocto] [PATCH][yocto-docs] ref-manual: Corrected openSUSE essential packages

2019-06-16 Thread akuster808



On 6/6/19 4:46 PM, Michael Halstead wrote:
> Some packages were bumped onto the pip3 install line. Install them with 
> zypper as before.
>
> Signed-off-by: Michael Halstead 
> ---

is this too early to Ping?

is there an issue with this patch?

-armin
>  documentation/poky.ent | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/documentation/poky.ent b/documentation/poky.ent
> index b5f600969..a436d9027 100644
> --- a/documentation/poky.ent
> +++ b/documentation/poky.ent
> @@ -68,8 +68,8 @@
>   python3-jinja2 SDL-devel xterm">
>   make wget python-xml \
>   diffstat makeinfo python-curses patch socat python3 python3-curses tar 
> python3-pip \
> - python3-pexpect xz which python3-Jinja2 Mesa-libEGL1
> - $ sudo pip3 install GitPython libSDL-devel xterm">
> + python3-pexpect xz which python3-Jinja2 Mesa-libEGL1 libSDL-devel xterm
> + $ sudo pip3 install GitPython">
> $ sudo yum makecache
>   $ sudo yum install gawk make wget tar bzip2 gzip python unzip perl 
> patch \

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [update-rc.d][PATCH V3] update-rc.d: support enable/disable options

2019-06-16 Thread Changqing Li

ping

On 5/28/19 8:59 AM, Changqing Li wrote:

ping

On 4/30/19 2:56 PM, changqing...@windriver.com wrote:

From: Changqing Li 

Add support of enable/disable options, refer
https://manpages.debian.org/wheezy/sysv-rc/update-rc.d.8.en.html

With support of these options, the usr can never change an existing
configuration even after upgrading a package. The program will only
install links if none are present, otherwise, it will keep
the previous configuration.

preinst in update-rc.d.bbclass will delete all the links under
rcrunlevel.d, this behavior now conflicts with enable/disable
options. so remove preinst from the update-rc.d.bbclass

[Yocto 12955]

Signed-off-by: Changqing Li 
---
  update-rc.d | 81 
+

  1 file changed, 81 insertions(+)

diff --git a/update-rc.d b/update-rc.d
index e07cf85..a7fb7bc 100644
--- a/update-rc.d
+++ b/update-rc.d
@@ -27,6 +27,7 @@ usage()
  usage: update-rc.d [-n] [-f] [-r ]  remove
 update-rc.d [-n] [-r ] [-s]  defaults [NN | 
sNN kNN]
 update-rc.d [-n] [-r ] [-s]  start|stop NN 
runlvl [runlvl] [...] .
+   update-rc.d [-n] [-r ] [-s]  enable|disable 
[S|2|3|4|5]

  -n: not really
  -f: force
  -v: verbose
@@ -101,6 +102,53 @@ makelinks()
  done
  }
  +# function to disable/enable init script link of one run level
+# $1 should be K/S, means to disable/enable
+# $2 means which run level to disable/enable
+renamelink()
+{
+    local oldstartstop newstartstop lev oldnn newnn
+    if [ "x$1" = "xS" ]; then
+    oldstartstop="K"
+    newstartstop="S"
+    else
+    oldstartstop="S"
+    newstartstop="K"
+    fi
+
+    lev=$2
+    # modifies existing runlevel links for the script 
/etc/init.d/name by renaming start links to stop link
+    # or stop link to start link with a sequence number equal to 
the difference of 100 minus the original sequence number.

+    if ls ${etcd}${lev}.d/${oldstartstop}*${bn} >/dev/null 2>&1; then
+    oldnn=`basename ${etcd}${lev}.d/${oldstartstop}*${bn}|cut 
-c2-3`

+    newnn=$[100-$oldnn]
+    [ $verbose -eq 1 ] && echo "rename 
${etcd}${lev}.d/${oldstartstop}${oldnn}${bn} -> 
${etcd}${lev}.d/${newstartstop}${newnn}${bn}"

+    if [ $notreally -eq 0 ];then
+    mv ${etcd}${lev}.d/${oldstartstop}${oldnn}${bn} 
${etcd}${lev}.d/${newstartstop}${newnn}${bn}

+    fi
+    if [ $dostart -eq 1 ] && [ $newstartstop = "S" ] && [ $lev = 
$RUNLEVEL ]; then

+    $fn start || true
+    fi
+    fi
+
+}
+
+# function to disable/enable init script link
+# $1 should be K/S, means to disable/enable
+# $2 run level [S|2|3|4|5], optional, If no start runlevel is
+# specified after the disable or enable keywords
+# the script will attempt to modify links in all start runlevels
+renamelinks()
+{
+    if [ $# -eq 2 ]; then
+    renamelink $1 $2
+    else
+    for i in 2 3 4 5 S; do
+    renamelink $1 $i
+    done
+    fi
+}
+
  while [ $# -gt 0 ]; do
  case $1 in
  -n)    notreally=1
@@ -221,6 +269,13 @@ case $1 in
  ;;
    start | stop)
+    if [ $# -lt 4 ]
+    then
+    echo "Not enough arguments"
+    usage
+    exit 1
+    fi
+
  while [ $# -gt 0 ]; do
  if [ $1 = "start" ]; then
  letter=S
@@ -251,6 +306,32 @@ case $1 in
  makelinks
  ;;
  +    enable | disable)
+    if [ $1 = "enable" ]; then
+    letter=S
+    elif [ $1 = "disable" ]; then
+    letter=K
+    else
+    usage
+    exit 1
+    fi
+    shift
+    #
+    if [ $# -gt 0 ]
+    then
+    case $1 in
+    S|2|3|4|5)
+    renamelinks $letter $1
+    ;;
+    *)
+    usage
+    exit 1
+    ;;
+    esac
+    else
+    renamelinks $letter
+    fi
+    ;;
  *)
  usage
  exit 1



--
BRs

Sandy(Li Changqing)

--
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [meta-swupdate] failed update leads to kernel panic

2019-06-16 Thread Moritz Porst

Hello Stefano,
Thanks very much for your answer

On 14.06.19 14:14, Stefano Babic wrote:

Hi Moritz,

On 14/06/19 12:19, Moritz Porst wrote:

(Sorry, the answer should go to everyone)
Thanks for your response, unfortunately it didn't work out for me.
Because I am not 100% sure whether I did the correct thing I describe it:
In my layer I went to recipes-kernel/kernel/files, here I added a file
defconfig which I filled with the content of your config-initramfs
my linux-yocto_%.bbappend, residing one level lower (kernel), got this
file added so it reads (in its entirety):

FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://0001-sdcard-power-management-off.patch"
SRC_URI += "file://defconfig"

However I *also* have a file called defconfig in meta-swupdate which is
basically the swupdate config that comes from menuconfig. I let this
untouched but since this is not the kernel defconfig I guess you didn't
mean this file ?

Additionally I can't mount the rootfs with the failed boot so I cannot
access the dmesg log file. Any advice here ?

Best regards
Moritz



*Gesendet:* Freitag, 14. Juni 2019 um 11:00 Uhr
*Von:* "Zoran Stojsavljevic" 
*An:* "Moritz Porst" 
*Cc:* "Yocto Project" 
*Betreff:* Re: [yocto] [meta-swupdate] failed update leads to kernel panic

However if I abort the update while running (i.e. simulating a power cut)
and then reboot I end up in a kernel panic: "Unable to mount rootfs on
unknown block". My understanding is that I should at least end up in a
busybox or that the update is retried, but this does not happen.

You missed to attach failed dmesg while the system booted and aborted.
Nevertheless, I expect problem with your defconfig, which does NOT
have options set for initramfs. These ones:
https://github.com/ZoranStojsavljevic/bbb-yocto/blob/master/custom/config-initramfs

Please, could you add these one to your current .config, this might
very well solve your problem.

Best Regards,
Zoran
___

On Fri, Jun 14, 2019 at 10:15 AM Moritz Porst  wrote:

Hello,

I am currently having trouble to get swupdate working properly.
My problem:
I can execute swupdate -i normally and if the update fits I have no

problem. However if I abort the update while running (i.e. simulating a
power cut) and then reboot I end up in a kernel panic: "Unable to mount
rootfs on unknown block". My understanding is that I should at least end
up in a busybox or that the update is retried, but this does not happen.

I receive 1 error when updating which does not stop the update: "Could

not find MTD".

My configuration:
I have a single rootfs and a separate boot partition. I build the

initramfs using:

You have a *single* rootfs, you stop an upgrade (resulting of course in
a corrupted rootfs or worse), and you wonder that kernel cannot mount
ityour update concept is broken.

Well conceptually I want to go through the bootloader, I just fail to
understand how I tell swupdate to do this.


You *must* check the bootloader marker in U-Boot (default is the
"recovery_status" variable) and you *mus*t start again the updater (the
ramdisk) until the marker (it is a transaction flag) is set. It is
erased by SWUpdate only after a successful update. You are now starting
your board with a half-completed update.


So I configured swupdate in menuconfig to work with grub which I set in
my machine as "EFI_PROVIDER". Doesn't this single rootfs update strategy
work with grub ? (I prefer to stick to EFI because partitioning of
images works out of the box with .wic images)
When you say "you must start again the updater", that's where I'm lost.
From the documentation I understand that I initiate an update using
"swupdate -i abc.swu" but this just runs the update without setting any
flag for the bootloader.
One more thing: swupdate complains that there is no grubenv file. I
defined a path in the config file and create this file using
"grub-editenv /path/as/in/config create". swupdate does not give an
error after I have done this.



Best regards,
Stefano Babic


Best regards
Moritz





---
IMAGE_INSTALL = "base-files \
base-passwd \
swupdate \
busybox \
libconfig \
util-linux-sfdisk \
mtd-utils \
mtd-utils-ubifs \
${@bb.utils.contains('SWUPDATE_INIT', 'tiny',

'virtual/initscripts-swupdate', 'initscripts sysvinit', d)} \

"
---
This is taken from swupdate-image. I include the same packages (via

_append) in my base image, is this necessary ?

I bundle the initramfs with my image using INITRAMFS_IMAGE_BUNDLE = "1"

Can you see a mistake I made ?

Best regards
Moritz
--
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto