rootfs.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. --- a/include/image.mk
  2. +++ b/include/image.mk
  3. @@ -728,8 +769,10 @@ endef
  4. define Device
  5. $(call Device/InitProfile,$(1))
  6. $(call Device/Init,$(1))
  7. + $(call Device/Init,$(PROFILE_SANITIZED))
  8. $(call Device/Default,$(1))
  9. $(call Device/$(1),$(1))
  10. + $(call Device/$(PROFILE_SANITIZED),$(1))
  11. $(call Device/Check,$(1))
  12. $(call Device/$(if $(DUMP),Dump,Build),$(1))
  13. --- a/target/linux/armvirt/image/Makefile
  14. +++ b/target/linux/armvirt/image/Makefile
  15. @@ -23,10 +23,30 @@ endef
  16. $(eval $(call Image/gzip-ext4-padded-squashfs))
  17. +define Device/box
  18. + DEVICE_VENDOR :=
  19. + DEVICE_MODEL := 电视盒子全系列 / N1
  20. + DEVICE_PACKAGES :=
  21. +endef
  22. +TARGET_DEVICES += box
  23. +
  24. +define Device/armvirt
  25. + DEVICE_MODEL := QEMU ARM virt machine
  26. + DEVICE_PACKAGES :=
  27. +endef
  28. +TARGET_DEVICES += armvirt
  29. +
  30. define Image/Build
  31. $(call Image/Build/$(1))
  32. $(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_ROOTFS)-$(1).img
  33. $(call Image/Build/gzip/$(1))
  34. + if [ "$(PROFILE_SANITIZED)" == "box" ]; then \
  35. + export BIN_DIR=$(BIN_DIR); \
  36. + export DATE=$(DATE); \
  37. + cd /www/wwwroot/op.supes.top/bcache/armvirt/64/amlogic-s9xxx-openwrt; \
  38. + . ../modify_amlogic.sh; \
  39. + ./make -k 5.15.100 -b $(MORE) -s $(shell echo $$(($(ROOTFS_PARTSIZE)/1024/1024))) || true; \
  40. + fi
  41. endef
  42. $(eval $(call BuildImage))