[Bookworm] Upgrade centec platforms to Bookworm (#17364)
How I did it Modified platform driver to comply with bookworm kernel. 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-v682-48y8c-d_1.0_amd64.deb Load the platform debian into the device and install it in bookworm image. Verify the platform related CLI and the functionality Signed-off-by: centecqianj <qianj@centec.com>
This commit is contained in:
parent
cec2731647
commit
8db3a99d11
@ -1,7 +1,7 @@
|
||||
dmsetup==2:1.02.175-2.1
|
||||
iputils-ping==3:20210202-1
|
||||
keyutils==1.6.1-2
|
||||
libdbus-1-dev==1.12.24-0+deb11u1
|
||||
libdbus-1-dev==1.12.28-0+deb11u1
|
||||
libdevmapper1.02.1==2:1.02.175-2.1
|
||||
libdpkg-perl==1.20.12
|
||||
libevent-2.1-7==2.1.12-stable-1
|
||||
|
@ -48,7 +48,7 @@ build:
|
||||
(for mod in $(MODULE_DIRS); do \
|
||||
make modules -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/$${mod}/modules; \
|
||||
cd $${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 -; \
|
||||
done)
|
||||
|
||||
|
@ -535,14 +535,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
|
||||
|
@ -210,7 +210,7 @@ sd2405_probe(struct i2c_client *client, const struct i2c_device_id *id)
|
||||
if (IS_ERR(rtc))
|
||||
return PTR_ERR(rtc);
|
||||
rtc->ops = &sd2405_rtc_ops;
|
||||
ret = rtc_register_device(rtc);
|
||||
ret = devm_rtc_register_device(rtc);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
@ -1935,10 +1935,10 @@ int linux_dal_pcie_probe(struct pci_dev* pdev, const struct pci_device_id* id)
|
||||
pdev->vendor, pdev->device);
|
||||
}
|
||||
|
||||
ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
|
||||
ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
|
||||
if (ret)
|
||||
{
|
||||
ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
|
||||
ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
|
||||
if (ret)
|
||||
{
|
||||
printk("Could not set PCI DMA Mask\n");
|
||||
|
@ -1,3 +1,3 @@
|
||||
KBUILD_EXTRA_SYMBOLS = /sonic/platform/centec-arm64/sonic-platform-modules-e530/pca954x/Module.symvers
|
||||
KBUILD_EXTRA_SYMBOLS = /sonic/platform/centec/sonic-platform-modules-e582/pca954x/Module.symvers
|
||||
|
||||
obj-m := centec_e582_48x2q4z_platform.o
|
||||
|
@ -6,21 +6,23 @@ KVERSION ?= $(shell uname -r)
|
||||
KERNEL_SRC := /lib/modules/$(KVERSION)
|
||||
MOD_SRC_DIR:= $(shell pwd)
|
||||
MODULE_DIRS:= 48x6q 48x2q4z
|
||||
PCA954X_DIR := pca954x
|
||||
KDAL_DIR := centec-dal/
|
||||
PCA954X_DIR := pca954x/
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
override_dh_auto_build:
|
||||
(for mod in $(MODULE_DIRS); do \
|
||||
make -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/$${mod}/modules; \
|
||||
cp ../../centec/centec-dal/ $(MOD_SRC_DIR)/$(KDAL_DIR) -rf
|
||||
(for mod in $(KDAL_DIR); do \
|
||||
make modules -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/$${mod}/; \
|
||||
done)
|
||||
(for mod in $(PCA954X_DIR); do \
|
||||
make modules -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/$${mod}/; \
|
||||
done)
|
||||
rm $(MOD_SRC_DIR)/centec-dal -rf
|
||||
cp $(MOD_SRC_DIR)/../centec-dal $(MOD_SRC_DIR)/centec-dal -rf
|
||||
make -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/centec-dal
|
||||
(for mod in $(MODULE_DIRS); do \
|
||||
make -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/$${mod}/modules; \
|
||||
done)
|
||||
|
||||
override_dh_auto_install:
|
||||
(for mod in $(MODULE_DIRS); do \
|
||||
@ -41,7 +43,6 @@ override_dh_clean:
|
||||
rm -rf $(MOD_SRC_DIR)/$${mod}/modules/*.ko; \
|
||||
rm -rf debian/platform-modules-e582-$${mod}/$(KERNEL_SRC)/$(INSTALL_MOD_DIR)/*.ko; \
|
||||
done)
|
||||
make -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/centec-dal clean; \
|
||||
rm -rf $(MOD_SRC_DIR)/centec-dal/*.ko; \
|
||||
rm $(MOD_SRC_DIR)/centec-dal -rf
|
||||
|
||||
|
@ -535,14 +535,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
|
||||
|
@ -229,7 +229,7 @@ sd2405_probe(struct i2c_client *client, const struct i2c_device_id *id)
|
||||
i2c_set_clientdata(client, rtc);
|
||||
rtc->ops = &sd2405_rtc_ops;
|
||||
|
||||
return rtc_register_device(rtc);
|
||||
return devm_rtc_register_device(rtc);
|
||||
}
|
||||
|
||||
static struct i2c_device_id sd2405_id[] = {
|
||||
|
@ -229,7 +229,7 @@ sd2405_probe(struct i2c_client *client, const struct i2c_device_id *id)
|
||||
i2c_set_clientdata(client, rtc);
|
||||
rtc->ops = &sd2405_rtc_ops;
|
||||
|
||||
return rtc_register_device(rtc);
|
||||
return devm_rtc_register_device(rtc);
|
||||
}
|
||||
|
||||
static struct i2c_device_id sd2405_id[] = {
|
||||
|
@ -41,7 +41,7 @@ build:
|
||||
(for mod in $(MODULE_DIRS); do \
|
||||
make modules -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/$${mod}/modules; \
|
||||
cd $${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 -; \
|
||||
done)
|
||||
# third party driver for cpu card
|
||||
|
Loading…
Reference in New Issue
Block a user