[Bookworm] Upgrade Dell platforms to Bookworm (#17003)

Why I did it
[Bookworm] Update platform-modules-dell for Bookworm #16735

How I did it
Modified platform driver to comply with bookworm kernel.
Removed MODULE_SUPPORTED_DEVICE wherever used.
Modified python build commands for building whl packages.

How to verify it
Verify whether all the platform bookworm debs are built.
make target/debs/bookworm/platform-modules-z9100_1.1_amd64.deb
Load the platform debian into the device and install it in bookworm image.
Verify the platform related CLI and the functionality
This commit is contained in:
Aravind Mani 2023-10-26 22:31:55 +05:30 committed by Ying Xie
parent b8548439b7
commit c8fe65873f
12 changed files with 24 additions and 41 deletions

View File

@ -3,11 +3,10 @@ include $(PLATFORM_PATH)/sai-modules.dep
include $(PLATFORM_PATH)/sai.dep
# TODO: re-enable once the following have been updated for bookworm:
# * Nokia
# * Dell
# * Juniper
# * Ragile
include $(PLATFORM_PATH)/platform-modules-s6000.dep
#include $(PLATFORM_PATH)/platform-modules-dell.dep
include $(PLATFORM_PATH)/platform-modules-dell.dep
include $(PLATFORM_PATH)/platform-modules-arista.dep
include $(PLATFORM_PATH)/platform-modules-ingrasys.dep
include $(PLATFORM_PATH)/platform-modules-accton.dep

View File

@ -2,12 +2,11 @@ include $(PLATFORM_PATH)/sai-modules.mk
include $(PLATFORM_PATH)/sai.mk
# TODO: re-enable once the following have been updated for bookworm:
# * Nokia
# * Dell
# * Juniper
# * Ragile
# * Ufispace
#include $(PLATFORM_PATH)/platform-modules-nokia.mk
#include $(PLATFORM_PATH)/platform-modules-dell.mk
include $(PLATFORM_PATH)/platform-modules-dell.mk
include $(PLATFORM_PATH)/platform-modules-arista.mk
#include $(PLATFORM_PATH)/platform-modules-ingrasys.mk
include $(PLATFORM_PATH)/platform-modules-accton.mk

View File

@ -1531,5 +1531,4 @@ module_exit (fpgapci_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("joyce_yu@dell.com");
MODULE_DESCRIPTION ("Driver for FPGA Logic I2C bus");
MODULE_SUPPORTED_DEVICE ("FPGA Logic I2C bus");
MODULE_VERSION ("01.01");

View File

@ -18,76 +18,76 @@ override_dh_auto_build:
cp $(COMMON_DIR)/dell_pmc.c $(MOD_SRC_DIR)/$${mod}/modules/dell_s6100_lpc.c; \
cp $(COMMON_DIR)/dell_ich.c $(MOD_SRC_DIR)/$${mod}/modules/dell_ich.c; \
cd $(MOD_SRC_DIR)/$${mod}; \
python3 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
python3 -m build --wheel --no-isolation --outdir $(MOD_SRC_DIR)/$${mod}/modules; \
cd $(MOD_SRC_DIR); \
elif [ $$mod = "z9100" ]; then \
cp $(COMMON_DIR)/dell_pmc.c $(MOD_SRC_DIR)/$${mod}/modules/dell_mailbox.c; \
cp $(COMMON_DIR)/dell_ich.c $(MOD_SRC_DIR)/$${mod}/modules/dell_ich.c; \
cd $(MOD_SRC_DIR)/$${mod}; \
python3 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
python3 -m build --wheel --no-isolation --outdir $(MOD_SRC_DIR)/$${mod}/modules; \
cd $(MOD_SRC_DIR); \
elif [ $$mod = "s6000" ]; then \
cd $(MOD_SRC_DIR)/$${mod}; \
python3 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
python3 -m build --wheel --no-isolation --outdir $(MOD_SRC_DIR)/$${mod}/modules; \
cd $(MOD_SRC_DIR); \
elif [ $$mod = "z9264f" ]; then \
cp $(COMMON_DIR)/dell_fpga_ocores.c $(MOD_SRC_DIR)/$${mod}/modules/dell_z9264f_fpga_ocores.c; \
cp $(COMMON_DIR)/ipmihelper.py $(MOD_SRC_DIR)/$${mod}/sonic_platform/ipmihelper.py; \
cd $(MOD_SRC_DIR)/$${mod}; \
python3 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
python3 -m build --wheel --no-isolation --outdir $(MOD_SRC_DIR)/$${mod}/modules; \
cd $(MOD_SRC_DIR); \
elif [ $$mod = "s5212f" ]; then \
cp $(COMMON_DIR)/dell_fpga_ocores.c $(MOD_SRC_DIR)/$${mod}/modules/dell_s5212f_fpga_ocores.c; \
cp $(COMMON_DIR)/ipmihelper.py $(MOD_SRC_DIR)/$${mod}/sonic_platform/ipmihelper.py; \
cd $(MOD_SRC_DIR)/$${mod}; \
python3 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
python3 -m build --wheel --no-isolation --outdir $(MOD_SRC_DIR)/$${mod}/modules; \
cd $(MOD_SRC_DIR); \
elif [ $$mod = "s5224f" ]; then \
cp $(COMMON_DIR)/dell_fpga_ocores.c $(MOD_SRC_DIR)/$${mod}/modules/dell_s5224f_fpga_ocores.c; \
cp $(COMMON_DIR)/ipmihelper.py $(MOD_SRC_DIR)/$${mod}/sonic_platform/ipmihelper.py; \
cd $(MOD_SRC_DIR)/$${mod}; \
python3 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
python3 -m build --wheel --no-isolation --outdir $(MOD_SRC_DIR)/$${mod}/modules; \
cd $(MOD_SRC_DIR); \
elif [ $$mod = "s5232f" ]; then \
cp $(COMMON_DIR)/dell_fpga_ocores.c $(MOD_SRC_DIR)/$${mod}/modules/dell_s5232f_fpga_ocores.c; \
cp $(COMMON_DIR)/ipmihelper.py $(MOD_SRC_DIR)/$${mod}/sonic_platform/ipmihelper.py; \
cd $(MOD_SRC_DIR)/$${mod}; \
python3 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
python3 -m build --wheel --no-isolation --outdir $(MOD_SRC_DIR)/$${mod}/modules; \
cd $(MOD_SRC_DIR); \
elif [ $$mod = "s5248f" ]; then \
cp $(COMMON_DIR)/dell_fpga_ocores.c $(MOD_SRC_DIR)/$${mod}/modules/dell_s5248f_fpga_ocores.c; \
cp $(COMMON_DIR)/ipmihelper.py $(MOD_SRC_DIR)/$${mod}/sonic_platform/ipmihelper.py; \
cd $(MOD_SRC_DIR)/$${mod}; \
python3 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
python3 -m build --wheel --no-isolation --outdir $(MOD_SRC_DIR)/$${mod}/modules; \
cd $(MOD_SRC_DIR); \
elif [ $$mod = "s5296f" ]; then \
cp $(COMMON_DIR)/dell_fpga_ocores.c $(MOD_SRC_DIR)/$${mod}/modules/dell_s5296f_fpga_ocores.c; \
cp $(COMMON_DIR)/ipmihelper.py $(MOD_SRC_DIR)/$${mod}/sonic_platform/ipmihelper.py; \
cd $(MOD_SRC_DIR)/$${mod}; \
python3 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
python3 -m build --wheel --no-isolation --outdir $(MOD_SRC_DIR)/$${mod}/modules; \
cd $(MOD_SRC_DIR); \
elif [ $$mod = "n3248te" ]; then \
cd $(MOD_SRC_DIR)/$${mod}; \
python3 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
python3 -m build --wheel --no-isolation --outdir $(MOD_SRC_DIR)/$${mod}/modules; \
cd $(MOD_SRC_DIR); \
elif [ $$mod = "z9332f" ]; then \
cp $(COMMON_DIR)/ipmihelper.py $(MOD_SRC_DIR)/$${mod}/sonic_platform/ipmihelper.py; \
cd $(MOD_SRC_DIR)/$${mod}; \
python3 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
python3 -m build --wheel --no-isolation --outdir $(MOD_SRC_DIR)/$${mod}/modules; \
cd $(MOD_SRC_DIR); \
elif [ $$mod = "z9432f" ]; then \
cp $(COMMON_DIR)/dell_fpga_ocores.c $(MOD_SRC_DIR)/$${mod}/modules/dell_z9432f_fpga_ocores.c; \
cp $(COMMON_DIR)/ipmihelper.py $(MOD_SRC_DIR)/$${mod}/sonic_platform/ipmihelper.py; \
cd $(MOD_SRC_DIR)/$${mod}; \
python3 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
python3 -m build --wheel --no-isolation --outdir $(MOD_SRC_DIR)/$${mod}/modules; \
cd $(MOD_SRC_DIR); \
elif [ $$mod = "n3248pxe" ]; then \
cd $(MOD_SRC_DIR)/$${mod}; \
python3 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
python3 -m build --wheel --no-isolation --outdir $(MOD_SRC_DIR)/$${mod}/modules; \
cd $(MOD_SRC_DIR); \
elif [ $$mod = "e3224f" ]; then \
cd $(MOD_SRC_DIR)/$${mod}; \
python3 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
python3 -m build --wheel --no-isolation --outdir $(MOD_SRC_DIR)/$${mod}/modules; \
cd $(MOD_SRC_DIR); \
fi; \
echo "making man page alias $$mod -> $$mod APIs";\

View File

@ -57,7 +57,6 @@ static const unsigned short i2c_adresses[] = {
0x4D,
I2C_CLIENT_END
};
/*
* global registers
*/
@ -854,7 +853,7 @@ static const struct sensor_device_attribute *emc2305_fan_attrs[] = {
* driver interface
*/
static int emc2305_remove(struct i2c_client *client)
static void emc2305_remove(struct i2c_client *client)
{
struct emc2305_data *data = i2c_get_clientdata(client);
int fan_idx, i;
@ -872,7 +871,6 @@ static int emc2305_remove(struct i2c_client *client)
&emc2305_attr_common[i].dev_attr);
kfree(data);
return 0;
}

View File

@ -609,7 +609,7 @@ static const struct sensor_device_attribute *emc2305_fan_attrs[] = {
* driver interface
*/
static int emc2305_remove(struct i2c_client *client)
static void emc2305_remove(struct i2c_client *client)
{
struct emc2305_data *data = i2c_get_clientdata(client);
int fan_idx, i;
@ -627,7 +627,6 @@ static int emc2305_remove(struct i2c_client *client)
&emc2305_attr_common[i].dev_attr);
kfree(data);
return 0;
}

View File

@ -609,7 +609,7 @@ static const struct sensor_device_attribute *emc2305_fan_attrs[] = {
* driver interface
*/
static int emc2305_remove(struct i2c_client *client)
static void emc2305_remove(struct i2c_client *client)
{
struct emc2305_data *data = i2c_get_clientdata(client);
int fan_idx, i;
@ -627,7 +627,6 @@ static int emc2305_remove(struct i2c_client *client)
&emc2305_attr_common[i].dev_attr);
kfree(data);
return 0;
}

View File

@ -49,7 +49,6 @@ struct cpld_data {
struct mutex update_lock;
};
static void dell_s6100_iom_cpld_add_client(struct i2c_client *client)
{
struct cpld_data *data = kzalloc(sizeof(struct cpld_data), GFP_KERNEL);
@ -68,7 +67,6 @@ static void dell_s6100_iom_cpld_remove_client(struct i2c_client *client)
{
struct cpld_data *data = i2c_get_clientdata(client);
kfree(data);
return;
}
int dell_s6100_iom_cpld_read(struct cpld_data *data,unsigned short cpld_addr, u8 reg)
@ -474,10 +472,9 @@ exit:
return status;
}
static int dell_s6100_iom_cpld_remove(struct i2c_client *client)
static void dell_s6100_iom_cpld_remove(struct i2c_client *client)
{
dell_s6100_iom_cpld_remove_client(client);
return 0;
}

View File

@ -449,10 +449,9 @@ exit:
return status;
}
static int dell_z9100_iom_cpld_remove(struct i2c_client *client)
static void dell_z9100_iom_cpld_remove(struct i2c_client *client)
{
dell_z9100_iom_cpld_remove_client(client);
return 0;
}

View File

@ -50,7 +50,6 @@
#define PCA954X_MAX_NCHANS 8
#define PCA954X_IRQ_OFFSET 4
enum pca_type {
pca_9540,
pca_9542,
@ -533,14 +532,13 @@ fail_cleanup:
return ret;
}
static int pca954x_remove(struct i2c_client *client)
static void pca954x_remove(struct i2c_client *client)
{
struct i2c_mux_core *muxc = i2c_get_clientdata(client);
device_remove_file(&client->dev, &dev_attr_idle_state);
pca954x_cleanup(muxc);
return 0;
}
#ifdef CONFIG_PM_SLEEP

View File

@ -108,15 +108,13 @@ static int mc24lc64t_probe(struct i2c_client *client,
return err;
}
static int mc24lc64t_remove(struct i2c_client *client)
static void mc24lc64t_remove(struct i2c_client *client)
{
struct mc24lc64t_data *drvdata = i2c_get_clientdata(client);
i2c_unregister_device(drvdata->fake_client);
sysfs_remove_bin_file(&client->dev.kobj, &mc24lc64t_bit_attr);
return 0;
}
static const struct i2c_device_id mc24lc64t_id[] = {

View File

@ -108,15 +108,13 @@ static int mc24lc64t_probe(struct i2c_client *client,
return err;
}
static int mc24lc64t_remove(struct i2c_client *client)
static void mc24lc64t_remove(struct i2c_client *client)
{
struct mc24lc64t_data *drvdata = i2c_get_clientdata(client);
i2c_unregister_device(drvdata->fake_client);
sysfs_remove_bin_file(&client->dev.kobj, &mc24lc64t_bit_attr);
return 0;
}
static const struct i2c_device_id mc24lc64t_id[] = {