From 605c37cb989a95c02633fcb93efb45102781b4bb Mon Sep 17 00:00:00 2001 From: Andrew Jeffery Date: Wed, 15 Sep 2021 09:12:36 +0930 Subject: bitbake: Use IPK packaging for rootfs assembly bitbake offers a choice of DEB, RPM or IPK packaging. To a degree the choice is functionally arbitrary for image generation but control over the package format becomes important if we want to: 1. Include runtime package management functionality in the firmware image 2. Mess about with the packages on the build system With respect to 1 the IPK format and opkg (an ipk package manager) are designed for embedded systems[1] - by contrast to RPMs have heavier dependencies and a greater impact on the size and complexity of the firmware image. Regarding 2, the embedded nature and the need for opkg to work without much fuss leads to a lower configuration barrier by comparison to RPMs. With ipk it becomes possible to reuse the packages built during image preparation for core analysis without needing to generate an SDK: ``` $ export LD_LIBRARY_PATH=./tmp/work/x86_64-linux/opkg-native/*/recipe-sysroot-native/usr/lib $ MY_DEBUG_ROOT=tmp/rootfs-debug $ ./tmp/sysroots-components/x86_64/opkg-native/usr/bin/opkg \ -f ./tmp/work/p10bmc-openbmc-linux-gnueabi/obmc-phosphor-image/*/opkg.conf \ -o $MY_DEBUG_ROOT \ update $ fakeroot ./tmp/sysroots-components/x86_64/opkg-native/usr/bin/opkg \ -f ./tmp/work/p10bmc-openbmc-linux-gnueabi/obmc-phosphor-image/1.0-r0/opkg.conf \ -o $MY_DEBUG_ROOT \ install dbus-sensors dbus-sensors-dbg $ gdb-multiarch (gdb) set solib-absolute-prefix .../tmp/rootfs-debug (gdb) add-auto-load-safe-path .../tmp/rootfs-debug (gdb) file tmp/rootfs-debug/usr/bin/nvmesensor (gdb) core-file obmcdump_17_9597/core.nvmesensor.0.aae91b519d0e4e0e8bbe746e3f6cd25f.2779.9594000000 Core was generated by `/usr/bin/nvmesensor'. Program terminated with signal SIGABRT, Aborted. pthread_kill.c:45 45 pthread_kill.c: No such file or directory. (gdb) bt pthread_kill.c:45 ../sysdeps/posix/raise.c:26 /home/andrew/src/openbmc/openbmc/build/p10bmc/tmp/rootfs-debug/usr/lib/libstdc++.so.6 /home/andrew/src/openbmc/openbmc/build/p10bmc/tmp/rootfs-debug/usr/lib/libstdc++.so.6 /home/andrew/src/openbmc/openbmc/build/p10bmc/tmp/rootfs-debug/usr/lib/libstdc++.so.6 /home/andrew/src/openbmc/openbmc/build/p10bmc/tmp/rootfs-debug/usr/lib/libstdc++.so.6 "xyz.openbmc_project.NVMeSensor", this=0x488f04) at /usr/include/sdbusplus/bus.hpp:234 ../../../../../../workspace/sources/dbus-sensors/src/NVMeSensorMain.cpp:159 (gdb) ``` This approach documented in the Poky Reference Manual: https://www.yoctoproject.org/docs/1.0/poky-ref-manual/poky-ref-manual.html#platdev-gdb-remotedebug-launch-gdb-inferiorbins Switch all machines to IPK to align the debugging experience with upstream's documentation and to facilitate efficient use of packaged software at runtime. [1] https://openwrt.org/docs/guide-user/additional-software/opkg Change-Id: I8ef526add2d7a6790de1b3eb3fb85cd39b864f23 Signed-off-by: Andrew Jeffery Signed-off-by: Patrick Williams --- meta-fii/meta-kudo/conf/local.conf.sample | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta-fii') diff --git a/meta-fii/meta-kudo/conf/local.conf.sample b/meta-fii/meta-kudo/conf/local.conf.sample index ed6eb492b..ad8272cf5 100644 --- a/meta-fii/meta-kudo/conf/local.conf.sample +++ b/meta-fii/meta-kudo/conf/local.conf.sample @@ -1,6 +1,6 @@ MACHINE ??= "kudo" DISTRO ?= "openbmc-kudo" -PACKAGE_CLASSES ?= "package_rpm" +PACKAGE_CLASSES ?= "package_ipk" SANITY_TESTED_DISTROS:append ?= " *" EXTRA_IMAGE_FEATURES = "debug-tweaks" USER_CLASSES ?= "buildstats image-prelink" -- cgit v1.2.3 From 625a4b00633cd0ad165f19c415277c209ec0b33e Mon Sep 17 00:00:00 2001 From: XP Chen Date: Thu, 16 Sep 2021 16:24:23 -0500 Subject: meta-fii/meta-kudo: Remove Mohaimen Alsamarai from OWNERS files Signed-off-by: XP Chen Change-Id: I540022c8547367d46f1f2fa52d6a144d41856ec4 --- meta-fii/OWNERS | 1 - 1 file changed, 1 deletion(-) (limited to 'meta-fii') diff --git a/meta-fii/OWNERS b/meta-fii/OWNERS index 3fb7829f6..f227b081f 100644 --- a/meta-fii/OWNERS +++ b/meta-fii/OWNERS @@ -2,6 +2,5 @@ owners: - benjaminfair@google.com - vveerach@google.com - lancelot.kao@fii-usa.com -- mohaimen.alsamarai@fii-na.com - xiao-peng.chen@fii-na.com - mustafa.shehabi@fii-na.com -- cgit v1.2.3 From 164a9c9f2d774276d5f5802e15e6c2299e43c04f Mon Sep 17 00:00:00 2001 From: XP Chen Date: Tue, 14 Sep 2021 14:37:46 -0500 Subject: meta-fii/meta-kudo: Modify init_once.sh to separate EVT/DVT HW GPIOs Signed-off-by: XP Chen Change-Id: I97ee9317df93480f68cd69ee3462f970970ba885 --- .../kudo-sys-utility/kudo-boot/init_once.sh | 82 +++++++++++++--------- 1 file changed, 49 insertions(+), 33 deletions(-) (limited to 'meta-fii') diff --git a/meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-boot/init_once.sh b/meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-boot/init_once.sh index adb86f238..8231e3de8 100644 --- a/meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-boot/init_once.sh +++ b/meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-boot/init_once.sh @@ -1,51 +1,67 @@ #!/bin/bash source /usr/sbin/kudo-lib.sh -# 0 for EVT. DVT will have a non-zero board version + +function set_mux_default(){ + # set all mux route to CPU before power on host + # BMC_CPU_RTC_I2C_SEL #120 + set_gpio_ctrl 120 out 1 + # BMC_CPU_DDR_I2C_SEL #84 + set_gpio_ctrl 84 out 1 + # BMC_CPU_EEPROM_I2C_SEL #85 + set_gpio_ctrl 85 out 1 + # BMC_CPU_PMBUS_SEL #86 + set_gpio_ctrl 86 out 1 + # LED control + # LED_BMC_LIVE #7 + set_gpio_ctrl 7 out 1 + + # SPI control + # Send command to CPLD to switch the bios spi interface to host + i2cset -y -f -a 13 0x76 0x10 0x00 + +} + +# 0 - 63 EVT +# 64 + DVT/PVT boardver=$(printf '%d' `cat /sys/bus/i2c/drivers/fiicpld/34-0076/CMD00 | awk '{print $6}'`) -# sleep so that FRU and all ipmitool Devices are ready before HOST OS -# gpio 143 for HPM_STBY_RST_N do to DC-SCM spec -set_gpio_ctrl 143 out 1 -sleep 5 # for the MUX to get ready -# set all mux route to CPU before power on host -# BMC_CPU_RTC_I2C_SEL #120 -set_gpio_ctrl 120 out 1 -# BMC_CPU_DDR_I2C_SEL #84 -set_gpio_ctrl 84 out 1 + # On EVT machines, the secondary SCP EEPROM is used. # Set BMC_I2C_BACKUP_SEL to secondary. -if [[ $boardver == 0 ]]; then +if [[ $boardver -lt 64 ]]; then echo "EVT system. Choosing secondary SCP EEPROM." set_gpio_ctrl 168 out 0 -fi -# BMC_CPU_EEPROM_I2C_SEL #85 -set_gpio_ctrl 85 out 1 -# BMC_CPU_PMBUS_SEL #86 -set_gpio_ctrl 86 out 1 - -# LED control -# LED_BMC_LIVE #7 -set_gpio_ctrl 7 out 1 - -# SPI control -# Send command to CPLD to switch the bios spi interface to host -i2cset -y -f -a 13 0x76 0x10 0x00 - -# Power control -# MON_BMC_ALIVE, GPIO 10(EVT), GPIO137(DVT) -set_gpio_ctrl 10 out 1 -set_gpio_ctrl 137 out 1 -# S0_BMC_OK, GPIO 69 -set_gpio_ctrl 69 out 1 + set_mux_default + # Power control + # S0_BMC_OK, GPIO 69 + set_gpio_ctrl 69 out 1 + + # MON_BMC_ALIVE, GPIO 10(EVT), GPIO137(DVT) + set_gpio_ctrl 137 out 0 # setting unused GPIO + set_gpio_ctrl 10 out 1 +else + echo "DVT or PVT system" + # sleep so that FRU and all ipmitool Devices are ready before HOST OS + # gpio 143 for HPM_STBY_RST_N do to DC-SCM spec + set_gpio_ctrl 143 out 1 # on DVT this became HPM_STBY_RST_N (EVT1 came from CPLD) + sleep 5 # for the MUX to get ready + set_mux_default + # Power control + # S0_BMC_OK, GPIO 69 + set_gpio_ctrl 69 out 1 + + # MON_BMC_ALIVE GPIO137(DVT) + set_gpio_ctrl 10 out 0 # setting unused GPIO + set_gpio_ctrl 137 out 1 +fi # Disable CPU 1 CLK when cpu not detected -boardver=$(printf '%d' `cat /sys/bus/i2c/drivers/fiicpld/34-0076/CMD00 | awk '{print $6}'`) # echo init_once cpu $CPU1_STATUS > /dev/ttyS0 # echo init_once board $boardver > /dev/ttyS0 CPU1_STATUS_N=$(get_gpio_ctrl 136) if [[ $CPU1_STATUS_N == 1 ]]; then #Execute this only on DVT systems - if [[ $boardver == 0 ]]; then + if [[ $boardver -lt 64 ]]; then echo EVT system $boardver else echo DVT system $boardver -- cgit v1.2.3