mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-02-14 12:21:53 +00:00
Update openwrt and change brcm2708 to bcm27xx
This commit is contained in:
parent
e01b691fc4
commit
19e814f4e5
13 changed files with 14 additions and 165 deletions
8
build.sh
8
build.sh
|
@ -58,9 +58,9 @@ else
|
|||
fi
|
||||
|
||||
#_get_repo source https://github.com/ysurac/openmptcprouter-source "master"
|
||||
_get_repo "$OMR_TARGET/source" https://github.com/openwrt/openwrt "1d47f81581bcd476487e5b29314602167a843b99"
|
||||
_get_repo feeds/packages https://github.com/openwrt/packages "2c86fac6f63f31b38be93e9acff970ac5c98b4c8"
|
||||
_get_repo feeds/luci https://github.com/openwrt/luci "980e893ce57dab26e73be38712c1dc7e17f69af2"
|
||||
_get_repo "$OMR_TARGET/source" https://github.com/openwrt/openwrt "215598fd03899c19a9cd26266221269dd5ec8cee"
|
||||
_get_repo feeds/packages https://github.com/openwrt/packages "e7088fe82ca72c47863398103408e64761308481"
|
||||
_get_repo feeds/luci https://github.com/openwrt/luci "b23a63f554ef073c4ba212d6e88009ed433adbf5"
|
||||
|
||||
if [ -z "$OMR_FEED" ]; then
|
||||
OMR_FEED=feeds/openmptcprouter
|
||||
|
@ -185,7 +185,7 @@ echo "Done"
|
|||
|
||||
if [ "$OMR_KERNEL" = "4.19" ]; then
|
||||
echo "Set to kernel 4.19 for rpi arch"
|
||||
find target/linux/brcm2708 -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=4.14%KERNEL_PATCHVER:=4.19%g' {} \;
|
||||
find target/linux/bcm27xx -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=4.14%KERNEL_PATCHVER:=4.19%g' {} \;
|
||||
echo "Done"
|
||||
echo "Set to kernel 4.19 for x86 arch"
|
||||
find target/linux/x86 -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=4.14%KERNEL_PATCHVER:=4.19%g' {} \;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
CONFIG_TARGET_brcm2708=y
|
||||
CONFIG_TARGET_brcm2708_bcm2709=y
|
||||
CONFIG_TARGET_brcm2708_bcm2709_DEVICE_rpi-2=y
|
||||
CONFIG_TARGET_bcm27xx=y
|
||||
CONFIG_TARGET_bcm27xx_bcm2709=y
|
||||
CONFIG_TARGET_bcm27xx_bcm2709_DEVICE_rpi-2=y
|
||||
CONFIG_PACKAGE_kmod-ath10k-ct=n
|
||||
CONFIG_PACKAGE_kmod-ath9k=y
|
||||
CONFIG_PACKAGE_rpi-eeprom=y
|
|
@ -1,5 +1,5 @@
|
|||
CONFIG_TARGET_brcm2708=y
|
||||
CONFIG_TARGET_brcm2708_bcm2710=y
|
||||
CONFIG_TARGET_brcm2708_bcm2710_DEVICE_rpi-3=y
|
||||
CONFIG_TARGET_bcm27xx=y
|
||||
CONFIG_TARGET_bcm27xx_bcm2710=y
|
||||
CONFIG_TARGET_bcm27xx_bcm2710_DEVICE_rpi-3=y
|
||||
CONFIG_PACKAGE_kmod-ath10k-ct=n
|
||||
CONFIG_PACKAGE_kmod-ath9k=y
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
CONFIG_TARGET_brcm2708=y
|
||||
CONFIG_TARGET_brcm2708_bcm2711=y
|
||||
CONFIG_TARGET_brcm2708_bcm2711_DEVICE_rpi-4=y
|
||||
CONFIG_TARGET_bcm27xx=y
|
||||
CONFIG_TARGET_bcm27xx_bcm2711=y
|
||||
CONFIG_TARGET_bcm27xx_bcm2711_DEVICE_rpi-4=y
|
||||
CONFIG_PACKAGE_kmod-ath10k-ct=n
|
||||
CONFIG_PACKAGE_kmod-ath9k=y
|
||||
CONFIG_PACKAGE_rpi-eeprom=y
|
|
@ -784,7 +784,7 @@ index a3d99288422..8ba069ed4fc 100644
|
|||
- depends on GRUB_IMAGES || USES_BOOT_PART
|
||||
+ depends on GRUB_IMAGES || EFI_IMAGES || USES_BOOT_PART
|
||||
default 8 if TARGET_apm821xx_sata
|
||||
default 64 if TARGET_brcm2708
|
||||
default 64 if TARGET_bcm27xx
|
||||
default 16
|
||||
|
||||
config TARGET_ROOTFS_PARTSIZE
|
||||
|
|
|
@ -1,150 +0,0 @@
|
|||
#
|
||||
# Copyright (C) 2012-2019 OpenWrt.org
|
||||
# Copyright (C) 2016-2017 LEDE project
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/image.mk
|
||||
|
||||
FAT32_BLOCK_SIZE=1024
|
||||
FAT32_BLOCKS=$(shell echo $$(($(CONFIG_TARGET_KERNEL_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE))))
|
||||
|
||||
define Build/Compile
|
||||
$(CP) $(LINUX_DIR)/COPYING $(KDIR)/COPYING.linux
|
||||
endef
|
||||
|
||||
### Image scripts ###
|
||||
define Build/kernel-img
|
||||
perl $(LINUX_DIR)/scripts/mkknlimg $@ $@.tmp
|
||||
mv $@.tmp $@
|
||||
endef
|
||||
|
||||
define Build/boot-common
|
||||
rm -f $@.boot
|
||||
mkfs.fat -C $@.boot $(FAT32_BLOCKS)
|
||||
mcopy -i $@.boot $(KDIR)/COPYING.linux ::
|
||||
mcopy -i $@.boot $(KDIR)/LICENCE.broadcom ::
|
||||
mcopy -i $@.boot config.txt ::
|
||||
mcopy -i $@.boot $(CMDLINE) ::cmdline.txt
|
||||
mcopy -i $@.boot distroconfig.txt ::
|
||||
mcopy -i $@.boot $(IMAGE_KERNEL) ::$(KERNEL_IMG)
|
||||
$(foreach dts,$(shell echo $(DEVICE_DTS)),mcopy -i $@.boot $(DTS_DIR)/$(dts).dtb ::;)
|
||||
mmd -i $@.boot ::/overlays
|
||||
mcopy -i $@.boot $(DTS_DIR)/overlays/*.dtbo ::/overlays/
|
||||
mcopy -i $@.boot $(DTS_DIR)/overlays/README ::/overlays/
|
||||
endef
|
||||
|
||||
define Build/boot-2708
|
||||
mcopy -i $@.boot $(KDIR)/bootcode.bin ::
|
||||
mcopy -i $@.boot $(KDIR)/start.elf ::
|
||||
mcopy -i $@.boot $(KDIR)/start_cd.elf ::
|
||||
mcopy -i $@.boot $(KDIR)/start_x.elf ::
|
||||
mcopy -i $@.boot $(KDIR)/fixup.dat ::
|
||||
mcopy -i $@.boot $(KDIR)/fixup_cd.dat ::
|
||||
mcopy -i $@.boot $(KDIR)/fixup_x.dat ::
|
||||
endef
|
||||
|
||||
define Build/boot-2711
|
||||
mcopy -i $@.boot $(KDIR)/start4.elf ::
|
||||
mcopy -i $@.boot $(KDIR)/start4cd.elf ::
|
||||
mcopy -i $@.boot $(KDIR)/start4x.elf ::
|
||||
mcopy -i $@.boot $(KDIR)/fixup4.dat ::
|
||||
mcopy -i $@.boot $(KDIR)/fixup4cd.dat ::
|
||||
mcopy -i $@.boot $(KDIR)/fixup4x.dat ::
|
||||
endef
|
||||
|
||||
define Build/sdcard-img
|
||||
./gen_rpi_sdcard_img.sh $@ $@.boot $(IMAGE_ROOTFS) \
|
||||
$(CONFIG_TARGET_KERNEL_PARTSIZE) $(CONFIG_TARGET_ROOTFS_PARTSIZE)
|
||||
endef
|
||||
|
||||
### Devices ###
|
||||
define Device/Default
|
||||
DEVICE_VENDOR := Raspberry Pi
|
||||
KERNEL := kernel-bin | kernel-img
|
||||
KERNEL_IMG := kernel.img
|
||||
IMAGES := factory.img.gz sysupgrade.img.gz
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-2708 | sdcard-img | gzip | append-metadata
|
||||
IMAGE/factory.img.gz := boot-common | boot-2708 | sdcard-img | gzip
|
||||
CMDLINE := cmdline.txt
|
||||
endef
|
||||
|
||||
define Device/rpi
|
||||
DEVICE_MODEL := B/B+/CM/Zero/ZeroW
|
||||
DEVICE_DTS := bcm2708-rpi-b bcm2708-rpi-b-plus bcm2708-rpi-cm bcm2708-rpi-zero bcm2708-rpi-zero-w
|
||||
SUPPORTED_DEVICES := \
|
||||
rpi-b rpi-b-plus rpi-cm rpi-zero rpi-zero-w \
|
||||
raspberrypi,model-b raspberrypi,model-b-plus raspberrypi,model-b-rev2 \
|
||||
raspberrypi,compute-module raspberrypi,compute-module-1 \
|
||||
raspberrypi,model-zero raspberrypi,model-zero-w
|
||||
DEVICE_PACKAGES := \
|
||||
brcmfmac-firmware-43430-sdio \
|
||||
brcmfmac-firmware-43430-sdio-rpi-zero-w \
|
||||
kmod-brcmfmac wpad-basic
|
||||
endef
|
||||
ifeq ($(SUBTARGET),bcm2708)
|
||||
TARGET_DEVICES += rpi
|
||||
endif
|
||||
|
||||
define Device/rpi-2
|
||||
DEVICE_MODEL := 2B/3B/3B+/3CM/4B
|
||||
DEVICE_DTS := bcm2709-rpi-2-b bcm2710-rpi-3-b bcm2710-rpi-3-b-plus bcm2711-rpi-4-b bcm2710-rpi-cm3
|
||||
SUPPORTED_DEVICES := \
|
||||
rpi-2-b rpi-3-b rpi-3-b-plus rpi-cm \
|
||||
raspberrypi,2-model-b \
|
||||
raspberrypi,3-model-b raspberrypi,3-model-b-plus \
|
||||
raspberrypi,3-compute-module raspberrypi,compute-module-3 \
|
||||
raspberrypi,4-model-b
|
||||
DEVICE_PACKAGES := \
|
||||
brcmfmac-firmware-43430-sdio \
|
||||
brcmfmac-firmware-43430-sdio-rpi-3b \
|
||||
brcmfmac-firmware-43455-sdio brcmfmac-firmware-43455-clm_blob \
|
||||
brcmfmac-firmware-43455-sdio-rpi-3b-plus brcmfmac-firmware-43455-sdio-rpi-4b \
|
||||
kmod-brcmfmac wpad-basic
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-2708 | boot-2711 | sdcard-img | gzip | append-metadata
|
||||
IMAGE/factory.img.gz := boot-common | boot-2708 | boot-2711 | sdcard-img | gzip
|
||||
endef
|
||||
ifeq ($(SUBTARGET),bcm2709)
|
||||
TARGET_DEVICES += rpi-2
|
||||
endif
|
||||
|
||||
define Device/rpi-3
|
||||
DEVICE_MODEL := 3B/3B+/3CM
|
||||
KERNEL_IMG := kernel8.img
|
||||
DEVICE_DTS := broadcom/bcm2710-rpi-3-b broadcom/bcm2710-rpi-3-b-plus broadcom/bcm2710-rpi-cm3
|
||||
SUPPORTED_DEVICES := \
|
||||
rpi-3-b rpi-3-b-plus \
|
||||
raspberrypi,3-model-b raspberrypi,3-model-b-plus \
|
||||
raspberrypi,3-compute-module raspberrypi,compute-module-3
|
||||
DEVICE_PACKAGES := \
|
||||
brcmfmac-firmware-43430-sdio \
|
||||
brcmfmac-firmware-43430-sdio-rpi-3b \
|
||||
brcmfmac-firmware-43455-sdio brcmfmac-firmware-43455-clm_blob \
|
||||
brcmfmac-firmware-43455-sdio-rpi-3b-plus \
|
||||
kmod-brcmfmac wpad-basic
|
||||
endef
|
||||
ifeq ($(SUBTARGET),bcm2710)
|
||||
TARGET_DEVICES += rpi-3
|
||||
endif
|
||||
|
||||
define Device/rpi-4
|
||||
DEVICE_MODEL := 4B
|
||||
KERNEL_IMG := kernel8.img
|
||||
DEVICE_DTS := broadcom/bcm2711-rpi-4-b
|
||||
SUPPORTED_DEVICES := \
|
||||
raspberrypi,4-model-b
|
||||
DEVICE_PACKAGES := \
|
||||
brcmfmac-firmware-43455-sdio brcmfmac-firmware-43455-clm_blob \
|
||||
brcmfmac-firmware-43455-sdio-rpi-4b \
|
||||
kmod-brcmfmac wpad-basic
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-2711 | sdcard-img | gzip | append-metadata
|
||||
IMAGE/factory.img.gz := boot-common | boot-2711 | sdcard-img | gzip
|
||||
CMDLINE := cmdline-bcm2711-arm64.txt
|
||||
endef
|
||||
ifeq ($(SUBTARGET),bcm2711)
|
||||
TARGET_DEVICES += rpi-4
|
||||
endif
|
||||
|
||||
$(eval $(call BuildImage))
|
|
@ -1 +0,0 @@
|
|||
console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=squashfs,ext4 rootwait coherent_pool=128M cma=256M@128M swiotlb=force
|
Loading…
Reference in a new issue