@@ -95,7 +95,6 @@ download_scripts() {
9595 " gpu_installer.sh"
9696 " npu_installer.sh"
9797 " openvino_installer.sh"
98- " platform_detection.sh"
9998 " print_summary_table.sh"
10099 )
101100
@@ -183,10 +182,26 @@ verify_ubuntu_24() {
183182
184183# Install NPU drivers (Core Ultra only)
185184install_npu_drivers () {
186- echo " Installing NPU drivers for Core Ultra..."
185+ # Explicit guard: Only install NPU drivers on Core Ultra platforms
186+ if ! is_coreultra; then
187+ echo " $S_ERROR NPU drivers are only supported on Core Ultra platforms"
188+ echo " Current platform: $CPU_MODEL "
189+ echo " Skipping NPU driver installation"
190+ return 1
191+ fi
192+
193+ echo " Installing NPU drivers for Core Ultra platform..."
194+ echo " $S_VALID NPU driver installation is supported on this Core Ultra platform"
195+
187196 # Execute the script instead of sourcing it to avoid context issues
188197 # shellcheck disable=SC1091
189- bash " $SCRIPT_DIR /npu_installer.sh"
198+ if bash " $SCRIPT_DIR /npu_installer.sh" ; then
199+ echo " $S_VALID NPU drivers installed successfully"
200+ return 0
201+ else
202+ echo " $S_ERROR NPU driver installation failed"
203+ return 1
204+ fi
190205}
191206
192207# Check for GPU presence
@@ -217,17 +232,26 @@ check_intel_arc_gpu() {
217232
218233# Install GPU drivers - only if any GPU is present
219234install_gpu_drivers () {
235+ echo " # GPU Driver Installation Process"
236+
220237 if check_intel_arc_gpu; then
221238 echo " Installing Intel GPU drivers..."
222239 # Execute the script instead of sourcing it to avoid context issues
223240 # shellcheck disable=SC1091
224- bash " $SCRIPT_DIR /gpu_installer.sh"
225- echo " $S_VALID GPU drivers installed"
226-
227- # Verify OpenCL setup after installation
228- # verify_opencl_setup
241+ if bash " $SCRIPT_DIR /gpu_installer.sh" ; then
242+ echo " $S_VALID GPU drivers installed successfully"
243+
244+ # Verify OpenCL setup after installation
245+ # verify_opencl_setup
246+ return 0
247+ else
248+ echo " $S_ERROR GPU driver installation failed"
249+ return 1
250+ fi
229251 else
230252 echo " $S_WARNING Skipping GPU driver installation - no GPU devices detected"
253+ echo " This is normal for systems without dedicated or integrated GPUs"
254+ return 0 # Not an error condition
231255 fi
232256}
233257
@@ -333,6 +357,50 @@ verify_opencl_setup() {
333357 fi
334358}
335359
360+ # Platform detection variables
361+ PLATFORM_FAMILY=" "
362+ CPU_MODEL=" "
363+ IS_COREULTRA=false
364+
365+ # Detect platform information
366+ detect_platform () {
367+ echo " Detecting platform family..."
368+
369+ # Get CPU model
370+ CPU_MODEL=$( grep -m1 " model name" /proc/cpuinfo | cut -d: -f2 | sed ' s/^[ \t]*//' || echo " unknown" )
371+
372+ # Detect platform family using a case statement for better readability
373+ case " $CPU_MODEL " in
374+ * Ultra* )
375+ PLATFORM_FAMILY=" coreultra"
376+ IS_COREULTRA=true
377+ ;;
378+ * Xeon* )
379+ PLATFORM_FAMILY=" xeon"
380+ ;;
381+ * Atom* |* Core* N[0-9]* )
382+ PLATFORM_FAMILY=" atom"
383+ ;;
384+ * Core* )
385+ PLATFORM_FAMILY=" core"
386+ ;;
387+ * Processor* )
388+ PLATFORM_FAMILY=" processor"
389+ ;;
390+ * )
391+ PLATFORM_FAMILY=" unknown"
392+ ;;
393+ esac
394+
395+ echo " CPU Model: $CPU_MODEL "
396+ echo " Platform Family: $PLATFORM_FAMILY "
397+ }
398+
399+ # Check if Core Ultra platform
400+ is_coreultra () {
401+ [ " $IS_COREULTRA " = true ]
402+ }
403+
336404install_openvino (){
337405 echo " "
338406 echo " ========================================================================"
@@ -419,48 +487,54 @@ main() {
419487 install_build_essentials
420488 echo " "
421489
422- # 3. Load platform detection
423- # shellcheck disable=SC1091
424- source " $SCRIPT_DIR /platform_detection.sh"
425-
426- # 4. Detect platform and OS
427- echo " # Detecting platform and OS..."
490+ # 3. Detect platform
491+ echo " # Detecting platform..."
428492 detect_platform
429- detect_os
430493 echo " "
431494
432495 # 5. Platform Installation Flow
433496 echo " # Platform Installation Flow..."
434497 echo " $S_VALID Platform detected: $CPU_MODEL "
435498
436499 # Determine platform family and execute appropriate flow
437- if is_xeon; then
438- echo " # Xeon platform detected"
439- echo " $S_ERROR Setup skipped for Xeon platforms"
440- echo " Please follow Ubuntu 24.04 Server installation guide:"
441- echo " https://ubuntu.com/download/server"
442- echo " For Xeon-specific optimizations, consult Intel documentation"
500+ if is_coreultra; then
501+ echo " "
502+ echo " ========================================================================"
503+ echo " # CORE ULTRA PLATFORM INSTALLATION"
504+ echo " ========================================================================"
505+ echo " Platform: Core Ultra CPU"
506+ echo " Components: GPU Drivers + NPU Drivers + OpenVINO"
507+ echo " NPU Support: Available and will be installed"
508+ echo " "
443509
444- elif is_coreultra; then
445- echo " # Core Ultra platform detected"
446- install_gpu_drivers # Will check for Arc GPU presence first
447- install_npu_drivers
510+ # Install GPU drivers (will check for GPU presence)
511+ install_gpu_drivers || echo " $S_WARNING GPU driver installation had issues"
512+
513+ # Install NPU drivers (Core Ultra only)
514+ install_npu_drivers || echo " $S_WARNING NPU driver installation had issues"
448515
449516 # Install OpenVINO with error handling
450517 if ! install_openvino; then
451518 echo " $S_ERROR Core Ultra platform setup incomplete due to OpenVINO installation failure"
452- echo " NPU and GPU drivers were installed successfully"
453519 echo " You may retry OpenVINO installation manually: bash $SCRIPT_DIR /openvino_installer.sh"
454520 fi
455521
456522 else
457- echo " # Atom/Core platform detected"
458- install_gpu_drivers # Will check for Arc GPU presence first
523+ echo " "
524+ echo " ========================================================================"
525+ echo " # STANDARD INTEL PLATFORM INSTALLATION"
526+ echo " ========================================================================"
527+ echo " Platform: $CPU_MODEL (Xeon/Atom/Core)"
528+ echo " Components: GPU Drivers (if GPU present) + OpenVINO"
529+ echo " NPU Support: Not available (Core Ultra only)"
530+ echo " "
531+
532+ # Install GPU drivers (will check for GPU presence)
533+ install_gpu_drivers || echo " $S_WARNING GPU driver installation had issues"
459534
460535 # Install OpenVINO with error handling
461536 if ! install_openvino; then
462- echo " $S_ERROR Atom/Core platform setup incomplete due to OpenVINO installation failure"
463- echo " GPU drivers were installed successfully (if Arc GPU was present)"
537+ echo " $S_ERROR Platform setup incomplete due to OpenVINO installation failure"
464538 echo " You may retry OpenVINO installation manually: bash $SCRIPT_DIR /openvino_installer.sh"
465539 fi
466540 fi
0 commit comments