diff --git a/README.md b/README.md index 9ec4cd89fef1563c99c8cb94170c83e778b7c520..a6be1c96a80b4a05591b8f41e86e2467b0cf36fd 100644 --- a/README.md +++ b/README.md @@ -82,10 +82,10 @@ and File -> Export -> Export Hardware -> include bitstream $ cd <SCALP_PROJECT_FOLDER> $ git clone https://gitedu.hesge.ch/soma/scalp_petalinux.git $ cd scalp_petalinux -$ git checkout SCALP-SAFE-v0.2 +$ git checkout SCALP-SAFE-v0.3 ``` -**Use version 0.2 only for the GIT scalp_petalinux repository and not for the GIT scalp_firmware repository. The version difference is not an error.** +**Use version 0.3 only for the GIT scalp_petalinux repository and not for the GIT scalp_firmware repository. The version difference is not an error.** ### Create new Petalinux project from a BSP @@ -95,7 +95,7 @@ $ petalinux-create --type project -s <path-to-bsp> --name <PROJECT NAME> $ cd <PROJECT NAME> ``` -In my case **\<path-to-bsp\>** corresponds to /home/jo/Documents/Projets/Hepia/scalp_project/scalp_petalinux/bsp/SCALP-SAFE-FIRMWARE-BSP-V0.2.bsp +In my case **\<path-to-bsp\>** corresponds to /home/jo/Documents/Projets/Hepia/scalp_project/scalp_petalinux/bsp/SCALP-SAFE-FIRMWARE-BSP-V0.3.bsp ### Importing hardware configuration @@ -184,7 +184,7 @@ In my case **\<PATH_TO_SCALP_FIRMWARE_PROJECT\>** corresponds to /home/jo/Docume ### Bug in the U-Boot config with the selection of the ZYNQ_SPI driver -Despite the fact that the ZYNQ_SPI driver is preselected in the U-Boot configuration specific to the SCALP board, this configuration is not automatically taken into account. Therefore, it is necessary to select the ZYNQ_SPI driver manually. +Despite the fact that the ZYNQ\_SPI driver is preselected in the U-Boot configuration specific to the SCALP board, this configuration is not automatically taken into account. Therefore, it is necessary to select the ZYNQ\_SPI driver manually. The same applies to commands related to the UBIFS file system (CMD\_UBI and CMD\_UBIFS). First, you need to open the U-Boot configuration menu, after cleaning up the project. @@ -202,11 +202,20 @@ U-Boot 2020.01 Configuration [*] Zynq SPI driver (select with spacebar) ``` -Then select 3 times EXIT... +and... + +``` +U-Boot 2020.01 Configuration + Command line interface ---> + [*] Enable UBI - Unsorted block images commands + [*] Enable UBIFS - Unsorted block images filesystem commands (NEW) +``` + +Then select 2 times EXIT... And save the configuration. -**You can eventually go back to the U-Boot configuration menu to check that the ZYNQ_SPI driver has been taken into account.** +**You can optionally return to the U-Boot configuration menu to check that the ZYNQ_SPI driver and the CMD_UBI and CMD_UBIFS commands have been taken into account.** ### Build the PetaLinux project @@ -216,7 +225,7 @@ $ petalinux-build The produced binary files can be found in the **./images/linux** folder. -**You can possibly check that the ZYNQ_SPI driver has been compiled.** +**You can possibly check that the ZYNQ_SPI driver and the CMD_UBI and CMD_UBIFS commands have been compiled.** ``` $ find . -name zynq_spi.o @@ -224,6 +233,17 @@ $ find . -name zynq_spi.o > ./build/tmp/work/zynq_generic-xilinx-linux-gnueabi/u-boot-xlnx/v2020.01-xilinx-v2020.2+git999-r0/u-boot-xlnx-v2020.01-xilinx-v2020.2+git999/drivers/spi/zynq_spi.o ``` +``` +$ find . -name ubi.o + +> ./build/tmp/work/zynq_generic-xilinx-linux-gnueabi/u-boot-xlnx/v2020.01-xilinx-v2020.2+git999-r0/u-boot-xlnx-v2020.01-xilinx-v2020.2+git999/cmd/ubi.o + +$ find . -name ubifs.o + +> ./build/tmp/work/zynq_generic-xilinx-linux-gnueabi/u-boot-xlnx/v2020.01-xilinx-v2020.2+git999-r0/u-boot-xlnx-v2020.01-xilinx-v2020.2+git999/cmd/ubifs.o +> ... +``` + ### Creation of the basic image of the U-Boot environment The image content can be produced by using the **mkenvimage** command. @@ -367,7 +387,7 @@ And that's it. ### Howto create a init script (example with the init script for the configuration of the ethernet switch sja1105) -First, we start by creating a new PetaLinux application. +First, we start by creating the new sja1105-init PetaLinux application. ``` $ petalinux-create -t apps --template install -n sja1105-init --enable @@ -384,6 +404,10 @@ $ emacs project-spec/meta-user/recipes-apps/sja1105-init/sja1105-init.bb Edit the file like this... ``` +# +# This file is the sja1105-init recipe. +# + SUMMARY = "Simple sja1105-init application" SECTION = "PETALINUX/apps" LICENSE = "MIT" @@ -400,13 +424,19 @@ inherit update-rc.d INITSCRIPT_NAME = "sja1105-init" -INITSCRIPT_PARAMS = "start 81 K ." +INITSCRIPT_PARAMS = "start 02 S ." do_install() { install -d ${D}${sysconfdir}/init.d install -m 0755 ${S}/sja1105-init ${D}${sysconfdir}/init.d/sja1105-init - install -d ${D}${sysconfdir}/rc0.d - install -m 0755 ${S}/sja1105-init ${D}${sysconfdir}/rc0.d/K81sja1105-init + install -d ${D}${sysconfdir}/rc2.d + install -m 0755 ${S}/sja1105-init ${D}${sysconfdir}/rc2.d/S02sja1105-init + install -d ${D}${sysconfdir}/rc3.d + install -m 0755 ${S}/sja1105-init ${D}${sysconfdir}/rc3.d/S02sja1105-init + install -d ${D}${sysconfdir}/rc4.d + install -m 0755 ${S}/sja1105-init ${D}${sysconfdir}/rc4.d/S02sja1105-init + install -d ${D}${sysconfdir}/rc5.d + install -m 0755 ${S}/sja1105-init ${D}${sysconfdir}/rc5.d/S02sja1105-init } FILES_${PN} += "${sysconfdir}/*" @@ -422,141 +452,286 @@ Then, edit the init script file like this... ``` #!/bin/sh +### BEGIN INIT INFO +# Provides: sja1105-init +# Required-Start: $local_fs $network $named $time $syslog +# Required-Stop: $local_fs $network $named $time $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Description: sja1105 init.d script configuration. +### END INIT INFO + +SCRIPT=sja1105-conf +RUNAS=root + +PIDFILE=/var/run/sja1105-init.pid +LOGFILE=/var/log/sja1105-init.log + +start() { + if [ -f /var/run/$PIDNAME ] && kill -0 $(cat /var/run/$PIDNAME); then + echo 'Service already running' >&2 + return 1 + fi + echo 'Starting service…' >&2 + local CMD="$SCRIPT &> \"$LOGFILE\" & echo \$!" + su -c "$CMD" $RUNAS > "$PIDFILE" + echo 'Service started' >&2 +} -echo "SJA1105 PetaLinux init script is running..." +stop() { + if [ ! -f "$PIDFILE" ] || ! kill -0 $(cat "$PIDFILE"); then + echo 'Service not running' >&2 + return 1 + fi + echo 'Stopping service…' >&2 + echo 'Log files /var/log/sja1105-init.log and /var/log/sja1105-conf.log' >&2 + kill -15 $(cat "$PIDFILE") && rm -f "$PIDFILE" + echo 'Service stopped' >&2 +} -ip link set swp0_east up +case "$1" in + start) + start + ;; + stop) + stop + ;; + retart) + stop + start + ;; + *) + echo "Usage: $0 {start|stop|restart|uninstall}" +esac +``` -if [ "$?" -eq "0" ] ; then - echo -e "[INFO] sja1105-init : swp0_east port is up." -else - exit 1 -fi +Next, we continue by creating the new sja1105-conf PetaLinux application. -ip link set swp2_bottom up +``` +$ petalinux-create -t apps --template install -n sja1105-conf --enable +``` -if [ "$?" -eq "0" ] ; then - echo -e "[INFO] sja1105-init : swp2_bottom port is up." -else - exit 1 -fi +Then we edit the BitBake file corresponding to the new application. -ip link set swp3_top up +``` +$ emacs project-spec/meta-user/recipes-apps/sja1105-conf/sja1105-conf.bb +``` -if [ "$?" -eq "0" ] ; then - echo -e "[INFO] sja1105-init : swp3_top port is up." -else - exit 1 -fi +Edit the file like this... -ip link set swp4_west up +``` +# +# This file is the sja1105-conf recipe. +# -if [ "$?" -eq "0" ] ; then - echo -e "[INFO] sja1105-init : swp4_west port is up." -else - exit 1 -fi +SUMMARY = "Simple sja1105-conf application" +SECTION = "PETALINUX/apps" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" -ip link add name br0 type bridge +SRC_URI = "file://sja1105-conf \ + " -if [ "$?" -eq "0" ] ; then - echo -e "[INFO] sja1105-init : Added a new bridge-like interface." -else - exit 1 -fi +S = "${WORKDIR}" -ip link set dev br0 type bridge vlan_filtering 1 +do_install() { + install -d ${D}/${bindir} + install -m 0755 ${S}/sja1105-conf ${D}/${bindir} +} +``` -if [ "$?" -eq "0" ] ; then - echo -e "[INFO] sja1105-init : Configuration of the bridge interface in VLAN filtering mode." -else - exit 1 -fi +Open the init script file. -ip link set dev swp0_east master br0 +``` +$ emacs project-spec/meta-user/recipes-apps/sja1105-conf/files/sja1105-conf +``` -if [ "$?" -eq "0" ] ; then - echo -e "[INFO] sja1105-init : Addition of the swp0_east interface to the bridge interface." -else - exit 1 -fi +Then, edit the init script file like this... + +``` +#!/bin/sh -ip link set dev swp2_bottom master br0 +sja1105_ports_link_up() +{ + echo "[INFO] sja1105-conf : sja1105 ports linking up..." -if [ "$?" -eq "0" ] ; then - echo -e "[INFO] sja1105-init : Addition of the swp2_bottom interface to the bridge interface." -else - exit 1 -fi + ip link set swp0_east up + + if [ "$?" -eq "0" ] ; then + echo "[INFO] sja1105-conf : swp0_east port is up." + else + exit 1 + fi -ip link set dev swp3_top master br0 + ip link set swp2_bottom up -if [ "$?" -eq "0" ] ; then - echo -e "[INFO] sja1105-init : Addition of the swp3_top interface to the bridge interface." -else - exit 1 -fi + if [ "$?" -eq "0" ] ; then + echo "[INFO] sja1105-conf : swp2_bottom port is up." + else + exit 1 + fi -ip link set dev swp4_west master br0 + ip link set swp3_top up -if [ "$?" -eq "0" ] ; then - echo -e "[INFO] sja1105-init : Addition of the swp4_west interface to the bridge interface." -else - exit 1 -fi + if [ "$?" -eq "0" ] ; then + echo "[INFO] sja1105-conf : swp3_top port is up." + else + exit 1 + fi -bridge vlan add dev swp0_east vid 1 pvid untagged + ip link set swp4_west up -if [ "$?" -eq "0" ] ; then - echo -e "[INFO] sja1105-init : Configuration of the swp0_east interface in untagged VLAN mode." -else - exit 1 -fi + if [ "$?" -eq "0" ] ; then + echo "[INFO] sja1105-conf : swp4_west port is up." + else + exit 1 + fi -bridge vlan add dev swp2_bottom vid 2 pvid untagged + echo "[INFO] sja1105-conf : sja1105 ports linked up." +} -if [ "$?" -eq "0" ] ; then - echo -e "[INFO] sja1105-init : Configuration of the swp2_bottom interface in untagged VLAN mode." -else - exit 1 -fi +sja1105_creat_bridge() +{ + echo "[INFO] sja1105-conf : Creation and configuration of the bridge in progress..." -bridge vlan add dev swp3_top vid 3 pvid untagged + ip link add name br0 type bridge -if [ "$?" -eq "0" ] ; then - echo -e "[INFO] sja1105-init : Configuration of the swp3_top interface in untagged VLAN mode." -else - exit 1 -fi + if [ "$?" -eq "0" ] ; then + echo "[INFO] sja1105-conf : Added a new bridge-like interface." + else + exit 1 + fi -bridge vlan add dev swp4_west vid 4 pvid untagged + ip link set dev br0 type bridge vlan_filtering 1 -if [ "$?" -eq "0" ] ; then - echo -e "[INFO] sja1105-init : Configuration of the swp4_west interface in untagged VLAN mode." -else - exit 1 -fi + if [ "$?" -eq "0" ] ; then + echo "[INFO] sja1105-conf : Configuration of the bridge interface in VLAN filtering mode." + else + exit 1 + fi -ip link set br0 up + echo "[INFO] sja1105-conf : Creation and configuration of the bridge is done." +} -if [ "$?" -eq "0" ] ; then - echo -e "[INFO] sja1105-init : bridge-like interface is up." -else - exit 1 -fi +sja1105_link_ports_to_bridge() +{ + echo "[INFO] sja1105-conf : sja1105 ports are being attached to the bridge..." + + ip link set dev swp0_east master br0 + + if [ "$?" -eq "0" ] ; then + echo "[INFO] sja1105-conf : Addition of the swp0_east interface to the bridge interface." + else + exit 1 + fi + + ip link set dev swp2_bottom master br0 + + if [ "$?" -eq "0" ] ; then + echo "[INFO] sja1105-conf : Addition of the swp2_bottom interface to the bridge interface." + else + exit 1 + fi + + ip link set dev swp3_top master br0 + + if [ "$?" -eq "0" ] ; then + echo "[INFO] sja1105-conf : Addition of the swp3_top interface to the bridge interface." + else + exit 1 + fi + + ip link set dev swp4_west master br0 + + if [ "$?" -eq "0" ] ; then + echo "[INFO] sja1105-conf : Addition of the swp4_west interface to the bridge interface." + else + exit 1 + fi + + echo "[INFO] sja1105-conf : sja1105 ports are attached to the bridge." +} + +sja1105_ports_vlan_conf() +{ + echo "[INFO] sja1105-conf : sja1105 ports VLAN configuration in progress..." + + bridge vlan add dev swp0_east vid 1 pvid untagged + + if [ "$?" -eq "0" ] ; then + echo "[INFO] sja1105-conf : Configuration of the swp0_east interface in untagged VLAN mode." + else + exit 1 + fi + + bridge vlan add dev swp2_bottom vid 2 pvid untagged + + if [ "$?" -eq "0" ] ; then + echo "[INFO] sja1105-conf : Configuration of the swp2_bottom interface in untagged VLAN mode." + else + exit 1 + fi + + bridge vlan add dev swp3_top vid 3 pvid untagged + + if [ "$?" -eq "0" ] ; then + echo "[INFO] sja1105-conf : Configuration of the swp3_top interface in untagged VLAN mode." + else + exit 1 + fi + + bridge vlan add dev swp4_west vid 4 pvid untagged + + if [ "$?" -eq "0" ] ; then + echo "[INFO] sja1105-conf : Configuration of the swp4_west interface in untagged VLAN mode." + else + exit 1 + fi + + echo "[INFO] sja1105-conf : sja1105 ports VLAN configuration is done." +} + +sja1105_bridge_link_up() +{ + echo "[INFO] sja1105-conf : sja1105 bridge linking up..." + + ip link set br0 up + + if [ "$?" -eq "0" ] ; then + echo "[INFO] sja1105-conf : bridge-like interface is up." + else + exit 1 + fi + + echo "[INFO] sja1105-conf : sja1105 bridge linked up." +} + +sja1105_ports_link_up +sja1105_creat_bridge +sja1105_link_ports_to_bridge +sja1105_ports_vlan_conf +sja1105_bridge_link_up ``` -Finaly build it... +Finaly build them... ``` $ petalinux-build -c sja1105-init -x do_cleanall $ petalinux-build -c sja1105-init $ petalinux-build -c sja1105-init -x do_install -f +$ petalinux-build -c sja1105-conf -x do_cleanall +$ petalinux-build -c sja1105-conf +$ petalinux-build -c sja1105-conf -x do_install -f +``` + +And build the root file system and the firmware... + +``` $ petalinux-build -c rootfs $ petalinux-build ``` -**If you prefer to start by cleaning up your project, don't forget to add the ZYNQ_SPI driver again in the U-Boot configuration. And yes, the bug is still there.** +**If you prefer to start by cleaning up your project, don't forget to add the ZYNQ_SPI driver and the CMD_UBI and CMD_UBIFS commands again in the U-Boot configuration. And yes, the bug is still there.** ### Howto create a new BSP diff --git a/bsp/SCALP-SAFE-FIRMWARE-BSP-V0.3.bsp b/bsp/SCALP-SAFE-FIRMWARE-BSP-V0.3.bsp new file mode 100644 index 0000000000000000000000000000000000000000..c2328d436d3e7f7b1dbbe71e34fa2cb1578e7786 Binary files /dev/null and b/bsp/SCALP-SAFE-FIRMWARE-BSP-V0.3.bsp differ diff --git a/scalp_safe_petalinux/.petalinux/metadata b/scalp_safe_petalinux/.petalinux/metadata index 7d06983b8164440df45c75d90cde1a6ea9f9f0ea..b6b8f719f8d36f34565506d383d27bd7e5f494e9 100644 --- a/scalp_safe_petalinux/.petalinux/metadata +++ b/scalp_safe_petalinux/.petalinux/metadata @@ -1,6 +1,6 @@ PETALINUX_VER=2020.2 VALIDATE_HW_CHKSUM=1 HARDWARE_PATH=/home/jo/Documents/Projets/Hepia/scalp_project/scalp_firmware/designs/vivado/scalp_safe_firmware/2020.2/lin64/scalp_safe_firmware/scalp_safe_firmware.xsa -HARDWARE_CHECKSUM=e4c86ebb7157c318baafe6ea2691035e +HARDWARE_CHECKSUM=c0e54849f94ffc5aaa53e1cad4e1235f YOCTO_SDK=5ff8fc5f85d1566b314bb73eaa378212 RFSCONFIG_CHKSUM=098862acb0a15bbc6a0d0999eb493baa diff --git a/scalp_safe_petalinux/SCALP-SAFE-FIRMWARE-BSP-V0.3.bsp b/scalp_safe_petalinux/SCALP-SAFE-FIRMWARE-BSP-V0.3.bsp new file mode 100644 index 0000000000000000000000000000000000000000..c2328d436d3e7f7b1dbbe71e34fa2cb1578e7786 Binary files /dev/null and b/scalp_safe_petalinux/SCALP-SAFE-FIRMWARE-BSP-V0.3.bsp differ diff --git a/scalp_safe_petalinux/project-spec/configs/u-boot-xlnx/platform-auto.h b/scalp_safe_petalinux/project-spec/configs/u-boot-xlnx/platform-auto.h index 1bfbbcdbac2de6e6821e9fa8ae08051e1638771f..16b4f360eeb5412701432ac13900bb56aa53411f 100644 --- a/scalp_safe_petalinux/project-spec/configs/u-boot-xlnx/platform-auto.h +++ b/scalp_safe_petalinux/project-spec/configs/u-boot-xlnx/platform-auto.h @@ -35,7 +35,7 @@ #define CONFIG_MII #define CONFIG_NET_MULTI #define CONFIG_NETCONSOLE 1 -#define CONFIG_SERVERIP 192.168.1.153 +#define CONFIG_SERVERIP 10.136.135.67 #define CONFIG_IPADDR 192.168.0.10 #define CONFIG_GATEWAYIP 192.168.0.1 #define CONFIG_NETMASK 255.255.255.0 diff --git a/scalp_safe_petalinux/project-spec/hw-description/scalp_safe_firmware.bit b/scalp_safe_petalinux/project-spec/hw-description/scalp_safe_firmware.bit index 4444a48227db9b3859ffcc9bd10049f7397636c9..23eb74d76dece145f45538952c942a7f8de9eec0 100644 Binary files a/scalp_safe_petalinux/project-spec/hw-description/scalp_safe_firmware.bit and b/scalp_safe_petalinux/project-spec/hw-description/scalp_safe_firmware.bit differ diff --git a/scalp_safe_petalinux/project-spec/hw-description/system.xsa b/scalp_safe_petalinux/project-spec/hw-description/system.xsa index e71dc988b5fee1b0925040854a4c5caf0deda31b..5d18795d6fe6b33532d6e4287580d2f70772f40f 100644 Binary files a/scalp_safe_petalinux/project-spec/hw-description/system.xsa and b/scalp_safe_petalinux/project-spec/hw-description/system.xsa differ diff --git a/scalp_safe_petalinux/project-spec/meta-user/recipes-apps/sja1105-conf/files/sja1105-conf b/scalp_safe_petalinux/project-spec/meta-user/recipes-apps/sja1105-conf/files/sja1105-conf index 07f27b151af6c99e7516a6a9abf5b57404ccf87d..249a825c635cf6b60d2d15659dfb82c087783e1e 100644 --- a/scalp_safe_petalinux/project-spec/meta-user/recipes-apps/sja1105-conf/files/sja1105-conf +++ b/scalp_safe_petalinux/project-spec/meta-user/recipes-apps/sja1105-conf/files/sja1105-conf @@ -5,7 +5,7 @@ sja1105_ports_link_up() echo "[INFO] sja1105-conf : sja1105 ports linking up..." ip link set swp0_east up - + if [ "$?" -eq "0" ] ; then echo "[INFO] sja1105-conf : swp0_east port is up." else @@ -42,7 +42,7 @@ sja1105_ports_link_up() sja1105_creat_bridge() { echo "[INFO] sja1105-conf : Creation and configuration of the bridge in progress..." - + ip link add name br0 type bridge if [ "$?" -eq "0" ] ; then @@ -65,9 +65,9 @@ sja1105_creat_bridge() sja1105_link_ports_to_bridge() { echo "[INFO] sja1105-conf : sja1105 ports are being attached to the bridge..." - - ip link set dev swp0_east master br0 + ip link set dev swp0_east master br0 + if [ "$?" -eq "0" ] ; then echo "[INFO] sja1105-conf : Addition of the swp0_east interface to the bridge interface." else @@ -75,7 +75,7 @@ sja1105_link_ports_to_bridge() fi ip link set dev swp2_bottom master br0 - + if [ "$?" -eq "0" ] ; then echo "[INFO] sja1105-conf : Addition of the swp2_bottom interface to the bridge interface." else @@ -83,7 +83,7 @@ sja1105_link_ports_to_bridge() fi ip link set dev swp3_top master br0 - + if [ "$?" -eq "0" ] ; then echo "[INFO] sja1105-conf : Addition of the swp3_top interface to the bridge interface." else @@ -91,7 +91,7 @@ sja1105_link_ports_to_bridge() fi ip link set dev swp4_west master br0 - + if [ "$?" -eq "0" ] ; then echo "[INFO] sja1105-conf : Addition of the swp4_west interface to the bridge interface." else @@ -104,9 +104,9 @@ sja1105_link_ports_to_bridge() sja1105_ports_vlan_conf() { echo "[INFO] sja1105-conf : sja1105 ports VLAN configuration in progress..." - - bridge vlan add dev swp0_east vid 1 pvid untagged + bridge vlan add dev swp0_east vid 1 pvid untagged + if [ "$?" -eq "0" ] ; then echo "[INFO] sja1105-conf : Configuration of the swp0_east interface in untagged VLAN mode." else @@ -114,7 +114,7 @@ sja1105_ports_vlan_conf() fi bridge vlan add dev swp2_bottom vid 2 pvid untagged - + if [ "$?" -eq "0" ] ; then echo "[INFO] sja1105-conf : Configuration of the swp2_bottom interface in untagged VLAN mode." else @@ -122,7 +122,7 @@ sja1105_ports_vlan_conf() fi bridge vlan add dev swp3_top vid 3 pvid untagged - + if [ "$?" -eq "0" ] ; then echo "[INFO] sja1105-conf : Configuration of the swp3_top interface in untagged VLAN mode." else @@ -130,7 +130,7 @@ sja1105_ports_vlan_conf() fi bridge vlan add dev swp4_west vid 4 pvid untagged - + if [ "$?" -eq "0" ] ; then echo "[INFO] sja1105-conf : Configuration of the swp4_west interface in untagged VLAN mode." else @@ -143,9 +143,9 @@ sja1105_ports_vlan_conf() sja1105_bridge_link_up() { echo "[INFO] sja1105-conf : sja1105 bridge linking up..." - - ip link set br0 up + ip link set br0 up + if [ "$?" -eq "0" ] ; then echo "[INFO] sja1105-conf : bridge-like interface is up." else diff --git a/scalp_safe_petalinux/project-spec/meta-user/recipes-apps/sja1105-init/.Xil/-5077-xps13-debian/scalp_zynqps.bda b/scalp_safe_petalinux/project-spec/meta-user/recipes-apps/sja1105-init/.Xil/-5077-xps13-debian/scalp_zynqps.bda deleted file mode 100644 index 51ce2ae68fb54183a3d4369d216de069efaeab9d..0000000000000000000000000000000000000000 --- a/scalp_safe_petalinux/project-spec/meta-user/recipes-apps/sja1105-init/.Xil/-5077-xps13-debian/scalp_zynqps.bda +++ /dev/null @@ -1,63 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no" ?> -<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd"> - <key attr.name="base_addr" attr.type="string" for="node" id="BA"/> - <key attr.name="base_param" attr.type="string" for="node" id="BP"/> - <key attr.name="edge_hid" attr.type="int" for="edge" id="EH"/> - <key attr.name="high_addr" attr.type="string" for="node" id="HA"/> - <key attr.name="high_param" attr.type="string" for="node" id="HP"/> - <key attr.name="master_addrspace" attr.type="string" for="node" id="MA"/> - <key attr.name="master_instance" attr.type="string" for="node" id="MX"/> - <key attr.name="master_interface" attr.type="string" for="node" id="MI"/> - <key attr.name="master_segment" attr.type="string" for="node" id="MS"/> - <key attr.name="master_vlnv" attr.type="string" for="node" id="MV"/> - <key attr.name="memory_type" attr.type="string" for="node" id="TM"/> - <key attr.name="slave_instance" attr.type="string" for="node" id="SX"/> - <key attr.name="slave_interface" attr.type="string" for="node" id="SI"/> - <key attr.name="slave_segment" attr.type="string" for="node" id="SS"/> - <key attr.name="slave_vlnv" attr.type="string" for="node" id="SV"/> - <key attr.name="usage_type" attr.type="string" for="node" id="TU"/> - <key attr.name="vert_hid" attr.type="int" for="node" id="VH"/> - <key attr.name="vert_name" attr.type="string" for="node" id="VM"/> - <key attr.name="vert_type" attr.type="string" for="node" id="VT"/> - <graph edgedefault="undirected" id="G" parse.edgeids="canonical" parse.nodeids="canonical" parse.order="nodesfirst"> - <node id="n0"> - <data key="BA">0x43C00000</data> - <data key="BP">C_BASEADDR</data> - <data key="HA">0x43C0FFFF</data> - <data key="HP">C_HIGHADDR</data> - <data key="MA">Data</data> - <data key="MX">/processing_system7_0</data> - <data key="MI">M_AXI_GP0</data> - <data key="MS">SEG_scalp_axi4lite_0_SAXILiteAddr</data> - <data key="MV">xilinx.com:ip:processing_system7:5.5</data> - <data key="TM">both</data> - <data key="SX">/scalp_axi4lite_0</data> - <data key="SI">SAXILitexDIO</data> - <data key="SS">SAXILiteAddr</data> - <data key="SV">hepia.hesge.ch:user:scalp_axi4lite:1.2</data> - <data key="TU">register</data> - <data key="VT">AC</data> - </node> - <node id="n1"> - <data key="TU">active</data> - <data key="VH">2</data> - <data key="VT">PM</data> - </node> - <node id="n2"> - <data key="VM">scalp_zynqps</data> - <data key="VT">BC</data> - </node> - <node id="n3"> - <data key="VH">2</data> - <data key="VM">scalp_zynqps</data> - <data key="VT">VR</data> - </node> - <edge id="e0" source="n2" target="n3"> - </edge> - <edge id="e1" source="n3" target="n1"> - </edge> - <edge id="e2" source="n0" target="n1"> - <data key="EH">2</data> - </edge> - </graph> -</graphml> diff --git a/scalp_safe_petalinux/project-spec/meta-user/recipes-apps/sja1105-init/files/sja1105-init b/scalp_safe_petalinux/project-spec/meta-user/recipes-apps/sja1105-init/files/sja1105-init index ecb6d50dbca7277809b8e067e14df8adf04b9f33..2bd066651a3e95586b5214c3779ebc5b30d29e4f 100644 --- a/scalp_safe_petalinux/project-spec/meta-user/recipes-apps/sja1105-init/files/sja1105-init +++ b/scalp_safe_petalinux/project-spec/meta-user/recipes-apps/sja1105-init/files/sja1105-init @@ -31,6 +31,7 @@ stop() { return 1 fi echo 'Stopping service…' >&2 + echo 'Log files /var/log/sja1105-init.log and /var/log/sja1105-conf.log' >&2 kill -15 $(cat "$PIDFILE") && rm -f "$PIDFILE" echo 'Service stopped' >&2 } diff --git a/scalp_safe_petalinux/project-spec/meta-user/recipes-bsp/u-boot/files/platform-top.h~ b/scalp_safe_petalinux/project-spec/meta-user/recipes-bsp/u-boot/files/platform-top.h~ deleted file mode 100644 index 0efcfbf46fc3b8e82cb98bd41cd4d7d573a3d47c..0000000000000000000000000000000000000000 --- a/scalp_safe_petalinux/project-spec/meta-user/recipes-bsp/u-boot/files/platform-top.h~ +++ /dev/null @@ -1,45 +0,0 @@ -#include <configs/zynq-common.h> -#include <configs/platform-auto.h> - -/* Extra U-Boot Env settings */ -#define CONFIG_EXTRA_ENV_SETTINGS \ - "custom_board_name=\"Zynq Scalp Board\"\0" \ - "custom_board_version=\"RevB 2008\"\0" \ - "custom_board_vendor=\"Hepia CoRES - LSN\"\0" \ - "scalp_uboot_script_load_addr=0x100000\0" \ - "scalp_uboot_script_qspi_partition_offset=0x500000\0" \ - "scalp_uboot_script_qspi_partition_size=0x20000\0" \ - "uboot_script_1=sf probe 0 0 0\0" \ - "uboot_script_2=sf read ${scalp_uboot_script_load_addr} ${scalp_uboot_script_qspi_partition_offset} ${scalp_uboot_script_qspi_partition_size}\0" \ - "uboot_script_3=imi ${scalp_uboot_script_load_addr}\0" \ - "uboot_script_4=source ${scalp_uboot_script_load_addr}\0" \ - "load_scalp_uboot_script=run uboot_script_0 && run uboot_script_1 && run uboot_script_2 && run uboot_script_3 && run uboot_script_4\0" \ - "boot_from_qspi=\0" \ - "setup_eth=run readmac buildmac buildip\0" \ - "macmemaddr=0x1000000\0" \ - "readmac=i2c dev 0; i2c read 0x53 0xfa.1 6 ${macmemaddr}\0" \ - "buildmac=\n" \ - "e=\" 02:00:00\"; sep=\":\"\n" \ - "for i in 3 4 5 ; do\n" \ - "setexpr x ${macmemaddr} + $i\n" \ - "setexpr.b b *$x\n" \ - "e=\"$e$sep$b\"\n" \ - "sep=\":\"\n" \ - "done &&\n" \ - "setenv ethaddr $e\0" \ - "buildip=\n" \ - "e=\" 10\"; sep=\".\"\n" \ - "for i in 3 4 5 ; do\n" \ - "setexpr x ${macmemaddr} + $i\n" \ - "setexpr.b b *$x\n" \ - "e=\"$e$sep${b_ulong}\"\n" \ - "sep=\".\"\n" \ - "done &&\n" \ - "setenv ipaddr $e &&\n" \ - "setenv bootargs \"ip=${ipaddr}:::::eth0\"\0" \ - "custom_autoboot=echo Scalp board autoboot && sja1105 init && run setup_eth && run load_scalp_uboot_script && run boot_from_qspi\0" \ - "baudrate=115200\0" \ - "bootargs=ip=${ipaddr}:::::eth0\0" \ - "bootdelay=2\0" \ - "bootcmd=run custom_autoboot\0" \ - "" diff --git a/scalp_safe_petalinux/project-spec/meta-user/recipes-bsp/u-boot/files/scalp_uboot.cfg b/scalp_safe_petalinux/project-spec/meta-user/recipes-bsp/u-boot/files/scalp_uboot.cfg deleted file mode 100644 index e4573d7894cb1b07634b3582dc7447bf0c4ea7ab..0000000000000000000000000000000000000000 --- a/scalp_safe_petalinux/project-spec/meta-user/recipes-bsp/u-boot/files/scalp_uboot.cfg +++ /dev/null @@ -1,73 +0,0 @@ -CONFIG_API=y -CONFIG_QSPI_BOOT=y -CONFIG_SPI_BOOT=y -CONFIG_LOG=y -# CONFIG_SPL_LOG is not set -# CONFIG_TPL_LOG is not set -CONFIG_LOG_MAX_LEVEL=5 -CONFIG_LOG_CONSOLE=y -# CONFIG_LOG_TEST is not set -# CONFIG_LOG_ERROR_RETURN is not set -CONFIG_SYS_PROMPT="ScalpZynq> " -CONFIG_BUILD_BIN2C=y -CONFIG_CMD_CONFIG=y -CONFIG_CMD_LICENSE=y -# CONFIG_BOOTM_PLAN9 is not set -# CONFIG_BOOTM_RTEMS is not set -# CONFIG_BOOTM_VXWORKS is not set -CONFIG_CMD_GREPENV=y -CONFIG_CMD_ERASEENV=y -CONFIG_CMD_ENV_FLAGS=y -CONFIG_CMD_NVEDIT_INFO=y -CONFIG_CMD_EEPROM=y -CONFIG_CMD_EEPROM_LAYOUT=y -CONFIG_EEPROM_LAYOUT_HELP_STRING="<not defined>" -CONFIG_CMD_MEMINFO=y -CONFIG_CMD_MX_CYCLIC=y -CONFIG_CMD_FPGA_LOAD_SECURE=y -CONFIG_CMD_MTD=y -CONFIG_CMD_SETEXPR=y -CONFIG_CMD_UBI=y -CONFIG_CMD_UBIFS=y -# CONFIG_ENV_IS_IN_UBI is not set -CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET=0xfa -CONFIG_SYS_I2C_EEPROM_ADDR=0x53 -CONFIG_MTD_PARTITIONS=y -CONFIG_SPI_FLASH_MTD=y -CONFIG_MTD_UBI=y -CONFIG_MTD_UBI_WL_THRESHOLD=4096 -CONFIG_MTD_UBI_BEB_LIMIT=20 -# CONFIG_MTD_UBI_FASTMAP is not set -CONFIG_SPI=y -CONFIG_DM_SPI=y -CONFIG_ZYNQ_SPI=y -CONFIG_ZYNQ_QSPI=y -CONFIG_RGMII=y -CONFIG_FS_JFFS2=y -CONFIG_RBTREE=y -CONFIG_LZO=y -CONFIG_ENV_OFFSET=0x0 -CONFIG_ENV_ADDR=0x500000 -CONFIG_XILINX_OF_BOARD_DTB_ADDR=0x520000 -CONFIG_PACKING=y -CONFIG_CMD_SJA1105=y -CONFIG_SCALP_SJA1105=y -CONFIG_PINCTRL=y -CONFIG_PINCTRL_FULL=y -CONFIG_PINCTRL_GENERIC=y -CONFIG_PINMUX=y -# CONFIG_PINCONF is not set -CONFIG_PINCONF_RECURSIVE=y -# CONFIG_PINCTRL_AT91 is not set -# CONFIG_PINCTRL_AT91PIO4 is not set -# CONFIG_PINCTRL_ROCKCHIP_RV1108 is not set -# CONFIG_PINCTRL_SINGLE is not set -# CONFIG_PINCTRL_STM32 is not set -# CONFIG_PINCTRL_STMFX is not set -CONFIG_DEFAULT_DEVICE_TREE="zynq-scalp" -# CONFIG_OF_SEPARATE is not set -CONFIG_OF_EMBED=y -CONFIG_DM_MDIO=y -CONFIG_DM_MDIO_MUX=y -# CONFIG_MDIO_MUX_I2CREG is not set -# CONFIG_MVMDIO is not set \ No newline at end of file